Commit e5ce4331 authored by 高建强's avatar 高建强

item:稳压泵启动间隔,需求变更业务修改

parent 41916c6b
......@@ -1547,7 +1547,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
StringUtil.isNotEmpty(e.getValue()) && e.getIotCode().equals(iotCode) && pressurePumpStart.equals(e.getEquipmentIndexKey())).sorted(Comparator.comparing(EquipmentSpecificIndex::getUpdateDate).reversed())
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(lastStop)) {
getIotDate(equipmentSpecificIndex, lastStop, prefix, suffix , "false");
equipmentSpecificIndex = getIotDate(equipmentSpecificIndex, lastStop, prefix, suffix , "false");
}
break;
case LAST_START:
......@@ -1561,7 +1561,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
StringUtil.isNotEmpty(e.getValue()) && e.getIotCode().equals(iotCode) && pressurePumpStart.equals(e.getEquipmentIndexKey())).sorted(Comparator.comparing(EquipmentSpecificIndex::getUpdateDate).reversed())
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(lastStart)) {
getIotDate(equipmentSpecificIndex, lastStart, prefix, suffix, "true");
equipmentSpecificIndex = getIotDate(equipmentSpecificIndex, lastStart, prefix, suffix, "true");
}
break;
case LATELY_STOP:
......@@ -1569,7 +1569,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
StringUtil.isNotEmpty(e.getValue()) && pressurePumpStart.equals(e.getEquipmentIndexKey())).sorted(Comparator.comparing(EquipmentSpecificIndex::getUpdateDate).reversed())
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(latelyStop)) {
getIotDate(equipmentSpecificIndex, latelyStop, prefix, null, "false");
equipmentSpecificIndex = getIotDate(equipmentSpecificIndex, latelyStop, prefix, null, "false");
}
break;
case LATELY_START:
......@@ -1577,7 +1577,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
StringUtil.isNotEmpty(e.getValue()) && pressurePumpStart.equals(e.getEquipmentIndexKey())).sorted(Comparator.comparing(EquipmentSpecificIndex::getUpdateDate).reversed())
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(latelyStart)) {
getIotDate(equipmentSpecificIndex, latelyStart, prefix, null, "true");
equipmentSpecificIndex = getIotDate(equipmentSpecificIndex, latelyStart, prefix, null, "true");
}
break;
case PUMP_START_TIME:
......@@ -1590,7 +1590,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
private void getIotDate(EquipmentSpecificIndex equipmentSpecificIndex, List<EquipmentSpecificIndex> listData, String prefix, String suffix, String flag) {
private EquipmentSpecificIndex getIotDate(EquipmentSpecificIndex equipmentSpecificIndex, List<EquipmentSpecificIndex> listData, String prefix, String suffix, String flag) {
ResponseModel start = iotFeign.selectOne(remoteSecurityService.getServerToken().getAppKey(), remoteSecurityService.getServerToken().getProduct(), remoteSecurityService.getServerToken().getToke(), "1", prefix, suffix, flag, pressurePumpStart);
if (200 == start.getStatus() && !ObjectUtils.isEmpty(start.getResult())) {
String json1 = JSON.toJSONString(start.getResult());
......@@ -1602,6 +1602,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
listData.get(0).setUpdateDate(startDate);
BeanUtils.copyProperties(listData.get(0),equipmentSpecificIndex);
}
return equipmentSpecificIndex;
}
private void checkValueByDate(EquipmentSpecificIndex data, Date newDate, PressurePumpEnum pressurePumpEnum) {
......
......@@ -148,7 +148,7 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
public long getAllPressurePumpStartStopInterval(List<IotDataVO> dataList, List<IotDataVO> dataListFilterTrue, List<IotDataVO> dataListFilterFalse, String nowStrLong) {
String intervalTime1 = nowStrLong;
String intervalTime2 = nowStrLong;
if (!ObjectUtils.isEmpty(dataListFilterTrue) && dataListFilterTrue.size() > 2) {
if (!ObjectUtils.isEmpty(dataListFilterTrue) && dataListFilterTrue.size() > 1) {
//获取启动列表中
intervalTime1 = dataListFilterTrue.get(0).getCreatedTime();
intervalTime2 = dataListFilterTrue.get(1).getCreatedTime();
......
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