diff --git a/src/main/java/com/isu/gaswellwatch/dao/DeviceDao.java b/src/main/java/com/isu/gaswellwatch/dao/DeviceDao.java index af7948d..d77e020 100644 --- a/src/main/java/com/isu/gaswellwatch/dao/DeviceDao.java +++ b/src/main/java/com/isu/gaswellwatch/dao/DeviceDao.java @@ -30,7 +30,8 @@ public interface DeviceDao extends BaseMapper { @Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("deviceId") Long deviceId, - @Param("tableName") String tableName); + @Param("tableName") String tableName, + @Param("deviceProduct") String deviceProduct); Page deviceOptLogPage(Page objectPage, @Param("startTime")Date startTime, diff --git a/src/main/java/com/isu/gaswellwatch/service/impl/DeviceServiceImpl.java b/src/main/java/com/isu/gaswellwatch/service/impl/DeviceServiceImpl.java index d8e2abd..280179b 100644 --- a/src/main/java/com/isu/gaswellwatch/service/impl/DeviceServiceImpl.java +++ b/src/main/java/com/isu/gaswellwatch/service/impl/DeviceServiceImpl.java @@ -82,7 +82,7 @@ public class DeviceServiceImpl extends ServiceImpl implements deviceVO.setOnline(online == null ? "" : online.toString()); Object gas_status = this.redisTemplate.opsForHash().get(deviceKey, "wellStatus"); - deviceVO.setWellCtl(gas_status == null ? "" : gas_status.toString()); + deviceVO.setWellStatus(gas_status == null ? "" : gas_status.toString()); Object runMode = this.redisTemplate.opsForHash().get(deviceKey, "runMode"); if (runMode == null) { @@ -189,7 +189,11 @@ public class DeviceServiceImpl extends ServiceImpl implements end = simpleDateFormat.parse(endTime); } String tableName = Redis2DBPersistenceService.DEFAULT_DATA_TABLE + deviceId; - Page page = this.deviceDao.historyPage(new Page<>(currentPage, pageSize), start, end, deviceId, tableName); + + //判断设备品牌 + DeviceVO device = this.getDevice(deviceId); + + Page page = this.deviceDao.historyPage(new Page<>(currentPage, pageSize), start, end, deviceId, tableName,device.getProduct().getCode()); List deviceHistoryVO = page.getRecords(); if (CollectionUtil.isNotEmpty(deviceHistoryVO)) { Map runModeMap = this.dictionaryService.getValueMapByType("runMode"); diff --git a/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java b/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java index 0d30a87..a53d9f3 100644 --- a/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java +++ b/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java @@ -39,5 +39,20 @@ public class DeviceHistoryVO extends Model { /** 柱塞状态 */ private String plugStatus; + /** 气井状态 */ + private String wellStatus; + + /** 倒计时 */ + private String statusEndTime; + + /** 温度 */ + private String temperature; + + /** 湿度 */ + private String humidity; + + /** 太阳能电压 */ + private String solarVoltage; + } diff --git a/src/main/java/com/isu/gaswellwatch/vo/DeviceVO.java b/src/main/java/com/isu/gaswellwatch/vo/DeviceVO.java index 631f494..9966567 100644 --- a/src/main/java/com/isu/gaswellwatch/vo/DeviceVO.java +++ b/src/main/java/com/isu/gaswellwatch/vo/DeviceVO.java @@ -71,7 +71,7 @@ public class DeviceVO extends Model { private String plugStatus; /** 生产状态 */ - private String wellCtl; + private String wellStatus; } diff --git a/src/main/resources/mapper/DeviceDao.xml b/src/main/resources/mapper/DeviceDao.xml index daa621e..559ee52 100644 --- a/src/main/resources/mapper/DeviceDao.xml +++ b/src/main/resources/mapper/DeviceDao.xml @@ -70,7 +70,12 @@