Commit fe768f39 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 5decf114 c01feb41
...@@ -613,7 +613,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -613,7 +613,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 新报检单记录历史数据的逻辑 // 新报检单记录历史数据的逻辑
map.putAll(inspectionHistory.getHistoryData()); map.putAll(inspectionHistory.getHistoryData());
} else { } else {
// 历史单位之前未记录历史数据的逻辑 // 兼容逻辑:历史单据之前未记录历史数据的逻辑
if (model.getEquipClassify().equals(EquipmentClassifityEnum.YLGD.getCode())) { if (model.getEquipClassify().equals(EquipmentClassifityEnum.YLGD.getCode())) {
// 压力管道 // 压力管道
map.putAll(getDeviceListByProjectContraption2(model)); map.putAll(getDeviceListByProjectContraption2(model));
...@@ -1480,11 +1480,19 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1480,11 +1480,19 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList()); List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList());
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfInspect(records); List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfInspect(records);
return setPieLineInfo(applicationModel, projectContraption, jsonObject, equList);
}
@NotNull
private JSONObject setPieLineInfo(JyjcInspectionApplicationModel applicationModel, IdxBizJgProjectContraption projectContraption, JSONObject jsonObject, List<Map<String, Object>> equList) {
jsonObject.put("equip", equList); jsonObject.put("equip", equList);
jsonObject.put("projectContraption", projectContraption.getProjectContraption()); jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId()); jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo()); jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject.put("pipelineLength", calTotalLength(equList)); jsonObject.put("pipelineLength", calTotalLength(equList));
jsonObject.put("equListName", projectContraption.getEquListName());
jsonObject.put("equCategoryName", projectContraption.getEquCategoryName());
jsonObject.put("equDefineName" , projectContraption.getEquDefineName());
jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode()); jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode());
this.setInstallAddress(projectContraption, jsonObject); this.setInstallAddress(projectContraption, jsonObject);
this.setUseAddress(projectContraption, jsonObject); this.setUseAddress(projectContraption, jsonObject);
...@@ -1515,15 +1523,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1515,15 +1523,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
List<JyjcInspectionApplicationEquipModel> applicationEquipModels = applicationEquipService.listApplicationEquipByApplicationSeq(applicationModel.getSequenceNbr()); List<JyjcInspectionApplicationEquipModel> applicationEquipModels = applicationEquipService.listApplicationEquipByApplicationSeq(applicationModel.getSequenceNbr());
List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList()); List<String> records = applicationEquipModels.stream().map(JyjcInspectionApplicationEquipModel::getEquipUnicode).collect(Collectors.toList());
List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfNoInspectInfo(records); List<Map<String, Object>> equList = this.getBaseMapper().selectPieLineListOfNoInspectInfo(records);
jsonObject.put("equip", equList); return setPieLineInfo(applicationModel, projectContraption, jsonObject, equList);
jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject.put("projectContraptionId", applicationModel.getProjectContraptionId());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject.put("pipelineLength", calTotalLength(equList));
jsonObject.put("useRegistrationCode", projectContraption.getUseRegistrationCode());
this.setInstallAddress(projectContraption, jsonObject);
this.setUseAddress(projectContraption, jsonObject);
return jsonObject;
} }
private String calTotalLength(List<Map<String, Object>> equList) { private String calTotalLength(List<Map<String, Object>> equList) {
......
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