Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
fc2621e08d
  1. 5
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  2. 31
      src/main/java/com/biutag/supervision/flow/action/ApplyExtensionAction.java
  3. 1
      src/main/java/com/biutag/supervision/flow/action/FirstExtensionApproveAction.java
  4. 8
      src/main/java/com/biutag/supervision/flow/action/SaveAction.java
  5. 4
      src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java
  6. 1
      src/main/java/com/biutag/supervision/pojo/entity/Negative.java
  7. 3
      src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
  8. 3
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  9. 2
      src/main/java/com/biutag/supervision/service/SupPoliceService.java
  10. 2
      src/main/java/com/biutag/supervision/util/TimeUtil.java

5
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<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>()
.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()));
// 未整改

31
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<NegativeWork>()
.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())

1
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());
}

8
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<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>()
.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())) {

4
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<Blame> blames = new ArrayList<>();
private List<FileVo> files = new ArrayList<>();

1
src/main/java/com/biutag/supervision/pojo/entity/Negative.java

@ -243,6 +243,7 @@ public class Negative {
private String handleThreeDepartName;
// 涉及案件/警情编号
private String caseNumber;
// 办理超时(秒)

3
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<Date> discoveryTime = new ArrayList<>();
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> crtTime = new ArrayList<>();
private String responderKey;
private String responderValue;

3
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":

2
src/main/java/com/biutag/supervision/service/SupPoliceService.java

@ -59,7 +59,7 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
public List<SupPolice> listAllByDepartId(String departId) {
List<String> departIds = departService.getAllNodeIds(List.of(departId));
return list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds));
return list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds).orderByDesc(SupPolice::getPosition));
}
public List<SupPolice> listLeaderByDepartId(String departId) {

2
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);
}
}

Loading…
Cancel
Save