Commit 39a64267 authored by 刘林's avatar 刘林

fix(jg):个人气瓶登记单监管业务登记管理不显示单子,工作台撤回后在提交报错设备设备正在流程中

parent a6d7c4c0
...@@ -631,11 +631,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -631,11 +631,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
} }
} }
private void checkForRepeatUsedEquip(JSONObject map, List<Map<String, Object>> equList, ReginParams reginParams) { private void checkForRepeatUsedEquip(JSONObject map, List<Map<String, Object>> equList, CompanyBo company) {
// 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
if (!ObjectUtils.isEmpty(map.get("submit"))) { if (!ObjectUtils.isEmpty(map.get("submit"))) {
equList.forEach(equip -> { equList.forEach(equip -> {
// 流程中或已完成 // 流程中或已完成
EquipUsedCheckStrategyContext.getUsedStrategy(DEFINITION_KEY).equipRepeatUsedCheck(equip.get("record").toString(), reginParams.getCompany().getCompanyCode()); EquipUsedCheckStrategyContext.getUsedStrategy(DEFINITION_KEY).equipRepeatUsedCheck(equip.get("record").toString(),
CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyCode().split("_")[1] : company.getCompanyCode());
}); });
} }
} }
...@@ -684,7 +686,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -684,7 +686,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
} }
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况) // 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
checkForRepeatUsedEquip(map, equipmentLists, reginParams); CompanyBo company = reginParams.getCompany();
checkForRepeatUsedEquip(map, equipmentLists, company);
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo( List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo(
equipmentLists.stream() equipmentLists.stream()
.map(v -> (String) v.get("record")) .map(v -> (String) v.get("record"))
...@@ -1789,7 +1792,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1789,7 +1792,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgRegisterInfo> wrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda().eq(IdxBizJgRegisterInfo::getRecord, record); LambdaQueryWrapper<IdxBizJgRegisterInfo> wrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda().eq(IdxBizJgRegisterInfo::getRecord, record);
IdxBizJgRegisterInfo registerInfo = idxBizJgRegisterInfoMapper.selectOne(wrapper); IdxBizJgRegisterInfo registerInfo = idxBizJgRegisterInfoMapper.selectOne(wrapper);
List<String> permissionInspectTypes = getInspectInfoByEquDefine(registerInfo.getEquList(), registerInfo.getEquCategory(), registerInfo.getEquDefine()); List<String> permissionInspectTypes = getInspectInfoByEquDefine(registerInfo.getEquList(), registerInfo.getEquCategory(), registerInfo.getEquDefine());
if (permissionInspectTypes.size() > 0) { if (!permissionInspectTypes.isEmpty()) {
return this.baseMapper.getInspectDetail(record, permissionInspectTypes); return this.baseMapper.getInspectDetail(record, permissionInspectTypes);
} else { } else {
return null; return null;
......
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