|
|
|
|
@ -69,7 +69,8 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
// 当前处理对象
|
|
|
|
|
.set(Negative::getCurrentProcessingObject, negative.getIsSecondHandle() ? "市局专班" : String.format("%s专班", negative.getHandleSecondDepartName())) |
|
|
|
|
.set(Negative::getHandleTime, LocalDateTime.now()) |
|
|
|
|
.set(Negative::getHandleTimeout, Objects.isNull(remainingDuration) || remainingDuration >= 0 ? 0 : -remainingDuration); |
|
|
|
|
.set(Negative::getHandleTimeout, Objects.isNull(remainingDuration) || remainingDuration >= 0 ? 0 : -remainingDuration) |
|
|
|
|
.set(Negative::getVerifyTime, LocalDateTime.now()); |
|
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -79,20 +80,37 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
.eq(Negative::getId, negative.getId()) |
|
|
|
|
.set(Negative::getUpdTime, now) |
|
|
|
|
.set(Negative::getCheckStatus, verifyData.getCheckStatus()) |
|
|
|
|
.set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc()) |
|
|
|
|
.set(Negative::getCheckStatusName, verifyData.getCheckStatusName()) |
|
|
|
|
.set(Negative::getIsRectifyCode, verifyData.getIsRectifyCode()) |
|
|
|
|
.set(Negative::getIsRectifyName, verifyData.getIsRectifyName()) |
|
|
|
|
.set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc()) |
|
|
|
|
.set(Negative::getAccountabilityTarget, verifyData.getAccountabilityTarget()) |
|
|
|
|
.set(Negative::getCaseNumber, verifyData.getCaseNumber()) |
|
|
|
|
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc()) |
|
|
|
|
.set(Negative::getInvolveDepartId, verifyData.getInvolveDepartId()) |
|
|
|
|
.set(Negative::getUnrectifyReason, verifyData.getUnrectifyReason()) |
|
|
|
|
.set(Negative::getInvolveDepartName, departService.getById(verifyData.getInvolveDepartId()).getShortName()) |
|
|
|
|
.set(Negative::getResolveSituation, verifyData.getResolveSituation()) |
|
|
|
|
.set(Negative::getResolveStatus, verifyData.getResolveStatus()) |
|
|
|
|
.set(Negative::getVisitingLeaderName, verifyData.getVisitingLeaderName()) |
|
|
|
|
.set(Negative::getVisitingLeaderEmpNo, verifyData.getVisitingLeaderEmpNo()); |
|
|
|
|
// 属实
|
|
|
|
|
if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { |
|
|
|
|
updateWrapper |
|
|
|
|
.set(Negative::getIsRectifyCode, verifyData.getIsRectifyCode()) |
|
|
|
|
.set(Negative::getIsRectifyName, verifyData.getIsRectifyName()) |
|
|
|
|
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc()) |
|
|
|
|
.set(Negative::getUnrectifyReason, verifyData.getUnrectifyReason()); |
|
|
|
|
// 未整改
|
|
|
|
|
if (IsRectifyEnum.NOT.getValue().equals(verifyData.getIsRectifyCode())) { |
|
|
|
|
updateWrapper.set(Negative::getRectifyRestrictionDays, verifyData.getRectifyRestrictionDays()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 不属实
|
|
|
|
|
else { |
|
|
|
|
updateWrapper |
|
|
|
|
.set(Negative::getIsRectifyCode, null) |
|
|
|
|
.set(Negative::getIsRectifyName, null) |
|
|
|
|
.set(Negative::getRectifyDesc, null) |
|
|
|
|
.set(Negative::getUnrectifyReason, null) |
|
|
|
|
.set(Negative::getRectifyRestrictionDays, null); |
|
|
|
|
} |
|
|
|
|
// 经办人
|
|
|
|
|
if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())) { |
|
|
|
|
updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices())); |
|
|
|
|
@ -108,10 +126,6 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
} else { |
|
|
|
|
throw new RuntimeException("涉及单位请选择二级或三级单位"); |
|
|
|
|
} |
|
|
|
|
// 未整改
|
|
|
|
|
if (IsRectifyEnum.NOT.getValue().equals(verifyData.getIsRectifyCode())) { |
|
|
|
|
updateWrapper.set(Negative::getRectifyRestrictionDays, verifyData.getRectifyRestrictionDays()); |
|
|
|
|
} |
|
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
|
|
|
|
|
if (!verifyData.getBlames().isEmpty()) { |
|
|
|
|
@ -125,36 +139,36 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
List<NegativeBlame> negativeBlames = blames.stream().map(item -> { |
|
|
|
|
NegativeBlame negativeBlame = new NegativeBlame(); |
|
|
|
|
BeanUtil.copyProperties(item, negativeBlame); |
|
|
|
|
if (CollectionUtil.isNotEmpty(item.getHandleResultCode())) { |
|
|
|
|
negativeBlame.setHandleResultCode(String.join(",", item.getHandleResultCode())); |
|
|
|
|
} |
|
|
|
|
List<VerifyData.BlameLeader> blameLeaders = verifyData.getBlameLeaders().stream() |
|
|
|
|
.filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())) |
|
|
|
|
.toList(); |
|
|
|
|
if(!blameLeaders.isEmpty()) { |
|
|
|
|
BeanUtil.copyProperties(blameLeaders.get(0), negativeBlame); |
|
|
|
|
if (CollectionUtil.isNotEmpty(blameLeaders.get(0).getLeadHandleResultCode())) { |
|
|
|
|
negativeBlame.setLeadHandleResultCode(String.join(",", blameLeaders.get(0).getLeadHandleResultCode())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
negativeBlame |
|
|
|
|
.setBlameId(IdUtil.getSnowflakeNextIdStr()) |
|
|
|
|
.setNegativeId(negative.getId()) |
|
|
|
|
.setCrtTime(now) |
|
|
|
|
.setUpdTime(now); |
|
|
|
|
if (CollectionUtil.isNotEmpty(item.getHandleResultCode())) { |
|
|
|
|
negativeBlame.setHandleResultCode(String.join(",", item.getHandleResultCode())); |
|
|
|
|
// 属实
|
|
|
|
|
if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { |
|
|
|
|
if (CollectionUtil.isNotEmpty(item.getHandleResultCode())) { |
|
|
|
|
negativeBlame.setHandleResultCode(String.join(",", item.getHandleResultCode())); |
|
|
|
|
} |
|
|
|
|
List<VerifyData.BlameLeader> blameLeaders = verifyData.getBlameLeaders().stream() |
|
|
|
|
.filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())) |
|
|
|
|
.toList(); |
|
|
|
|
if(!blameLeaders.isEmpty()) { |
|
|
|
|
BeanUtil.copyProperties(blameLeaders.get(0), negativeBlame); |
|
|
|
|
if (CollectionUtil.isNotEmpty(blameLeaders.get(0).getLeadHandleResultCode())) { |
|
|
|
|
negativeBlame.setLeadHandleResultCode(String.join(",", blameLeaders.get(0).getLeadHandleResultCode())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
problemRelations.addAll(item.getProblems().stream().filter(problem -> StrUtil.isNotBlank(problem.getOneLevelCode())).map(problem -> { |
|
|
|
|
NegativeProblemRelation problemRelation = new NegativeProblemRelation(); |
|
|
|
|
BeanUtil.copyProperties(problem, problemRelation); |
|
|
|
|
problemRelation.setId(IdUtil.fastSimpleUUID()); |
|
|
|
|
problemRelation.setBlameId(negativeBlame.getBlameId()); |
|
|
|
|
problemRelation.setNegativeId(negative.getId()); |
|
|
|
|
return problemRelation; |
|
|
|
|
}).toList()); |
|
|
|
|
} else { |
|
|
|
|
negativeBlame.setHandleResultCode(null).setLeadHandleResultCode(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
problemRelations.addAll(item.getProblems().stream().filter(problem -> StrUtil.isNotBlank(problem.getOneLevelCode())).map(problem -> { |
|
|
|
|
NegativeProblemRelation problemRelation = new NegativeProblemRelation(); |
|
|
|
|
BeanUtil.copyProperties(problem, problemRelation); |
|
|
|
|
problemRelation.setId(IdUtil.fastSimpleUUID()); |
|
|
|
|
problemRelation.setBlameId(negativeBlame.getBlameId()); |
|
|
|
|
problemRelation.setNegativeId(negative.getId()); |
|
|
|
|
return problemRelation; |
|
|
|
|
}).toList()); |
|
|
|
|
return negativeBlame; |
|
|
|
|
}).toList(); |
|
|
|
|
// 先删除
|
|
|
|
|
@ -164,6 +178,7 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
// 新增涉及人员问题类型
|
|
|
|
|
// 先删除
|
|
|
|
|
negativeProblemRelationService.remove(negative.getId()); |
|
|
|
|
|
|
|
|
|
if (!problemRelations.isEmpty()) { |
|
|
|
|
// 新增
|
|
|
|
|
negativeProblemRelationService.saveBatch(problemRelations); |
|
|
|
|
@ -175,7 +190,6 @@ public class ApplyCompletionAction implements Action {
|
|
|
|
|
// 新增
|
|
|
|
|
fileService.saveBatch(verifyData.getFiles(), negative.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void addApprove(Negative negative) { |
|
|
|
|
|