Commit 11383f3b authored by tianyiming's avatar tianyiming

一码通存草稿bug修改

parent 7ea33d57
......@@ -1511,14 +1511,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
LinkedHashMap inspectionForm = (LinkedHashMap) map.get(inspection_form_id);
List inspectionList = (ArrayList) inspectionForm.get("subForm_pbim1pfid8");
List<IdxBizJgInspectionDetectionInfo> detectionInfoList = new ArrayList<>();
for (Object obj : inspectionList) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(obj), IdxBizJgInspectionDetectionInfo.class);
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setSequenceNbr("save".equals(type) ? null : inspectionDetectionInfo.getSequenceNbr());
detectionInfoList.add(inspectionDetectionInfo);
if(!ObjectUtils.isEmpty(inspectionList)){
for (Object obj : inspectionList) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(obj), IdxBizJgInspectionDetectionInfo.class);
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setSequenceNbr("save".equals(type) ? null : inspectionDetectionInfo.getSequenceNbr());
detectionInfoList.add(inspectionDetectionInfo);
}
idxBizJgInspectionDetectionInfoService.saveOrUpdateBatch(detectionInfoList);
}
idxBizJgInspectionDetectionInfoService.saveOrUpdateBatch(detectionInfoList);
//施工信息
LinkedHashMap constructionForm = (LinkedHashMap) map.get(construction_form_id);
......@@ -1539,7 +1541,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>();
LinkedHashMap registerForm = null;
if (equCategory.startsWith("3")) {
String equList = idxBizJgOtherInfo.getAlias().toString();
if (equList.startsWith("3")) {
//维保备案信息
LinkedHashMap maintenanceForm = (LinkedHashMap) map.get(maintenance_form_id);
List subFormMaintenanceList = (ArrayList) maintenanceForm.get("subForm_6i16fox27e");
......@@ -1563,7 +1566,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
elevator.setSequenceNbr("save".equals(type) ? null : techParamsElevator.getSequenceNbr());
idxBizJgTechParamsElevatorService.saveOrUpdate(elevator);
}
} else if (equCategory.startsWith("1")) {
} else if (equList.startsWith("1")) {
registerForm = (LinkedHashMap) map.get(gl_register_from_id);
IdxBizJgTechParamsBoiler boiler = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsBoiler.class);
if (!ObjectUtils.isEmpty(boiler)) {
......@@ -1575,7 +1578,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormMainPartsList.add("subForm_1hh88r4m69");
mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type);
}
} else if (equCategory.startsWith("2")) {
} else if (equList.startsWith("2")) {
registerForm = (LinkedHashMap) map.get(ylrq_register_from_id);
IdxBizJgTechParamsVessel vessel = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVessel.class);
if (!ObjectUtils.isEmpty(vessel)) {
......@@ -1590,7 +1593,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormProtectionDevicesList.add("subForm_d4xdzhsgdj");
protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type);
}
} else if (equCategory.startsWith("4")) {
} else if (equList.startsWith("4")) {
registerForm = (LinkedHashMap) map.get(qzjx_register_from_id);
IdxBizJgTechParamsLifting lifting = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsLifting.class);
if (!ObjectUtils.isEmpty(lifting)) {
......@@ -1606,7 +1609,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormProtectionDevicesList.add("subForm_h5h4x0zhur");
protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type);
}
} else if (equCategory.startsWith("5")) {
} else if (equList.startsWith("5")) {
registerForm = (LinkedHashMap) map.get(cc_register_from_id);
IdxBizJgTechParamsVehicle vehicle = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVehicle.class);
if (!ObjectUtils.isEmpty(vehicle)) {
......@@ -1619,7 +1622,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormMainPartsList.add("subForm_tef7yf5fbr");
mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type);
}
} else if (equCategory.startsWith("6")) {
} else if (equList.startsWith("6")) {
registerForm = (LinkedHashMap) map.get(ylss_register_from_id);
IdxBizJgTechParamsRides rides = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsRides.class);
if (!ObjectUtils.isEmpty(rides)) {
......@@ -1628,7 +1631,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
rides.setSequenceNbr("save".equals(type) ? null : techParamsRides.getSequenceNbr());
idxBizJgTechParamsRidesService.saveOrUpdate(rides);
}
} else if (equCategory.startsWith("8")) {
} else if (equList.startsWith("8")) {
registerForm = (LinkedHashMap) map.get(ylgd_register_from_id);
IdxBizJgTechParamsPipeline pipeline = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsPipeline.class);
if (!ObjectUtils.isEmpty(pipeline)) {
......@@ -1654,10 +1657,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
IdxBizJgRegisterInfo registerInfo = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgRegisterInfo.class);
registerInfo.setRecord(record);
registerInfo.setRecDate(date);
registerInfo.setSequenceNbr("save".equals(type) ? null : registerForm.get("sequenceNbr").toString());
idxBizJgRegisterInfoService.saveOrUpdate(registerInfo);
if(!ObjectUtils.isEmpty(registerInfo)){
registerInfo.setRecord(record);
registerInfo.setRecDate(date);
registerInfo.setSequenceNbr("save".equals(type) ? null : registerForm.get("sequenceNbr").toString());
idxBizJgRegisterInfoService.saveOrUpdate(registerInfo);
}
if (!ObjectUtils.isEmpty(mainPartsList)) {
idxBizJgMainPartsService.saveOrUpdateBatch(mainPartsList);
......
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