Commit c32fdc09 authored by Administrator's avatar Administrator

2023-04.04 降雨量统计判断修改 新增报警状态统计

parent 56555de0
...@@ -172,5 +172,6 @@ public class MpDataController { ...@@ -172,5 +172,6 @@ public class MpDataController {
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
mpDataService.download(response, dataQueryCriteria, request); mpDataService.download(response, dataQueryCriteria, request);
} }
} }
...@@ -133,7 +133,7 @@ public class RealDataController { ...@@ -133,7 +133,7 @@ public class RealDataController {
@GetMapping("dimensional") @GetMapping("dimensional")
public ResponseEntity<Object> dimensionalReal(HttpServletRequest request, String tailInfoNo) { public ResponseEntity<Object> dimensionalReal(HttpServletRequest request, String tailInfoNo) {
if (ObjectUtils.isEmpty(tailInfoNo)) { if (ObjectUtils.isEmpty(tailInfoNo)) {
return null; return new ResponseEntity<>(PageResult.failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
//创建返回对象 //创建返回对象
ArrayList<RealDataVo> realDataVos = new ArrayList<>(); ArrayList<RealDataVo> realDataVos = new ArrayList<>();
...@@ -150,39 +150,39 @@ public class RealDataController { ...@@ -150,39 +150,39 @@ public class RealDataController {
for (SysType sysType : list) { for (SysType sysType : list) {
switch (sysType.getCode()) { switch (sysType.getCode()) {
case "1": case "1":
List<RealDataVo> dbdatas = dbDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> dbdatas = dbDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(dbdatas); realDataVos.addAll(dbdatas);
break; break;
case "2": case "2":
List<RealDataVo> wtdatas = wtDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> wtdatas = wtDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(wtdatas); realDataVos.addAll(wtdatas);
break; break;
case "3": case "3":
List<RealDataVo> mpdatas = mpDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> mpdatas = mpDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(mpdatas); realDataVos.addAll(mpdatas);
break; break;
case "4": case "4":
List<RealDataVo> dmdatas = dmDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> dmdatas = dmDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(dmdatas); realDataVos.addAll(dmdatas);
break; break;
case "5": case "5":
List<RealDataVo> stdatas = stDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> stdatas = stDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(stdatas); realDataVos.addAll(stdatas);
break; break;
case "6": case "6":
List<RealDataVo> rgdatas = rgDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> rgdatas = rgDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(rgdatas); realDataVos.addAll(rgdatas);
break; break;
case "7": case "7":
List<RealDataVo> psldatas = pslDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> psldatas = pslDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(psldatas); realDataVos.addAll(psldatas);
break; break;
case "9": case "9":
List<RealDataVo> sldatas = slDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> sldatas = slDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(sldatas); realDataVos.addAll(sldatas);
break; break;
case "16": case "16":
List<RealDataVo> wpbdatas = wpbDataService.real(sysType.getTypeno(), request,tailInfoNo); List<RealDataVo> wpbdatas = wpbDataService.real(sysType.getTypeno(), request, tailInfoNo);
realDataVos.addAll(wpbdatas); realDataVos.addAll(wpbdatas);
break; break;
} }
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
time &gt;= #{start} time &gt;= #{start}
AND time &lt;= #{end} AND time &lt;= #{end}
and sensorid=#{sensorid} and sensorid=#{sensorid}
and state = 0
GROUP BY GROUP BY
DATE_FORMAT( time, '%Y-%m-%d' ) DATE_FORMAT( time, '%Y-%m-%d' )
</select> </select>
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
SELECT COUNT(id) as unloin SELECT COUNT(id) as unloin
FROM tb_drybeachequipinfor FROM tb_drybeachequipinfor
where tailingid = #{tailingid} where tailingid = #{tailingid}
and (DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d and (DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d %H:%i:%s')
%H:%m:%s')
or datarealtime is Null) and equipname !='基准点' or datarealtime is Null) and equipname !='基准点'
</select> </select>
<update id="enforceOnline"> <update id="enforceOnline">
......
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