Commit ee66c680 authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 76083e8a 8c60a0ca
...@@ -13,7 +13,10 @@ public enum KGName { ...@@ -13,7 +13,10 @@ public enum KGName {
GCK("高测控","gck"), GCK("高测控","gck"),
CK("测控","ck"), CK("测控","ck"),
MXDZ("母线PT刀闸","mxdc"), MXDZ("母线PT刀闸","mxdc"),
BTCK("本体测控","btck"); BTCK("本体测控","btck"),
QGYX("前光Ⅰ线", "qgyx"),
QGEX("前光Ⅱ线", "qgex"),
YZYB("Ⅰ母PT", "yzyb");
......
...@@ -46,4 +46,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -46,4 +46,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
@Param("sort") String sort); @Param("sort") String sort);
List<Map<String, String>> getBoosterStationInfo2(@Param("gatewayId") String boosterGatewayId); List<Map<String, String>> getBoosterStationInfo2(@Param("gatewayId") String boosterGatewayId);
List<Map<String, String>> getBoosterStationInfoNormal(@Param("gatewayId") String boosterGatewayId);
} }
...@@ -188,4 +188,19 @@ ...@@ -188,4 +188,19 @@
limit 1 limit 1
</select> </select>
<select id="getBoosterStationInfoNormal" resultType="java.util.Map">
select
`sequence_nbr` as id,
`gateway_id` as gatewayId,
`booster_name` as text,
booster_name as boosterName,
`booster_code` as boosterCode,
`sort` as value
from booster_station_info
<where>
<if test="gatewayId != null and gatewayId != ''">
AND gateway_id = #{gatewayId}
</if>
</where>
</select>
</mapper> </mapper>
...@@ -453,16 +453,13 @@ public class MonitorFanIdxController extends BaseController { ...@@ -453,16 +453,13 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "升压站主屏消息接口") @ApiOperation(value = "升压站主屏消息接口")
@GetMapping("/getMajorAnalogQuantityByPage") @GetMapping("/getMajorAnalogQuantityByPage")
public ResponseModel getMajorAnalogQuantityByPage() { public ResponseModel getMajorAnalogQuantityByPage(@RequestParam (required = false) String stationId) {
LambdaQueryWrapper<StationBasic> wrapper = new LambdaQueryWrapper<>(); StationBasic stationBasic = stationBasicMapper.selectById(stationId);
List<StationBasic> stationBasics = stationBasicMapper.selectList(wrapper); String gatewayId = stationBasic.getBoosterGatewayId();
for (StationBasic stationBasic : stationBasics) { if ("夏造风电站".equals(stationBasic.getStationName())) {
String gatewayId = stationBasic.getBoosterGatewayId(); monitorFanIndicator.getMajorAnalogQuantityByPage(gatewayId, stationBasic.getSequenceNbr().toString());
if ("夏造风电站".equals(stationBasic.getStationName())) { } else if ("泰和前进光伏站".equals(stationBasic.getStationName())) {
monitorFanIndicator.getMajorAnalogQuantityByPage(gatewayId, stationBasic.getSequenceNbr().toString()); monitorFanIndicator.getMajorAnalogQuantityByPageByTHGF(gatewayId, stationBasic.getSequenceNbr().toString());
} else if ("泰和前进光伏站".equals(stationBasic.getStationName())) {
monitorFanIndicator.getMajorAnalogQuantityByPageByTHGF(gatewayId, stationBasic.getSequenceNbr().toString());
}
} }
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
......
...@@ -893,12 +893,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -893,12 +893,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public List<Map<String, String>> getBoosterStationInfo(String stationId) { public List<Map<String, String>> getBoosterStationInfo(String stationId) {
StationBasic stationBasic = getOneByStationNumber(stationId); StationBasic stationBasic = getOneByStationNumber(stationId);
List<Map<String, String>> boosterStationInfo = monitorFanIndicatorregionMapper.getBoosterStationInfo2(stationBasic.getBoosterGatewayId()); List<Map<String, String>> boosterStationInfo = new ArrayList<>();
// List<Map<String, String>> value = boosterStationInfo.stream().filter(item -> !"2".equals(item.get("value"))).collect(Collectors.toList()); if ("夏造风电站".equals(stationBasic.getStationName())) {
// HashMap<String, String> stringStringHashMap = new HashMap<>(); boosterStationInfo = monitorFanIndicatorregionMapper.getBoosterStationInfo2(stationBasic.getBoosterGatewayId());
// stringStringHashMap.put(); } else {
boosterStationInfo = monitorFanIndicatorregionMapper.getBoosterStationInfoNormal(stationBasic.getBoosterGatewayId());
}
return boosterStationInfo; return boosterStationInfo;
} }
...@@ -1191,7 +1191,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1191,7 +1191,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public void getMajorAnalogQuantityByPageByTHGF(String gatewayId, String stationId) { public void getMajorAnalogQuantityByPageByTHGF(String gatewayId, String stationId) {
if (StringUtils.isNotEmpty(gatewayId)) { if (StringUtils.isNotEmpty(gatewayId)) {
// 10kVⅡ段母线数据 // 10kVⅡ段母线数据
String xianSql = String.format("SELECT equipmentIndexName, value, frontModule, unit, displayName FROM \"indicators_%s\" WHERE systemType = '模拟量' and frontModule = '10kVⅡ段母线'", gatewayId); String xianSql = String.format("SELECT equipmentIndexName, value, frontModule, unit, displayName FROM \"indicators_%s\" WHERE systemType = '模拟量' and frontModule = '35kVⅠ母PT'", gatewayId);
List<IndicatorsDto> xianData = influxDButils.getListData(xianSql, IndicatorsDto.class); List<IndicatorsDto> xianData = influxDButils.getListData(xianSql, IndicatorsDto.class);
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
xianData.forEach(item -> resultMap.put(item.getDisplayName(), item.getValue())); xianData.forEach(item -> resultMap.put(item.getDisplayName(), item.getValue()));
...@@ -1282,13 +1282,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1282,13 +1282,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public Map<String, Object> getSwitchUrl(String gatewayId,String equipName ){ public Map<String, Object> getSwitchUrl(String gatewayId,String equipName ){
String sql = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType = '开关'" + " and displayName =~/合位$/"; String sql = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType =~/开关/" + " and displayName =~/合位$/";
String sql1 = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType = '开关'" + " and displayName =~/远方就地开关$/"; String sql1 = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType =~/开关/" + " and displayName =~/远方就地开关$/";
String sql2 = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType = '开关'" + " and displayName =~/接地刀位置$/"; String sql2 = "SELECT * FROM indicators_" + gatewayId + " WHERE systemType =~/开关/" + " and displayName =~/接地刀位置$/";
if (StringUtils.isNotEmpty(equipName)) { if (StringUtils.isNotEmpty(equipName)) {
sql = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType = '开关' and frontModule =~ /"+equipName+"/ and displayName =~/合位$/"; sql = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType =~/开关/ and frontModule =~ /"+equipName+"/ and displayName =~/合位$/";
sql1 = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType = '开关' and frontModule =~ /"+equipName+"/ and displayName =~/远方就地开关$/"; sql1 = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType =~/开关/ and frontModule =~ /"+equipName+"/ and displayName =~/远方就地开关$/";
sql2 = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType = '开关' and frontModule =~ /"+equipName+"/ and displayName =~/接地刀位置$/"; sql2 = "SELECT * FROM indicators_"+gatewayId+" WHERE systemType =~/开关/ and frontModule =~ /"+equipName+"/ and displayName =~/接地刀位置$/";
} }
List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class); List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class);
List<IndicatorsDto> listDatas = influxDButils.getListData(sql1, IndicatorsDto.class); List<IndicatorsDto> listDatas = influxDButils.getListData(sql1, IndicatorsDto.class);
...@@ -1309,7 +1309,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1309,7 +1309,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for (IndicatorsDto data : listDatas) { for (IndicatorsDto data : listDatas) {
String url = ""; String url = "";
String[] urls = data.getPictureName().split(","); String[] urls = data.getPictureName().split(",");
if (data.getValue().equals("true")){ if (StringUtils.isNotEmpty(data.getValue()) && data.getValue().equals("true")){
url =pictureUrl+urls[0]; url =pictureUrl+urls[0];
}else { }else {
url =pictureUrl+ urls[1];; url =pictureUrl+ urls[1];;
......
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