Commit 9d894db5 authored by tangwei's avatar tangwei

解决冲突

parents 8eab645d f0f9173f
...@@ -196,7 +196,7 @@ public class BigScreenAnalyseController extends BaseController { ...@@ -196,7 +196,7 @@ public class BigScreenAnalyseController extends BaseController {
public ResponseModel<Map<String, Object>> getHealthInfoByArea() throws Exception { public ResponseModel<Map<String, Object>> getHealthInfoByArea() throws Exception {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoByArea(); List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoByArea();
Map<String, Integer> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("area").toString(), t -> Integer.valueOf(t.get("healthIndex").toString()))); Map<String, Integer> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("area").toString(), t -> Integer.valueOf(t.get("healthIndex").toString().replace(".0", ""))));
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区"); // List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
......
...@@ -124,8 +124,8 @@ public class IdxBizFanPointProcessVariableClassificationController extends BaseC ...@@ -124,8 +124,8 @@ public class IdxBizFanPointProcessVariableClassificationController extends BaseC
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询") @ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/selectParams") @GetMapping(value = "/selectParams")
public ResponseModel<List<Map<String,Object>>> selectParams(String tableName,String column) { public ResponseModel<List<Map<String,Object>>> selectParams(String tableName,String column,@RequestParam(required = false) String isFx) {
return ResponseHelper.buildResponse(idxBizFanPointProcessVariableClassificationServiceImpl.selectParams(column,tableName)); return ResponseHelper.buildResponse(idxBizFanPointProcessVariableClassificationServiceImpl.selectParams(column,tableName,isFx));
} }
} }
...@@ -18,7 +18,7 @@ public interface IdxBizFanPointProcessVariableClassificationMapper extends BaseM ...@@ -18,7 +18,7 @@ public interface IdxBizFanPointProcessVariableClassificationMapper extends BaseM
List<IdxBizFanPointProcessVariableClassificationDto> getInfluxDBData(); List<IdxBizFanPointProcessVariableClassificationDto> getInfluxDBData();
List<Map<String,Object>> selectParams(String tableName,String column); List<Map<String,Object>> selectParams(String tableName,String column,String isFx);
List<String> gateWayIdListFan(); List<String> gateWayIdListFan();
} }
...@@ -34,9 +34,9 @@ public class IdxBizFanPointProcessVariableClassificationServiceImpl extends Base ...@@ -34,9 +34,9 @@ public class IdxBizFanPointProcessVariableClassificationServiceImpl extends Base
return this.queryForList("" , false); return this.queryForList("" , false);
} }
public List<Map<String,Object>> selectParams(String column, String tableName) { public List<Map<String,Object>> selectParams(String column, String tableName,String isFx) {
return this.getBaseMapper(). selectParams(tableName,column); return this.getBaseMapper(). selectParams(tableName,column,isFx);
} }
} }
\ No newline at end of file
...@@ -93,6 +93,9 @@ ...@@ -93,6 +93,9 @@
select ${column} as text from ${tableName} select ${column} as text from ${tableName}
where ${column} is not null and ${column} != '' where ${column} is not null and ${column} != ''
<if test="isFx != '' and is Fx != null">
and TAG_CODE = '分析变量'
</if>
group by ${column}; group by ${column};
</select> </select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipDic;
public interface EquipDicMapper extends BaseMapper<EquipDic> {
}
...@@ -27,7 +27,7 @@ public class MasterDbConfig { ...@@ -27,7 +27,7 @@ public class MasterDbConfig {
private Logger logger = LoggerFactory.getLogger(MasterDbConfig.class); private Logger logger = LoggerFactory.getLogger(MasterDbConfig.class);
// 精确到 master 目录,以便跟其他数据源隔离 // 精确到 master 目录,以便跟其他数据源隔离
private static final String MAPPER_LOCATION = "classpath*:mapper/*.xml"; private static final String MAPPER_LOCATION = "classpath*:mapper/master/*.xml";
@Value("${spring.db1.datasource.url}") @Value("${spring.db1.datasource.url}")
private String dbUrl; private String dbUrl;
......
package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@TableName("monitor_equip_dic")
public class EquipDic {
@TableId(value = "sequence_nbr", type = IdType.ID_WORKER)
private Long sequenceNumber;
@TableField("value")
Double value;
@TableField("desc")
String desc;
}
package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
@Data
@Accessors(chain = true)
@TableName("equip_alarm_event")
public class EquipDivergenceAlarmEvent {
@TableField("created_time")
private Long createdTime;
@TableField("station_name")
private String stationName;
@TableField("station_id")
private String stationId;
@TableField("gateway_id")
private String gatewayId;
@TableField("equip_index")
private String equipIndex;
@TableField("event_desc")
private String eventDesc;
@TableField("equip_name")
private String equipName;
/**
* 分类 逆变器、箱变、汇流箱
*/
@TableField("front_module")
private String frontModule;
@TableField("value")
private String value;
@TableField(exist = false)
private String time;
@TableField("alarm_group_name")
private String alarmGroupName;
}
package com.yeejoin.amos.boot.module.jxiop.biz.scheduled;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl;
@EnableScheduling
public class EquipWarnSchedule {
@Autowired
private MonitorFanIndicatorImpl monitorFanIndicatorImpl;
@Scheduled(cron = "${equip.warn.cron}")
private void doEquipDivergencWarn() {
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdmapper;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.EquipAlarmEventDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipAlarmEvent;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipDivergenceAlarmEvent;
public interface EquipDivergenceAlarmEventMapper extends BaseMapper<EquipDivergenceAlarmEvent> {
void save(List<EquipDivergenceAlarmEvent> list);
List<EquipDivergenceAlarmEvent> getEventList(String gatewayId, String equipName, String frontModule, Date time);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.EquipDicMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.EquipDivergenceAlarmEventMapper">
<select id="getEventList" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipDivergenceAlarmEvent">
SELECT
*
FROM
equip_divergence_alarm_event
<where>
<if test="gatewayId != null and gatewayId != ''">
AND gateway_id = #{gatewayId}
</if>
<if test="equipName!= null and equipName != ''">
AND equip_name LIKE #{equipName}
</if>
<if test="frontModule!= null and frontModule != ''">
AND front_module = #{frontModule}
</if>
AND #{time} &lt;= created_time
</where>
ORDER BY created_time DESC
</select>
<insert id="save">
INSERT INTO
equip_divergence_alarm_event(created_time,staion_name,staion_id,gateway_id,equip_index,event_desc,equip_name,front_module,value,alarm_group_name)
VALUES
<foreach collection="list" item="item" separator=",">
(NOW(),#{item.stationName},#{item.stationId},#{item.gatewayId},#{item.equipIndex},'#{item.eventDesc}','#{item.equipName}',#{item.frontModule},'#{item.value}','#{item.alarmGroupName}')
</foreach>
</insert>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment