Commit 7f7a6f7e authored by KeYong's avatar KeYong

更新

parent b20654b7
...@@ -282,19 +282,23 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -282,19 +282,23 @@ public class SupervisionConfigureController extends AbstractBaseController {
Date halfHour = DateUtils.dateAddMinutes(null, -30); Date halfHour = DateUtils.dateAddMinutes(null, -30);
Date twoHour = DateUtils.dateAddHours(null, -2); Date twoHour = DateUtils.dateAddHours(null, -2);
Date fourHour = DateUtils.dateAddHours(null, -4); Date fourHour = DateUtils.dateAddHours(null, -4);
Date oneHour = DateUtils.dateAddHours(null, -1);
String startDateStr = DateUtils.convertDateToString(mounthDate, DateUtils.DATE_TIME_PATTERN); String startDateStr = DateUtils.convertDateToString(mounthDate, DateUtils.DATE_TIME_PATTERN);
String half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN); String half = DateUtils.convertDateToString(halfHour, DateUtils.DATE_TIME_PATTERN);
String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN); String two = DateUtils.convertDateToString(twoHour, DateUtils.DATE_TIME_PATTERN);
String four = DateUtils.convertDateToString(fourHour, DateUtils.DATE_TIME_PATTERN); String four = DateUtils.convertDateToString(fourHour, DateUtils.DATE_TIME_PATTERN);
String one = DateUtils.convertDateToString(oneHour, DateUtils.DATE_TIME_PATTERN);
ResponseModel mounthEntity = null; ResponseModel mounthEntity = null;
ResponseModel halfHourEntity = null; ResponseModel halfHourEntity = null;
ResponseModel twoHourEntity = null; ResponseModel twoHourEntity = null;
ResponseModel fourHourEntity = null; ResponseModel fourHourEntity = null;
ResponseModel oneHourEntity = null;
try { try {
mounthEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), startDateStr, nowStrLong, prefix, suffix, pressurePumpStart); mounthEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), startDateStr, nowStrLong, prefix, suffix, pressurePumpStart);
halfHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), half, nowStrLong, prefix, suffix, pressurePumpStart); halfHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), half, nowStrLong, prefix, suffix, pressurePumpStart);
twoHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), two, nowStrLong, prefix, suffix, pressurePumpStart); twoHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), two, nowStrLong, prefix, suffix, pressurePumpStart);
fourHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), four, nowStrLong, prefix, suffix, pressurePumpStart); fourHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), four, nowStrLong, prefix, suffix, pressurePumpStart);
oneHourEntity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), one, nowStrLong, prefix, suffix, pressurePumpStart);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -326,6 +330,13 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -326,6 +330,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
int num = collect.size(); int num = collect.size();
item.put("fourHourStartNum", num); item.put("fourHourStartNum", num);
} }
if (200 == oneHourEntity.getStatus()) {
String json1 = JSON.toJSONString(oneHourEntity.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey(pressurePumpStart) && t.get(pressurePumpStart).equals("true"))).collect(Collectors.toList());
int num = collect.size();
item.put("oneHourStartNum", num);
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long nowDateTime = new Date().getTime();//当前时间戳 long nowDateTime = new Date().getTime();//当前时间戳
Map<String, String> stateMap = fireFightingSystemMapper.queryPressureNowStateBySpecificId((Long) item.get("id")); Map<String, String> stateMap = fireFightingSystemMapper.queryPressureNowStateBySpecificId((Long) item.get("id"));
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
alter table `wl_equipment_detail` add column `delivery_date` datetime DEFAULT NULL COMMENT '投运日期'; alter table `wl_equipment_detail` add column `delivery_date` datetime DEFAULT NULL COMMENT '投运日期';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="ltw" id="20220831-ltw2"> <changeSet author="ltw" id="20220831-ltw22">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group_column"/> <tableExists tableName="wl_form_group_column"/>
</preConditions> </preConditions>
......
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