Commit 9a1e6e0c authored by 麻笑宇's avatar 麻笑宇

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 7aee2b3b a46c95af
...@@ -1423,7 +1423,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1423,7 +1423,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (ValidationUtil.isEmpty(map.get("useUnitCreditCode")) || ValidationUtil.isEmpty(map.get("county"))) { if (ValidationUtil.isEmpty(map.get("useUnitCreditCode")) || ValidationUtil.isEmpty(map.get("county"))) {
throw new BadRequest("请先选择使用单位,施工区县等信息!"); throw new BadRequest("请先选择使用单位,施工区县等信息!");
} }
map.put("USE_UNIT_CREDIT_CODE", map.get("useUnitCreditCode")); map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]); map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]);
} else if (ValidationUtil.equals(queryType, "GZ_YZ")) {// 移装告知设备选择 - 业务限制 } else if (ValidationUtil.equals(queryType, "GZ_YZ")) {// 移装告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据 // 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据
...@@ -1437,7 +1437,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1437,7 +1437,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]); map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]);
} }
} }
map.put("USE_UNIT_CREDIT_CODE", map.get("useUnitCreditCode")); map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
} }
} }
// this.setRepeatUsedCheckFilterByType(boolMust,companyCode,queryType); // this.setRepeatUsedCheckFilterByType(boolMust,companyCode,queryType);
......
...@@ -940,11 +940,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -940,11 +940,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
} }
//更新历史数据表 //更新历史数据表
if (!ValidationUtil.isEmpty(useRegistrationCodeList)) { historyData.setStatus("history");
historyData.setStatus("history"); historyData.setUseRegistrationCode(String.join(",", useRegistrationCodeList));
historyData.setUseRegistrationCode(String.join(",", useRegistrationCodeList)); jgRegistrationHistoryService.saveOrUpdateHistoryData(historyData);
jgRegistrationHistoryService.saveOrUpdateHistoryData(historyData);
}
transfer.setAuditPassDate(new Date()); transfer.setAuditPassDate(new Date());
transfer.setRegPersonId(reginParams.getUserModel().getUserId()); transfer.setRegPersonId(reginParams.getUserModel().getUserId());
transfer.setRegPersonName(reginParams.getUserModel().getUserName()); transfer.setRegPersonName(reginParams.getUserModel().getUserName());
......
...@@ -200,7 +200,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -200,7 +200,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 字段转换 // 字段转换
this.convertField(noticeDto); this.convertField(noticeDto);
JgReformNotice notice = this.getById(noticeDto.getSequenceNbr()); JgReformNotice notice = this.getById(noticeDto.getSequenceNbr());
this.checkRepeatUsed(submitType, notice); List<Map<String, Object>> deviceList = noticeDto.getDeviceList();
List<String> records = deviceList.stream().map(equ -> String.valueOf(equ.get("SEQUENCE_NBR"))).collect(Collectors.toList());
this.checkRepeatUsed(submitType, records, notice);
if (SUBMIT_TYPE_FLOW.equals(submitType)) { if (SUBMIT_TYPE_FLOW.equals(submitType)) {
// 发起流程 // 发起流程
if (!StringUtils.hasText(noticeDto.getInstanceId())) { if (!StringUtils.hasText(noticeDto.getInstanceId())) {
...@@ -274,7 +276,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -274,7 +276,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
BeanUtils.copyProperties(noticeDto, bean); BeanUtils.copyProperties(noticeDto, bean);
jgReformNoticeMapper.updateById(bean); jgReformNoticeMapper.updateById(bean);
} }
List<Map<String, Object>> deviceList = noticeDto.getDeviceList();
jgReformNoticeEqMapper.delete(new QueryWrapper<JgReformNoticeEq>() jgReformNoticeEqMapper.delete(new QueryWrapper<JgReformNoticeEq>()
.eq("equip_transfer_id", notice.getSequenceNbr())); .eq("equip_transfer_id", notice.getSequenceNbr()));
// eq关系表 // eq关系表
...@@ -512,15 +514,13 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -512,15 +514,13 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode)); equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode));
} }
private void checkRepeatUsed(String submitType, JgReformNotice jgReformNotice) { private void checkRepeatUsed(String submitType, List<String> records, JgReformNotice jgReformNotice) {
if (SUBMIT_TYPE_FLOW.equals(submitType)) { if (SUBMIT_TYPE_FLOW.equals(submitType)) {
// 流程中校验 // 流程中校验
LambdaQueryWrapper<JgReformNoticeEq> queryWrapper = new LambdaQueryWrapper<>(); records.forEach(record -> {
queryWrapper.eq(JgReformNoticeEq::getEquipTransferId, jgReformNotice.getSequenceNbr()); EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY)
List<JgReformNoticeEq> noticeEqs = jgReformNoticeEqMapper.selectList(queryWrapper); .equipRepeatUsedCheck(record, jgReformNotice.getInstallUnitCreditCode());
for (JgReformNoticeEq noticeEq : noticeEqs) { });
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(noticeEq.getEquId(), jgReformNotice.getInstallUnitCreditCode());
}
} }
} }
...@@ -612,6 +612,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -612,6 +612,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
.startDate(item.getCreateDate()) .startDate(item.getCreateDate())
.model(taskMessageDto) .model(taskMessageDto)
.nextExecuteUser(item.getNextExecuteIds()) .nextExecuteUser(item.getNextExecuteIds())
.startDate(new Date())
.build(); .build();
} }
......
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