Browse Source

fix: 修复修改核查内容 涉及单位修改不生效的问题。

fit: 问题下发,新增是否开启流程选项。如果选择关闭流程,问题下发后对应办理单位无待办任务。
fit: 模型超市-模型分类,增加模型数量显示。
main
wxc 12 months ago
parent
commit
fa020254ed
  1. 11
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java
  2. 3
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java
  3. 3
      src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java
  4. 6
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  5. 4
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  6. 4
      src/main/java/com/biutag/supervision/mapper/ModelClassMapper.java
  7. 2
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  8. 20
      src/main/java/com/biutag/supervision/service/NegativeService.java

11
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java

@ -1,9 +1,8 @@
package com.biutag.supervision.controller.sensitivePerception;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.mapper.ModelClassMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.ModelClass;
import com.biutag.supervision.service.ModelClassService;
import com.biutag.supervision.pojo.model.ModelClassModel;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -16,11 +15,11 @@ import java.util.List;
@RestController
public class ModelClassController {
private final ModelClassService modelClassService;
private final ModelClassMapper modelClassMapper;
@GetMapping
public Result<List<ModelClass>> list() {
return Result.success(modelClassService.list(new LambdaQueryWrapper<ModelClass>().orderByAsc(ModelClass::getSort)));
public Result<List<ModelClassModel>> list() {
return Result.success(modelClassMapper.selectListAll());
}
}

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

@ -12,7 +12,6 @@ import com.biutag.supervision.pojo.model.ModelClassModel;
import com.biutag.supervision.pojo.param.ModelQueryParam;
import com.biutag.supervision.pojo.vo.ModelTree;
import com.biutag.supervision.service.ModelService;
import com.biutag.supervision.util.JSON;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
@ -42,7 +41,7 @@ public class ModelController {
@GetMapping("tree")
public Result<List<ModelTree>> tree() {
List<ModelClassModel> modelClasses = modelClassMapper.selectListAll();
List<ModelClassModel> modelClasses = modelClassMapper.selectListByStatus();
List<Model> models = modelService.list();
List<ModelTree> list = new ArrayList<>();
list.addAll(modelClasses.stream().map(item -> {

3
src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java

@ -93,6 +93,9 @@ public class RiskPersonalController {
riskRule.setRiskName(rule.getRiskName());
List<RiskScoreRule> rules2 = riskScoreRuleService.list(new LambdaQueryWrapper<RiskScoreRule>().eq(RiskScoreRule::getPid, rule.getId())
.eq(RiskScoreRule::getLevel, 2));
if (rules2.isEmpty()) {
return riskRule;
}
List<Model> models = modelService.list(new LambdaQueryWrapper<Model>().in(Model::getRiskScoreRuleId, rules2.stream().map(RiskScoreRule::getId).toList()));
List<RiskModelTaskClue> records = models.isEmpty() ? new ArrayList<>() : riskModelTaskClueService.page(Page.of(1, 100), new LambdaQueryWrapper<RiskModelTaskClue>()

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

@ -68,7 +68,11 @@ public class NegativeController {
@PostMapping
public Result<Boolean> add(@Validated(AddGroup.class) @RequestBody NegativeDto negativeDto) {
negativeService.save(negativeDto);
if (negativeDto.getFlowFlag()) {
negativeService.save(negativeDto);
} else {
negativeService.saveNegative(negativeDto);
}
return Result.success();
}

4
src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java

@ -78,7 +78,9 @@ public class ApplyCompletionAction implements Action {
.set(Negative::getIsRectifyName, verifyData.getIsRectifyName())
.set(Negative::getAccountabilityTarget, verifyData.getAccountabilityTarget())
.set(Negative::getCaseNumber, verifyData.getCaseNumber())
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc());
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc())
.set(Negative::getInvolveDepartId, verifyData.getInvolveDepartId())
.set(Negative::getInvolveDepartName, departService.getById(verifyData.getInvolveDepartId()).getShortName());
// 未整改
if (IsRectifyEnum.NOT.getValue().equals(verifyData.getIsRectifyCode())) {
updateWrapper.set(Negative::getRectifyRestrictionDays, verifyData.getRectifyRestrictionDays());

4
src/main/java/com/biutag/supervision/mapper/ModelClassMapper.java

@ -10,6 +10,10 @@ import java.util.List;
public interface ModelClassMapper extends BaseMapper<ModelClass> {
@Select("select mc.id, mc.name, mc.sort, count(m.id) size from model_class mc left join model m on mc.id = m.class_id where status = 1 GROUP BY mc.id, mc.name, mc.sort order by sort")
List<ModelClassModel> selectListByStatus();
@Select("select mc.id, mc.name, mc.sort, count(m.id) size from model_class mc left join model m on mc.id = m.class_id GROUP BY mc.id, mc.name, mc.sort order by sort")
List<ModelClassModel> selectListAll();
}

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

@ -108,4 +108,6 @@ public class NegativeDto {
private String reportNumber;
// 是否开启流程
private Boolean flowFlag;
}

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

@ -164,6 +164,26 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
return getOne(new LambdaUpdateWrapper<Negative>().eq(Negative::getOriginId, originId));
}
public boolean saveNegative(NegativeDto negativeDto) {
Negative negative = new Negative();
BeanUtil.copyProperties(negativeDto, negative);
if (StrUtil.isBlank(negativeDto.getOriginId())) {
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
negative.setOriginId(originId); // 如果是空就生成随机的线索源
}
LocalDateTime now = LocalDateTime.now();
negative.setId(IdUtil.getSnowflakeNextIdStr()) // negative唯一标识 雪花
.setProcessingStatus(ProcessingStatusEnum.completed.name())
.setFlowKey(FlowNodeEnum.COMPLETED.getKey()) // 市局下发
.setCrtDepartLevel(DepartLevelEnum.FIRST.getValue())
.setCrtTime(now)
.setUpdTime(now);
if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) {
negative.setInvolveProblem(String.join(",", negativeDto.getInvolveProblem()));
}
return save(negative);
}
@Transactional(rollbackFor = Exception.class)
public Negative save(NegativeDto negativeDto) {
Negative negative = new Negative();

Loading…
Cancel
Save