Commit 917ddc4e authored by 刘林's avatar 刘林

fix:(jg):气瓶单位变更功能开发

parent f985b2e1
...@@ -1125,18 +1125,18 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1125,18 +1125,18 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 匹配使用登记证编号 // 匹配使用登记证编号
List<Map<String, String>> useRegMapList = commonMapper.useRegCertAccountUniqueWithVehGasCyl(useRegistrationCode, record); List<Map<String, String>> useRegMapList = commonMapper.useRegCertAccountUniqueWithVehGasCyl(useRegistrationCode, record);
boolean hasUseReg = !useRegMapList.isEmpty(); boolean hasUseReg = !useRegMapList.isEmpty();
boolean certificateOfTheEnterprise = hasUseReg ? JSON.toJSONString(useRegMapList).contains(companyCode) : Boolean.FALSE; boolean certificateOfTheEnterprise = hasUseReg ? toJSONString(useRegMapList).contains(companyCode) : Boolean.FALSE;
// 匹配车辆VIN码 // 匹配车辆VIN码
List<Map<String, String>> VINMapList = commonMapper.VINAccountUniqueWithVehGasCyl(VIN, record); List<Map<String, String>> VINMapList = commonMapper.VINAccountUniqueWithVehGasCyl(VIN, record);
boolean hasVIN = !VINMapList.isEmpty(); boolean hasVIN = !VINMapList.isEmpty();
boolean VINOfTheEnterprise = hasVIN ? JSON.toJSONString(VINMapList).contains(companyCode) : Boolean.FALSE; boolean VINOfTheEnterprise = hasVIN ? toJSONString(VINMapList).contains(companyCode) : Boolean.FALSE;
// 无证无VIN 和 本企业的证本企业的VIN 两种情况可以放行 // 无证无VIN 和 本企业的证本企业的VIN 两种情况可以放行
if ((!hasUseReg && !hasVIN) || (certificateOfTheEnterprise && VINOfTheEnterprise)) { if ((!hasUseReg && !hasVIN) || (certificateOfTheEnterprise && VINOfTheEnterprise)) {
return; return;
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.info("历史车用气瓶==输入的==>使用登记证编号:{},车辆VIN码:{}", useRegistrationCode, VIN); log.info("历史车用气瓶==输入的==>使用登记证编号:{},车辆VIN码:{}", useRegistrationCode, VIN);
log.info("历史车用气瓶==匹配到的==>使用登记证编号:{},车辆VIN码:{}", JSON.toJSONString(useRegMapList), JSON.toJSONString(VINMapList)); log.info("历史车用气瓶==匹配到的==>使用登记证编号:{},车辆VIN码:{}", toJSONString(useRegMapList), toJSONString(VINMapList));
log.info("历史车用气瓶====>是否本企业使用登记证编号:{},是否本企业车辆VIN码:{}", certificateOfTheEnterprise, VINOfTheEnterprise); log.info("历史车用气瓶====>是否本企业使用登记证编号:{},是否本企业车辆VIN码:{}", certificateOfTheEnterprise, VINOfTheEnterprise);
} }
// 本企业存在证 + 无VIN 无证 + 本企业存在VIN // 本企业存在证 + 无VIN 无证 + 本企业存在VIN
...@@ -1528,7 +1528,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1528,7 +1528,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String whetherVehicleCylinderStr = (String)objMap.get("WHETHER_VEHICLE_CYLINDER"); String whetherVehicleCylinderStr = (String)objMap.get("WHETHER_VEHICLE_CYLINDER");
String equCategoryStr = (String)objMap.get("EQU_CATEGORY"); String equCategoryStr = (String)objMap.get("EQU_CATEGORY");
if(CylinderTypeEnum.CYLINDER.getCode().equals(equCategoryStr)){ if(CylinderTypeEnum.CYLINDER.getCode().equals(equCategoryStr)){
if(CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(equDefineStr)){ if(SPECIAL_CYLINDER.getCode().equals(equDefineStr)){
if("1".equals(whetherVehicleCylinderStr)){ if("1".equals(whetherVehicleCylinderStr)){
equDefineStr="23T0_1"; equDefineStr="23T0_1";
}else if("0".equals(whetherVehicleCylinderStr)){ }else if("0".equals(whetherVehicleCylinderStr)){
...@@ -1906,7 +1906,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1906,7 +1906,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String whetherVehicleCylinderStr = (String)objMap.get("WHETHER_VEHICLE_CYLINDER"); String whetherVehicleCylinderStr = (String)objMap.get("WHETHER_VEHICLE_CYLINDER");
if(CylinderTypeEnum.CYLINDER.getCode().equals(equCategoryStr)){ if(CylinderTypeEnum.CYLINDER.getCode().equals(equCategoryStr)){
if(CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(equDefineStr)){ if(SPECIAL_CYLINDER.getCode().equals(equDefineStr)){
if("1".equals(whetherVehicleCylinderStr)){ if("1".equals(whetherVehicleCylinderStr)){
equDefineStr="23T0_1"; equDefineStr="23T0_1";
}else if("0".equals(whetherVehicleCylinderStr)){ }else if("0".equals(whetherVehicleCylinderStr)){
...@@ -3590,24 +3590,24 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3590,24 +3590,24 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String companyTypeStr = companyInfoMap.get("companyType").toString(); String companyTypeStr = companyInfoMap.get("companyType").toString();
// 使用信息 // 使用信息
IdxBizJgUseInfo useInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgUseInfo.class); IdxBizJgUseInfo useInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgUseInfo.class);
// 设计信息 // 设计信息
IdxBizJgDesignInfo designInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgDesignInfo.class); IdxBizJgDesignInfo designInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgDesignInfo.class);
// 制造信息 // 制造信息
IdxBizJgFactoryInfo factoryInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgFactoryInfo.class); IdxBizJgFactoryInfo factoryInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgFactoryInfo.class);
// 施工信息 // 施工信息
IdxBizJgConstructionInfo constructionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgConstructionInfo.class); IdxBizJgConstructionInfo constructionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgConstructionInfo.class);
// 注册登记信息 // 注册登记信息
IdxBizJgRegisterInfo registerInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgRegisterInfo.class); IdxBizJgRegisterInfo registerInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgRegisterInfo.class);
// 监督管理 // 监督管理
IdxBizJgSupervisionInfo supervisionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgSupervisionInfo.class); IdxBizJgSupervisionInfo supervisionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgSupervisionInfo.class);
// 其他信息 // 其他信息
IdxBizJgOtherInfo otherInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgOtherInfo.class); IdxBizJgOtherInfo otherInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgOtherInfo.class);
// 检验检测 【新增时】 固定式压力容器(2100)和 气瓶(2300)可以添加检验检测信息 // 检验检测 【新增时】 固定式压力容器(2100)和 气瓶(2300)可以添加检验检测信息
if (ADD.equals(submitType) || isCopy) { if (ADD.equals(submitType) || isCopy) {
// 历史无证设备创建且是检验信息齐全时才创建检验信息 // 历史无证设备创建且是检验信息齐全时才创建检验信息
if (dataSource.contains("jg_his_black") && InspectIsInPeriodEnum.IN_PERIOD_YES.getValue().equals(registerInfo.getInInspectionPeriod())) { if (dataSource.contains("jg_his_black") && InspectIsInPeriodEnum.IN_PERIOD_YES.getValue().equals(registerInfo.getInInspectionPeriod())) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
inspectionDetectionInfo.setRecord(record); inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date); inspectionDetectionInfo.setRecDate(date);
if (inspectionDetectionInfo.getNextInspectDate() != null) { if (inspectionDetectionInfo.getNextInspectDate() != null) {
...@@ -3616,7 +3616,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3616,7 +3616,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfo.setSequenceNbr(null); inspectionDetectionInfo.setSequenceNbr(null);
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo); iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
} else if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) { } else if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false); List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false);
Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst(); Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap()); Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
...@@ -3632,7 +3632,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3632,7 +3632,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} else { } else {
if(dataSource.contains("jg_his_black") && InspectIsInPeriodEnum.IN_PERIOD_YES.getValue().equals(registerInfo.getInInspectionPeriod())){ if(dataSource.contains("jg_his_black") && InspectIsInPeriodEnum.IN_PERIOD_YES.getValue().equals(registerInfo.getInInspectionPeriod())){
// 历史无证设备编辑时,只有在选择检验信息齐全时,才更新或者插入检验信息数据[在原本检验信息齐全,而在编辑时选择不齐全时,不修改原有的检验信息] // 历史无证设备编辑时,只有在选择检验信息齐全时,才更新或者插入检验信息数据[在原本检验信息齐全,而在编辑时选择不齐全时,不修改原有的检验信息]
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
inspectionDetectionInfo.setRecord(record); inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date); inspectionDetectionInfo.setRecDate(date);
if (inspectionDetectionInfo.getNextInspectDate() != null) { if (inspectionDetectionInfo.getNextInspectDate() != null) {
...@@ -3642,7 +3642,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3642,7 +3642,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo); iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
} else if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) { } else if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) {
//更新时 固定式压力容器(2100)和 气瓶(2300)可以更新检验检测信息 //更新时 固定式压力容器(2100)和 气瓶(2300)可以更新检验检测信息
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false); List<Map<String, Object>> inspectionAndTestingInstitutions = commonService.getUnitListByType("inspection", "gasCylindersForCars", false);
Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst(); Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap()); Map<String, Object> mapOrDefault = optional.orElse(Collections.emptyMap());
...@@ -3813,7 +3813,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3813,7 +3813,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsElevator) { if (params instanceof IdxBizJgTechParamsElevator) {
equipmentParamsForm.put("ELEVATOR_SEQ", ((IdxBizJgTechParamsElevator) params).getSequenceNbr()); equipmentParamsForm.put("ELEVATOR_SEQ", ((IdxBizJgTechParamsElevator) params).getSequenceNbr());
} }
IdxBizJgTechParamsElevator elevator = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsElevator.class); IdxBizJgTechParamsElevator elevator = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsElevator.class);
if (!ValidationUtil.isEmpty(elevator)) { if (!ValidationUtil.isEmpty(elevator)) {
elevator.setRecord(record); elevator.setRecord(record);
elevator.setRecDate(date); elevator.setRecDate(date);
...@@ -3826,7 +3826,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3826,7 +3826,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsVehicle) { if (params instanceof IdxBizJgTechParamsVehicle) {
equipmentParamsForm.put("VEHICLE_SEQ", ((IdxBizJgTechParamsVehicle) params).getSequenceNbr()); equipmentParamsForm.put("VEHICLE_SEQ", ((IdxBizJgTechParamsVehicle) params).getSequenceNbr());
} }
IdxBizJgTechParamsVehicle vehicle = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsVehicle.class); IdxBizJgTechParamsVehicle vehicle = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsVehicle.class);
if (!ValidationUtil.isEmpty(vehicle)) { if (!ValidationUtil.isEmpty(vehicle)) {
vehicle.setRecord(record); vehicle.setRecord(record);
vehicle.setRecDate(date); vehicle.setRecDate(date);
...@@ -3846,7 +3846,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3846,7 +3846,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsRopeway) { if (params instanceof IdxBizJgTechParamsRopeway) {
equipmentParamsForm.put("ROPEWAY_SEQ", ((IdxBizJgTechParamsRopeway) params).getSequenceNbr()); equipmentParamsForm.put("ROPEWAY_SEQ", ((IdxBizJgTechParamsRopeway) params).getSequenceNbr());
} }
IdxBizJgTechParamsRopeway ropeway = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsRopeway.class); IdxBizJgTechParamsRopeway ropeway = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsRopeway.class);
if (!ValidationUtil.isEmpty(ropeway)) { if (!ValidationUtil.isEmpty(ropeway)) {
ropeway.setRecord(record); ropeway.setRecord(record);
ropeway.setRecDate(date); ropeway.setRecDate(date);
...@@ -3865,7 +3865,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3865,7 +3865,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsRides) { if (params instanceof IdxBizJgTechParamsRides) {
equipmentParamsForm.put("RIDES_SEQ", ((IdxBizJgTechParamsRides) params).getSequenceNbr()); equipmentParamsForm.put("RIDES_SEQ", ((IdxBizJgTechParamsRides) params).getSequenceNbr());
} }
IdxBizJgTechParamsRides rides = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsRides.class); IdxBizJgTechParamsRides rides = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsRides.class);
if (!ValidationUtil.isEmpty(rides)) { if (!ValidationUtil.isEmpty(rides)) {
rides.setRecord(record); rides.setRecord(record);
rides.setRecDate(date); rides.setRecDate(date);
...@@ -3878,7 +3878,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3878,7 +3878,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsBoiler) { if (params instanceof IdxBizJgTechParamsBoiler) {
equipmentParamsForm.put("BOILER_SEQ", ((IdxBizJgTechParamsBoiler) params).getSequenceNbr()); equipmentParamsForm.put("BOILER_SEQ", ((IdxBizJgTechParamsBoiler) params).getSequenceNbr());
} }
IdxBizJgTechParamsBoiler boiler = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsBoiler.class); IdxBizJgTechParamsBoiler boiler = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsBoiler.class);
if (!ValidationUtil.isEmpty(boiler)) { if (!ValidationUtil.isEmpty(boiler)) {
boiler.setRecord(record); boiler.setRecord(record);
boiler.setRecDate(date); boiler.setRecDate(date);
...@@ -3896,7 +3896,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3896,7 +3896,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsVessel) { if (params instanceof IdxBizJgTechParamsVessel) {
equipmentParamsForm.put("VESSEL_SEQ", ((IdxBizJgTechParamsVessel) params).getSequenceNbr()); equipmentParamsForm.put("VESSEL_SEQ", ((IdxBizJgTechParamsVessel) params).getSequenceNbr());
} }
IdxBizJgTechParamsVessel vessel = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsVessel.class); IdxBizJgTechParamsVessel vessel = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsVessel.class);
if (!ValidationUtil.isEmpty(vessel)) { if (!ValidationUtil.isEmpty(vessel)) {
vessel.setRecord(record); vessel.setRecord(record);
vessel.setRecDate(date); vessel.setRecDate(date);
...@@ -3922,7 +3922,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3922,7 +3922,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsPipeline) { if (params instanceof IdxBizJgTechParamsPipeline) {
equipmentParamsForm.put("PIPELINE_SEQ", ((IdxBizJgTechParamsPipeline) params).getSequenceNbr()); equipmentParamsForm.put("PIPELINE_SEQ", ((IdxBizJgTechParamsPipeline) params).getSequenceNbr());
} }
IdxBizJgTechParamsPipeline pipeline = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsPipeline.class); IdxBizJgTechParamsPipeline pipeline = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsPipeline.class);
if (!ValidationUtil.isEmpty(pipeline)) { if (!ValidationUtil.isEmpty(pipeline)) {
pipeline.setRecord(record); pipeline.setRecord(record);
pipeline.setRecDate(date); pipeline.setRecDate(date);
...@@ -3941,7 +3941,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3941,7 +3941,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (params instanceof IdxBizJgTechParamsLifting) { if (params instanceof IdxBizJgTechParamsLifting) {
equipmentParamsForm.put("LIFTING_SEQ", ((IdxBizJgTechParamsLifting) params).getSequenceNbr()); equipmentParamsForm.put("LIFTING_SEQ", ((IdxBizJgTechParamsLifting) params).getSequenceNbr());
} }
IdxBizJgTechParamsLifting lifting = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsLifting.class); IdxBizJgTechParamsLifting lifting = JSON.parseObject(toJSONString(equipmentParamsForm), IdxBizJgTechParamsLifting.class);
if (!ValidationUtil.isEmpty(lifting)) { if (!ValidationUtil.isEmpty(lifting)) {
lifting.setRecord(record); lifting.setRecord(record);
lifting.setRecDate(date); lifting.setRecDate(date);
...@@ -4080,6 +4080,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4080,6 +4080,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Override @Override
public Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject) { public Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject) {
String useUnitCreditCode = Objects.toString(jsonObject.get(USE_UNIT_CREDIT_CODE), ""); String useUnitCreditCode = Objects.toString(jsonObject.get(USE_UNIT_CREDIT_CODE), "");
String[] recordList = null;
if (ValidationUtil.isEmpty(useUnitCreditCode)) { if (ValidationUtil.isEmpty(useUnitCreditCode)) {
String redisVal = String.valueOf(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()))); String redisVal = String.valueOf(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())));
if (StringUtils.isNotEmpty(redisVal)) { if (StringUtils.isNotEmpty(redisVal)) {
...@@ -4090,13 +4091,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4090,13 +4091,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.orElse(""); .orElse("");
useUnitCreditCode = useUnitCreditCode.contains("_") ? useUnitCreditCode.split("_")[1] : useUnitCreditCode; useUnitCreditCode = useUnitCreditCode.contains("_") ? useUnitCreditCode.split("_")[1] : useUnitCreditCode;
} }
Set<String> records = EquipUsedCheckStrategyContext.getUsedStrategy("useRegistration").getEquipInFlow(useUnitCreditCode);
recordList= ValidationUtil.isEmpty(records) ? null : records.toArray(new String[records.size()]);
} else { } else {
useUnitCreditCode = useUnitCreditCode.contains("_") ? useUnitCreditCode.split("_")[0] : useUnitCreditCode; useUnitCreditCode = useUnitCreditCode.contains("_") ? useUnitCreditCode.split("_")[0] : useUnitCreditCode;
} }
jsonObject.put(USE_UNIT_CREDIT_CODE, useUnitCreditCode); jsonObject.put(USE_UNIT_CREDIT_CODE, useUnitCreditCode);
Page<JSONObject> page = new Page<>(jsonObject.getLong("number"), jsonObject.getLong("size")); Page<JSONObject> page = new Page<>(jsonObject.getLong("number"), jsonObject.getLong("size"));
Set<String> records = EquipUsedCheckStrategyContext.getUsedStrategy("useRegistration").getEquipInFlow(useUnitCreditCode);
String[] recordList = ValidationUtil.isEmpty(records) ? null : records.toArray(new String[records.size()]);
if ("2300".equals(jsonObject.get(EQU_CATEGORY_CODE))) {// 气瓶 if ("2300".equals(jsonObject.get(EQU_CATEGORY_CODE))) {// 气瓶
List<DictionarieValueModel> fillingMedium = Systemctl.dictionarieClient.dictValues("FILLING_MEDIUM").getResult(); List<DictionarieValueModel> fillingMedium = Systemctl.dictionarieClient.dictValues("FILLING_MEDIUM").getResult();
Map<String, Object> fillingMediumMap = fillingMedium.stream().collect(Collectors.toMap(DictionarieValueModel::getDictDataKey, DictionarieValueModel::getDictDataValue)); Map<String, Object> fillingMediumMap = fillingMedium.stream().collect(Collectors.toMap(DictionarieValueModel::getDictDataKey, DictionarieValueModel::getDictDataValue));
...@@ -4366,7 +4367,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4366,7 +4367,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
for (Map<String, Object> item : dataList) { for (Map<String, Object> item : dataList) {
if (key.equals(item.get("key"))) { if (key.equals(item.get("key"))) {
return JSON.toJSONString(item.get("value")); return toJSONString(item.get("value"));
} }
} }
return null; return null;
...@@ -4398,7 +4399,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4398,7 +4399,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
EquipmentInfoDto equipInfoDto = this.createEquipmentInfoDto(equipmentInfoForm, jgVehicleInformationMapper); EquipmentInfoDto equipInfoDto = this.createEquipmentInfoDto(equipmentInfoForm, jgVehicleInformationMapper);
// 登记证记录表主键 // 登记证记录表主键
Long changeRecordId = sequence.nextId(); Long changeRecordId = sequence.nextId();
List<EquipInfoCylinderExcelDto> equipInfoCylinderExcelDtoList = JSON.parseArray(JSON.toJSONString(attachmentUpload.get(EQU_LISTS)), EquipInfoCylinderExcelDto.class); List<EquipInfoCylinderExcelDto> equipInfoCylinderExcelDtoList = JSON.parseArray(toJSONString(attachmentUpload.get(EQU_LISTS)), EquipInfoCylinderExcelDto.class);
// 属地监管部门 // 属地监管部门
String orgBranchCode = equipInfoDto.getOrgBranchCode(); String orgBranchCode = equipInfoDto.getOrgBranchCode();
String orgBranchName = equipInfoDto.getOrgBranchName(); String orgBranchName = equipInfoDto.getOrgBranchName();
...@@ -4927,7 +4928,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4927,7 +4928,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
lambda.eq(JgRegistrationHistory::getIsDelete, false); lambda.eq(JgRegistrationHistory::getIsDelete, false);
lambda.eq(JgRegistrationHistory::getRegistrationClass, "使用登记"); lambda.eq(JgRegistrationHistory::getRegistrationClass, "使用登记");
Integer integer = jgRegistrationHistoryService.getBaseMapper().selectCount(lambda); Integer integer = jgRegistrationHistoryService.getBaseMapper().selectCount(lambda);
jgRegistrationHistory.setChangeData(JSON.toJSONString(map)); jgRegistrationHistory.setChangeData(toJSONString(map));
if (integer > 0) { if (integer > 0) {
jgRegistrationHistoryService.update(jgRegistrationHistory, lambda); jgRegistrationHistoryService.update(jgRegistrationHistory, lambda);
} else { } else {
...@@ -5067,7 +5068,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -5067,7 +5068,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ReadRowHolder readRowHolder = context.readRowHolder(); ReadRowHolder readRowHolder = context.readRowHolder();
int rowIndex = readRowHolder.getRowIndex() + 1; int rowIndex = readRowHolder.getRowIndex() + 1;
try { try {
log.info("解析第{}行数据:{}", rowIndex, JSON.toJSONString(data)); log.info("解析第{}行数据:{}", rowIndex, toJSONString(data));
// 检查各字段是否为空,如果为空则追加错误信息 // 检查各字段是否为空,如果为空则追加错误信息
checkNotBlank(data.getProductName(), "设备名称不能为空;", result); checkNotBlank(data.getProductName(), "设备名称不能为空;", result);
//checkNotBlank(data.getBrandName(), "品牌名称不能为空;", result); //checkNotBlank(data.getBrandName(), "品牌名称不能为空;", result);
...@@ -5143,7 +5144,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -5143,7 +5144,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
} catch (Exception e) { } catch (Exception e) {
log.error(String.format("行索引数: [%s] -> 失败的 Excel 数据: [%s]", rowIndex, JSON.toJSONString(data)), e); log.error(String.format("行索引数: [%s] -> 失败的 Excel 数据: [%s]", rowIndex, toJSONString(data)), e);
throw e; throw e;
} }
return result; return result;
...@@ -5684,7 +5685,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -5684,7 +5685,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
contextWrapper.apply(); contextWrapper.apply();
Map<String, Map<String, Object>> details = idxBizJgProjectContraptionService.details(seq); Map<String, Map<String, Object>> details = idxBizJgProjectContraptionService.details(seq);
Map<String, Object> objectMap = details.get(EQUIP_INFO_FORM_ID); Map<String, Object> objectMap = details.get(EQUIP_INFO_FORM_ID);
JSONArray pipeList = JSON.parseArray(JSON.toJSONString(objectMap.get(PIPELINE_LIST))); JSONArray pipeList = JSON.parseArray(toJSONString(objectMap.get(PIPELINE_LIST)));
// 列表有条数据,详情没有管道信息的情况 // 列表有条数据,详情没有管道信息的情况
if (pipeList.isEmpty()) { if (pipeList.isEmpty()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
...@@ -5696,7 +5697,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -5696,7 +5697,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
resultArray.add(jsonObject); resultArray.add(jsonObject);
} }
pipeList.forEach(pipeEqu -> { pipeList.forEach(pipeEqu -> {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(pipeEqu)); JSONObject jsonObject = JSON.parseObject(toJSONString(pipeEqu));
for (Map.Entry<String, Object> entry : objectMap.entrySet()) { for (Map.Entry<String, Object> entry : objectMap.entrySet()) {
if (!PIPELINE_LIST.equals(entry.getKey())) { if (!PIPELINE_LIST.equals(entry.getKey())) {
jsonObject.put(entry.getKey(), entry.getValue()); jsonObject.put(entry.getKey(), entry.getValue());
......
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