diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index e602321..5afeb74 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -60,16 +60,17 @@ public class ApplyCompletionAction implements Action { public void updateNegative(String negativeId, String nextFlowKey, VerifyData verifyData, Negative negative) { LocalDateTime now = LocalDateTime.now(); LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() + .eq(Negative::getId, negativeId) .set(Negative::getFlowKey, nextFlowKey) .set(Negative::getUpdTime, now) .set(Negative::getProcessingStatus, ProcessingStatusEnum.approval.name()) - .eq(Negative::getId, negativeId); - updateWrapper.set(Negative::getCheckStatus, verifyData.getCheckStatus()) + .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::getAccountabilityTarget, verifyData.getAccountabilityTarget()) + .set(Negative::getCaseNumber, verifyData.getCaseNumber()) // 当前处理对象 .set(Negative::getCurrentProcessingObject, negative.getIsSecondHandle() ? "市局专班" : String.format("%s专班", negative.getHandleSecondDepartName())); // 未整改 diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyExtensionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyExtensionAction.java index 3556062..8c391b7 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyExtensionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyExtensionAction.java @@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.biutag.supervision.common.UserContextHolder; -import com.biutag.supervision.constants.enums.ProcessingStatusEnum; +import com.biutag.supervision.constants.AppConstants; import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.WorkStatusEnum; import com.biutag.supervision.pojo.dto.ActionDto; @@ -43,7 +43,7 @@ public class ApplyExtensionAction implements Action { ExtensionApplyData extensionApplyData = BeanUtil.toBean(actionDto.getData(), ExtensionApplyData.class); NegativeExtensionApply extensionApply = addExtensionApply(actionDto, extensionApplyData); updateNegative(actionDto.getNegativeId(), extensionApply.getId()); - addWork(actionDto, RoleCodeEnum.SECOND_ADMIN.getCode()); + addWork(actionDto); } public NegativeExtensionApply addExtensionApply(ActionDto actionDto, ExtensionApplyData applyExtensionData) { @@ -70,20 +70,33 @@ public class ApplyExtensionAction implements Action { .eq(Negative::getId, negativeId)); } - public void addWork(ActionDto actionDto, String roleCode) { + public void addWork(ActionDto actionDto) { NegativeWork currentWork = workService.getById(actionDto.getWorkId()); - SupDepart depart = departService.getById(currentWork.getDepartId()); - SupDepart parentDepart = departService.getById(depart.getPid()); + Negative negative = negativeService.getById(actionDto.getNegativeId()); + String roleCode; + String departId; + String departName; + // 是否是二级机构办理 + if (negative.getIsSecondHandle()) { + roleCode = RoleCodeEnum.FIRST_ADMIN.getCode(); + departId = AppConstants.ROOT_DEPART_ID; + departName = AppConstants.ROOT_DEPART_NAME; + } else { + roleCode = RoleCodeEnum.SECOND_ADMIN.getCode(); + SupDepart parentDepart = departService.getParentDepart(currentWork.getDepartId()); + departId = parentDepart.getId(); + departName = parentDepart.getShortName(); + } workService.remove(new LambdaQueryWrapper() .eq(NegativeWork::getNegativeId, actionDto.getNegativeId()) .eq(NegativeWork::getRoleCode, roleCode) - .eq(NegativeWork::getDepartId, parentDepart.getId())); - Negative negative = negativeService.getById(actionDto.getNegativeId()); + .eq(NegativeWork::getDepartId, departId)); + NegativeWork work = new NegativeWork() .setNegativeId(actionDto.getNegativeId()) .setRoleCode(roleCode) - .setDepartId(parentDepart.getId()) - .setDepartName(parentDepart.getName()) + .setDepartId(departId) + .setDepartName(departName) .setProblemSourcesCode(negative.getProblemSourcesCode()) .setFlowKey(actionDto.getNextFlowKey()) .setCreateTime(LocalDateTime.now()) diff --git a/src/main/java/com/biutag/supervision/flow/action/FirstExtensionApproveAction.java b/src/main/java/com/biutag/supervision/flow/action/FirstExtensionApproveAction.java index 7a432e4..62b1151 100644 --- a/src/main/java/com/biutag/supervision/flow/action/FirstExtensionApproveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/FirstExtensionApproveAction.java @@ -42,6 +42,7 @@ public class FirstExtensionApproveAction implements Action { public void next(ActionDto actionDto) { ApproveData approveData = BeanUtil.toBean(actionDto.getData(), ApproveData.class); Negative negative = negativeService.getById(actionDto.getNegativeId()); + updateNegative(negative); addExtensionApprove(actionDto, approveData.getComments(), negative.getNegativeExtensionApplyId()); doneWork(actionDto.getWorkId()); } diff --git a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java index a5a9b2d..e3f7c1c 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java @@ -10,9 +10,7 @@ import com.biutag.supervision.pojo.dto.ActionDto; import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeBlame; -import com.biutag.supervision.pojo.entity.NegativeFile; import com.biutag.supervision.pojo.entity.NegativeProblemRelation; -import com.biutag.supervision.pojo.vo.FileVo; import com.biutag.supervision.service.NegativeBlameService; import com.biutag.supervision.service.NegativeFileService; import com.biutag.supervision.service.NegativeProblemRelationService; @@ -30,6 +28,7 @@ import java.util.List; @RequiredArgsConstructor @Component public class SaveAction implements Action { + private final NegativeService negativeService; private final NegativeBlameService negativeBlameService; @@ -46,11 +45,12 @@ public class SaveAction implements Action { public void updateNegative(String negativeId, String nextFlowKey, VerifyData verifyData) { LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() + .eq(Negative::getId, negativeId) .set(Negative::getUpdTime, LocalDateTime.now()) .set(Negative::getProcessingStatus, ProcessingStatusEnum.approval.name()) .set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc()) - .eq(Negative::getId, negativeId); - updateWrapper.set(Negative::getCheckStatus, verifyData.getCheckStatus()) + .set(Negative::getCaseNumber, verifyData.getCaseNumber()) + .set(Negative::getCheckStatus, verifyData.getCheckStatus()) .set(Negative::getCheckStatusName, verifyData.getCheckStatusName()); // 核查情况是否属实 if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java index 9abac1a..21a2e3c 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java @@ -1,6 +1,5 @@ package com.biutag.supervision.pojo.dto.flow; -import com.baomidou.mybatisplus.annotation.TableField; import com.biutag.supervision.pojo.vo.FileVo; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.validation.constraints.NotBlank; @@ -42,6 +41,9 @@ public class VerifyData { @NotBlank private String accountabilityTarget; + // 涉及案件/警情编号 + private String caseNumber; + private List blames = new ArrayList<>(); private List files = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java index 6c9ef2a..73239d0 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -243,6 +243,7 @@ public class Negative { private String handleThreeDepartName; + // 涉及案件/警情编号 private String caseNumber; // 办理超时(秒) diff --git a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java index c9a519e..a813b02 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java @@ -22,6 +22,9 @@ public class NegativeQueryParam extends BasePage { @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private List discoveryTime = new ArrayList<>(); + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private List crtTime = new ArrayList<>(); + private String responderKey; private String responderValue; diff --git a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java index ee443ec..c4f6246 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java @@ -59,6 +59,9 @@ public class NegativeQueryService { if (param.getDiscoveryTime().size() == 2) { queryWrapper.between(Negative::getDiscoveryTime, param.getDiscoveryTime().get(0), param.getDiscoveryTime().get(1)); } + if (param.getCrtTime().size() == 2) { + queryWrapper.between(Negative::getCrtTime, param.getCrtTime().get(0), param.getCrtTime().get(1)); + } if (StrUtil.isNotBlank(param.getResponderKey()) && StrUtil.isNotBlank(param.getResponderValue())) { switch (param.getResponderKey()) { case "name": diff --git a/src/main/java/com/biutag/supervision/service/SupPoliceService.java b/src/main/java/com/biutag/supervision/service/SupPoliceService.java index 40a97c6..462f0aa 100644 --- a/src/main/java/com/biutag/supervision/service/SupPoliceService.java +++ b/src/main/java/com/biutag/supervision/service/SupPoliceService.java @@ -59,7 +59,7 @@ public class SupPoliceService extends ServiceImpl { public List listAllByDepartId(String departId) { List departIds = departService.getAllNodeIds(List.of(departId)); - return list(new LambdaQueryWrapper().in(SupPolice::getOrgId, departIds)); + return list(new LambdaQueryWrapper().in(SupPolice::getOrgId, departIds).orderByDesc(SupPolice::getPosition)); } public List listLeaderByDepartId(String departId) { diff --git a/src/main/java/com/biutag/supervision/util/TimeUtil.java b/src/main/java/com/biutag/supervision/util/TimeUtil.java index a9a9f13..d08a03f 100644 --- a/src/main/java/com/biutag/supervision/util/TimeUtil.java +++ b/src/main/java/com/biutag/supervision/util/TimeUtil.java @@ -100,6 +100,6 @@ public class TimeUtil { if (Objects.isNull(extensionDurationDays)) { return getRemainingDuration(beginTime, maxHandleDuration); } - return getRemainingDuration(beginTime, maxHandleDuration, maxSignDuration); + return getRemainingDuration(beginTime, maxHandleDuration, extensionDurationDays); } }