Commit 0a2d22a1 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 878fde0e 9a1e6e0c
......@@ -1423,7 +1423,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (ValidationUtil.isEmpty(map.get("useUnitCreditCode")) || ValidationUtil.isEmpty(map.get("county"))) {
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]);
} else if (ValidationUtil.equals(queryType, "GZ_YZ")) {// 移装告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据
......@@ -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_UNIT_CREDIT_CODE", map.get("useUnitCreditCode"));
map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
}
}
// this.setRepeatUsedCheckFilterByType(boolMust,companyCode,queryType);
......
......@@ -940,11 +940,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
//更新历史数据表
if (!ValidationUtil.isEmpty(useRegistrationCodeList)) {
historyData.setStatus("history");
historyData.setUseRegistrationCode(String.join(",", useRegistrationCodeList));
jgRegistrationHistoryService.saveOrUpdateHistoryData(historyData);
}
historyData.setStatus("history");
historyData.setUseRegistrationCode(String.join(",", useRegistrationCodeList));
jgRegistrationHistoryService.saveOrUpdateHistoryData(historyData);
transfer.setAuditPassDate(new Date());
transfer.setRegPersonId(reginParams.getUserModel().getUserId());
transfer.setRegPersonName(reginParams.getUserModel().getUserName());
......
......@@ -200,7 +200,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 字段转换
this.convertField(noticeDto);
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 (!StringUtils.hasText(noticeDto.getInstanceId())) {
......@@ -274,7 +276,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
BeanUtils.copyProperties(noticeDto, bean);
jgReformNoticeMapper.updateById(bean);
}
List<Map<String, Object>> deviceList = noticeDto.getDeviceList();
jgReformNoticeEqMapper.delete(new QueryWrapper<JgReformNoticeEq>()
.eq("equip_transfer_id", notice.getSequenceNbr()));
// eq关系表
......@@ -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));
}
private void checkRepeatUsed(String submitType, JgReformNotice jgReformNotice) {
private void checkRepeatUsed(String submitType, List<String> records, JgReformNotice jgReformNotice) {
if (SUBMIT_TYPE_FLOW.equals(submitType)) {
// 流程中校验
LambdaQueryWrapper<JgReformNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgReformNoticeEq::getEquipTransferId, jgReformNotice.getSequenceNbr());
List<JgReformNoticeEq> noticeEqs = jgReformNoticeEqMapper.selectList(queryWrapper);
for (JgReformNoticeEq noticeEq : noticeEqs) {
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(noticeEq.getEquId(), jgReformNotice.getInstallUnitCreditCode());
}
records.forEach(record -> {
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY)
.equipRepeatUsedCheck(record, jgReformNotice.getInstallUnitCreditCode());
});
}
}
......@@ -612,6 +612,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
.startDate(item.getCreateDate())
.model(taskMessageDto)
.nextExecuteUser(item.getNextExecuteIds())
.startDate(new Date())
.build();
}
......
......@@ -484,11 +484,13 @@ public class ZLDPStatisticsServiceImpl {
List<DataDictionary> dataDictionaryList = iDataDictionaryService.getByType("ADDRESS");
dataDictionaryList.stream().forEach(x -> {
Map<String, Object> map = new HashMap<>();
map.put(x.getName(), dataMap.getOrDefault(x.getCode(), 0));
map.put("name", x.getName());
map.put("value", dataMap.getOrDefault(x.getCode(), 0));
returnList.add(map);
});
Map<String, Object> otherMap = new HashMap<>();
otherMap.put("其他", dataMap.getOrDefault("其他", 0) + dataMap.getOrDefault("", 0));
otherMap.put("name", "其他");
otherMap.put("value", dataMap.getOrDefault("其他", 0) + dataMap.getOrDefault("", 0));
returnList.add(otherMap);
} catch (IOException e) {
e.printStackTrace();
......
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