Commit bbc301b3 authored by maoying's avatar maoying

Merge branch 'develop_dl_plan6_temp' of…

Merge branch 'develop_dl_plan6_temp' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6_temp
parents 45cf464f 557f1bc8
......@@ -386,7 +386,7 @@ public class EquipmentSpecificController extends AbstractBaseController {
ReginParams ReginParams=getSelectedOrgInfo();
String bizCode= ReginParams.getPersonIdentity().getCompanyBizOrgCode();
return equipmentSpecificSerivce.getListByEquipmentCode(code,bizCode);
return equipmentSpecificSerivce.getListByEquipmentCodeJ(code,bizCode);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -227,7 +227,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @param code 装备分类逗号隔开
* @return 装备list
*/
// List<Map<String, Object>> getListByEquipmentCode(String code,String bizOrgCode);
List<Map<String, Object>> getListByEquipmentCodeJ(String code,String bizOrgCode);
List<Map<String, Object>> getFirePumpInfoEQ(String code,String bizOrgCode);
/**
* 根据装备分类code获取装备列表,id 升序
......
......@@ -248,11 +248,11 @@ public class EmergencyServiceImpl implements IEmergencyService {
List<Map<String, String>> dataList = (List<Map<String, String>>) JSONArray.parse(json);
if (!CollectionUtils.isEmpty(dataList)) {
Collections.reverse(dataList);
Map<String, List<Map<String, String>>> dataMap = dataList.stream().filter(y -> y.containsKey("createdTime")).collect(Collectors.groupingBy(e -> e.get("createdTime").substring(5, 16).replace("T", " ")));
Map<String, List<Map<String, String>>> dataMap = dataList.stream().filter(y -> y.containsKey("createdTime")).collect(Collectors.groupingBy(e -> e.get("createdTime").substring(5, 16)));
timeList.forEach(t -> {
List<Map<String, String>> data = dataMap.get(t);
if (!CollectionUtils.isEmpty(data)) {
List<Map<String, String>> yDataList = dataMap.get(t).stream().filter(o -> "true".equals(o.get(pressurePumpStart).toString())).collect(Collectors.toList());
List<Map<String, String>> yDataList = data.stream().filter(o -> "true".equals(o.get(pressurePumpStart))).collect(Collectors.toList());
yList.add(CollectionUtils.isEmpty(yDataList) ? 0 : 1);
} else {
yList.add(0);
......@@ -331,13 +331,13 @@ public class EmergencyServiceImpl implements IEmergencyService {
if (200 == halfResponseModel.getStatus()) {
String json = JSON.toJSONString(halfResponseModel.getResult());
List<Map<String, String>> halfDataList = (List<Map<String, String>>) JSONArray.parse(json);
List<Map<String, String>> halfCollect = halfDataList.stream().filter(o -> "true".equals(o.get(pressurePumpStart).toString())).collect(Collectors.toList());
List<Map<String, String>> halfCollect = halfDataList.stream().filter(o -> "true".equals(o.get(pressurePumpStart))).collect(Collectors.toList());
halfNum.addAndGet(halfCollect.size());
}
if (200 == twoResponseModel.getStatus()) {
String json = JSON.toJSONString(twoResponseModel.getResult());
List<Map<String, String>> twoDataList = (List<Map<String, String>>) JSONArray.parse(json);
List<Map<String, String>> twoCollect = twoDataList.stream().filter(o -> "true".equals(o.get(pressurePumpStart).toString())).collect(Collectors.toList());
List<Map<String, String>> twoCollect = twoDataList.stream().filter(o -> "true".equals(o.get(pressurePumpStart))).collect(Collectors.toList());
twoNum.addAndGet(twoCollect.size());
}
} catch (Exception e) {
......@@ -360,7 +360,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
List<Map<String, String>> stopDataList = (List<Map<String, String>>) JSONArray.parse(stopJson);
List<Map<String, String>> collect = stopDataList.stream().filter(o -> o.containsKey("createdTime")).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)) {
intervalTime = collect.get(0).get("createdTime").substring(0, 19).replace("T", " ");
intervalTime = collect.get(0).get("createdTime").substring(0, 19);
// 停泵前的前5分钟,判断管网压力状态
try {
String stop5BeforeTime = DateUtils.convertDateToString(DateUtils.dateAddMinutes(DateUtils.convertStrToDate(intervalTime, "yyyy-MM-dd HH:mm:ss"), -5), "yyyy-MM-dd HH:mm:ss");
......@@ -396,7 +396,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
List<Map<String, String>> startDataList = (List<Map<String, String>>) JSONArray.parse(startJson);
List<Map<String, String>> collect = startDataList.stream().filter(o -> o.containsKey("createdTime")).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)) {
intervalTime = collect.get(0).get("createdTime").substring(0, 19).replace("T", " ");
intervalTime = collect.get(0).get("createdTime").substring(0, 19);
durationTime = intervalTime;
}
}
......
......@@ -1832,7 +1832,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public List<Map<String, Object>> getListByEquipmentCode(String code,String bizOrgCode) {
public List<Map<String, Object>> getListByEquipmentCodeJ(String code,String bizOrgCode) {
List<Map<String, Object>> list = new ArrayList<>();
if (StringUtil.isNotEmpty(code)) {
String[] strings = code.split(",");
......
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