Browse Source

fix: 修复二级机构本级办理时申请延期界面展示错误

fit: 新增“预警模型”时,提供模型图标+颜色的组合来为“预警模型”设置丰富的图标效果
fit: 涉及单位、当前处理对象统一使用简称,以及流程节点使用单位简称。
fit: 问题录入:主办层级如选择二级机构主办,默认三级审批
main
wxc 12 months ago
parent
commit
483c822397
  1. 4
      sql/241204.sql
  2. 0
      sql/history/0911.sql
  3. 0
      sql/history/1008.sql
  4. 0
      sql/history/1011.sql
  5. 0
      sql/history/1014.sql
  6. 0
      sql/history/1027.sql
  7. 0
      sql/history/1106.sql
  8. 0
      sql/history/1107.sql
  9. 0
      sql/history/1109.sql
  10. 0
      sql/history/1114.sql
  11. 0
      sql/history/1126.sql
  12. 0
      sql/history/1128.sql
  13. 0
      sql/history/data.sql
  14. 0
      sql/history/dict.sql
  15. 0
      sql/history/file_class.sql
  16. 0
      sql/history/negative_0904.sql
  17. 0
      sql/history/negative_mark.sql
  18. 0
      sql/history/open-platform_0904.sql
  19. 0
      sql/history/truncate.sql
  20. 0
      sql/history/update-data.sql
  21. 2
      src/main/java/com/biutag/supervision/config/InterceptorConfig.java
  22. 18
      src/main/java/com/biutag/supervision/constants/enums/InvolveProblemEnum.java
  23. 49
      src/main/java/com/biutag/supervision/controller/UpdateController.java
  24. 4
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java
  25. 2
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java
  26. 10
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  27. 4
      src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
  28. 4
      src/main/java/com/biutag/supervision/pojo/dto/ModelDto.java
  29. 4
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  30. 2
      src/main/java/com/biutag/supervision/pojo/entity/Model.java
  31. 10
      src/main/java/com/biutag/supervision/service/ModelClueService.java
  32. 30
      src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java
  33. 23
      src/main/java/com/biutag/supervision/service/NegativeService.java

4
sql/241204.sql

@ -0,0 +1,4 @@
update model set involve_problem = null;
ALTER TABLE `negative`.`model`
ADD COLUMN `icon_color` varchar(255) NULL COMMENT '图标颜色' AFTER `icon`;

0
sql/0911.sql → sql/history/0911.sql

0
sql/1008.sql → sql/history/1008.sql

0
sql/1011.sql → sql/history/1011.sql

0
sql/1014.sql → sql/history/1014.sql

0
sql/1027.sql → sql/history/1027.sql

0
sql/1106.sql → sql/history/1106.sql

0
sql/1107.sql → sql/history/1107.sql

0
sql/1109.sql → sql/history/1109.sql

0
sql/1114.sql → sql/history/1114.sql

0
sql/1126.sql → sql/history/1126.sql

0
sql/1128.sql → sql/history/1128.sql

0
sql/data.sql → sql/history/data.sql

0
sql/dict.sql → sql/history/dict.sql

0
sql/file_class.sql → sql/history/file_class.sql

0
sql/negative_0904.sql → sql/history/negative_0904.sql

0
sql/negative_mark.sql → sql/history/negative_mark.sql

0
sql/open-platform_0904.sql → sql/history/open-platform_0904.sql

0
sql/truncate.sql → sql/history/truncate.sql

0
sql/update-data.sql → sql/history/update-data.sql

2
src/main/java/com/biutag/supervision/config/InterceptorConfig.java

@ -36,8 +36,8 @@ public class InterceptorConfig implements WebMvcConfigurer {
.excludePathPatterns("/file/stream/**", "/templates/**")
.excludePathPatterns("/datav/risk/**")
.excludePathPatterns("/score/**")
.excludePathPatterns("/updateInvolveProblem")
.excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**"));
registry.addInterceptor(new ApiInterceptor())
.addPathPatterns("/api/jwdc/**");
}

18
src/main/java/com/biutag/supervision/constants/enums/InvolveProblemEnum.java

@ -0,0 +1,18 @@
package com.biutag.supervision.constants.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author wxc
* @date 2024/12/4
*/
@AllArgsConstructor
public enum InvolveProblemEnum {
// 自动回访不满意
ZDHFBMY("1");
@Getter
private String value;
}

49
src/main/java/com/biutag/supervision/controller/UpdateController.java

