|
|
|
|
@ -112,7 +112,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.stream().map(leaderIdCode -> { |
|
|
|
|
VerifyData.BlameLeader blameLeader = new VerifyData.BlameLeader(); |
|
|
|
|
List<Blame> blames = blameList.stream().filter(blameObj -> leaderIdCode.equals(blameObj.getLeadIdCode())).toList(); |
|
|
|
|
// 取第一个
|
|
|
|
|
// å<EFBFBD>–第一ï¿?
|
|
|
|
|
Blame blame = blames.get(0); |
|
|
|
|
BeanUtil.copyProperties(blame, blameLeader); |
|
|
|
|
blameLeader.setBlameIdCodes(blames.stream().map(Blame::getBlameIdCode).toList()); |
|
|
|
|
@ -133,7 +133,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setFlowActions(flowActions) |
|
|
|
|
.setApproves(approveService.list(id)) |
|
|
|
|
.setIsFav(favService.existsByCurrentUser(id)); |
|
|
|
|
// 签收退回
|
|
|
|
|
// ç¾æ”¶é€€ï¿?
|
|
|
|
|
if (!flows.isEmpty() && AppConstants.SIGN_RETURN_ACTION_NAME.equals(flows.get(flows.size() - 1).getActionName())) { |
|
|
|
|
detail.setSignReturns(signReturnService.list(id)); |
|
|
|
|
} |
|
|
|
|
@ -146,11 +146,11 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
if (FlowNodeEnum.isSignFlow(negative.getFlowKey())) { |
|
|
|
|
detail.setMaxDuration(NumberUtil.mul(negative.getMaxSignDuration(), TimeUtil.SECONDS_OF_A_DAY).longValue()); |
|
|
|
|
} |
|
|
|
|
// 未延期
|
|
|
|
|
// 未延�
|
|
|
|
|
else if (Objects.isNull(negative.getExtensionDays())) { |
|
|
|
|
detail.setMaxDuration(NumberUtil.mul(negative.getMaxHandleDuration(), TimeUtil.SECONDS_OF_A_DAY).longValue()); |
|
|
|
|
} else { |
|
|
|
|
// 已延期
|
|
|
|
|
// 已延�
|
|
|
|
|
Integer maxDuration = negative.getMaxHandleDuration() + negative.getExtensionDays(); |
|
|
|
|
detail.setMaxDuration(NumberUtil.mul(maxDuration, TimeUtil.SECONDS_OF_A_DAY).longValue()); |
|
|
|
|
} |
|
|
|
|
@ -160,7 +160,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
negative.getExtensionDays(), |
|
|
|
|
negative.getFlowKey())); |
|
|
|
|
} |
|
|
|
|
// 判断当前是否 是认定办结环节
|
|
|
|
|
// 判æ–当å‰<EFBFBD>是å<EFBFBD>¦ 是认定办结环ï¿?
|
|
|
|
|
if (Objects.nonNull(workId)) { |
|
|
|
|
Boolean confirmationCompletionFlag = (ApprovalFlowEnum.SECOND_APPROVAL.getValue().equals(negative.getApprovalFlow()) && FlowNodeEnum.SECOND_APPROVE.getKey().equals(negative.getFlowKey())) |
|
|
|
|
|| FlowNodeEnum.FIRST_APPROVE.getKey().equals(negative.getFlowKey()); |
|
|
|
|
@ -189,7 +189,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isBlank(negativeDto.getOriginId())) { |
|
|
|
|
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode()); |
|
|
|
|
negative.setOriginId(originId); // 如果是空就生成随机的线索源
|
|
|
|
|
negative.setOriginId(originId); // 如果是空就生æˆ<EFBFBD>éš<EFBFBD>机的线索ï¿?
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) { |
|
|
|
|
@ -206,7 +206,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
negative.setThreeInvolveDepartId(depart.getId()); |
|
|
|
|
negative.setSecondInvolveDepartId(depart.getPid()); |
|
|
|
|
} else { |
|
|
|
|
throw new RuntimeException("涉及单位请选择二级或三级单位"); |
|
|
|
|
throw new RuntimeException("涉å<EFBFBD>Šå<EFBFBD>•ä½<EFBFBD>请选择二级或三级å<EFBFBD>•ï¿?); |
|
|
|
|
} |
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
boolean secondFlag = false; |
|
|
|
|
@ -240,7 +240,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
log.warn("未获取到用户上下文,问题ID:{}", negative.getId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
save(negative); // 添加一条 negative 数据
|
|
|
|
|
save(negative); // æ·»åŠ ä¸€ï¿?negative æ•°æ<EFBFBD>®
|
|
|
|
|
negativeDto.setId(negative.getId()); |
|
|
|
|
if (!negativeDto.getThingFiles().isEmpty()) { |
|
|
|
|
List<NegativeThingFile> files = negativeDto.getThingFiles().stream().map(item -> { |
|
|
|
|
@ -270,7 +270,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setProblemSourcesCode(negative.getProblemSourcesCode()) |
|
|
|
|
.setUpdateTime(now) |
|
|
|
|
.setCreateTime(now); |
|
|
|
|
workService.save(work); // 添加一条 negative_work 数据 工作状态
|
|
|
|
|
workService.save(work); // æ·»åŠ ä¸€ï¿?negative_work æ•°æ<EFBFBD>® 工作状�?
|
|
|
|
|
|
|
|
|
|
FirstDistributeData firstDistributeData = new FirstDistributeData(); |
|
|
|
|
BeanUtil.copyProperties(negativeDto, firstDistributeData); |
|
|
|
|
@ -282,7 +282,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setWorkId(work.getId()) |
|
|
|
|
.setNextFlowKey(FlowNodeEnum.SECOND_SIGN.getKey()) |
|
|
|
|
.setData(firstDistributeData); |
|
|
|
|
SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数据
|
|
|
|
|
SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一æ<EFBFBD>¡åކå<EFBFBD>²æ•°ï¿?
|
|
|
|
|
return negative; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -301,10 +301,10 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setBusinessTypeCode(businessTypeCode) |
|
|
|
|
.setPoliceType(NegativeApiDto.BusinessType.getPoliceType(item.getBusinessTypeName())) |
|
|
|
|
.setPoliceTypeName(NegativeApiDto.BusinessType.getPoliceTypeName(item.getBusinessTypeName())) |
|
|
|
|
// 导入的数据都是警务调查
|
|
|
|
|
// 导入的数æ<EFBFBD>®éƒ½æ˜¯è¦åŠ¡è°ƒï¿?
|
|
|
|
|
.setProblemSources(ProblemSourcesEnum.JWDC.getLabel()) |
|
|
|
|
.setProblemSourcesCode(ProblemSourcesEnum.JWDC.getValue()) |
|
|
|
|
// 警务调查默认为137工作制
|
|
|
|
|
// è¦åŠ¡è°ƒæŸ¥é»˜è®¤ï¿?37工作ï¿?
|
|
|
|
|
.setTimeLimit(TimeLimitEnum.WORK_137.getValue()) |
|
|
|
|
.setMaxSignDuration(TimeLimitEnum.WORK_137.getMaxSignDuration()) |
|
|
|
|
.setMaxHandleDuration(TimeLimitEnum.WORK_137.getMaxHandleDuration()) |
|
|
|
|
@ -341,7 +341,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setCurrentProcessingObject(String.format("%s专班", dept.getShortName())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// jwpy直接算现场督察大队
|
|
|
|
|
// jwpy直接算现场ç<EFBFBD>£å¯Ÿå¤§ï¿?
|
|
|
|
|
negative.setIssuingDepartId(JWPY_DEPARTID); |
|
|
|
|
negative.setIssuingDepartName(JWPY_DEPART_NAME); |
|
|
|
|
save(negative); |
|
|
|
|
@ -373,7 +373,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
.setCreateTime(now); |
|
|
|
|
workService.save(firstWork); |
|
|
|
|
} else { |
|
|
|
|
log.error("未匹配上单位:{}, code: {}", item.getDepartName(), item.getDepartCode()); |
|
|
|
|
log.error("未匹é…<EFBFBD>上å<EFBFBD>•ä½<EFBFBD>:{}ï¿?code: {}", item.getDepartName(), item.getDepartCode()); |
|
|
|
|
departId = AppConstants.ROOT_DEPART_ID; |
|
|
|
|
departName = AppConstants.ROOT_DEPART_NAME; |
|
|
|
|
roleCode = RoleCodeEnum.FIRST_ADMIN.getCode(); |
|
|
|
|
@ -417,17 +417,17 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
public boolean remove(String id) { |
|
|
|
|
removeById(id); |
|
|
|
|
negativeHistoryService.removeById(id); |
|
|
|
|
// 工作表
|
|
|
|
|
// 工作�
|
|
|
|
|
workService.remove(new LambdaQueryWrapper<NegativeWork>().eq(NegativeWork::getNegativeId, id)); |
|
|
|
|
// 收藏表
|
|
|
|
|
// æ”¶è—<EFBFBD>ï¿?
|
|
|
|
|
favService.remove(new LambdaQueryWrapper<NegativeFav>().eq(NegativeFav::getNegativeId, id)); |
|
|
|
|
// 事件详情描述表
|
|
|
|
|
// 事件详情æ<EFBFBD><EFBFBD>è¿°ï¿?
|
|
|
|
|
thingFileService.remove(new LambdaQueryWrapper<NegativeThingFile>().eq(NegativeThingFile::getNegativeId, id)); |
|
|
|
|
// 涉及人员
|
|
|
|
|
blameService.remove(id); |
|
|
|
|
// 核查附件
|
|
|
|
|
fileService.remove(new LambdaQueryWrapper<NegativeFile>().eq(NegativeFile::getNegtiveId, id)); |
|
|
|
|
// 签收退回
|
|
|
|
|
// ç¾æ”¶é€€ï¿?
|
|
|
|
|
signReturnService.remove(new LambdaQueryWrapper<NegativeSignReturn>().eq(NegativeSignReturn::getNegativeId, id)); |
|
|
|
|
// 申请延期
|
|
|
|
|
extensionApplyService.remove(new LambdaQueryWrapper<NegativeExtensionApply>().eq(NegativeExtensionApply::getNegativeId, id)); |
|
|
|
|
@ -442,7 +442,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
if (CollUtil.isEmpty(histories) || CollUtil.isEmpty(applys)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 1. 按部门
|
|
|
|
|
// 1. 按部�
|
|
|
|
|
Map<String, NegativeHistory> countersignHistoryMap = new HashMap<>(); |
|
|
|
|
for (NegativeHistory history : histories) { |
|
|
|
|
if ("提交会签".equals(history.getActionName()) && StrUtil.isNotBlank(history.getDepartName())) { |
|
|
|
|
@ -452,7 +452,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
if (countersignHistoryMap.isEmpty()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 2. 回填会签人信息 校验部门
|
|
|
|
|
// 2. 回填会ç¾äººä¿¡ï¿? æ ¡éªŒéƒ¨é—¨
|
|
|
|
|
for (CountersignApply apply : applys) { |
|
|
|
|
List<NegativeCountersign> countersigns = apply.getCountersigns(); |
|
|
|
|
if (CollUtil.isEmpty(countersigns)) { |
|
|
|
|
@ -475,8 +475,54 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}\r\n @Transactional(rollbackFor = Exception.class)\r\n public void updateNegative(NegativeDto negativeDto) { |
|
|
|
|
if (StrUtil.isBlank(negativeDto.getId())) { |
|
|
|
|
throw new RuntimeException("æ•°æ<EFBFBD>®å¼‚常,请系统è<EFBFBD>”系管ç<EFBFBD>†å‘˜ã€<EFBFBD>问题ID为空ï¿?); |
|
|
|
|
} |
|
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<>(); |
|
|
|
|
// 涉å<EFBFBD>Šå<EFBFBD>•ä½<EFBFBD>
|
|
|
|
|
SupDepart depart = departService.getById(negativeDto.getInvolveDepartId()); |
|
|
|
|
if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { |
|
|
|
|
updateWrapper.set(Negative::getSecondInvolveDepartId, depart.getId()) |
|
|
|
|
.set(Negative::getThreeInvolveDepartId, null); |
|
|
|
|
} else if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) { |
|
|
|
|
updateWrapper.set(Negative::getSecondInvolveDepartId, depart.getPid()) |
|
|
|
|
.set(Negative::getThreeInvolveDepartId, depart.getId()); |
|
|
|
|
} else { |
|
|
|
|
throw new RuntimeException("涉å<EFBFBD>Šå<EFBFBD>•ä½<EFBFBD>请选择二级或三级å<EFBFBD>•ï¿?); |
|
|
|
|
} |
|
|
|
|
updateWrapper.eq(Negative::getId, negativeDto.getId()) |
|
|
|
|
.set(Negative::getProblemSources, negativeDto.getProblemSources()) |
|
|
|
|
.set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode()) |
|
|
|
|
.set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode()) |
|
|
|
|
.set(Negative::getCaseNumber, negativeDto.getCaseNumber()) |
|
|
|
|
.set(Negative::getInvolveProblem, com.biutag.supervision.util.JSON.toJSONString(negativeDto.getInvolveProblem())) |
|
|
|
|
.set(Negative::getPoliceType, negativeDto.getPoliceType()) |
|
|
|
|
.set(Negative::getPoliceTypeName, negativeDto.getPoliceTypeName()) |
|
|
|
|
.set(Negative::getDiscoveryTime, negativeDto.getDiscoveryTime()) |
|
|
|
|
.set(Negative::getHappenTime, negativeDto.getHappenTime()) |
|
|
|
|
.set(Negative::getResponderName, negativeDto.getResponderName()) |
|
|
|
|
.set(Negative::getContactPhone, negativeDto.getContactPhone()) |
|
|
|
|
.set(Negative::getThingDesc, negativeDto.getThingDesc()) |
|
|
|
|
.set(Negative::getSpecialSupervision, negativeDto.getSpecialSupervision()) |
|
|
|
|
.set(Negative::getReportNumber, negativeDto.getReportNumber()) |
|
|
|
|
.set(StrUtil.isNotEmpty(negativeDto.getReportId()),Negative::getReportId,negativeDto.getReportId()) |
|
|
|
|
.set(Negative::getInvolveDepartId, negativeDto.getInvolveDepartId()) |
|
|
|
|
.set(Negative::getInvolveDepartName, depart.getShortName()) |
|
|
|
|
// 涉嫌问题
|
|
|
|
|
.set(Negative::getInvolveProblem, CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem()) ? String.join(",", negativeDto.getInvolveProblem()) : null) |
|
|
|
|
.set(Negative::getUpdUser, UserContextHolder.getCurrentUser().getNickName()) |
|
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()); |
|
|
|
|
if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) { |
|
|
|
|
updateWrapper.set(Negative::getInvolveProblem, String.join(",", negativeDto.getInvolveProblem())); |
|
|
|
|
} else { |
|
|
|
|
updateWrapper.set(Negative::getInvolveProblem, null); |
|
|
|
|
} |
|
|
|
|
update(updateWrapper); |
|
|
|
|
// 更新问题æ<EFBFBD>¥æº<EFBFBD>
|
|
|
|
|
workService.update(new LambdaUpdateWrapper<NegativeWork>().set(NegativeWork::getProblemSourcesCode, negativeDto.getProblemSourcesCode()).eq(NegativeWork::getNegativeId, negativeDto.getId())); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|