Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
18d1c67b43
|
@ -30,7 +30,8 @@ public interface DeviceDao extends BaseMapper<Device> {
|
|||
@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<DeviceOptLog> deviceOptLogPage(Page<DeviceOptLog> objectPage,
|
||||
@Param("startTime")Date startTime,
|
||||
|
|
|
@ -82,7 +82,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceDao, Device> 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<DeviceDao, Device> implements
|
|||
end = simpleDateFormat.parse(endTime);
|
||||
}
|
||||
String tableName = Redis2DBPersistenceService.DEFAULT_DATA_TABLE + deviceId;
|
||||
Page<DeviceHistoryVO> page = this.deviceDao.historyPage(new Page<>(currentPage, pageSize), start, end, deviceId, tableName);
|
||||
|
||||
//判断设备品牌
|
||||
DeviceVO device = this.getDevice(deviceId);
|
||||
|
||||
Page<DeviceHistoryVO> page = this.deviceDao.historyPage(new Page<>(currentPage, pageSize), start, end, deviceId, tableName,device.getProduct().getCode());
|
||||
List<DeviceHistoryVO> deviceHistoryVO = page.getRecords();
|
||||
if (CollectionUtil.isNotEmpty(deviceHistoryVO)) {
|
||||
Map<String, Dictionary> runModeMap = this.dictionaryService.getValueMapByType("runMode");
|
||||
|
|
|
@ -39,5 +39,20 @@ public class DeviceHistoryVO extends Model<DeviceHistoryVO> {
|
|||
/** 柱塞状态 */
|
||||
private String plugStatus;
|
||||
|
||||
/** 气井状态 */
|
||||
private String wellStatus;
|
||||
|
||||
/** 倒计时 */
|
||||
private String statusEndTime;
|
||||
|
||||
/** 温度 */
|
||||
private String temperature;
|
||||
|
||||
/** 湿度 */
|
||||
private String humidity;
|
||||
|
||||
/** 太阳能电压 */
|
||||
private String solarVoltage;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class DeviceVO extends Model<DeviceVO> {
|
|||
private String plugStatus;
|
||||
|
||||
/** 生产状态 */
|
||||
private String wellCtl;
|
||||
private String wellStatus;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,12 @@
|
|||
|
||||
|
||||
<select id="historyPage" resultType="com.isu.gaswellwatch.vo.DeviceHistoryVO">
|
||||
select t.collection_time,t.oil_pressure,t.cas_pressure,t.run_mode,t.plug_status from ${tableName} t where
|
||||
select t.collection_time,t.oil_pressure,t.cas_pressure,t.pre_pressure,t.status_end_time
|
||||
<if test="deviceProduct!=null and deviceProduct=='knpc'">,t.run_mode,t.temperature,t.humidity,t.well_status,t.plug_status</if>
|
||||
<if test="deviceProduct!=null and deviceProduct=='etc'"></if>
|
||||
<if test="deviceProduct!=null and deviceProduct=='scss'">,t.solarVoltage</if>
|
||||
from ${tableName} t
|
||||
<where>
|
||||
t.device_id = #{deviceId}
|
||||
<if test="startTime!=null">
|
||||
and t.collection_time >= #{startTime}
|
||||
|
@ -78,6 +83,7 @@
|
|||
<if test="endTime!=null">
|
||||
and t.collection_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by t.collection_time desc
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue