|
|
@@ -6,17 +6,13 @@ import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
|
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
|
import com.steerinfo.framework.user.UserPayload;
|
|
|
import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMapper;
|
|
|
-import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
|
|
|
import com.steerinfo.meterwork.meterworkcaractualfirst.mapper.MeterWorkCarActualFirstMapper;
|
|
|
-import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.mapper.MeterWorkDataCountMapper;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.CarRegularComparison;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.WorkLoadReportInfo;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.service.IMeterWorkDataCountService;
|
|
|
import com.steerinfo.meterwork.meterworkrailwayactfirst.mapper.MeterWorkRailwayActFirstMapper;
|
|
|
-import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
|
|
|
import com.steerinfo.meterwork.meterworkrailwayactual.mapper.MeterWorkRailwayActualMapper;
|
|
|
-import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
|
|
|
import com.steerinfo.util.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -173,9 +169,13 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
params.put("spotNoStr", spotNoStr);
|
|
|
}
|
|
|
List<HashMap> paramsList = new ArrayList<>();
|
|
|
+ //总结净
|
|
|
long countActualTemp = 0L;
|
|
|
+ //总一次
|
|
|
long countFirstTemp = 0L;
|
|
|
+ //结净未匹配委托总数
|
|
|
long countActualValidTemp = 0L;
|
|
|
+ //未结净有效一次总数
|
|
|
long countFirstValidTemp = 0L;
|
|
|
{
|
|
|
HashMap params01 = new HashMap();
|
|
|
@@ -186,23 +186,37 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> actualMap = new HashMap<>();
|
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
+ actualMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualTotal = meterWorkCarActualMapper.countDayAllState(actualMap);
|
|
|
if(carActualTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carActualTotal) {
|
|
|
- countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
+ countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
}
|
|
|
//作废结净总数
|
|
|
HashMap<String, Object> actualVoidMap = new HashMap<>();
|
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
actualVoidMap.put("valueFlag", "0");
|
|
|
List<HashMap> carActualVoidTotal = meterWorkCarActualMapper.countDayAllState(actualVoidMap);
|
|
|
//结净未匹配委托总数
|
|
|
HashMap<String, Object> actualNotMatchScaleMap = new HashMap<>();
|
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
actualNotMatchScaleMap.put("isPreScale", "0");
|
|
|
+ actualNotMatchScaleMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualNotMatchTotal = meterWorkCarActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
|
if(carActualNotMatchTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carActualNotMatchTotal) {
|
|
|
@@ -213,6 +227,11 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
+ firstMap.put("validFlag", "1");
|
|
|
List<HashMap> carFirstTotal = meterWorkCarActualFirstMaper.countDayAllState(firstMap);
|
|
|
if(carFirstTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carFirstTotal) {
|
|
|
@@ -223,6 +242,10 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstNotNetMap = new HashMap<>();
|
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
|
List<HashMap> carFirst = meterWorkCarActualFirstMaper.countDayAllState(firstNotNetMap);
|
|
|
if(carFirst.size() >= 1) {
|
|
|
@@ -233,11 +256,19 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstResetMap = new HashMap<>();
|
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
List<HashMap> carFirstLog = meterBaseOperationLogMapper.countAllFirstState02(firstResetMap);
|
|
|
|
|
|
HashMap<String, Object> obj = new HashMap<>();
|
|
|
obj.put("startTime", params.get("startTime"));
|
|
|
obj.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ obj.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayCarReportInfo(obj);
|
|
|
if (spotModelList.size() >= 1) {
|
|
|
for (MeterBaseSpotInfo spotModel : spotModelList) {
|
|
|
@@ -285,32 +316,32 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
long carFirstLogSum = 0L;
|
|
|
if (carActualTotalTemp01 != null && carActualTotalTemp01.size() >= 1) {
|
|
|
List<HashMap> carActualTotalTemp02 = carActualTotalTemp01.stream().filter(item ->
|
|
|
- (item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
- || StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").equals(model.getMeterMode()))
|
|
|
+ (item.get("NET_MODE") == null || StringUtils.isEmpty(item.get("NET_MODE").toString())
|
|
|
+ || StringUtils.isEmpty(model.getMeterMode()) || item.get("NET_MODE").equals(model.getMeterMode()))
|
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").equals(model.getMeterTypeNo()))
|
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").equals(model.getMeterTypeName()))
|
|
|
- && (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|
- && (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
+ && (item.get("NET_MAN_NO") == null || StringUtils.isEmpty(item.get("NET_MAN_NO").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|
+ && (item.get("NET_MAN_NAME") == null || StringUtils.isEmpty(item.get("NET_MAN_NAME").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if(carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
}
|
|
|
if (carActualVoidTotalTemp01 != null && carActualVoidTotalTemp01.size() >= 1) {
|
|
|
List<HashMap> carActualVoidTotalTemp02 = carActualVoidTotalTemp01.stream().filter(item ->
|
|
|
- (item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
- || StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").equals(model.getMeterMode()))
|
|
|
+ (item.get("NET_MODE") == null || StringUtils.isEmpty(item.get("NET_MODE").toString())
|
|
|
+ || StringUtils.isEmpty(model.getMeterMode()) || item.get("NET_MODE").equals(model.getMeterMode()))
|
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").equals(model.getMeterTypeNo()))
|
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").equals(model.getMeterTypeName()))
|
|
|
- && (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|
- && (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
+ && (item.get("NET_MAN_NO") == null || StringUtils.isEmpty(item.get("NET_MAN_NO").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|
+ && (item.get("NET_MAN_NAME") == null || StringUtils.isEmpty(item.get("NET_MAN_NAME").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if(carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
@@ -352,9 +383,9 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
carMap.put("countFirstSum", countFirstSum);
|
|
|
carMap.put("carFirstLogSum", carFirstLogSum);
|
|
|
|
|
|
- countActualTemp += countActualSum;
|
|
|
- countFirstTemp += countFirstSum;
|
|
|
- countActualValidTemp += countActualValidSum;
|
|
|
+// countActualTemp += countActualSum;
|
|
|
+// countFirstTemp += countFirstSum;
|
|
|
+// countActualValidTemp += countActualValidSum;
|
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
|
}
|
|
|
params02.put("childrenBase", carMap02List);
|
|
|
@@ -373,26 +404,29 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}
|
|
|
paramsList02.add(params02);
|
|
|
}
|
|
|
- params01.put("countActualTemp", countActualTemp);
|
|
|
- params01.put("countFirstTemp", countFirstTemp);
|
|
|
+ params01.put("countActualTemp", countActualValidTemp);
|
|
|
+ params01.put("countFirstTemp", countFirstValidTemp);
|
|
|
params01.put("type", "汽车衡");
|
|
|
- params01.put("countFirst", countFirstValidTemp);
|
|
|
- params01.put("countActual", countActualValidTemp);
|
|
|
+ params01.put("countFirst", countFirstTemp);
|
|
|
+ params01.put("countActual", countActualTemp);
|
|
|
params01.put("children", paramsList02);
|
|
|
paramsList.add(params01);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
{
|
|
|
String[][] railwayTypeNoList = new String[][]{{"001019001"},{"001019002"}, {"001019003", "001019004"}, {"001019005"}};
|
|
|
for(int i = 0; i <= railwayTypeNoList.length-1; i++) {
|
|
|
String[] railwayTypeNo = railwayTypeNoList[i];
|
|
|
HashMap params01 = new HashMap();
|
|
|
List<HashMap> paramsList02 = new ArrayList<>();
|
|
|
+ //总结净
|
|
|
countActualTemp = 0L;
|
|
|
+ //总一次
|
|
|
countFirstTemp = 0L;
|
|
|
+ //结净未匹配委托总数
|
|
|
countActualValidTemp = 0L;
|
|
|
+ //未结净有效一次总数
|
|
|
countFirstValidTemp = 0L;
|
|
|
//静态轨道衡
|
|
|
// String[] railwayTypeNo = new String[]{"001019001"};
|
|
|
@@ -400,6 +434,10 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
spotModelMap.put("startTime", params.get("startTime"));
|
|
|
spotModelMap.put("endTime", params.get("endTime"));
|
|
|
spotModelMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ spotModelMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ spotModelMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
List<MeterBaseSpotInfo> spotModelList = meterBaseSpotInfoMapper.staticSpotGroupByActualAndFirst(spotModelMap);
|
|
|
|
|
|
//总结净数
|
|
|
@@ -407,10 +445,15 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
|
actualMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
+ actualMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualTotal = meterWorkRailwayActualMapper.countDayAllState(actualMap);
|
|
|
if(carActualTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carActualTotal) {
|
|
|
- countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
+ countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
}
|
|
|
//作废结净总数
|
|
|
@@ -418,6 +461,10 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
|
actualVoidMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
actualVoidMap.put("valueFlag", "0");
|
|
|
List<HashMap> carActualVoidTotal = meterWorkRailwayActualMapper.countDayAllState(actualVoidMap);
|
|
|
//结净未匹配委托总数
|
|
|
@@ -425,7 +472,12 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
|
actualNotMatchScaleMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- actualNotMatchScaleMap.put("isPreScale", "0");
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
+ actualNotMatchScaleMap.put("isPreSacale", "0");
|
|
|
+ actualNotMatchScaleMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualNotMatchTotal = meterWorkRailwayActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
|
if(carActualNotMatchTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carActualNotMatchTotal) {
|
|
|
@@ -436,7 +488,12 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
firstMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ firstMap.put("validFlag", "1");
|
|
|
List<HashMap> carFirstTotal = meterWorkRailwayActFirstMapper.countDayAllState(firstMap);
|
|
|
if(carFirstTotal.size() >= 1) {
|
|
|
for(HashMap modelTemp: carFirstTotal) {
|
|
|
@@ -448,6 +505,10 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
|
firstNotNetMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
|
List<HashMap> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(firstNotNetMap);
|
|
|
if(carFirst.size() >= 1) {
|
|
|
@@ -459,12 +520,20 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
|
firstResetMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
List<HashMap> carFirstLog = meterBaseOperationLogMapper.countAllFirstState03(firstResetMap);
|
|
|
|
|
|
HashMap<String, Object> obj = new HashMap<>();
|
|
|
obj.put("startTime", params.get("startTime"));
|
|
|
obj.put("endTime", params.get("endTime"));
|
|
|
obj.put("railwayTypeNo", railwayTypeNo);
|
|
|
+ if(params.get("netSpot3NoStr") != null) {
|
|
|
+ obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
+ obj.put("spotNoStr", params.get("spotNoStr"));
|
|
|
+ }
|
|
|
List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
|
if(spotModelList.size() >= 1) {
|
|
|
for(MeterBaseSpotInfo spotModel: spotModelList) {
|
|
|
@@ -510,32 +579,32 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
long carFirstLogSum = 0L;
|
|
|
if (carActualTotalTemp01 != null && carActualTotalTemp01.size() >= 1) {
|
|
|
List<HashMap> carActualTotalTemp02 = carActualTotalTemp01.stream().filter(item ->
|
|
|
- (item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
- || StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").equals(model.getMeterMode()))
|
|
|
+ (item.get("NET_MODE") == null || StringUtils.isEmpty(item.get("NET_MODE").toString())
|
|
|
+ || StringUtils.isEmpty(model.getMeterMode()) || item.get("NET_MODE").equals(model.getMeterMode()))
|
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").equals(model.getMeterTypeNo()))
|
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").equals(model.getMeterTypeName()))
|
|
|
- && (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|
- && (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
+ && (item.get("NET_MAN_NO") == null || StringUtils.isEmpty(item.get("NET_MAN_NO").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|
+ && (item.get("NET_MAN_NAME") == null || StringUtils.isEmpty(item.get("NET_MAN_NAME").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if(carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
}
|
|
|
if (carActualVoidTotalTemp01 != null && carActualVoidTotalTemp01.size() >= 1) {
|
|
|
List<HashMap> carActualVoidTotalTemp02 = carActualVoidTotalTemp01.stream().filter(item ->
|
|
|
- (item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
- || StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").equals(model.getMeterMode()))
|
|
|
+ (item.get("NET_MODE") == null || StringUtils.isEmpty(item.get("NET_MODE").toString())
|
|
|
+ || StringUtils.isEmpty(model.getMeterMode()) || item.get("NET_MODE").equals(model.getMeterMode()))
|
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").equals(model.getMeterTypeNo()))
|
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").equals(model.getMeterTypeName()))
|
|
|
- && (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|
- && (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- || StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
+ && (item.get("NET_MAN_NO") == null || StringUtils.isEmpty(item.get("NET_MAN_NO").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|
+ && (item.get("NET_MAN_NAME") == null || StringUtils.isEmpty(item.get("NET_MAN_NAME").toString())
|
|
|
+ || StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if(carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
|
@@ -577,9 +646,9 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
carMap.put("countFirstSum", countFirstSum);
|
|
|
carMap.put("carFirstLogSum", carFirstLogSum);
|
|
|
|
|
|
- countActualTemp += countActualSum;
|
|
|
- countFirstTemp += countFirstSum;
|
|
|
- countActualValidTemp += countActualValidSum;
|
|
|
+// countActualTemp += countActualSum;
|
|
|
+// countFirstTemp += countFirstSum;
|
|
|
+// countActualValidTemp += countActualValidSum;
|
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
|
}
|
|
|
params02.put("childrenBase", carMap02List);
|
|
|
@@ -598,8 +667,8 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}
|
|
|
paramsList02.add(params02);
|
|
|
}
|
|
|
- params01.put("countActualTemp", countActualTemp);
|
|
|
- params01.put("countFirstTemp", countFirstTemp);
|
|
|
+ params01.put("countActualTemp", countActualValidTemp);
|
|
|
+ params01.put("countFirstTemp", countFirstValidTemp);
|
|
|
if(i == 0) {
|
|
|
params01.put("type", "静态轨轨道衡");
|
|
|
}else if(i == 1){
|
|
|
@@ -609,526 +678,13 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}else if(i == 3){
|
|
|
params01.put("type", "吊钩秤");
|
|
|
}
|
|
|
- params01.put("countFirst", countFirstValidTemp);
|
|
|
- params01.put("countActual", countActualValidTemp);
|
|
|
+ params01.put("countFirst", countFirstTemp);
|
|
|
+ params01.put("countActual", countActualTemp);
|
|
|
params01.put("children", paramsList02);
|
|
|
paramsList.add(params01);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- {
|
|
|
- HashMap params01 = new HashMap();
|
|
|
- List<HashMap> paramsList02 = new ArrayList<>();
|
|
|
- countActualTemp = 0L;
|
|
|
- countFirstTemp = 0L;
|
|
|
- countActualValidTemp = 0L;
|
|
|
- countFirstValidTemp = 0L;
|
|
|
- List<MeterBaseSpotInfo> spotModelList = meterBaseSpotInfoMapper.staticSpotGroupByActualAndFirst(params);
|
|
|
- if(spotModelList.size() >= 1) {
|
|
|
- for(MeterBaseSpotInfo spotModel: spotModelList) {
|
|
|
- HashMap<String, Object> params02 = new HashMap<>();
|
|
|
- params02.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- params02.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-
|
|
|
- HashMap<String, Object> obj = new HashMap<>();
|
|
|
- obj.put("startTime", params.get("startTime"));
|
|
|
- obj.put("endTime", params.get("endTime"));
|
|
|
- String[] railwayTypeNo = new String[]{"001019002"};
|
|
|
- obj.put("railwayTypeNo", railwayTypeNo);
|
|
|
- obj.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- obj.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
- List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
|
-
|
|
|
- HashMap<String, Object> objB = new HashMap<>();
|
|
|
- objB.put("startTime", params.get("startTime"));
|
|
|
- objB.put("endTime", params.get("endTime"));
|
|
|
- objB.put("railwayTypeNo", railwayTypeNo);
|
|
|
-// objB.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
-// objB.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-// objB.put("meterMode", model.getMeterMode());
|
|
|
-// objB.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
-// objB.put("meterTypeName", model.getMeterTypeName());
|
|
|
-// objB.put("createManNo", model.getCreateManNo());
|
|
|
-// objB.put("createManName", model.getCreateManName());
|
|
|
- List<MeterWorkRailwayActual> carActual = meterWorkRailwayActualMapper.countDayAllState(objB);
|
|
|
- List<MeterWorkRailwayActFirst> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(objB);
|
|
|
- List<HashMap> carFirstLog = meterBaseOperationLogMapper.countAllFirstState03(objB);
|
|
|
- List<HashMap> carMap02List = new ArrayList<>();
|
|
|
- if(models.size() >= 1) {
|
|
|
- List<MeterWorkRailwayActual> carActualTemp = carActual.stream().filter(item -> item.getNetSpot3No().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getNetSpot3Name().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<MeterWorkRailwayActFirst> carFirstTemp = carFirst.stream().filter(item -> item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<HashMap> carFirstLogTemp = carFirstLog.stream().filter(item -> item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- for(WorkLoadReportInfo model: models) {
|
|
|
-// objB.put("startTime", params.get("startTime"));
|
|
|
-// objB.put("endTime", params.get("endTime"));
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", model.getMeterMode());
|
|
|
- carMap.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
- carMap.put("meterTypeName", model.getMeterTypeName());
|
|
|
- carMap.put("createManNo", model.getCreateManNo());
|
|
|
- carMap.put("createManName", model.getCreateManName());
|
|
|
-
|
|
|
- carMap02List.add(carMap);
|
|
|
- long countActualSum = 0L;
|
|
|
- long countActualValidSum = 0L;
|
|
|
- long countFirstSum = 0L;
|
|
|
- long countFirsValidtSum = 0L;
|
|
|
- long carFirstLogSum = 0L;
|
|
|
- boolean T = StringUtils.isNotEmpty(model.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManName());
|
|
|
- if(carActual != null && carActual.size() >= 1) {
|
|
|
- countActualSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())).count();
|
|
|
- countActualValidSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())
|
|
|
- && (item.getIsPreSacale().equals("0") || StringUtils.isEmpty(item.getIsPreSacale()))).count();
|
|
|
- }
|
|
|
- if(carFirst != null && carFirst.size() >= 1) {
|
|
|
- countFirstSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())).count();
|
|
|
- //一次毛重
|
|
|
- countFirsValidtSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())
|
|
|
- && item.getValueFlag().equals("1")).count();
|
|
|
- }
|
|
|
- if(carFirstLog != null && carFirstLog.size() >= 1) {
|
|
|
- carFirstLogSum = carFirstLogTemp.stream().filter(item -> T
|
|
|
- && item.get("METER_MODE") != null
|
|
|
- && item.get("METER_TYPE_NO") != null
|
|
|
- && item.get("METER_TYPE_NAME") != null
|
|
|
- && item.get("CREATE_MAN_NO") != null
|
|
|
- && item.get("CREATE_MAN_NAMEss") != null
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_MODE").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- && item.get("METER_MODE").toString().equals(model.getMeterMode())
|
|
|
- && item.get("METER_TYPE_NO").toString().equals(model.getMeterTypeNo())
|
|
|
- && item.get("METER_TYPE_NAME").toString().equals(model.getMeterTypeName())
|
|
|
- && item.get("CREATE_MAN_NO").toString().equals(model.getCreateManNo())
|
|
|
- && item.get("CREATE_MAN_NAME").toString().equals(model.getCreateManName())).count();
|
|
|
- }
|
|
|
- carMap.put("countActualSum", countActualSum);
|
|
|
- carMap.put("countFirstSum", countFirstSum);
|
|
|
- carMap.put("carFirstLogSum", carFirstLogSum);
|
|
|
-
|
|
|
- countActualTemp += countActualSum;
|
|
|
- countFirstTemp += countFirstSum;
|
|
|
- countActualValidTemp += countActualValidSum;
|
|
|
- countFirstValidTemp += countFirsValidtSum;
|
|
|
- }
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }else {
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", null);
|
|
|
- carMap.put("meterTypeNo", null);
|
|
|
- carMap.put("meterTypeName", null);
|
|
|
- carMap.put("createManNo", null);
|
|
|
- carMap.put("createManName", null);
|
|
|
- carMap02List.add(carMap);
|
|
|
- carMap.put("countActualSum", 0L);
|
|
|
- carMap.put("countFirstSum", 0L);
|
|
|
- carMap.put("carFirstLogSum", 0L);
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }
|
|
|
- paramsList02.add(params02);
|
|
|
- }
|
|
|
- params01.put("countActualTemp", countActualTemp);
|
|
|
- params01.put("countFirstTemp", countFirstTemp);
|
|
|
- params01.put("type", "动态轨道衡");
|
|
|
- params01.put("countFirst", countFirstValidTemp);
|
|
|
- params01.put("countActual", countActualValidTemp);
|
|
|
- params01.put("children", paramsList02);
|
|
|
- paramsList.add(params01);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- {
|
|
|
- HashMap params01 = new HashMap();
|
|
|
- List<HashMap> paramsList02 = new ArrayList<>();
|
|
|
- countActualTemp = 0L;
|
|
|
- countFirstTemp = 0L;
|
|
|
- countActualValidTemp = 0L;
|
|
|
- countFirstValidTemp = 0L;
|
|
|
- List<MeterBaseSpotInfo> spotModelList = meterBaseSpotInfoMapper.staticSpotGroupByActualAndFirst(params);
|
|
|
- if(spotModelList.size() >= 1) {
|
|
|
- for(MeterBaseSpotInfo spotModel: spotModelList) {
|
|
|
- HashMap<String, Object> params02 = new HashMap<>();
|
|
|
- params02.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- params02.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-
|
|
|
- HashMap<String, Object> obj = new HashMap<>();
|
|
|
- obj.put("startTime", params.get("startTime"));
|
|
|
- obj.put("endTime", params.get("endTime"));
|
|
|
- String[] railwayTypeNo = new String[]{"001019003", "001019004"};
|
|
|
- obj.put("railwayTypeNo", railwayTypeNo);
|
|
|
- obj.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- obj.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
- List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
|
-
|
|
|
- HashMap<String, Object> objB = new HashMap<>();
|
|
|
- objB.put("startTime", params.get("startTime"));
|
|
|
- objB.put("endTime", params.get("endTime"));
|
|
|
- objB.put("railwayTypeNo", railwayTypeNo);
|
|
|
-// objB.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
-// objB.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-// objB.put("meterMode", model.getMeterMode());
|
|
|
-// objB.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
-// objB.put("meterTypeName", model.getMeterTypeName());
|
|
|
-// objB.put("createManNo", model.getCreateManNo());
|
|
|
-// objB.put("createManName", model.getCreateManName());
|
|
|
- List<MeterWorkRailwayActual> carActual = meterWorkRailwayActualMapper.countDayAllState(objB);
|
|
|
- List<MeterWorkRailwayActFirst> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(objB);
|
|
|
- List<HashMap> carFirstLog = meterBaseOperationLogMapper.countAllFirstState03(objB);
|
|
|
- List<HashMap> carMap02List = new ArrayList<>();
|
|
|
- if(models.size() >= 1) {
|
|
|
- List<MeterWorkRailwayActual> carActualTemp = carActual.stream().filter(item -> item.getNetSpot3No().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getNetSpot3Name().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<MeterWorkRailwayActFirst> carFirstTemp = carFirst.stream().filter(item -> item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<HashMap> carFirstLogTemp = carFirstLog.stream().filter(item -> item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- for(WorkLoadReportInfo model: models) {
|
|
|
-// objB.put("startTime", params.get("startTime"));
|
|
|
-// objB.put("endTime", params.get("endTime"));
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", model.getMeterMode());
|
|
|
- carMap.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
- carMap.put("meterTypeName", model.getMeterTypeName());
|
|
|
- carMap.put("createManNo", model.getCreateManNo());
|
|
|
- carMap.put("createManName", model.getCreateManName());
|
|
|
-
|
|
|
- carMap02List.add(carMap);
|
|
|
- long countActualSum = 0L;
|
|
|
- long countActualValidSum = 0L;
|
|
|
- long countFirstSum = 0L;
|
|
|
- long countFirsValidtSum = 0L;
|
|
|
- long carFirstLogSum = 0L;
|
|
|
- boolean T = StringUtils.isNotEmpty(model.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManName());
|
|
|
- if(carActual != null && carActual.size() >= 1) {
|
|
|
- countActualSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())).count();
|
|
|
- countActualValidSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())
|
|
|
- && (item.getIsPreSacale().equals("0") || StringUtils.isEmpty(item.getIsPreSacale()))).count();
|
|
|
- }
|
|
|
- if(carFirst != null && carFirst.size() >= 1) {
|
|
|
- countFirstSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())).count();
|
|
|
- //一次毛重
|
|
|
- countFirsValidtSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())
|
|
|
- && item.getValueFlag().equals("1")).count();
|
|
|
- }
|
|
|
- if(carFirstLog != null && carFirstLog.size() >= 1) {
|
|
|
- carFirstLogSum = carFirstLogTemp.stream().filter(item -> T
|
|
|
- && item.get("METER_MODE") != null
|
|
|
- && item.get("METER_TYPE_NO") != null
|
|
|
- && item.get("METER_TYPE_NAME") != null
|
|
|
- && item.get("CREATE_MAN_NO") != null
|
|
|
- && item.get("CREATE_MAN_NAMEss") != null
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_MODE").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- && item.get("METER_MODE").toString().equals(model.getMeterMode())
|
|
|
- && item.get("METER_TYPE_NO").toString().equals(model.getMeterTypeNo())
|
|
|
- && item.get("METER_TYPE_NAME").toString().equals(model.getMeterTypeName())
|
|
|
- && item.get("CREATE_MAN_NO").toString().equals(model.getCreateManNo())
|
|
|
- && item.get("CREATE_MAN_NAME").toString().equals(model.getCreateManName())).count();
|
|
|
- }
|
|
|
- carMap.put("countActualSum", countActualSum);
|
|
|
- carMap.put("countFirstSum", countFirstSum);
|
|
|
- carMap.put("carFirstLogSum", carFirstLogSum);
|
|
|
-
|
|
|
- countActualTemp += countActualSum;
|
|
|
- countFirstTemp += countFirstSum;
|
|
|
- countActualValidTemp += countActualValidSum;
|
|
|
- countFirstValidTemp += countFirsValidtSum;
|
|
|
- }
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }else {
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", null);
|
|
|
- carMap.put("meterTypeNo", null);
|
|
|
- carMap.put("meterTypeName", null);
|
|
|
- carMap.put("createManNo", null);
|
|
|
- carMap.put("createManName", null);
|
|
|
- carMap02List.add(carMap);
|
|
|
- carMap.put("countActualSum", 0L);
|
|
|
- carMap.put("countFirstSum", 0L);
|
|
|
- carMap.put("carFirstLogSum", 0L);
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }
|
|
|
- paramsList02.add(params02);
|
|
|
- }
|
|
|
- params01.put("countActualTemp", countActualTemp);
|
|
|
- params01.put("countFirstTemp", countFirstTemp);
|
|
|
- params01.put("type", "铁水衡");
|
|
|
- params01.put("countFirst", countFirstValidTemp);
|
|
|
- params01.put("countActual", countActualValidTemp);
|
|
|
- params01.put("children", paramsList02);
|
|
|
- paramsList.add(params01);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- {
|
|
|
- HashMap params01 = new HashMap();
|
|
|
- List<HashMap> paramsList02 = new ArrayList<>();
|
|
|
- countActualTemp = 0L;
|
|
|
- countFirstTemp = 0L;
|
|
|
- countActualValidTemp = 0L;
|
|
|
- countFirstValidTemp = 0L;
|
|
|
- List<MeterBaseSpotInfo> spotModelList = meterBaseSpotInfoMapper.staticSpotGroupByActualAndFirst(params);
|
|
|
- if(spotModelList.size() >= 1) {
|
|
|
- for(MeterBaseSpotInfo spotModel: spotModelList) {
|
|
|
- HashMap<String, Object> params02 = new HashMap<>();
|
|
|
- params02.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- params02.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-
|
|
|
- HashMap<String, Object> obj = new HashMap<>();
|
|
|
- obj.put("startTime", params.get("startTime"));
|
|
|
- obj.put("endTime", params.get("endTime"));
|
|
|
- String[] railwayTypeNo = new String[]{"001019005"};
|
|
|
- obj.put("railwayTypeNo", railwayTypeNo);
|
|
|
- obj.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
- obj.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
- List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
|
-
|
|
|
- HashMap<String, Object> objB = new HashMap<>();
|
|
|
- objB.put("startTime", params.get("startTime"));
|
|
|
- objB.put("endTime", params.get("endTime"));
|
|
|
- objB.put("railwayTypeNo", railwayTypeNo);
|
|
|
-// objB.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
|
-// objB.put("baseSpotName", spotModel.getBaseSpotName());
|
|
|
-// objB.put("meterMode", model.getMeterMode());
|
|
|
-// objB.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
-// objB.put("meterTypeName", model.getMeterTypeName());
|
|
|
-// objB.put("createManNo", model.getCreateManNo());
|
|
|
-// objB.put("createManName", model.getCreateManName());
|
|
|
- List<MeterWorkRailwayActual> carActual = meterWorkRailwayActualMapper.countDayAllState(objB);
|
|
|
- List<MeterWorkRailwayActFirst> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(objB);
|
|
|
- List<HashMap> carFirstLog = meterBaseOperationLogMapper.countAllFirstState03(objB);
|
|
|
- List<HashMap> carMap02List = new ArrayList<>();
|
|
|
- if(models.size() >= 1) {
|
|
|
- List<MeterWorkRailwayActual> carActualTemp = carActual.stream().filter(item -> item.getNetSpot3No().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getNetSpot3Name().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<MeterWorkRailwayActFirst> carFirstTemp = carFirst.stream().filter(item -> item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
|
|
|
- && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- List<HashMap> carFirstLogTemp = carFirstLog.stream().filter(item -> item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- for(WorkLoadReportInfo model: models) {
|
|
|
-// objB.put("startTime", params.get("startTime"));
|
|
|
-// objB.put("endTime", params.get("endTime"));
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", model.getMeterMode());
|
|
|
- carMap.put("meterTypeNo", model.getMeterTypeNo());
|
|
|
- carMap.put("meterTypeName", model.getMeterTypeName());
|
|
|
- carMap.put("createManNo", model.getCreateManNo());
|
|
|
- carMap.put("createManName", model.getCreateManName());
|
|
|
-
|
|
|
- carMap02List.add(carMap);
|
|
|
- long countActualSum = 0L;
|
|
|
- long countActualValidSum = 0L;
|
|
|
- long countFirstSum = 0L;
|
|
|
- long countFirsValidtSum = 0L;
|
|
|
- long carFirstLogSum = 0L;
|
|
|
- boolean T = StringUtils.isNotEmpty(model.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(model.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(model.getCreateManName());
|
|
|
- if(carActual != null && carActual.size() >= 1) {
|
|
|
- countActualSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())).count();
|
|
|
- countActualValidSum = carActualTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getNetMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getNetManName())
|
|
|
- && item.getNetMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getNetManNo().equals(model.getCreateManNo())
|
|
|
- && item.getNetManName().equals(model.getCreateManName())
|
|
|
- && (item.getIsPreSacale().equals("0") || StringUtils.isEmpty(item.getIsPreSacale()))).count();
|
|
|
- }
|
|
|
- if(carFirst != null && carFirst.size() >= 1) {
|
|
|
- countFirstSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())).count();
|
|
|
- //一次毛重
|
|
|
- countFirsValidtSum = carFirstTemp.stream().filter(item -> T
|
|
|
- && StringUtils.isNotEmpty(item.getMeterMode())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeNo())
|
|
|
- && StringUtils.isNotEmpty(item.getMeterTypeName())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManNo())
|
|
|
- && StringUtils.isNotEmpty(item.getCreateManName())
|
|
|
- && item.getMeterMode().equals(model.getMeterMode())
|
|
|
- && item.getMeterTypeNo().equals(model.getMeterTypeNo())
|
|
|
- && item.getMeterTypeName().equals(model.getMeterTypeName())
|
|
|
- && item.getCreateManNo().equals(model.getCreateManNo())
|
|
|
- && item.getCreateManName().equals(model.getCreateManName())
|
|
|
- && item.getValueFlag().equals("1")).count();
|
|
|
- }
|
|
|
- if(carFirstLog != null && carFirstLog.size() >= 1) {
|
|
|
- carFirstLogSum = carFirstLogTemp.stream().filter(item -> T
|
|
|
- && item.get("METER_MODE") != null
|
|
|
- && item.get("METER_TYPE_NO") != null
|
|
|
- && item.get("METER_TYPE_NAME") != null
|
|
|
- && item.get("CREATE_MAN_NO") != null
|
|
|
- && item.get("CREATE_MAN_NAMEss") != null
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_MODE").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- && StringUtils.isNotEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- && item.get("METER_MODE").toString().equals(model.getMeterMode())
|
|
|
- && item.get("METER_TYPE_NO").toString().equals(model.getMeterTypeNo())
|
|
|
- && item.get("METER_TYPE_NAME").toString().equals(model.getMeterTypeName())
|
|
|
- && item.get("CREATE_MAN_NO").toString().equals(model.getCreateManNo())
|
|
|
- && item.get("CREATE_MAN_NAME").toString().equals(model.getCreateManName())).count();
|
|
|
- }
|
|
|
- carMap.put("countActualSum", countActualSum);
|
|
|
- carMap.put("countFirstSum", countFirstSum);
|
|
|
- carMap.put("carFirstLogSum", carFirstLogSum);
|
|
|
-
|
|
|
- countActualTemp += countActualSum;
|
|
|
- countFirstTemp += countFirstSum;
|
|
|
- countActualValidTemp += countActualValidSum;
|
|
|
- countFirstValidTemp += countFirsValidtSum;
|
|
|
- }
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }else {
|
|
|
- HashMap<String, Object> carMap = new HashMap<>();
|
|
|
- carMap.put("meterMode", null);
|
|
|
- carMap.put("meterTypeNo", null);
|
|
|
- carMap.put("meterTypeName", null);
|
|
|
- carMap.put("createManNo", null);
|
|
|
- carMap.put("createManName", null);
|
|
|
- carMap02List.add(carMap);
|
|
|
- carMap.put("countActualSum", 0L);
|
|
|
- carMap.put("countFirstSum", 0L);
|
|
|
- carMap.put("carFirstLogSum", 0L);
|
|
|
- params02.put("childrenBase", carMap02List);
|
|
|
- }
|
|
|
- paramsList02.add(params02);
|
|
|
- }
|
|
|
- params01.put("countActualTemp", countActualTemp);
|
|
|
- params01.put("countFirstTemp", countFirstTemp);
|
|
|
- params01.put("type", "吊钩秤");
|
|
|
- params01.put("countFirst", countFirstValidTemp);
|
|
|
- params01.put("countActual", countActualValidTemp);
|
|
|
- params01.put("children", paramsList02);
|
|
|
- paramsList.add(params01);
|
|
|
- }
|
|
|
}
|
|
|
- */
|
|
|
return paramsList;
|
|
|
}
|
|
|
}
|