@ -0,0 +1,49 @@
package com.biutag.supervision.controller;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.service.NegativeService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author wxc
* @date 2024/12/4
*/
@Slf4j
@RequiredArgsConstructor
@RestController
public class UpdateController {
private final NegativeService negativeService;
@RequestMapping("updateInvolveProblem")
public String update() {
List<Negative> list = negativeService.list(new LambdaUpdateWrapper<Negative>().isNotNull(Negative::getInvolveProblem));
int i = 0;
for (Negative negative : list) {
if (StrUtil.isBlank(negative.getInvolveProblem())) {
continue;
}
log.info("第{}条数据--------", i++);
try {
JSONArray jsonArray = JSON.parseArray(negative.getInvolveProblem());
String val = jsonArray.stream().map(item -> ((JSONObject) item).getString("dictValue")).collect(Collectors.joining(","));
System.out.println(val);
negativeService.update(new LambdaUpdateWrapper<Negative>().eq(Negative::getId, negative.getId()).set(Negative::getInvolveProblem, val));
} catch (Exception e) {
log.error("更新涉嫌问题异常:{}", e.getMessage(), e);
}
}
return "success";
}
}

4
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java

@ -64,7 +64,7 @@ public class ModelController {
Model model = new Model();
BeanUtil.copyProperties(modelDto, model);
if (Objects.nonNull(modelDto.getInvolveProblem())) {
model.setInvolveProblem(JSON.toJSONString(modelDto.getInvolveProblem()));
model.setInvolveProblem(String.join(",", modelDto.getInvolveProblem()));
}
return Result.success(modelService.saveModel(model, modelDto.getProblems()));
}
@ -74,7 +74,7 @@ public class ModelController {
Model model = new Model();
BeanUtil.copyProperties(modelDto, model);
if (Objects.nonNull(modelDto.getInvolveProblem())) {
model.setInvolveProblem(JSON.toJSONString(modelDto.getInvolveProblem()));
model.setInvolveProblem(String.join(",", modelDto.getInvolveProblem()));
}
modelService.updateModel(model, modelDto.getProblems());
return Result.success(model);

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java

@ -76,7 +76,7 @@ public class ProfileDepartController {
ProfileDepart profileDepart = new ProfileDepart();
SupDepart depart = departService.getById(departId);
profileDepart.getDepartInfo()
.setName(depart.getName())
.setName(depart.getShortName())
.setShortName(depart.getShortName());
List<SupPolice> polices = policeService.listAllByDepartId(departId);
profileDepart.getDepartInfo().setMainRole(polices.stream().filter(item -> "正职".equals(item.getPosition())).findFirst().map(SupPolice::getName).orElse(null));

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

@ -1,8 +1,10 @@
package com.biutag.supervision.controller.work;
import cn.hutool.core.collection.CollectionUtil;
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.flow.FlowService;
@ -86,8 +88,14 @@ public class NegativeController {
.set(Negative::getReportNumber, negativeDto.getReportNumber())
.set(Negative::getInvolveDepartId, negativeDto.getInvolveDepartId())
.set(Negative::getInvolveDepartName, negativeDto.getResponderName())
.set(Negative::getUpdUser, UserContextHolder.getCurrentUser().getNickName())
.set(Negative::getUpdTime, LocalDateTime.now());
negativeService.update(updateWrapper);
if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) {
updateWrapper.set(Negative::getInvolveProblem, String.join(",", negativeDto.getInvolveProblem()));
} else {
updateWrapper.set(Negative::getInvolveProblem, null);
}
negativeService.update(updateWrapper);
return Result.success();
}

4
src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java

@ -60,8 +60,8 @@ public class NegativeVo {
// 业务类别名称
private String businessTypeName;
// 涉嫌问题JSON
private String involveProblemLables;
// 涉嫌问题
private String involveProblem;
// 涉及警种名称
private String policeTypeName;

4
src/main/java/com/biutag/supervision/pojo/dto/ModelDto.java

@ -20,6 +20,8 @@ public class ModelDto {
private String icon;
private String iconColor;
private String remarks;
// 分发方式
@ -76,7 +78,7 @@ public class ModelDto {
// 警种
private String policeType;
private List<Map<String, String>> involveProblem;
private List<String> involveProblem = new ArrayList<>();
// 问题类型
private List<VerifyData.Problem> problems = new ArrayList<>();

4
src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java

@ -52,8 +52,8 @@ public class NegativeDto {
// 涉及警种
private String policeType;
// 涉嫌问题JSON
private List<Map<String, String>> involveProblem;
// 涉嫌问题
private List<String> involveProblem = new ArrayList<>();
// 反映人姓名
private String responderName;

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

@ -110,4 +110,6 @@ public class Model {
private String involveProblem;
private String iconColor;
}

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

@ -168,7 +168,9 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
negative.setBusinessTypeCode(model.getPoliceType());
//negative.setInvolveProblem(JSON.parseArray(model.getInvolveProblem(), Map.class));
if (StrUtil.isNotBlank(model.getInvolveProblem())) {
negative.setInvolveProblem(Arrays.stream(model.getInvolveProblem().split(",")).toList());
}
// 涉及单位
negative.setInvolveDepartId(item.getInvolveDepartId());
negative.setInvolveDepartName(item.getInvolveDepartName());
@ -185,16 +187,16 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
SupDepart depart = departService.getById(item.getInvolveDepartId());
if (depart.getLevel().equals(DepartLevelEnum.SECOND.getValue())) {
negative.setDepartId(depart.getId());
negative.setDepartName(depart.getName());
negative.setDepartName(depart.getShortName());
}
if (depart.getLevel().equals(DepartLevelEnum.THREE.getValue()) && Objects.equals(model.getDistributionFlow(), DistributionFlowEnum.SECOND.getValue())) {
SupDepart parentDepart = departService.getParentDepart(item.getInvolveDepartId());
negative.setDepartId(parentDepart.getId());
negative.setDepartName(parentDepart.getName());
negative.setDepartName(parentDepart.getShortName());
}
if (depart.getLevel().equals(DepartLevelEnum.THREE.getValue()) && Objects.equals(model.getDistributionFlow(), DistributionFlowEnum.THIRD.getValue())) {
negative.setDepartId(depart.getId());
negative.setDepartName(depart.getName());
negative.setDepartName(depart.getShortName());
}
negative.setTimeLimit(model.getTimeLimit());
negative.setMaxSignDuration(model.getMaxSignDuration());

30
src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java

@ -34,16 +34,26 @@ public class NegativeExtensionApplyService extends ServiceImpl<NegativeExtension
ExtensionApproveStepModel step1 = new ExtensionApproveStepModel("延期申请", "", ApproveStateEnum.approved.name(), null);
ExtensionApproveStepModel step2 = new ExtensionApproveStepModel(negative.getHandleSecondDepartName() + "专班审批", "", null, null);
ExtensionApproveStepModel step3 = new ExtensionApproveStepModel("市局专班审批", "", null, null);
apply.setApproveSteps(List.of(step1, step2, step3));
if (!list.isEmpty()) {
step2.setComments(list.get(0).getComments());
step2.setState(list.get(0).getState());
step2.setCreateTime(list.get(0).getCreateTime());
}
if (list.size() > 1) {
step3.setComments(list.get(1).getComments());
step3.setState(list.get(1).getState());
step3.setCreateTime(list.get(1).getCreateTime());
if (negative.getIsSecondHandle()) {
apply.setApproveSteps(List.of(step1, step3));
if (!list.isEmpty()) {
step3.setComments(list.get(0).getComments());
step3.setState(list.get(0).getState());
step3.setCreateTime(list.get(0).getCreateTime());
}
} else {
apply.setApproveSteps(List.of(step1, step2, step3));
if (!list.isEmpty()) {
step2.setComments(list.get(0).getComments());
step2.setState(list.get(0).getState());
step2.setCreateTime(list.get(0).getCreateTime());
}
if (list.size() > 1) {
step3.setComments(list.get(1).getComments());
step3.setState(list.get(1).getState());
step3.setCreateTime(list.get(1).getCreateTime());
}
}
return apply;
}

23
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -1,6 +1,7 @@
package com.biutag.supervision.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
@ -25,7 +26,6 @@ import com.biutag.supervision.pojo.dto.flow.VerifyData;
import com.biutag.supervision.pojo.dto.jwdc.NegativeApiDto;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.util.JSON;
import com.biutag.supervision.util.SpringUtil;
import com.biutag.supervision.util.TimeUtil;
import lombok.RequiredArgsConstructor;
@ -34,7 +34,10 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@ -87,10 +90,6 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
NegativeVo vo = new NegativeVo();
BeanUtil.copyProperties(negative, vo);
if (StrUtil.isNotBlank(negative.getInvolveProblem())) {
String involveProblemLables = JSON.readValueForList(negative.getInvolveProblem(), Map.class).stream().map(item -> String.valueOf(item.get("dictLabel"))).collect(Collectors.joining(" "));
vo.setInvolveProblemLables(involveProblemLables);
}
List<Blame> blameVos = blameService.list(id);
vo.setBlames(blameVos);
if (!blameVos.isEmpty()) {
@ -182,8 +181,9 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setCrtDepartLevel(secondFlag ? DepartLevelEnum.SECOND.getValue() : DepartLevelEnum.FIRST.getValue())
.setCrtTime(now)
.setUpdTime(now);
if (Objects.nonNull(negativeDto.getInvolveProblem())) {
negative.setInvolveProblem(JSON.toJSONString(negativeDto.getInvolveProblem()));
if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) {
negative.setInvolveProblem(String.join(",", negativeDto.getInvolveProblem()));
}
save(negative); // 添加一条 negative 数据
negativeDto.setId(negative.getId());
@ -262,12 +262,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setCrtTime(now)
.setUpdTime(now);
// [{"dictLabel":"自动回访不满意\n","dictType":"suspectProblem","dictValue":"1"}]
Map<String, String> involveProblem = new HashMap<>();
involveProblem.put("dictLabel", "自动回访不满意");
involveProblem.put("dictType", "suspectProblem");
involveProblem.put("dictValue", "1");
negative.setInvolveProblem(JSON.toJSONString(Collections.singletonList(involveProblem)));
negative.setInvolveProblem(InvolveProblemEnum.ZDHFBMY.getValue());
if (Objects.nonNull(dept)) {
negative.setInvolveDepartId(dept.getId())

Loading…
Cancel
Save