|
@@ -4,11 +4,15 @@ import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLog
|
|
|
import com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper;
|
|
import com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper;
|
|
|
import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
|
|
import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
|
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
|
|
|
+import com.steerinfo.framework.service.pagehelper.PageHelper;
|
|
|
|
|
+import com.steerinfo.framework.service.pagehelper.PageList;
|
|
|
import com.steerinfo.framework.user.UserPayload;
|
|
import com.steerinfo.framework.user.UserPayload;
|
|
|
import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMapper;
|
|
import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMapper;
|
|
|
import com.steerinfo.meterwork.meterworkcaractualfirst.mapper.MeterWorkCarActualFirstMapper;
|
|
import com.steerinfo.meterwork.meterworkcaractualfirst.mapper.MeterWorkCarActualFirstMapper;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.mapper.MeterWorkDataCountMapper;
|
|
import com.steerinfo.meterwork.meterworkdatacount.mapper.MeterWorkDataCountMapper;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.CarRegularComparison;
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.CarRegularComparison;
|
|
|
|
|
+import com.steerinfo.meterwork.meterworkdatacount.model.MeasurementAccuracyAnalysis;
|
|
|
|
|
+import com.steerinfo.meterwork.meterworkdatacount.model.TruckHisTareComparison;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.WorkLoadReportInfo;
|
|
import com.steerinfo.meterwork.meterworkdatacount.model.WorkLoadReportInfo;
|
|
|
import com.steerinfo.meterwork.meterworkdatacount.service.IMeterWorkDataCountService;
|
|
import com.steerinfo.meterwork.meterworkdatacount.service.IMeterWorkDataCountService;
|
|
|
import com.steerinfo.meterwork.meterworkrailwayactfirst.mapper.MeterWorkRailwayActFirstMapper;
|
|
import com.steerinfo.meterwork.meterworkrailwayactfirst.mapper.MeterWorkRailwayActFirstMapper;
|
|
@@ -65,19 +69,19 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
String userName = payload.getUserName();
|
|
String userName = payload.getUserName();
|
|
|
models.put("userId", userId);
|
|
models.put("userId", userId);
|
|
|
models.put("userName", userName);
|
|
models.put("userName", userName);
|
|
|
- models.put("myDate", str[0] + '年' + str[1] + '月'+ str[2] + '日');
|
|
|
|
|
|
|
+ models.put("myDate", str[0] + '年' + str[1] + '月' + str[2] + '日');
|
|
|
return models;
|
|
return models;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public RESTfulResult carRegularComparison(HashMap<String, Object> params){
|
|
|
|
|
|
|
+ public RESTfulResult carRegularComparison(HashMap<String, Object> params) {
|
|
|
RESTfulResult rm = new RESTfulResult();
|
|
RESTfulResult rm = new RESTfulResult();
|
|
|
rm.setFailed();
|
|
rm.setFailed();
|
|
|
- try{
|
|
|
|
|
|
|
+ try {
|
|
|
List<CarRegularComparison> models = new ArrayList<>();
|
|
List<CarRegularComparison> models = new ArrayList<>();
|
|
|
List<CarRegularComparison> modelsA = meterWorkDataCountMapper.carRegularComparisonA(params);
|
|
List<CarRegularComparison> modelsA = meterWorkDataCountMapper.carRegularComparisonA(params);
|
|
|
- if(modelsA.size() >= 1) {
|
|
|
|
|
- for(CarRegularComparison model: modelsA) {
|
|
|
|
|
|
|
+ if (modelsA.size() >= 1) {
|
|
|
|
|
+ for (CarRegularComparison model : modelsA) {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Calendar beforeTime = Calendar.getInstance();
|
|
Calendar beforeTime = Calendar.getInstance();
|
|
|
Calendar afterTime = Calendar.getInstance();
|
|
Calendar afterTime = Calendar.getInstance();
|
|
@@ -102,50 +106,50 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
&& s.getCreateTime().getTime() >= beforeD.getTime()
|
|
&& s.getCreateTime().getTime() >= beforeD.getTime()
|
|
|
&& s.getCreateTime().getTime() <= afterD.getTime()).collect(Collectors.toList());
|
|
&& s.getCreateTime().getTime() <= afterD.getTime()).collect(Collectors.toList());
|
|
|
// List<CarRegularComparison> modelsB = meterWorkDataCountMapper.carRegularComparisonB(map);
|
|
// List<CarRegularComparison> modelsB = meterWorkDataCountMapper.carRegularComparisonB(map);
|
|
|
- if(modelsB.size() >= 1) {
|
|
|
|
|
|
|
+ if (modelsB.size() >= 1) {
|
|
|
//去重
|
|
//去重
|
|
|
long count = models.stream().filter(item -> item.getActualFirstNo().equals(modelsB.get(0).getActualFirstNo())).count();
|
|
long count = models.stream().filter(item -> item.getActualFirstNo().equals(modelsB.get(0).getActualFirstNo())).count();
|
|
|
//一次作业编号不存在,则添加,否者,跳过
|
|
//一次作业编号不存在,则添加,否者,跳过
|
|
|
- if(count < 1) {
|
|
|
|
|
- SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
- Date timeDate1 = simpleFormat.parse(sdf.format(modelsB.get(0).getCreateTime()));
|
|
|
|
|
- Date timeDate2 = simpleFormat.parse(sdf.format(model.getCreateTime()));
|
|
|
|
|
- long time1 = timeDate1.getTime();
|
|
|
|
|
- long time2 = timeDate2.getTime();
|
|
|
|
|
- int minutes = Math.abs((int) ((time1 - time2) / (1000 * 60)));
|
|
|
|
|
- if(StringUtils.isEmpty(model.getWeightType()) || StringUtils.isEmpty(modelsB.get(0).getWeightType())){
|
|
|
|
|
- if(modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
- && minutes <= 20) {
|
|
|
|
|
- model.setMemo("双秤比对");
|
|
|
|
|
- model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
- models.add(model);
|
|
|
|
|
- models.add(modelsB.get(0));
|
|
|
|
|
- }else if(!modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
- && minutes >= 30 && minutes <= 60){
|
|
|
|
|
- model.setMemo("异地比对");
|
|
|
|
|
- model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
- models.add(model);
|
|
|
|
|
- models.add(modelsB.get(0));
|
|
|
|
|
- }
|
|
|
|
|
- }else if(StringUtils.isNotEmpty(model.getWeightType()) && StringUtils.isNotEmpty(modelsB.get(0).getWeightType())
|
|
|
|
|
- && !(modelsB.get(0).getWeightType().equals("0") && model.getWeightType().equals("1"))
|
|
|
|
|
- && !(modelsB.get(0).getWeightType().equals("1") && model.getWeightType().equals("0"))
|
|
|
|
|
- && !(modelsB.get(0).getWeightType().equals("0") && model.getWeightType().equals("2"))
|
|
|
|
|
- && !(modelsB.get(0).getWeightType().equals("2") && model.getWeightType().equals("0"))) {
|
|
|
|
|
- if(modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
- && minutes <= 20) {
|
|
|
|
|
- model.setMemo("双秤比对");
|
|
|
|
|
- model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
- models.add(model);
|
|
|
|
|
- models.add(modelsB.get(0));
|
|
|
|
|
- }else if(!modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
- && minutes >= 30 && minutes <= 60){
|
|
|
|
|
- model.setMemo("异地比对");
|
|
|
|
|
- model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
- models.add(model);
|
|
|
|
|
- models.add(modelsB.get(0));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (count < 1) {
|
|
|
|
|
+ SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ Date timeDate1 = simpleFormat.parse(sdf.format(modelsB.get(0).getCreateTime()));
|
|
|
|
|
+ Date timeDate2 = simpleFormat.parse(sdf.format(model.getCreateTime()));
|
|
|
|
|
+ long time1 = timeDate1.getTime();
|
|
|
|
|
+ long time2 = timeDate2.getTime();
|
|
|
|
|
+ int minutes = Math.abs((int) ((time1 - time2) / (1000 * 60)));
|
|
|
|
|
+ if (StringUtils.isEmpty(model.getWeightType()) || StringUtils.isEmpty(modelsB.get(0).getWeightType())) {
|
|
|
|
|
+ if (modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
+ && minutes <= 20) {
|
|
|
|
|
+ model.setMemo("双秤比对");
|
|
|
|
|
+ model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
+ models.add(model);
|
|
|
|
|
+ models.add(modelsB.get(0));
|
|
|
|
|
+ } else if (!modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
+ && minutes >= 30 && minutes <= 60) {
|
|
|
|
|
+ model.setMemo("异地比对");
|
|
|
|
|
+ model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
+ models.add(model);
|
|
|
|
|
+ models.add(modelsB.get(0));
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (StringUtils.isNotEmpty(model.getWeightType()) && StringUtils.isNotEmpty(modelsB.get(0).getWeightType())
|
|
|
|
|
+ && !(modelsB.get(0).getWeightType().equals("0") && model.getWeightType().equals("1"))
|
|
|
|
|
+ && !(modelsB.get(0).getWeightType().equals("1") && model.getWeightType().equals("0"))
|
|
|
|
|
+ && !(modelsB.get(0).getWeightType().equals("0") && model.getWeightType().equals("2"))
|
|
|
|
|
+ && !(modelsB.get(0).getWeightType().equals("2") && model.getWeightType().equals("0"))) {
|
|
|
|
|
+ if (modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
+ && minutes <= 20) {
|
|
|
|
|
+ model.setMemo("双秤比对");
|
|
|
|
|
+ model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
+ models.add(model);
|
|
|
|
|
+ models.add(modelsB.get(0));
|
|
|
|
|
+ } else if (!modelsB.get(0).getSpotAreaNo().equals(model.getSpotAreaNo())
|
|
|
|
|
+ && minutes >= 30 && minutes <= 60) {
|
|
|
|
|
+ model.setMemo("异地比对");
|
|
|
|
|
+ model.setSubstract(model.getMeterWeight().subtract(modelsB.get(0).getMeterWeight()));
|
|
|
|
|
+ models.add(model);
|
|
|
|
|
+ models.add(modelsB.get(0));
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -154,7 +158,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
rm.setSucceed(true);
|
|
rm.setSucceed(true);
|
|
|
rm.setData(models);
|
|
rm.setData(models);
|
|
|
rm.setMessage("操作成功!!");
|
|
rm.setMessage("操作成功!!");
|
|
|
- }catch(Exception e){
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
rm.setMessage("操作失败:>>>" + e.getMessage());
|
|
rm.setMessage("操作失败:>>>" + e.getMessage());
|
|
|
}
|
|
}
|
|
@@ -164,7 +168,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
@Override
|
|
@Override
|
|
|
public List<HashMap> countDayAllSpot(HashMap<String, Object> params) {
|
|
public List<HashMap> countDayAllSpot(HashMap<String, Object> params) {
|
|
|
|
|
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
String[] spotNoStr = params.get("netSpot3NoStr").toString().split(",");
|
|
String[] spotNoStr = params.get("netSpot3NoStr").toString().split(",");
|
|
|
params.put("spotNoStr", spotNoStr);
|
|
params.put("spotNoStr", spotNoStr);
|
|
|
}
|
|
}
|
|
@@ -186,14 +190,14 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> actualMap = new HashMap<>();
|
|
HashMap<String, Object> actualMap = new HashMap<>();
|
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
actualMap.put("validFlag", "1");
|
|
actualMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualTotal = meterWorkCarActualMapper.countDayAllState(actualMap);
|
|
List<HashMap> carActualTotal = meterWorkCarActualMapper.countDayAllState(actualMap);
|
|
|
- if(carActualTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carActualTotal) {
|
|
|
|
|
|
|
+ if (carActualTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carActualTotal) {
|
|
|
countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -201,7 +205,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> actualVoidMap = new HashMap<>();
|
|
HashMap<String, Object> actualVoidMap = new HashMap<>();
|
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -211,15 +215,15 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> actualNotMatchScaleMap = new HashMap<>();
|
|
HashMap<String, Object> actualNotMatchScaleMap = new HashMap<>();
|
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
actualNotMatchScaleMap.put("isPreScale", "0");
|
|
actualNotMatchScaleMap.put("isPreScale", "0");
|
|
|
actualNotMatchScaleMap.put("validFlag", "1");
|
|
actualNotMatchScaleMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualNotMatchTotal = meterWorkCarActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
List<HashMap> carActualNotMatchTotal = meterWorkCarActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
|
- if(carActualNotMatchTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carActualNotMatchTotal) {
|
|
|
|
|
|
|
+ if (carActualNotMatchTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carActualNotMatchTotal) {
|
|
|
countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -227,14 +231,14 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
firstMap.put("validFlag", "1");
|
|
firstMap.put("validFlag", "1");
|
|
|
List<HashMap> carFirstTotal = meterWorkCarActualFirstMaper.countDayAllState(firstMap);
|
|
List<HashMap> carFirstTotal = meterWorkCarActualFirstMaper.countDayAllState(firstMap);
|
|
|
- if(carFirstTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carFirstTotal) {
|
|
|
|
|
|
|
+ if (carFirstTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carFirstTotal) {
|
|
|
countFirstTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
countFirstTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -242,21 +246,21 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstNotNetMap = new HashMap<>();
|
|
HashMap<String, Object> firstNotNetMap = new HashMap<>();
|
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
|
List<HashMap> carFirst = meterWorkCarActualFirstMaper.countDayAllState(firstNotNetMap);
|
|
List<HashMap> carFirst = meterWorkCarActualFirstMaper.countDayAllState(firstNotNetMap);
|
|
|
- if(carFirst.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carFirst) {
|
|
|
|
|
|
|
+ if (carFirst.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carFirst) {
|
|
|
countFirstValidTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
countFirstValidTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
HashMap<String, Object> firstResetMap = new HashMap<>();
|
|
HashMap<String, Object> firstResetMap = new HashMap<>();
|
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -265,7 +269,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> obj = new HashMap<>();
|
|
HashMap<String, Object> obj = new HashMap<>();
|
|
|
obj.put("startTime", params.get("startTime"));
|
|
obj.put("startTime", params.get("startTime"));
|
|
|
obj.put("endTime", params.get("endTime"));
|
|
obj.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
obj.put("spotNoStr", params.get("spotNoStr"));
|
|
obj.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -286,19 +290,19 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
//总结净数
|
|
//总结净数
|
|
|
List<HashMap> carActualTotalTemp01 = carActualTotal.stream().filter(item ->
|
|
List<HashMap> carActualTotalTemp01 = carActualTotal.stream().filter(item ->
|
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("NET_SPOT3_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ && item.get("NET_SPOT3_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
//作废结净总数
|
|
//作废结净总数
|
|
|
List<HashMap> carActualVoidTotalTemp01 = carActualVoidTotal.stream().filter(item ->
|
|
List<HashMap> carActualVoidTotalTemp01 = carActualVoidTotal.stream().filter(item ->
|
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("NET_SPOT3_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ && item.get("NET_SPOT3_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
//一次计量总数
|
|
//一次计量总数
|
|
|
List<HashMap> carFirstTotalTemp01 = carFirstTotal.stream().filter(item ->
|
|
List<HashMap> carFirstTotalTemp01 = carFirstTotal.stream().filter(item ->
|
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
//修改车号总数
|
|
//修改车号总数
|
|
|
List<HashMap> carFirstLogTemp01 = carFirstLog.stream().filter(item ->
|
|
List<HashMap> carFirstLogTemp01 = carFirstLog.stream().filter(item ->
|
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
- && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ && item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
for (WorkLoadReportInfo model : modelTemp) {
|
|
for (WorkLoadReportInfo model : modelTemp) {
|
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
@@ -326,7 +330,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -342,7 +346,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -358,7 +362,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carFirstTotalTemp02 != null && carFirstTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carFirstTotalTemp02 != null && carFirstTotalTemp02.size() >= 1) {
|
|
|
countFirstSum = Long.parseLong(carFirstTotalTemp02.get(0).get("COUNT_FIRST").toString());
|
|
countFirstSum = Long.parseLong(carFirstTotalTemp02.get(0).get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -366,14 +370,14 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
List<HashMap> carFirstLogTemp02 = carFirstLogTemp01.stream().filter(item ->
|
|
List<HashMap> carFirstLogTemp02 = carFirstLogTemp01.stream().filter(item ->
|
|
|
(item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
(item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").toString().equals(model.getMeterMode()))
|
|
|| StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").toString().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").toString().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").toString().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").toString().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").toString().equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
|
|
|
|
+ && (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
|
|
+ || StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").toString().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").toString().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").toString().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").toString().equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if (carFirstLogTemp02 != null && carFirstLogTemp02.size() >= 1) {
|
|
if (carFirstLogTemp02 != null && carFirstLogTemp02.size() >= 1) {
|
|
|
carFirstLogSum = Long.parseLong(carFirstLogTemp02.get(0).get("COUNT_RESETCAR").toString());
|
|
carFirstLogSum = Long.parseLong(carFirstLogTemp02.get(0).get("COUNT_RESETCAR").toString());
|
|
|
}
|
|
}
|
|
@@ -389,7 +393,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
|
}
|
|
}
|
|
|
params02.put("childrenBase", carMap02List);
|
|
params02.put("childrenBase", carMap02List);
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
|
carMap.put("meterMode", null);
|
|
carMap.put("meterMode", null);
|
|
|
carMap.put("meterTypeNo", null);
|
|
carMap.put("meterTypeNo", null);
|
|
@@ -415,8 +419,8 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- String[][] railwayTypeNoList = new String[][]{{"001019001"},{"001019002"}, {"001019003", "001019004"}, {"001019005"}};
|
|
|
|
|
- for(int i = 0; i <= railwayTypeNoList.length-1; i++) {
|
|
|
|
|
|
|
+ String[][] railwayTypeNoList = new String[][]{{"001019001"}, {"001019002"}, {"001019003", "001019004"}, {"001019005"}};
|
|
|
|
|
+ for (int i = 0; i <= railwayTypeNoList.length - 1; i++) {
|
|
|
String[] railwayTypeNo = railwayTypeNoList[i];
|
|
String[] railwayTypeNo = railwayTypeNoList[i];
|
|
|
HashMap params01 = new HashMap();
|
|
HashMap params01 = new HashMap();
|
|
|
List<HashMap> paramsList02 = new ArrayList<>();
|
|
List<HashMap> paramsList02 = new ArrayList<>();
|
|
@@ -434,7 +438,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
spotModelMap.put("startTime", params.get("startTime"));
|
|
spotModelMap.put("startTime", params.get("startTime"));
|
|
|
spotModelMap.put("endTime", params.get("endTime"));
|
|
spotModelMap.put("endTime", params.get("endTime"));
|
|
|
spotModelMap.put("railwayTypeNo", railwayTypeNo);
|
|
spotModelMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
spotModelMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
spotModelMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
spotModelMap.put("spotNoStr", params.get("spotNoStr"));
|
|
spotModelMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -445,14 +449,14 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
actualMap.put("startTime", params.get("startTime"));
|
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
actualMap.put("endTime", params.get("endTime"));
|
|
|
actualMap.put("railwayTypeNo", railwayTypeNo);
|
|
actualMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
actualMap.put("validFlag", "1");
|
|
actualMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualTotal = meterWorkRailwayActualMapper.countDayAllState(actualMap);
|
|
List<HashMap> carActualTotal = meterWorkRailwayActualMapper.countDayAllState(actualMap);
|
|
|
- if(carActualTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carActualTotal) {
|
|
|
|
|
|
|
+ if (carActualTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carActualTotal) {
|
|
|
countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
countActualTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -461,7 +465,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
actualVoidMap.put("startTime", params.get("startTime"));
|
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
actualVoidMap.put("endTime", params.get("endTime"));
|
|
|
actualVoidMap.put("railwayTypeNo", railwayTypeNo);
|
|
actualVoidMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualVoidMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualVoidMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -472,15 +476,15 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
actualNotMatchScaleMap.put("startTime", params.get("startTime"));
|
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
actualNotMatchScaleMap.put("endTime", params.get("endTime"));
|
|
|
actualNotMatchScaleMap.put("railwayTypeNo", railwayTypeNo);
|
|
actualNotMatchScaleMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
actualNotMatchScaleMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
actualNotMatchScaleMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
actualNotMatchScaleMap.put("isPreSacale", "0");
|
|
actualNotMatchScaleMap.put("isPreSacale", "0");
|
|
|
actualNotMatchScaleMap.put("validFlag", "1");
|
|
actualNotMatchScaleMap.put("validFlag", "1");
|
|
|
List<HashMap> carActualNotMatchTotal = meterWorkRailwayActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
List<HashMap> carActualNotMatchTotal = meterWorkRailwayActualMapper.countDayAllState(actualNotMatchScaleMap);
|
|
|
- if(carActualNotMatchTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carActualNotMatchTotal) {
|
|
|
|
|
|
|
+ if (carActualNotMatchTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carActualNotMatchTotal) {
|
|
|
countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
countActualValidTemp += Long.parseLong(modelTemp.get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -488,15 +492,15 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
HashMap<String, Object> firstMap = new HashMap<>();
|
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
firstMap.put("startTime", params.get("startTime"));
|
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
firstMap.put("endTime", params.get("endTime"));
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
firstMap.put("railwayTypeNo", railwayTypeNo);
|
|
firstMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
firstMap.put("validFlag", "1");
|
|
firstMap.put("validFlag", "1");
|
|
|
List<HashMap> carFirstTotal = meterWorkRailwayActFirstMapper.countDayAllState(firstMap);
|
|
List<HashMap> carFirstTotal = meterWorkRailwayActFirstMapper.countDayAllState(firstMap);
|
|
|
- if(carFirstTotal.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carFirstTotal) {
|
|
|
|
|
|
|
+ if (carFirstTotal.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carFirstTotal) {
|
|
|
countFirstTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
countFirstTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -505,14 +509,14 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
firstNotNetMap.put("startTime", params.get("startTime"));
|
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
firstNotNetMap.put("endTime", params.get("endTime"));
|
|
|
firstNotNetMap.put("railwayTypeNo", railwayTypeNo);
|
|
firstNotNetMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstNotNetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstNotNetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
firstNotNetMap.put("valueFlag", "1");
|
|
|
List<HashMap> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(firstNotNetMap);
|
|
List<HashMap> carFirst = meterWorkRailwayActFirstMapper.countDayAllState(firstNotNetMap);
|
|
|
- if(carFirst.size() >= 1) {
|
|
|
|
|
- for(HashMap modelTemp: carFirst) {
|
|
|
|
|
|
|
+ if (carFirst.size() >= 1) {
|
|
|
|
|
+ for (HashMap modelTemp : carFirst) {
|
|
|
countFirstValidTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
countFirstValidTemp += Long.parseLong(modelTemp.get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -520,7 +524,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
firstResetMap.put("startTime", params.get("startTime"));
|
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
firstResetMap.put("endTime", params.get("endTime"));
|
|
|
firstResetMap.put("railwayTypeNo", railwayTypeNo);
|
|
firstResetMap.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
firstResetMap.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
firstResetMap.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
@@ -530,13 +534,13 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
obj.put("startTime", params.get("startTime"));
|
|
obj.put("startTime", params.get("startTime"));
|
|
|
obj.put("endTime", params.get("endTime"));
|
|
obj.put("endTime", params.get("endTime"));
|
|
|
obj.put("railwayTypeNo", railwayTypeNo);
|
|
obj.put("railwayTypeNo", railwayTypeNo);
|
|
|
- if(params.get("netSpot3NoStr") != null) {
|
|
|
|
|
|
|
+ if (params.get("netSpot3NoStr") != null) {
|
|
|
obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
obj.put("netSpot3NoStr", params.get("netSpot3NoStr"));
|
|
|
obj.put("spotNoStr", params.get("spotNoStr"));
|
|
obj.put("spotNoStr", params.get("spotNoStr"));
|
|
|
}
|
|
}
|
|
|
List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
List<WorkLoadReportInfo> models = meterWorkDataCountMapper.groupByDayStaticReportInfo(obj);
|
|
|
- if(spotModelList.size() >= 1) {
|
|
|
|
|
- for(MeterBaseSpotInfo spotModel: spotModelList) {
|
|
|
|
|
|
|
+ if (spotModelList.size() >= 1) {
|
|
|
|
|
+ for (MeterBaseSpotInfo spotModel : spotModelList) {
|
|
|
//写入返回值
|
|
//写入返回值
|
|
|
HashMap<String, Object> params02 = new HashMap<>();
|
|
HashMap<String, Object> params02 = new HashMap<>();
|
|
|
params02.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
params02.put("baseSpotNo", spotModel.getBaseSpotNo());
|
|
@@ -546,7 +550,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
List<WorkLoadReportInfo> modelTemp = models.stream()
|
|
List<WorkLoadReportInfo> modelTemp = models.stream()
|
|
|
.filter(item -> item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
|
|
.filter(item -> item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
|
|
|
&& item.getBaseSpotName().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
&& item.getBaseSpotName().equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- if(modelTemp.size() >= 1) {
|
|
|
|
|
|
|
+ if (modelTemp.size() >= 1) {
|
|
|
//总结净数
|
|
//总结净数
|
|
|
List<HashMap> carActualTotalTemp01 = carActualTotal.stream().filter(item ->
|
|
List<HashMap> carActualTotalTemp01 = carActualTotal.stream().filter(item ->
|
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("NET_SPOT3_NO").equals(spotModel.getBaseSpotNo())
|
|
@@ -563,7 +567,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
List<HashMap> carFirstLogTemp01 = carFirstLog.stream().filter(item ->
|
|
List<HashMap> carFirstLogTemp01 = carFirstLog.stream().filter(item ->
|
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
item.get("BASE_SPOT_NO").equals(spotModel.getBaseSpotNo())
|
|
|
&& item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
&& item.get("BASE_SPOT_NAME").equals(spotModel.getBaseSpotName())).collect(Collectors.toList());
|
|
|
- for(WorkLoadReportInfo model: modelTemp) {
|
|
|
|
|
|
|
+ for (WorkLoadReportInfo model : modelTemp) {
|
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
|
carMap.put("meterMode", model.getMeterMode());
|
|
carMap.put("meterMode", model.getMeterMode());
|
|
|
carMap.put("meterTypeNo", model.getMeterTypeNo());
|
|
carMap.put("meterTypeNo", model.getMeterTypeNo());
|
|
@@ -589,7 +593,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carActualTotalTemp02 != null && carActualTotalTemp02.size() >= 1) {
|
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
countActualSum = Long.parseLong(carActualTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -605,7 +609,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("NET_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("NET_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carActualVoidTotalTemp02 != null && carActualVoidTotalTemp02.size() >= 1) {
|
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
countActualValidSum = Long.parseLong(carActualVoidTotalTemp02.get(0).get("COUNT_ACTUAL").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -621,7 +625,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
|| StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").equals(model.getCreateManNo()))
|
|
|| 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())
|
|
&& (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());
|
|
|| StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
- if(carFirstTotalTemp02 != null && carFirstTotalTemp02.size() >= 1) {
|
|
|
|
|
|
|
+ if (carFirstTotalTemp02 != null && carFirstTotalTemp02.size() >= 1) {
|
|
|
countFirstSum = Long.parseLong(carFirstTotalTemp02.get(0).get("COUNT_FIRST").toString());
|
|
countFirstSum = Long.parseLong(carFirstTotalTemp02.get(0).get("COUNT_FIRST").toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -630,13 +634,13 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
(item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
(item.get("METER_MODE") == null || StringUtils.isEmpty(item.get("METER_MODE").toString())
|
|
|
|| StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").toString().equals(model.getMeterMode()))
|
|
|| StringUtils.isEmpty(model.getMeterMode()) || item.get("METER_MODE").toString().equals(model.getMeterMode()))
|
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
&& (item.get("METER_TYPE_NO") == null || StringUtils.isEmpty(item.get("METER_TYPE_NO").toString())
|
|
|
- ||StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").toString().equals(model.getMeterTypeNo()))
|
|
|
|
|
|
|
+ || StringUtils.isEmpty(model.getMeterTypeNo()) || item.get("METER_TYPE_NO").toString().equals(model.getMeterTypeNo()))
|
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
&& (item.get("METER_TYPE_NAME") == null || StringUtils.isEmpty(item.get("METER_TYPE_NAME").toString())
|
|
|
- ||StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").toString().equals(model.getMeterTypeName()))
|
|
|
|
|
|
|
+ || StringUtils.isEmpty(model.getMeterTypeName()) || item.get("METER_TYPE_NAME").toString().equals(model.getMeterTypeName()))
|
|
|
&& (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
&& (item.get("CREATE_MAN_NO") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NO").toString())
|
|
|
- ||StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").toString().equals(model.getCreateManNo()))
|
|
|
|
|
|
|
+ || StringUtils.isEmpty(model.getCreateManNo()) || item.get("CREATE_MAN_NO").toString().equals(model.getCreateManNo()))
|
|
|
&& (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
&& (item.get("CREATE_MAN_NAME") == null || StringUtils.isEmpty(item.get("CREATE_MAN_NAME").toString())
|
|
|
- ||StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").toString().equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
|
|
|
|
+ || StringUtils.isEmpty(model.getCreateManName()) || item.get("CREATE_MAN_NAME").toString().equals(model.getCreateManName()))).collect(Collectors.toList());
|
|
|
if (carFirstLogTemp02 != null && carFirstLogTemp02.size() >= 1) {
|
|
if (carFirstLogTemp02 != null && carFirstLogTemp02.size() >= 1) {
|
|
|
carFirstLogSum = Long.parseLong(carFirstLogTemp02.get(0).get("COUNT_RESETCAR").toString());
|
|
carFirstLogSum = Long.parseLong(carFirstLogTemp02.get(0).get("COUNT_RESETCAR").toString());
|
|
|
}
|
|
}
|
|
@@ -652,7 +656,7 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
// countFirstValidTemp += countFirsValidtSum;
|
|
|
}
|
|
}
|
|
|
params02.put("childrenBase", carMap02List);
|
|
params02.put("childrenBase", carMap02List);
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
HashMap<String, Object> carMap = new HashMap<>();
|
|
|
carMap.put("meterMode", null);
|
|
carMap.put("meterMode", null);
|
|
|
carMap.put("meterTypeNo", null);
|
|
carMap.put("meterTypeNo", null);
|
|
@@ -669,13 +673,13 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}
|
|
}
|
|
|
params01.put("countActualTemp", countActualValidTemp);
|
|
params01.put("countActualTemp", countActualValidTemp);
|
|
|
params01.put("countFirstTemp", countFirstValidTemp);
|
|
params01.put("countFirstTemp", countFirstValidTemp);
|
|
|
- if(i == 0) {
|
|
|
|
|
|
|
+ if (i == 0) {
|
|
|
params01.put("type", "静态轨轨道衡");
|
|
params01.put("type", "静态轨轨道衡");
|
|
|
- }else if(i == 1){
|
|
|
|
|
|
|
+ } else if (i == 1) {
|
|
|
params01.put("type", "动态轨轨道衡");
|
|
params01.put("type", "动态轨轨道衡");
|
|
|
- }else if(i == 2){
|
|
|
|
|
|
|
+ } else if (i == 2) {
|
|
|
params01.put("type", "铁水衡");
|
|
params01.put("type", "铁水衡");
|
|
|
- }else if(i == 3){
|
|
|
|
|
|
|
+ } else if (i == 3) {
|
|
|
params01.put("type", "吊钩秤");
|
|
params01.put("type", "吊钩秤");
|
|
|
}
|
|
}
|
|
|
params01.put("countFirst", countFirstTemp);
|
|
params01.put("countFirst", countFirstTemp);
|
|
@@ -687,4 +691,30 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
|
|
|
}
|
|
}
|
|
|
return paramsList;
|
|
return paramsList;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public PageList<TruckHisTareComparison> truckHisTareComparison(HashMap<String, Object> params) {
|
|
|
|
|
+ PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
|
|
|
|
|
+ List<TruckHisTareComparison> models = meterWorkDataCountMapper.truckHisTareComparison(params);
|
|
|
|
|
+ PageList<TruckHisTareComparison> rows = new PageList<>(models);
|
|
|
|
|
+ return rows;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public PageList<MeasurementAccuracyAnalysis> measurementAccuracyAnalysis(HashMap<String, Object> params) {
|
|
|
|
|
+ PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
|
|
|
|
|
+ List<MeasurementAccuracyAnalysis> models = meterWorkDataCountMapper.measurementAccuracyAnalysis(params);
|
|
|
|
|
+ if (models.size() >= 1) {
|
|
|
|
|
+ for (MeasurementAccuracyAnalysis model : models) {
|
|
|
|
|
+ if (StringUtils.isNotEmpty(model.getBeforeFix())) {
|
|
|
|
|
+ String str = model.getBeforeFix();
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotEmpty(model.getAfterFix())) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ PageList<MeasurementAccuracyAnalysis> rows = new PageList<>(models);
|
|
|
|
|
+ return rows;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|