奥体项目设备实时数据,模拟量实时数据接口开发
正在显示
10 个修改的文件
包含
230 行增加
和
6 行删除
... | @@ -32,7 +32,6 @@ | ... | @@ -32,7 +32,6 @@ |
32 | <orderEntry type="library" name="Maven: cn.jpush.api:jpush-client:3.4.8" level="project" /> | 32 | <orderEntry type="library" name="Maven: cn.jpush.api:jpush-client:3.4.8" level="project" /> |
33 | <orderEntry type="library" name="Maven: cn.jpush.api:jiguang-common:1.1.10" level="project" /> | 33 | <orderEntry type="library" name="Maven: cn.jpush.api:jiguang-common:1.1.10" level="project" /> |
34 | <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.33.Final" level="project" /> | 34 | <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.33.Final" level="project" /> |
35 | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" /> | ||
36 | <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.60" level="project" /> | 35 | <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.60" level="project" /> |
37 | <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.60" level="project" /> | 36 | <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.60" level="project" /> |
38 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE" level="project" /> | 37 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE" level="project" /> |
... | @@ -96,6 +95,40 @@ | ... | @@ -96,6 +95,40 @@ |
96 | <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.3" level="project" /> | 95 | <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.3" level="project" /> |
97 | <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" /> | 96 | <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" /> |
98 | <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" /> | 97 | <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" /> |
98 | <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-miniapp:3.3.0" level="project" /> | ||
99 | <orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.3.0" level="project" /> | ||
100 | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.7" level="project" /> | ||
101 | <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" /> | ||
102 | <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.0.0" level="project" /> | ||
103 | <orderEntry type="library" name="Maven: jaxen:jaxen:1.1.6" level="project" /> | ||
104 | <orderEntry type="library" name="Maven: com.github.binarywang:java-emoji-converter:1.0.1" level="project" /> | ||
105 | <orderEntry type="library" name="Maven: com.vdurmont:emoji-java:5.1.1" level="project" /> | ||
106 | <orderEntry type="library" name="Maven: org.json:json:20170516" level="project" /> | ||
107 | <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.12" level="project" /> | ||
108 | <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" /> | ||
109 | <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" /> | ||
110 | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> | ||
111 | <orderEntry type="library" name="Maven: org.jodd:jodd-http:5.1.4" level="project" /> | ||
112 | <orderEntry type="library" name="Maven: org.jodd:jodd-core:5.1.4" level="project" /> | ||
113 | <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> | ||
114 | <orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" /> | ||
115 | <orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" /> | ||
116 | <orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" /> | ||
117 | <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> | ||
118 | <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" /> | ||
119 | <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" /> | ||
120 | <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" /> | ||
121 | <orderEntry type="library" name="Maven: joda-time:joda-time:2.10.1" level="project" /> | ||
122 | <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java:0.2.7" level="project" /> | ||
123 | <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java-core:0.2.7" level="project" /> | ||
124 | <orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:4.10.0" level="project" /> | ||
125 | <orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okio:okio-jvm:3.0.0" level="project" /> | ||
126 | <orderEntry type="library" scope="RUNTIME" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71" level="project" /> | ||
127 | <orderEntry type="library" scope="RUNTIME" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71" level="project" /> | ||
128 | <orderEntry type="library" scope="RUNTIME" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31" level="project" /> | ||
129 | <orderEntry type="library" scope="RUNTIME" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" /> | ||
130 | <orderEntry type="library" scope="RUNTIME" name="Maven: org.jetbrains:annotations:13.0" level="project" /> | ||
131 | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" /> | ||
99 | <orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" /> | 132 | <orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" /> |
100 | <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> | 133 | <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
101 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.1.3.RELEASE" level="project" /> | 134 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.1.3.RELEASE" level="project" /> |
... | @@ -115,11 +148,10 @@ | ... | @@ -115,11 +148,10 @@ |
115 | <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.5.RELEASE" level="project" /> | 148 | <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.5.RELEASE" level="project" /> |
116 | <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.17" level="project" /> | 149 | <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.17" level="project" /> |
117 | <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.17" level="project" /> | 150 | <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.17" level="project" /> |
118 | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> | ||
119 | <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:2.5.4" level="project" /> | 151 | <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:2.5.4" level="project" /> |
120 | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.56" level="project" /> | 152 | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.56" level="project" /> |
121 | <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" /> | 153 | <orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" /> |
122 | <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" /> | 154 | <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.16" level="project" /> |
123 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-quartz:2.1.3.RELEASE" level="project" /> | 155 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-quartz:2.1.3.RELEASE" level="project" /> |
124 | <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.5.RELEASE" level="project" /> | 156 | <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.5.RELEASE" level="project" /> |
125 | <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.0" level="project" /> | 157 | <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.0" level="project" /> |
... | @@ -146,7 +178,6 @@ | ... | @@ -146,7 +178,6 @@ |
146 | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> | 178 | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> |
147 | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> | 179 | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> |
148 | <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> | 180 | <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> |
149 | <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" /> | ||
150 | <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" /> | 181 | <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" /> |
151 | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> | 182 | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
152 | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> | 183 | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
... | @@ -184,7 +215,6 @@ | ... | @@ -184,7 +215,6 @@ |
184 | <orderEntry type="library" name="Maven: xerces:xercesImpl:2.9.1" level="project" /> | 215 | <orderEntry type="library" name="Maven: xerces:xercesImpl:2.9.1" level="project" /> |
185 | <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" /> | 216 | <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" /> |
186 | <orderEntry type="library" name="Maven: org.apache.poi:poi-scratchpad:3.9" level="project" /> | 217 | <orderEntry type="library" name="Maven: org.apache.poi:poi-scratchpad:3.9" level="project" /> |
187 | <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> | ||
188 | <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.5.11" level="project" /> | 218 | <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.5.11" level="project" /> |
189 | <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.0.0" level="project" /> | 219 | <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.0.0" level="project" /> |
190 | <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:3.2.3" level="project" /> | 220 | <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:3.2.3" level="project" /> | ... | ... |
... | @@ -315,4 +315,28 @@ public class OlympicCenterController { | ... | @@ -315,4 +315,28 @@ public class OlympicCenterController { |
315 | result.setSuccess(true); | 315 | result.setSuccess(true); |
316 | return result; | 316 | return result; |
317 | } | 317 | } |
318 | |||
319 | @ApiOperation(value="获取新锅炉房设备实时数据", notes="获取新锅炉房设备实时数据") | ||
320 | @GetMapping(value = "/getNewBoilerEquipRealTimeReport") | ||
321 | public Result<List<Map<String,Object>>> getNewBoilerRealTimeReport(String sourceType){ | ||
322 | Result<List<Map<String,Object>>> result = new Result<List<Map<String,Object>>>(); | ||
323 | List<Map<String,Object>> list = new ArrayList<>(); | ||
324 | list = olympicCenterService.getNewBoilerRealTimeReport(sourceType); | ||
325 | result.setResult(list); | ||
326 | result.setSuccess(true); | ||
327 | return result; | ||
328 | } | ||
329 | |||
330 | @ApiOperation(value="获取新锅炉房模拟量实时数据", notes="获取新锅炉房模拟量实时数据") | ||
331 | @GetMapping(value = "/getNewBoilerRealDataReport") | ||
332 | public Result<List<TableResult>> getNewBoilerRealDataReport(InputQueryParams inputQueryParams){ | ||
333 | Result<List<TableResult>> result = new Result<List<TableResult>>(); | ||
334 | List<TableResult> list = new ArrayList<>(); | ||
335 | if(inputQueryParams.getSourceType()!=null&&inputQueryParams.getPipeDn()!=null){ | ||
336 | list = olympicCenterService.getNewBoilerRealDataReport(inputQueryParams.getSourceType(),inputQueryParams.getPipeDn()); | ||
337 | } | ||
338 | result.setResult(list); | ||
339 | result.setSuccess(true); | ||
340 | return result; | ||
341 | } | ||
318 | } | 342 | } | ... | ... |
... | @@ -30,8 +30,11 @@ public class WhatStructData { | ... | @@ -30,8 +30,11 @@ public class WhatStructData { |
30 | @ApiModelProperty(value = "设备编码") | 30 | @ApiModelProperty(value = "设备编码") |
31 | private String equipCode; | 31 | private String equipCode; |
32 | /**设备类型*/ | 32 | /**设备类型*/ |
33 | @ApiModelProperty(value = "设备类型") | 33 | @ApiModelProperty(value = "设备类型") |
34 | private String equipType; | 34 | private String equipType; |
35 | /**设备管径*/ | ||
36 | @ApiModelProperty(value = "设备管径") | ||
37 | private String equipDiameter; | ||
35 | /**所属系统*/ | 38 | /**所属系统*/ |
36 | @ApiModelProperty(value = "所属系统") | 39 | @ApiModelProperty(value = "所属系统") |
37 | private String systemCode; | 40 | private String systemCode; |
... | @@ -44,6 +47,9 @@ public class WhatStructData { | ... | @@ -44,6 +47,9 @@ public class WhatStructData { |
44 | /**点类型*/ | 47 | /**点类型*/ |
45 | @ApiModelProperty(value = "点类型") | 48 | @ApiModelProperty(value = "点类型") |
46 | private String monitorType; | 49 | private String monitorType; |
50 | /**点实单位*/ | ||
51 | @ApiModelProperty(value = "点实单位") | ||
52 | private String monitorUnit; | ||
47 | /**点实时值*/ | 53 | /**点实时值*/ |
48 | @ApiModelProperty(value = "点实时值") | 54 | @ApiModelProperty(value = "点实时值") |
49 | private String monitorValue; | 55 | private String monitorValue; | ... | ... |
... | @@ -33,4 +33,8 @@ public interface WhatStructDataMapper { | ... | @@ -33,4 +33,8 @@ public interface WhatStructDataMapper { |
33 | List<WhatStructData> getEquipDataListBySource(@Param("sourceType") String sourceType); | 33 | List<WhatStructData> getEquipDataListBySource(@Param("sourceType") String sourceType); |
34 | 34 | ||
35 | List<WhatStructData> getSumEquipListBySource(@Param("sourceType") String sourceType); | 35 | List<WhatStructData> getSumEquipListBySource(@Param("sourceType") String sourceType); |
36 | |||
37 | List<WhatStructData> getEquipDataListOfNewBoiler(@Param("sourceType") String sourceType); | ||
38 | |||
39 | List<WhatStructData> getRealTimeDataOfNewBoiler(@Param("sourceType") String sourceType, @Param("pipeDn") String pipeDn); | ||
36 | } | 40 | } | ... | ... |
... | @@ -74,4 +74,26 @@ | ... | @@ -74,4 +74,26 @@ |
74 | AND is_sum = 1 | 74 | AND is_sum = 1 |
75 | </select> | 75 | </select> |
76 | 76 | ||
77 | <select id="getEquipDataListOfNewBoiler" resultType="com.skua.modules.business.entity.WhatStructData"> | ||
78 | SELECT | ||
79 | * | ||
80 | FROM | ||
81 | what_struct_data_xglf | ||
82 | WHERE | ||
83 | pump_code = #{sourceType} | ||
84 | AND equip_type = 'equip_status' | ||
85 | OR equip_type = 'equip_time' | ||
86 | </select> | ||
87 | |||
88 | <select id="getRealTimeDataOfNewBoiler" resultType="com.skua.modules.business.entity.WhatStructData"> | ||
89 | SELECT | ||
90 | * | ||
91 | FROM | ||
92 | what_struct_data_xglf | ||
93 | WHERE | ||
94 | pump_code = #{sourceType} | ||
95 | AND equip_diameter = #{pipeDn} | ||
96 | AND equip_type = 'other' | ||
97 | </select> | ||
98 | |||
77 | </mapper> | 99 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -60,4 +60,8 @@ public interface IOlympicCenterService { | ... | @@ -60,4 +60,8 @@ public interface IOlympicCenterService { |
60 | Map<String, Object> getYearSumFlowGroup(SumFlowParams sumFlowParams); | 60 | Map<String, Object> getYearSumFlowGroup(SumFlowParams sumFlowParams); |
61 | 61 | ||
62 | WhatStructData getFieldNameById(String equipId); | 62 | WhatStructData getFieldNameById(String equipId); |
63 | |||
64 | List<Map<String,Object>> getNewBoilerRealTimeReport(String sourceType); | ||
65 | |||
66 | List<TableResult> getNewBoilerRealDataReport(String sourceType,String pipeDn); | ||
63 | } | 67 | } | ... | ... |
... | @@ -1939,6 +1939,33 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { | ... | @@ -1939,6 +1939,33 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { |
1939 | return status; | 1939 | return status; |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | private String getStatusNew2(Map<String, Object> map, List<Map<String, Object>> list, String pumpId) { | ||
1943 | String status = "停止"; | ||
1944 | String gzName = pumpId+"_FLT"; | ||
1945 | String yxName = pumpId+"_RUN"; | ||
1946 | boolean gzFlag = false; | ||
1947 | for (Map<String, Object> bean : list) { | ||
1948 | if(gzName.equals(bean.get("id"))){ | ||
1949 | if("1".equals(map.get(bean.get("monitorid").toString()))){ | ||
1950 | status = "故障"; | ||
1951 | gzFlag = true; | ||
1952 | } | ||
1953 | } | ||
1954 | if(!gzFlag){ | ||
1955 | if(yxName.equals(bean.get("id"))){ | ||
1956 | if("1".equals(map.get(bean.get("monitorid").toString()))){ | ||
1957 | status = "运行"; | ||
1958 | }else{ | ||
1959 | status = "停止"; | ||
1960 | } | ||
1961 | }else{ | ||
1962 | status = "停止"; | ||
1963 | } | ||
1964 | } | ||
1965 | } | ||
1966 | return status; | ||
1967 | } | ||
1968 | |||
1942 | private List<Map<String, Object>> getMnData(){ | 1969 | private List<Map<String, Object>> getMnData(){ |
1943 | List<Map<String, Object>> list = new ArrayList<>(); | 1970 | List<Map<String, Object>> list = new ArrayList<>(); |
1944 | Map<String, Object> flowMap = new HashMap<>(); | 1971 | Map<String, Object> flowMap = new HashMap<>(); |
... | @@ -2853,6 +2880,94 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { | ... | @@ -2853,6 +2880,94 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { |
2853 | return whatStructData; | 2880 | return whatStructData; |
2854 | } | 2881 | } |
2855 | 2882 | ||
2883 | @Override | ||
2884 | public List<Map<String,Object>> getNewBoilerRealTimeReport(String sourceType) { | ||
2885 | List<Map<String, Object>> list = new ArrayList<>(); | ||
2886 | List<WhatStructData> timeList = new ArrayList<>(); | ||
2887 | List<WhatStructData> equipList = new ArrayList<>(); | ||
2888 | String pgField = ""; | ||
2889 | equipList = whatStructDataMapper.getEquipDataListOfNewBoiler(sourceType); | ||
2890 | if(equipList.size()==0){ | ||
2891 | return null; | ||
2892 | } | ||
2893 | for (WhatStructData whatStructData : equipList) { | ||
2894 | pgField = pgField + "," + whatStructData.getMonitorId(); | ||
2895 | if("equip_time".equals(whatStructData.getEquipType())){ | ||
2896 | timeList.add(whatStructData); | ||
2897 | } | ||
2898 | } | ||
2899 | Map<String, Object> monitorMap = new HashMap<>(); | ||
2900 | List<Map<String, Object>> monitorList = fmPgQueryService.queryFactoryMonitorFromRealTimeData(AT_ID,pgField); | ||
2901 | if(monitorList.size()==1){ | ||
2902 | monitorMap = monitorList.get(0); | ||
2903 | } | ||
2904 | for (WhatStructData whatStructData:timeList) { | ||
2905 | List<Map<String, Object>> list1 = new ArrayList<>(); | ||
2906 | Map<String, Object> map = new HashMap<>(); | ||
2907 | map.put("id",whatStructData.getEquipCode()); | ||
2908 | map.put("name",whatStructData.getMonitorName()); | ||
2909 | String equipCode = whatStructData.getEquipCode(); | ||
2910 | for (WhatStructData whatStructData1 : equipList) { | ||
2911 | if(equipCode.equals(whatStructData1.getEquipCode())){ | ||
2912 | Map<String, Object> statusMap = new HashMap<>(); | ||
2913 | statusMap.put("id",whatStructData1.getId()); | ||
2914 | statusMap.put("name",whatStructData1.getMonitorName()); | ||
2915 | if(whatStructData1.getMonitorId()!=null){ | ||
2916 | statusMap.put("monitorid",whatStructData1.getMonitorId()); | ||
2917 | }else{ | ||
2918 | statusMap.put("monitorid",""); | ||
2919 | } | ||
2920 | list1.add(statusMap); | ||
2921 | } | ||
2922 | } | ||
2923 | map.put("status", getStatusNew2(monitorMap,list1,equipCode)); | ||
2924 | map.put("signal","--"); | ||
2925 | if(whatStructData.getMonitorId()!=null){ | ||
2926 | if(monitorMap.get(whatStructData.getMonitorId())!=null){ | ||
2927 | map.put("runtime",monitorMap.get(whatStructData.getMonitorId())); | ||
2928 | }else{ | ||
2929 | map.put("runtime", "--"); | ||
2930 | } | ||
2931 | }else{ | ||
2932 | map.put("runtime","--"); | ||
2933 | } | ||
2934 | list.add(map); | ||
2935 | } | ||
2936 | return list; | ||
2937 | } | ||
2938 | |||
2939 | @Override | ||
2940 | public List<TableResult> getNewBoilerRealDataReport(String sourceType,String pipeDn) { | ||
2941 | List<TableResult> list = new LinkedList<>(); | ||
2942 | List<WhatStructData> dataList = new LinkedList<>(); | ||
2943 | String pgField = ""; | ||
2944 | dataList = whatStructDataMapper.getRealTimeDataOfNewBoiler(sourceType, pipeDn); | ||
2945 | if(dataList.size()==0){ | ||
2946 | return null; | ||
2947 | } | ||
2948 | for (WhatStructData whatStructData : dataList) { | ||
2949 | pgField = pgField + "," + whatStructData.getMonitorId(); | ||
2950 | } | ||
2951 | Map<String, Object> monitorMap = new HashMap<>(); | ||
2952 | List<Map<String, Object>> monitorList = fmPgQueryService.queryFactoryMonitorFromRealTimeData(AT_ID,pgField); | ||
2953 | if(monitorList.size()==1){ | ||
2954 | monitorMap = monitorList.get(0); | ||
2955 | } | ||
2956 | for (WhatStructData whatStructData : dataList) { | ||
2957 | TableResult tableResult = new TableResult(); | ||
2958 | tableResult.setId(whatStructData.getId()); | ||
2959 | tableResult.setName(whatStructData.getMonitorName()); | ||
2960 | tableResult.setUnit(whatStructData.getMonitorUnit()); | ||
2961 | if(monitorMap.get(whatStructData.getMonitorId())!=null){ | ||
2962 | tableResult.setCount(monitorMap.get(whatStructData.getMonitorId()).toString()); | ||
2963 | }else{ | ||
2964 | tableResult.setCount("--"); | ||
2965 | } | ||
2966 | list.add(tableResult); | ||
2967 | } | ||
2968 | return list; | ||
2969 | } | ||
2970 | |||
2856 | //遍历两个年份之间的年份 | 2971 | //遍历两个年份之间的年份 |
2857 | private static String[] getYearsArray(String startYear, String endYear) { | 2972 | private static String[] getYearsArray(String startYear, String endYear) { |
2858 | int length = Integer.parseInt(endYear) - Integer.parseInt(startYear) + 1; | 2973 | int length = Integer.parseInt(endYear) - Integer.parseInt(startYear) + 1; | ... | ... |
... | @@ -20,4 +20,6 @@ public class InputQueryParams { | ... | @@ -20,4 +20,6 @@ public class InputQueryParams { |
20 | private String start; | 20 | private String start; |
21 | /**结束时间 yyyy-MM-DD*/ | 21 | /**结束时间 yyyy-MM-DD*/ |
22 | private String end; | 22 | private String end; |
23 | /**设备管径 DN350,DN250*/ | ||
24 | private String pipeDn; | ||
23 | } | 25 | } | ... | ... |
-
请 注册 或 登录 后发表评论