diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java new file mode 100644 index 0000000..2685c0a --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java @@ -0,0 +1,65 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.modular.system.service.GasFlowHomeService; +import com.casic.missiles.modular.system.service.IGasFlowDataService; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author cz + * @Date 2022-11-10 + */ +@RestController +@RequestMapping("/gas") +@AllArgsConstructor +public class GasFlowHomeController { + + private final GasFlowHomeService gasFlowHomeService; + + @ApiOperation("气体用气量统计") + @RequestMapping("/statistics/used") + public Object statisticsUsed(@RequestParam(required = false) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsUsed(deviceType, beginTime, endTime); + } + + @ApiOperation("气体用气量走势图") + @RequestMapping("/statistics/trend") + public Object statisticsTrend(@RequestParam(required = false) String deviceType, + @RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.statisticsTrend(deviceType,intervalDay); + } + + @ApiOperation("设备用气量统计") + @RequestMapping("/used") + public Object gasUsed(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.gasUsed(beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计") + @RequestMapping("/alarm/trend") + public Object alarmTrend(@RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.alarmTrend(intervalDay); + } + + @ApiOperation("气体泄露监测") + @RequestMapping("/leakage/rate") + public Object leakRate(@RequestParam(required = true) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.leakRate(deviceType,beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计占比") + @RequestMapping("/statistics/rate") + public Object statisticsRate(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsRate(beginTime, endTime); + } + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java new file mode 100644 index 0000000..2685c0a --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java @@ -0,0 +1,65 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.modular.system.service.GasFlowHomeService; +import com.casic.missiles.modular.system.service.IGasFlowDataService; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author cz + * @Date 2022-11-10 + */ +@RestController +@RequestMapping("/gas") +@AllArgsConstructor +public class GasFlowHomeController { + + private final GasFlowHomeService gasFlowHomeService; + + @ApiOperation("气体用气量统计") + @RequestMapping("/statistics/used") + public Object statisticsUsed(@RequestParam(required = false) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsUsed(deviceType, beginTime, endTime); + } + + @ApiOperation("气体用气量走势图") + @RequestMapping("/statistics/trend") + public Object statisticsTrend(@RequestParam(required = false) String deviceType, + @RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.statisticsTrend(deviceType,intervalDay); + } + + @ApiOperation("设备用气量统计") + @RequestMapping("/used") + public Object gasUsed(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.gasUsed(beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计") + @RequestMapping("/alarm/trend") + public Object alarmTrend(@RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.alarmTrend(intervalDay); + } + + @ApiOperation("气体泄露监测") + @RequestMapping("/leakage/rate") + public Object leakRate(@RequestParam(required = true) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.leakRate(deviceType,beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计占比") + @RequestMapping("/statistics/rate") + public Object statisticsRate(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsRate(beginTime, endTime); + } + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java new file mode 100644 index 0000000..e5118df --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java @@ -0,0 +1,53 @@ +package com.casic.missiles.modular.system.dao; + +import com.casic.missiles.core.datascope.DataScope; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface GasFlowHomeMapper { + + /** + * 气体用气量统计 + */ + Double gasTotalUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType); + + Double gasMonthUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("month") String month); + Double gasDayUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("day") String dayTime); + + /** + * 气体用气量走势图 + */ + List getDevice(@Param("deviceType") Long deviceType); + + List> countGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + List> totalGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + /** + * 设备用气量统计 + */ + List> gasUsedByDevice(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + + /** + * 气体泄露监测 + */ + Integer countRecData(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + + Integer countRecAlarm(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + /* 用气量超量报警统计占比 + */ + List> statisticsRate(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + /** + * 用气量超量报警统计 + */ + List> countAlarmByDay(@Param("scope") DataScope dataScope,@Param("IntervalDay") Integer IntervalDay); + + List getGasFlowDevType(@Param("scope") DataScope dataScope); + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java new file mode 100644 index 0000000..2685c0a --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java @@ -0,0 +1,65 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.modular.system.service.GasFlowHomeService; +import com.casic.missiles.modular.system.service.IGasFlowDataService; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author cz + * @Date 2022-11-10 + */ +@RestController +@RequestMapping("/gas") +@AllArgsConstructor +public class GasFlowHomeController { + + private final GasFlowHomeService gasFlowHomeService; + + @ApiOperation("气体用气量统计") + @RequestMapping("/statistics/used") + public Object statisticsUsed(@RequestParam(required = false) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsUsed(deviceType, beginTime, endTime); + } + + @ApiOperation("气体用气量走势图") + @RequestMapping("/statistics/trend") + public Object statisticsTrend(@RequestParam(required = false) String deviceType, + @RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.statisticsTrend(deviceType,intervalDay); + } + + @ApiOperation("设备用气量统计") + @RequestMapping("/used") + public Object gasUsed(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.gasUsed(beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计") + @RequestMapping("/alarm/trend") + public Object alarmTrend(@RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.alarmTrend(intervalDay); + } + + @ApiOperation("气体泄露监测") + @RequestMapping("/leakage/rate") + public Object leakRate(@RequestParam(required = true) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.leakRate(deviceType,beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计占比") + @RequestMapping("/statistics/rate") + public Object statisticsRate(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsRate(beginTime, endTime); + } + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java new file mode 100644 index 0000000..e5118df --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java @@ -0,0 +1,53 @@ +package com.casic.missiles.modular.system.dao; + +import com.casic.missiles.core.datascope.DataScope; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface GasFlowHomeMapper { + + /** + * 气体用气量统计 + */ + Double gasTotalUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType); + + Double gasMonthUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("month") String month); + Double gasDayUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("day") String dayTime); + + /** + * 气体用气量走势图 + */ + List getDevice(@Param("deviceType") Long deviceType); + + List> countGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + List> totalGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + /** + * 设备用气量统计 + */ + List> gasUsedByDevice(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + + /** + * 气体泄露监测 + */ + Integer countRecData(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + + Integer countRecAlarm(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + /* 用气量超量报警统计占比 + */ + List> statisticsRate(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + /** + * 用气量超量报警统计 + */ + List> countAlarmByDay(@Param("scope") DataScope dataScope,@Param("IntervalDay") Integer IntervalDay); + + List getGasFlowDevType(@Param("scope") DataScope dataScope); + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml new file mode 100644 index 0000000..d0bd58c --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + ID AS id, WELL_CODE AS wellCode, DEVCODE AS devcode, INSTANT_FLOW AS instantFlow, + INSTANTS_VELOCITY AS instantsVelocity, AMBOCETOR_TEMPERTURE AS ambocetorTemperture, + TOTAL_FLOW AS totalFlow,UPTIME AS uptime, LOGTIME AS logtime,DESCN AS descn, + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java new file mode 100644 index 0000000..2685c0a --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/controller/GasFlowHomeController.java @@ -0,0 +1,65 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.modular.system.service.GasFlowHomeService; +import com.casic.missiles.modular.system.service.IGasFlowDataService; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author cz + * @Date 2022-11-10 + */ +@RestController +@RequestMapping("/gas") +@AllArgsConstructor +public class GasFlowHomeController { + + private final GasFlowHomeService gasFlowHomeService; + + @ApiOperation("气体用气量统计") + @RequestMapping("/statistics/used") + public Object statisticsUsed(@RequestParam(required = false) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsUsed(deviceType, beginTime, endTime); + } + + @ApiOperation("气体用气量走势图") + @RequestMapping("/statistics/trend") + public Object statisticsTrend(@RequestParam(required = false) String deviceType, + @RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.statisticsTrend(deviceType,intervalDay); + } + + @ApiOperation("设备用气量统计") + @RequestMapping("/used") + public Object gasUsed(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.gasUsed(beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计") + @RequestMapping("/alarm/trend") + public Object alarmTrend(@RequestParam(required = true) Integer intervalDay) { + return gasFlowHomeService.alarmTrend(intervalDay); + } + + @ApiOperation("气体泄露监测") + @RequestMapping("/leakage/rate") + public Object leakRate(@RequestParam(required = true) String deviceType, + @RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.leakRate(deviceType,beginTime, endTime); + } + + @ApiOperation("用气量超量报警统计占比") + @RequestMapping("/statistics/rate") + public Object statisticsRate(@RequestParam(required = false) String beginTime, + @RequestParam(required = false) String endTime) { + return gasFlowHomeService.statisticsRate(beginTime, endTime); + } + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java new file mode 100644 index 0000000..e5118df --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/GasFlowHomeMapper.java @@ -0,0 +1,53 @@ +package com.casic.missiles.modular.system.dao; + +import com.casic.missiles.core.datascope.DataScope; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface GasFlowHomeMapper { + + /** + * 气体用气量统计 + */ + Double gasTotalUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType); + + Double gasMonthUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("month") String month); + Double gasDayUsed(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, + @Param("day") String dayTime); + + /** + * 气体用气量走势图 + */ + List getDevice(@Param("deviceType") Long deviceType); + + List> countGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + List> totalGasByDay(@Param("scope") DataScope dataScope, @Param("deviceType") Long deviceType, @Param("IntervalDay") Integer IntervalDay); + + /** + * 设备用气量统计 + */ + List> gasUsedByDevice(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + + /** + * 气体泄露监测 + */ + Integer countRecData(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + + Integer countRecAlarm(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deviceType") Long deviceType); + /* 用气量超量报警统计占比 + */ + List> statisticsRate(@Param("scope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime); + /** + * 用气量超量报警统计 + */ + List> countAlarmByDay(@Param("scope") DataScope dataScope,@Param("IntervalDay") Integer IntervalDay); + + List getGasFlowDevType(@Param("scope") DataScope dataScope); + +} diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml new file mode 100644 index 0000000..d0bd58c --- /dev/null +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataGasHomeMapper.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + ID AS id, WELL_CODE AS wellCode, DEVCODE AS devcode, INSTANT_FLOW AS instantFlow, + INSTANTS_VELOCITY AS instantsVelocity, AMBOCETOR_TEMPERTURE AS ambocetorTemperture, + TOTAL_FLOW AS totalFlow,UPTIME AS uptime, LOGTIME AS logtime,DESCN AS descn, + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + SELECT CAST(SUM(total_Flow) AS DECIMAL (10, 2)) AS sumComm + FROM ( + SELECT + total_Flow, + MAX( UPTIME ) + FROM + data_gasflow dg + JOIN bus_device bd ON bd.devcode = dg.devcode + WHERE + bd.VALID = '1' + AND bd.device_type =#{deviceType} + GROUP BY + dg.DEVCODE + )bgd + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml index faf1e9e..12144d2 100644 --- a/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml +++ b/casic-sluicewell/src/main/java/com/casic/missiles/modular/system/dao/mapping/DataWaterMeterMapper.xml @@ -127,10 +127,7 @@ - d - . - ID - AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type + d.ID AS deviceId, DEVCODE AS devcode, INSTALL_DATE AS installDate, ONLINE_STATE AS onlineState, t.WATCH_TYPE AS watchType, t.id as type