Commit 4f51ee70 authored by 史志龙's avatar 史志龙

检查记录汇总--shizhilong

parent 6e66c914
...@@ -211,8 +211,21 @@ public class AnalysisAlgorithmLine { ...@@ -211,8 +211,21 @@ public class AnalysisAlgorithmLine {
List<TrackBedManagementCheck> ekList = trackBedManagementCheckService.lambdaQuery().eq(TrackBedManagementCheck::getRecordsMasterCheckId, checkDataMap.getEkId()).eq(TrackBedManagementCheck::getDelFlag, "0") List<TrackBedManagementCheck> ekList = trackBedManagementCheckService.lambdaQuery().eq(TrackBedManagementCheck::getRecordsMasterCheckId, checkDataMap.getEkId()).eq(TrackBedManagementCheck::getDelFlag, "0")
.list(); .list();
if (checkDataMap != null) { if (checkDataMap != null) {
//判断是否标记为异常
Integer markStatus = 1;
if (CollectionUtils.isEmpty(ekList)) {
markStatus = 1;
} else {
for (TrackBedManagementCheck model : ekList) {
//不合格
if(model.getEkProjectStatus().equals("3")){
markStatus = 2;
break;
}
}
}
//保存单元信息 //保存单元信息
String deviceId = saveTrackBedUnit(analysisLineBatch, checkDataMap, unitList); String deviceId = saveTrackBedUnit(analysisLineBatch, checkDataMap, unitList, markStatus);
if (CollectionUtils.isNotEmpty(ekList)) { if (CollectionUtils.isNotEmpty(ekList)) {
ekList.forEach(model -> { ekList.forEach(model -> {
//保存道床单元信息详情 //保存道床单元信息详情
...@@ -247,10 +260,34 @@ public class AnalysisAlgorithmLine { ...@@ -247,10 +260,34 @@ public class AnalysisAlgorithmLine {
//获取分析批次筛选的单元设备编码 //获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString(); String unitCode = map.get("unitCode").toString();
String deviceCode = map.get("deviceCode").toString(); String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备 //判断分析批次的设备与检查时维护的设备是同一个设备
List<CorrugationRecord> corrugationRecordList = deviceProjectList.get(unitCode); List<CorrugationRecord> corrugationRecordList = deviceProjectList.get(unitCode);
//判断是否标记为异常 1为待标记 2为异常
Integer markStatus = 1;
if (CollectionUtils.isEmpty(corrugationRecordList)) {
markStatus = 1;
} else {
for (CorrugationRecord model : corrugationRecordList) {
//检查项目-波段-谷深(10-30)
BigDecimal checkBandOne = model.getCheckBandOne();
//检查项目-波段-谷深(30-100)
BigDecimal checkBandTwo = model.getCheckBandTwo();
//检查项目-波段-谷深(100-300)
BigDecimal checkBandThree = model.getCheckBandThree();
//检查项目-波段-谷深(300-1000)
BigDecimal checkBandFour = model.getCheckBandFour();
BigDecimal num = new BigDecimal("0.2");
if (checkBandOne.compareTo(num) > 0 || checkBandTwo.compareTo(num) > 0
|| checkBandThree.compareTo(num) > 0 || checkBandFour.compareTo(num) > 0) {
markStatus = 2;
break;
}
}
}
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode, markStatus);
if (CollectionUtils.isNotEmpty(corrugationRecordList)) { if (CollectionUtils.isNotEmpty(corrugationRecordList)) {
corrugationRecordList.forEach(model -> { corrugationRecordList.forEach(model -> {
//保存道岔单元信息详情 //保存道岔单元信息详情
...@@ -290,10 +327,22 @@ public class AnalysisAlgorithmLine { ...@@ -290,10 +327,22 @@ public class AnalysisAlgorithmLine {
//获取分析批次筛选的单元设备编码 //获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString(); String unitCode = map.get("unitCode").toString();
String deviceCode = map.get("deviceCode").toString(); String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备 //判断分析批次的设备与检查时维护的设备是同一个设备
List<CurveWearRecord> curveWearRecordList = deviceProjectList.get(unitCode); List<CurveWearRecord> curveWearRecordList = deviceProjectList.get(unitCode);
//判断是否标记异常
Integer markStatus = 1;
if (CollectionUtils.isEmpty(curveWearRecordList)) {
markStatus = 1;
} else {
for (CurveWearRecord model : curveWearRecordList) {
if (model.getOverType() > 1) {
markStatus = 2;
break;
}
}
}
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode, markStatus);
if (CollectionUtils.isNotEmpty(curveWearRecordList)) { if (CollectionUtils.isNotEmpty(curveWearRecordList)) {
curveWearRecordList.forEach(model -> { curveWearRecordList.forEach(model -> {
//保存道岔单元信息详情 //保存道岔单元信息详情
...@@ -329,10 +378,18 @@ public class AnalysisAlgorithmLine { ...@@ -329,10 +378,18 @@ public class AnalysisAlgorithmLine {
//获取分析批次筛选的单元设备编码 //获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString(); String unitCode = map.get("unitCode").toString();
String deviceCode = map.get("deviceCode").toString(); String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备 //判断分析批次的设备与检查时维护的设备是同一个设备
List<RailWearRecord> railWearRecordList = deviceProjectList.get(unitCode); List<RailWearRecord> railWearRecordList = deviceProjectList.get(unitCode);
//判断是否标记异常
Integer markStatus = null;
if (CollectionUtils.isEmpty(railWearRecordList)) {
markStatus = 1;
} else {
markStatus = 2;
}
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode, markStatus);
if (CollectionUtils.isNotEmpty(railWearRecordList)) { if (CollectionUtils.isNotEmpty(railWearRecordList)) {
railWearRecordList.forEach(model -> { railWearRecordList.forEach(model -> {
//保存道岔单元信息详情 //保存道岔单元信息详情
...@@ -371,7 +428,7 @@ public class AnalysisAlgorithmLine { ...@@ -371,7 +428,7 @@ public class AnalysisAlgorithmLine {
//获取分析批次筛选的道岔编号 //获取分析批次筛选的道岔编号
String deviceCode = map.get("deviceCode").toString(); String deviceCode = map.get("deviceCode").toString();
//保存单元信息 //保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode); String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode, 1);
//判断分析批次的道岔编号在检查时维护的道岔编号是同一个编号 //判断分析批次的道岔编号在检查时维护的道岔编号是同一个编号
List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList = switchCodeList.get(deviceCode); List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList = switchCodeList.get(deviceCode);
if (CollectionUtils.isNotEmpty(recordsMasterTurnoutInfoList)) { if (CollectionUtils.isNotEmpty(recordsMasterTurnoutInfoList)) {
...@@ -399,7 +456,7 @@ public class AnalysisAlgorithmLine { ...@@ -399,7 +456,7 @@ public class AnalysisAlgorithmLine {
* @param unitList 最终封装到的集合 * @param unitList 最终封装到的集合
*/ */
public String savePatrolUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap public String savePatrolUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap
checkDataMap, List<AnalysisLineBatchUnitDevice> unitList,List<RecordPatrolMasterInfo> ekIfoList) { checkDataMap, List<AnalysisLineBatchUnitDevice> unitList, List<RecordPatrolMasterInfo> ekIfoList) {
//维护单元表 //维护单元表
AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice(); AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice();
...@@ -422,10 +479,10 @@ public class AnalysisAlgorithmLine { ...@@ -422,10 +479,10 @@ public class AnalysisAlgorithmLine {
ekIfoList = ekIfoList.stream().filter ekIfoList = ekIfoList.stream().filter
(map -> "1".equals(map.getStatus())).collect(Collectors.toList()); (map -> "1".equals(map.getStatus())).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(ekIfoList)){ if (CollectionUtils.isNotEmpty(ekIfoList)) {
unit.setCheckStatus(2); unit.setCheckStatus(2);
unit.setMarkStatus(2); unit.setMarkStatus(2);
}else { } else {
unit.setCheckStatus(1); unit.setCheckStatus(1);
unit.setMarkStatus(3); unit.setMarkStatus(3);
} }
...@@ -441,7 +498,7 @@ public class AnalysisAlgorithmLine { ...@@ -441,7 +498,7 @@ public class AnalysisAlgorithmLine {
* @param unitList 最终封装到的集合 * @param unitList 最终封装到的集合
*/ */
public String saveTrackBedUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap public String saveTrackBedUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap
checkDataMap, List<AnalysisLineBatchUnitDevice> unitList) { checkDataMap, List<AnalysisLineBatchUnitDevice> unitList, Integer markStatus) {
//维护单元表 //维护单元表
AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice(); AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice();
...@@ -453,7 +510,7 @@ public class AnalysisAlgorithmLine { ...@@ -453,7 +510,7 @@ public class AnalysisAlgorithmLine {
unit.setUnitStartMileage(checkDataMap.getStartingMileage()); unit.setUnitStartMileage(checkDataMap.getStartingMileage());
unit.setUnitEndMileage(checkDataMap.getEndMileage()); unit.setUnitEndMileage(checkDataMap.getEndMileage());
unit.setWorkStatus(1); unit.setWorkStatus(1);
unit.setMarkStatus(1); unit.setMarkStatus(markStatus);
unit.setCreateBy(checkDataMap.getCreateBy()); unit.setCreateBy(checkDataMap.getCreateBy());
unit.setUpdateBy(checkDataMap.getUpdateBy()); unit.setUpdateBy(checkDataMap.getUpdateBy());
unit.setRemark(analysisLineBatch.getRemark()); unit.setRemark(analysisLineBatch.getRemark());
...@@ -469,7 +526,7 @@ public class AnalysisAlgorithmLine { ...@@ -469,7 +526,7 @@ public class AnalysisAlgorithmLine {
* @param switchCode 设备编码 * @param switchCode 设备编码
*/ */
public String saveUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap public String saveUnit(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap
checkDataMap, Map<String, Object> map, List<AnalysisLineBatchUnitDevice> unitList, String switchCode) { checkDataMap, Map<String, Object> map, List<AnalysisLineBatchUnitDevice> unitList, String switchCode, Integer markStatus) {
//维护单元表 //维护单元表
AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice(); AnalysisLineBatchUnitDevice unit = new AnalysisLineBatchUnitDevice();
...@@ -487,7 +544,7 @@ public class AnalysisAlgorithmLine { ...@@ -487,7 +544,7 @@ public class AnalysisAlgorithmLine {
unit.setUnitCenterMileage(new BigDecimal(map.get("centerMileage").toString())); unit.setUnitCenterMileage(new BigDecimal(map.get("centerMileage").toString()));
unit.setUnitEndMileage(new BigDecimal(map.get("endMileage").toString())); unit.setUnitEndMileage(new BigDecimal(map.get("endMileage").toString()));
unit.setWorkStatus(1); unit.setWorkStatus(1);
unit.setMarkStatus(1); unit.setMarkStatus(markStatus);
unit.setCreateBy(checkDataMap.getCreateBy()); unit.setCreateBy(checkDataMap.getCreateBy());
unit.setUpdateBy(checkDataMap.getUpdateBy()); unit.setUpdateBy(checkDataMap.getUpdateBy());
unit.setRemark(analysisLineBatch.getRemark()); unit.setRemark(analysisLineBatch.getRemark());
...@@ -631,6 +688,7 @@ public class AnalysisAlgorithmLine { ...@@ -631,6 +688,7 @@ public class AnalysisAlgorithmLine {
unitInfo.setDelFlag("0"); unitInfo.setDelFlag("0");
unitInfoList.add(unitInfo); unitInfoList.add(unitInfo);
} }
/** /**
* 线路巡查病害分析巡道员巡查单元详情维护 * 线路巡查病害分析巡道员巡查单元详情维护
* *
...@@ -655,6 +713,7 @@ public class AnalysisAlgorithmLine { ...@@ -655,6 +713,7 @@ public class AnalysisAlgorithmLine {
unitInfo.setDelFlag("0"); unitInfo.setDelFlag("0");
unitInfoList.add(unitInfo); unitInfoList.add(unitInfo);
} }
/** /**
* 线路巡查病害分析协助巡道员巡查单元详情维护 * 线路巡查病害分析协助巡道员巡查单元详情维护
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment