Browse Source

fix: 修复灵敏感知-问题分发涉嫌问题必填校验错误导致无法下发的问题

fix: 个人极端赋分规则:调整权重支持小数点后3位,修复界面不展示问题
fit: 综合查询:新增“转待办”功能,将已办结的件转为市局审批
main
wxc 12 months ago
parent
commit
5d4d65d026
  1. 38
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  2. 2
      src/main/java/com/biutag/supervision/pojo/dto/ModelClueTaskDistribute.java
  3. 2
      src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java
  4. 3
      src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java
  5. 2
      src/main/java/com/biutag/supervision/pojo/vo/RiskScoreRuleTree.java
  6. 2
      src/main/java/com/biutag/supervision/service/ModelClueService.java
  7. 1
      src/main/java/com/biutag/supervision/service/SupPoliceService.java
  8. 11
      src/test/java/com/biutag/supervision/StrUtil.java

38
src/main/java/com/biutag/supervision/controller/work/NegativeController.java

@ -1,26 +1,32 @@
package com.biutag.supervision.controller.work;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.common.validation.AddGroup;
import com.biutag.supervision.common.validation.EditGroup;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.FlowNodeEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.constants.enums.WorkStatusEnum;
import com.biutag.supervision.flow.FlowService;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.NegativeDetail;
import com.biutag.supervision.pojo.dto.ActionDto;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.DepartNegativeRate;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.NegativeConfirmationCompletionVo;
import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.JSON;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -42,6 +48,8 @@ public class NegativeController {
private final DepartNegativeRateService departNegativeRateService;
private final NegativeWorkService negativeWorkService;
@GetMapping
public Result<Page<NegativeQueryVo>> list(NegativeQueryParam queryParam) {
return Result.success(negativeQueryService.page(queryParam));
@ -108,6 +116,30 @@ public class NegativeController {
return Result.success(flowService.execute(action));
}
private final NegativeHistoryService historyService;
@PostMapping("{id}/transferTodo")
@Transactional(rollbackFor = Exception.class)
public Result<Boolean> transferTodo(@PathVariable String id) {
negativeService.update(new LambdaUpdateWrapper<Negative>().eq(Negative::getId, id).set(Negative::getProcessingStatus, ProcessingStatusEnum.approval.name())
.set(Negative::getFlowKey, FlowNodeEnum.FIRST_APPROVE.getKey()).set(Negative::getUpdTime, LocalDateTime.now()));
negativeWorkService.update(new LambdaUpdateWrapper<NegativeWork>().eq(NegativeWork::getNegativeId, id)
.eq(NegativeWork::getRoleCode, RoleCodeEnum.FIRST_ADMIN.getCode())
.set(NegativeWork::getStatus, WorkStatusEnum.todo.name())
.set(NegativeWork::getUpdateTime, LocalDateTime.now()));
UserAuth user = UserContextHolder.getCurrentUser();
NegativeHistory history = new NegativeHistory().setHistoryId(IdUtil.fastSimpleUUID())
.setNegativeId(id)
.setActionName("转为待办")
.setDepartName(AppConstants.ROOT_DEPART_NAME)
.setCrtUser(user.getUserId())
.setCrtUserName(user.getUserName())
.setCrtName(user.getNickName())
.setCrtTime(LocalDateTime.now());
historyService.save(history);
return Result.success();
}
@PostMapping("export/excel")
public Result<Void> export(NegativeQueryParam queryParam) {
queryParam.setSize(10000);

2
src/main/java/com/biutag/supervision/pojo/dto/ModelClueTaskDistribute.java

@ -51,7 +51,7 @@ public class ModelClueTaskDistribute {
// 警种
private String policeType;
private String involveProblem;
private List<String> involveProblem = new ArrayList<>();
private List<FileVo> thingFiles = new ArrayList<>();

2
src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java

@ -35,7 +35,7 @@ public class RiskScoreRule {
// 权重
@TableField("weight")
private Integer weight;
private Double weight;
// 状态
@TableField("status")

3
src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java

@ -94,4 +94,7 @@ public class NegativeWorkModel {
private String checkStatusName;
// 当前处理对象
private String currentProcessingObject;
}

2
src/main/java/com/biutag/supervision/pojo/vo/RiskScoreRuleTree.java

@ -30,7 +30,7 @@ public class RiskScoreRuleTree {
private String ruleDesc;
// 权重
private Integer weight;
private Double weight;
// 状态
private Boolean status;

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

@ -128,7 +128,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
model.setBusinessTypeCode(taskDistribute.getBusinessTypeCode());
model.setPoliceType(taskDistribute.getPoliceType());
model.setInvolveProblem(taskDistribute.getInvolveProblem());
model.setInvolveProblem(String.join(",", taskDistribute.getInvolveProblem()));
return distribution(modelClues, model, taskDistribute.getTaskName(), taskDistribute.getThingFiles());
}

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

@ -67,7 +67,6 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
}
}
}
queryWrapper.orderByDesc("field(p.job,'辅警','民警','四级机构副职','四级机构正职','三级机构副职','三级机构正职二','三级机构正职一','二级机构副职','二级机构正职二','二级机构正职一','市局领导副职','市局领导正职')");
queryWrapper.orderByDesc("field(p.position,'副职','正职')");
queryWrapper.orderByAsc("d.level").orderByDesc("p.position").orderByDesc("p.sort_id").orderByAsc("p.person_status");
return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper);

11
src/test/java/com/biutag/supervision/StrUtil.java

@ -1,14 +1,20 @@
package com.biutag.supervision;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileTypeUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.io.resource.ResourceUtil;
import com.biutag.supervision.util.JSON;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.net.URL;
import java.time.LocalDate;
import java.util.List;
@ -16,7 +22,8 @@ import java.util.List;
public class StrUtil {
@Test
public void testSubstr() {
System.out.println(StrUtil.class.getSimpleName());
public void testSubstr() throws FileNotFoundException {
ImgUtil.compress(new File("C:\\Users\\ldj\\Desktop\\文件类型\\1204.png"), new File("C:\\Users\\ldj\\Desktop\\文件类型\\1204.jpg"), 1);
}
}

Loading…
Cancel
Save