Browse Source

fix: 问题修复

main
wxc 1 year ago
parent
commit
3f2d255b66
  1. 4
      sql/1109.sql
  2. 8
      src/main/java/com/biutag/supervision/flow/action/SaveAction.java

4
sql/1109.sql

@ -16,4 +16,6 @@ update sup_depart set statistics_group_id = 14 where short_name = '禁毒大队'
update sup_depart set statistics_group_id = 15 where short_name = '治安大队' and `level` = 3;
update sup_depart set statistics_group_id = 16 where short_name = '人境大队' and `level` = 3;
-- 其他
update sup_depart set statistics_group_id = 12 where statistics_group_id is null and `level` = 3;
update sup_depart set statistics_group_id = 12 where statistics_group_id is null and `level` = 3;
update sup_dict_problem_type set score = 1 where level = 3;

8
src/main/java/com/biutag/supervision/flow/action/SaveAction.java

@ -19,6 +19,7 @@ import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 核查办理-保存
@ -74,8 +75,11 @@ public class SaveAction implements Action {
List<NegativeBlame> negativeBlames = verifyData.getBlames().stream().map(item -> {
NegativeBlame negativeBlame = new NegativeBlame();
BeanUtil.copyProperties(item, negativeBlame);
VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream().filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().get();
BeanUtil.copyProperties(blameLeader, negativeBlame);
VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream()
.filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().orElse(null);
if (Objects.nonNull(blameLeader)) {
BeanUtil.copyProperties(blameLeader, negativeBlame);
}
negativeBlame.setNegativeId(negativeId)
.setBlameId(IdUtil.fastSimpleUUID())
.setCrtTime(LocalDateTime.now())

Loading…
Cancel
Save