Browse Source
fit: 新增“预警模型”时,提供模型图标+颜色的组合来为“预警模型”设置丰富的图标效果 fit: 涉及单位、当前处理对象统一使用简称,以及流程节点使用单位简称。 fit: 问题录入:主办层级如选择二级机构主办,默认三级审批main
33 changed files with 128 additions and 38 deletions
@ -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,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; |
||||||
|
|
||||||
|
} |
||||||
@ -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"; |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue