Commit 9f697632 authored by tianyiming's avatar tianyiming

修改因一码通多线程校验code重复问题衍生出来的删除redis key不存在问题

parent c3efe130
...@@ -541,7 +541,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -541,7 +541,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
it.remove(); it.remove();
} }
// 删除检验检测机构 // 删除检验检测机构
if (!"company".equals(e.get("level")) && e.get("companyType").toString().contains("检验检测机构")){ if (!"company".equals(e.get("level")) && e.get("companyType").toString().contains("检验检测机构")) {
it.remove(); it.remove();
} }
if (!ObjectUtils.isEmpty(e.get("children"))) { if (!ObjectUtils.isEmpty(e.get("children"))) {
...@@ -821,7 +821,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -821,7 +821,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
.collect(Collectors.toList()); .collect(Collectors.toList());
List<Integer> codeList = categoryOtherInfoMapper.selectExceedElevatorCodeList(start, prefix); List<Integer> codeList = categoryOtherInfoMapper.selectExceedElevatorCodeList(start, prefix);
List<Integer> resultList = getDiffrent(allCodeList, codeList); List<Integer> resultList = getDiffrent(allCodeList, codeList);
if(!ObjectUtils.isEmpty(resultList)){ if (!ObjectUtils.isEmpty(resultList)) {
elevatorCode.setLength(0); elevatorCode.setLength(0);
elevatorCode.append(resultList.get(0)); elevatorCode.append(resultList.get(0));
} else { } else {
...@@ -846,6 +846,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -846,6 +846,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/** /**
* 获取两个List的不同元素 * 获取两个List的不同元素
*
* @param list1 * @param list1
* @param list2 * @param list2
* @return * @return
...@@ -1442,10 +1443,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1442,10 +1443,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseModel submit(Map<String, Object> map) { public ResponseModel submit(Map<String, Object> map) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
StopWatch stopWatch3 = new StopWatch();
stopWatch3.start();
SupervisoryCodeInfo supervisoryCodeInfo = new SupervisoryCodeInfo(); SupervisoryCodeInfo supervisoryCodeInfo = new SupervisoryCodeInfo();
LinkedHashMap useInfoFrom = (LinkedHashMap) map.get(use_info_form_id); LinkedHashMap useInfoFrom = (LinkedHashMap) map.get(use_info_form_id);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
...@@ -1456,15 +1453,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1456,15 +1453,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String record = null; String record = null;
LinkedHashMap superviseMap = (LinkedHashMap) map.get("data"); LinkedHashMap superviseMap = (LinkedHashMap) map.get("data");
String equCategory = String.valueOf(superviseMap.get("equCategory")); String equCategory = String.valueOf(superviseMap.get("equCategory"));
String code96333 = String.valueOf(superviseMap.get("code96333"));
String useOrgCode = null; String useOrgCode = null;
String equCode = null; String equCode = null;
// String alias = String.valueOf(supervisionMap.get("ALIAS")); String alias = String.valueOf(supervisionMap.get("ALIAS"));
// if(){ if ("null".equals(alias)) {
// throw new BadRequest("该数据存在问题,请联系管理员补充数据的ALIAS字段");
// } }
LinkedHashMap registerForm = null;
if (EquipmentTypeEnum.GL.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(gl_register_from_id);
} else if (EquipmentTypeEnum.YL_RQ.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylrq_register_from_id);
} else if (EquipmentTypeEnum.DT.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(dt_register_from_id);
} else if (EquipmentTypeEnum.QZJ.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(qzjx_register_from_id);
} else if (EquipmentTypeEnum.CS.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(cc_register_from_id);
} else if (EquipmentTypeEnum.YL_SS.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylss_register_from_id);
} else if (EquipmentTypeEnum.YL_GD.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylgd_register_from_id);
} else {
registerForm = (LinkedHashMap) map.get(kysd_register_from_id);
}
useOrgCode = ObjectUtils.isEmpty(registerForm.get("USE_ORG_CODE")) ? null : String.valueOf(registerForm.get("USE_ORG_CODE"));
equCode = ObjectUtils.isEmpty(registerForm.get("EQU_CODE")) ? null : String.valueOf(registerForm.get("EQU_CODE"));
try { try {
String claimStatus = String.valueOf(superviseMap.get("claimStatus")); String claimStatus = String.valueOf(superviseMap.get("claimStatus"));
String code96333 = String.valueOf(superviseMap.get("code96333"));
String operateType = String.valueOf(superviseMap.get("operateType")); String operateType = String.valueOf(superviseMap.get("operateType"));
String isCopy = String.valueOf(useInfoFrom.get("isCopy")); String isCopy = String.valueOf(useInfoFrom.get("isCopy"));
//生成码 //生成码
...@@ -1482,17 +1499,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1482,17 +1499,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisionMap.put("CODE96333", codeMap.get("code96333")); supervisionMap.put("CODE96333", codeMap.get("code96333"));
supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode")); supervisionMap.put("SUPERVISORY_CODE", codeMap.get("superviseCode"));
map.put(supervision_form_id, supervisionMap); map.put(supervision_form_id, supervisionMap);
stopWatch.stop(); record = batchSubmitOrUpdate(map, registerForm, alias, isCopy, operateType, claimStatus);
if (log.isInfoEnabled()) {
log.info("业务存数据前耗时:{} 秒", stopWatch.getTotalTimeSeconds());
}
StopWatch stopWatch1 = new StopWatch();
stopWatch1.start();
record = batchSubmitOrUpdate(map, isCopy, operateType,claimStatus);
stopWatch1.stop();
if (log.isInfoEnabled()) {
log.info("业务存数据耗时:{} 秒", stopWatch1.getTotalTimeSeconds());
}
if (!ObjectUtils.isEmpty(record)) { if (!ObjectUtils.isEmpty(record)) {
supervisoryCodeInfo.setStatus(EquipmentCategoryEnum.YSY.getCode()); supervisoryCodeInfo.setStatus(EquipmentCategoryEnum.YSY.getCode());
} else { } else {
...@@ -1503,23 +1510,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1503,23 +1510,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisionMap.put("CODE96333", "null".equals(code96333) ? null : code96333); supervisionMap.put("CODE96333", "null".equals(code96333) ? null : code96333);
map.put(supervision_form_id, supervisionMap); map.put(supervision_form_id, supervisionMap);
//根据操作状态判断是调用新增还是修改接口 //根据操作状态判断是调用新增还是修改接口
record = batchSubmitOrUpdate(map, isCopy, operateType,claimStatus); record = batchSubmitOrUpdate(map, registerForm, alias, isCopy, operateType, claimStatus);
} else { } else {
record = batchSubmitOrUpdate(map, isCopy, operateType,claimStatus); record = batchSubmitOrUpdate(map, registerForm, alias, isCopy, operateType, claimStatus);
} }
StopWatch stopWatch4 = new StopWatch();
stopWatch4.start();
if (!ObjectUtils.isEmpty(record)) { if (!ObjectUtils.isEmpty(record)) {
checkEsData(record); checkEsData(record);
} }
stopWatch4.stop();
if (log.isInfoEnabled()) {
log.info("更新es耗时:{} 秒", stopWatch4.getTotalTimeSeconds());
}
stopWatch3.stop();
if (log.isInfoEnabled()) {
log.info("通用提交耗时:{} 秒", stopWatch3.getTotalTimeSeconds());
}
String finalRecord = record; String finalRecord = record;
threadPool.submit(() -> { threadPool.submit(() -> {
if (log.isInfoEnabled()) { if (log.isInfoEnabled()) {
...@@ -1546,15 +1543,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1546,15 +1543,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
response.setStatus(HttpStatus.BAD_REQUEST.value()); response.setStatus(HttpStatus.BAD_REQUEST.value());
return response; return response;
} finally { } finally {
redisUtils.del(CHECK_CODE_USE_ORG_CODE + useOrgCode);
redisUtils.del(CHECK_CODE_EQU_CODE + equCode); redisUtils.del(CHECK_CODE_EQU_CODE + equCode);
redisUtils.del(CHECK_CODE_CODE96333 + supervisionMap.get("CODE96333")); redisUtils.del(CHECK_CODE_CODE96333 + code96333);
redisUtils.del(CHECK_CODE_USE_ORG_CODE + useOrgCode);
supervisoryCodeInfoMapper.update(supervisoryCodeInfo, new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code", supervisionMap.get("SUPERVISORY_CODE"))); supervisoryCodeInfoMapper.update(supervisoryCodeInfo, new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code", supervisionMap.get("SUPERVISORY_CODE")));
} }
return ResponseHelper.buildResponse(record); return ResponseHelper.buildResponse(record);
} }
private String batchSubmitOrUpdate(Map<String, Object> map, String isCopy, String type, String claimStatus) { private String batchSubmitOrUpdate(Map<String, Object> map, LinkedHashMap registerForm, String alias, String isCopy, String type, String claimStatus) {
Date date = new Date(); Date date = new Date();
String record = null; String record = null;
LinkedHashMap useInfoForm = (LinkedHashMap) map.get(use_info_form_id); LinkedHashMap useInfoForm = (LinkedHashMap) map.get(use_info_form_id);
...@@ -1589,7 +1586,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1589,7 +1586,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
useInfo.setRecDate(date); useInfo.setRecDate(date);
useInfo.setCreateDate("save".equals(type) ? new Date() : null); useInfo.setCreateDate("save".equals(type) ? new Date() : null);
useInfo.setClaimDate((EquipmentCategoryEnum.YRL.getName().equals(claimStatus) || EquipmentCategoryEnum.YJL.getName().equals(claimStatus)) ? new Date() : null); useInfo.setClaimDate((EquipmentCategoryEnum.YRL.getName().equals(claimStatus) || EquipmentCategoryEnum.YJL.getName().equals(claimStatus)) ? new Date() : null);
if("save".equals(type)){ if ("save".equals(type)) {
useInfo.setDataSource(IS_COPY.equals(isCopy) ? useInfo.getSequenceNbr() : "0"); useInfo.setDataSource(IS_COPY.equals(isCopy) ? useInfo.getSequenceNbr() : "0");
} }
if (IS_COPY.equals(isCopy)) { if (IS_COPY.equals(isCopy)) {
...@@ -1607,7 +1604,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1607,7 +1604,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
IdxBizJgOtherInfo idxBizJgOtherInfo = JSON.parseObject(JSON.toJSONString(supervisionForm), IdxBizJgOtherInfo.class); IdxBizJgOtherInfo idxBizJgOtherInfo = JSON.parseObject(JSON.toJSONString(supervisionForm), IdxBizJgOtherInfo.class);
if (!ObjectUtils.isEmpty(idxBizJgOtherInfo)) { if (!ObjectUtils.isEmpty(idxBizJgOtherInfo)) {
if(EquipmentCategoryEnum.DRL.getName().equals(claimStatus) && "save".equals(type)){ if (EquipmentCategoryEnum.DRL.getName().equals(claimStatus) && "save".equals(type)) {
idxBizJgOtherInfo.setClaimStatus("草稿"); idxBizJgOtherInfo.setClaimStatus("草稿");
} }
idxBizJgOtherInfo.setRecord(record); idxBizJgOtherInfo.setRecord(record);
...@@ -1636,7 +1633,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1636,7 +1633,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
LinkedHashMap inspectionForm = (LinkedHashMap) map.get(inspection_form_id); LinkedHashMap inspectionForm = (LinkedHashMap) map.get(inspection_form_id);
List inspectionList = (ArrayList) inspectionForm.get("subForm_pbim1pfid8"); List inspectionList = (ArrayList) inspectionForm.get("subForm_pbim1pfid8");
List<IdxBizJgInspectionDetectionInfo> detectionInfoList = new ArrayList<>(); List<IdxBizJgInspectionDetectionInfo> detectionInfoList = new ArrayList<>();
if(!ObjectUtils.isEmpty(inspectionList)){ if (!ObjectUtils.isEmpty(inspectionList)) {
for (Object obj : inspectionList) { for (Object obj : inspectionList) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(obj), IdxBizJgInspectionDetectionInfo.class); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(obj), IdxBizJgInspectionDetectionInfo.class);
inspectionDetectionInfo.setRecord(record); inspectionDetectionInfo.setRecord(record);
...@@ -1665,9 +1662,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1665,9 +1662,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//八大类技术参数实体填充 //八大类技术参数实体填充
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>(); List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>(); List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>();
LinkedHashMap registerForm = null;
String equList = idxBizJgOtherInfo.getAlias().toString(); String equList = idxBizJgOtherInfo.getAlias().toString();
if (equList.startsWith("3")) { if (EquipmentTypeEnum.DT.getCode().equals(alias)) {
//维保备案信息 //维保备案信息
LinkedHashMap maintenanceForm = (LinkedHashMap) map.get(maintenance_form_id); LinkedHashMap maintenanceForm = (LinkedHashMap) map.get(maintenance_form_id);
List subFormMaintenanceList = (ArrayList) maintenanceForm.get("subForm_6i16fox27e"); List subFormMaintenanceList = (ArrayList) maintenanceForm.get("subForm_6i16fox27e");
...@@ -1683,7 +1679,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1683,7 +1679,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
idxBizJgMaintenanceRecordInfoService.saveOrUpdateBatch(maintenanceList); idxBizJgMaintenanceRecordInfoService.saveOrUpdateBatch(maintenanceList);
} }
//技术参数 //技术参数
registerForm = (LinkedHashMap) map.get(dt_register_from_id);
IdxBizJgTechParamsElevator elevator = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsElevator.class); IdxBizJgTechParamsElevator elevator = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsElevator.class);
if (!ObjectUtils.isEmpty(elevator)) { if (!ObjectUtils.isEmpty(elevator)) {
elevator.setRecord(record); elevator.setRecord(record);
...@@ -1691,8 +1686,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1691,8 +1686,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
elevator.setSequenceNbr("save".equals(type) ? null : techParamsElevator.getSequenceNbr()); elevator.setSequenceNbr("save".equals(type) ? null : techParamsElevator.getSequenceNbr());
idxBizJgTechParamsElevatorService.saveOrUpdate(elevator); idxBizJgTechParamsElevatorService.saveOrUpdate(elevator);
} }
} else if (equList.startsWith("1")) { } else if (EquipmentTypeEnum.GL.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(gl_register_from_id);
IdxBizJgTechParamsBoiler boiler = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsBoiler.class); IdxBizJgTechParamsBoiler boiler = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsBoiler.class);
if (!ObjectUtils.isEmpty(boiler)) { if (!ObjectUtils.isEmpty(boiler)) {
boiler.setRecord(record); boiler.setRecord(record);
...@@ -1703,8 +1697,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1703,8 +1697,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormMainPartsList.add("subForm_1hh88r4m69"); subFormMainPartsList.add("subForm_1hh88r4m69");
mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type); mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type);
} }
} else if (equList.startsWith("2")) { } else if (EquipmentTypeEnum.YL_RQ.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylrq_register_from_id);
IdxBizJgTechParamsVessel vessel = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVessel.class); IdxBizJgTechParamsVessel vessel = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVessel.class);
if (!ObjectUtils.isEmpty(vessel)) { if (!ObjectUtils.isEmpty(vessel)) {
vessel.setRecord(record); vessel.setRecord(record);
...@@ -1718,8 +1711,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1718,8 +1711,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormProtectionDevicesList.add("subForm_d4xdzhsgdj"); subFormProtectionDevicesList.add("subForm_d4xdzhsgdj");
protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type); protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type);
} }
} else if (equList.startsWith("4")) { } else if (EquipmentTypeEnum.QZJ.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(qzjx_register_from_id);
IdxBizJgTechParamsLifting lifting = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsLifting.class); IdxBizJgTechParamsLifting lifting = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsLifting.class);
if (!ObjectUtils.isEmpty(lifting)) { if (!ObjectUtils.isEmpty(lifting)) {
lifting.setRecord(record); lifting.setRecord(record);
...@@ -1734,8 +1726,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1734,8 +1726,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormProtectionDevicesList.add("subForm_h5h4x0zhur"); subFormProtectionDevicesList.add("subForm_h5h4x0zhur");
protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type); protectionDevicesList = getAccessoryEntity(registerForm, subFormProtectionDevicesList, protection_devices, record, date, type);
} }
} else if (equList.startsWith("5")) { } else if (EquipmentTypeEnum.CS.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(cc_register_from_id);
IdxBizJgTechParamsVehicle vehicle = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVehicle.class); IdxBizJgTechParamsVehicle vehicle = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsVehicle.class);
if (!ObjectUtils.isEmpty(vehicle)) { if (!ObjectUtils.isEmpty(vehicle)) {
vehicle.setRecord(record); vehicle.setRecord(record);
...@@ -1747,7 +1738,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1747,7 +1738,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
subFormMainPartsList.add("subForm_tef7yf5fbr"); subFormMainPartsList.add("subForm_tef7yf5fbr");
mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type); mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type);
} }
} else if (equList.startsWith("6")) { } else if (EquipmentTypeEnum.YL_SS.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylss_register_from_id); registerForm = (LinkedHashMap) map.get(ylss_register_from_id);
IdxBizJgTechParamsRides rides = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsRides.class); IdxBizJgTechParamsRides rides = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsRides.class);
if (!ObjectUtils.isEmpty(rides)) { if (!ObjectUtils.isEmpty(rides)) {
...@@ -1756,7 +1747,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1756,7 +1747,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
rides.setSequenceNbr("save".equals(type) ? null : techParamsRides.getSequenceNbr()); rides.setSequenceNbr("save".equals(type) ? null : techParamsRides.getSequenceNbr());
idxBizJgTechParamsRidesService.saveOrUpdate(rides); idxBizJgTechParamsRidesService.saveOrUpdate(rides);
} }
} else if (equList.startsWith("8")) { } else if (EquipmentTypeEnum.YL_GD.getCode().equals(alias)) {
registerForm = (LinkedHashMap) map.get(ylgd_register_from_id); registerForm = (LinkedHashMap) map.get(ylgd_register_from_id);
IdxBizJgTechParamsPipeline pipeline = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsPipeline.class); IdxBizJgTechParamsPipeline pipeline = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsPipeline.class);
if (!ObjectUtils.isEmpty(pipeline)) { if (!ObjectUtils.isEmpty(pipeline)) {
...@@ -1769,7 +1760,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1769,7 +1760,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type); mainPartsList = getAccessoryEntity(registerForm, subFormMainPartsList, main_parts, record, date, type);
} }
} else { } else {
registerForm = (LinkedHashMap) map.get(kysd_register_from_id);
IdxBizJgTechParamsRopeway ropeway = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsRopeway.class); IdxBizJgTechParamsRopeway ropeway = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgTechParamsRopeway.class);
if (!ObjectUtils.isEmpty(ropeway)) { if (!ObjectUtils.isEmpty(ropeway)) {
ropeway.setRecord(record); ropeway.setRecord(record);
...@@ -1782,7 +1772,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1782,7 +1772,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
IdxBizJgRegisterInfo registerInfo = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgRegisterInfo.class); IdxBizJgRegisterInfo registerInfo = JSON.parseObject(JSON.toJSONString(registerForm), IdxBizJgRegisterInfo.class);
if(!ObjectUtils.isEmpty(registerInfo)){ if (!ObjectUtils.isEmpty(registerInfo)) {
registerInfo.setRecord(record); registerInfo.setRecord(record);
registerInfo.setRecDate(date); registerInfo.setRecDate(date);
registerInfo.setSequenceNbr("save".equals(type) ? null : registerForm.get("sequenceNbr").toString()); registerInfo.setSequenceNbr("save".equals(type) ? null : registerForm.get("sequenceNbr").toString());
...@@ -1849,6 +1839,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1849,6 +1839,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/** /**
* 分页查询所有数据 * 分页查询所有数据
*
* @param map * @param map
* @return * @return
*/ */
...@@ -2067,7 +2058,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -2067,7 +2058,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("STATUS")); String test = QueryParser.escape(map.getString("STATUS"));
if (test.contains("非")) { if (test.contains("非")) {
meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test.replace("非",""))); meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test.replace("非", "")));
boolMust.mustNot(meBuilder); boolMust.mustNot(meBuilder);
} else { } else {
meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test)); meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test));
......
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