From cba05fac89eb1dc2785cc387a31899e74b73ab82 Mon Sep 17 00:00:00 2001 From: sjh Date: Tue, 19 Nov 2024 02:08:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E6=96=B0=E5=A2=9E=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=AE=E6=94=B9=E5=8D=95=E4=BD=8D=E6=96=B9=E6=B3=95?= =?UTF-8?q?=202=E3=80=81=E4=BF=AE=E6=94=B9103=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supervision/mapper/ModelClueMapper.java | 5 +++++ .../supervision/service/ModelClueService.java | 17 +++++++++++++++++ src/main/resources/mapper/ModelClueMapper.xml | 8 ++++++++ 3 files changed, 30 insertions(+) diff --git a/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java b/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java index 0e33162..e63a720 100644 --- a/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java @@ -18,4 +18,9 @@ public interface ModelClueMapper extends BaseMapper { @Select("${newSql}") List> selectByUniqueKeys(@org.apache.ibatis.annotations.Param("newSql") String newSql); + + + List selectByModelId(@Param("modelId") int modelId); + + int updateInvolveDepartId(@Param("id") int id, @Param("newDepartId") String newDepartId); } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/service/ModelClueService.java b/src/main/java/com/biutag/supervision/service/ModelClueService.java index 5d281cf..50653e5 100644 --- a/src/main/java/com/biutag/supervision/service/ModelClueService.java +++ b/src/main/java/com/biutag/supervision/service/ModelClueService.java @@ -197,6 +197,22 @@ public class ModelClueService extends ServiceImpl { } public void generate(Integer modelId) { + if (modelId == 1300) { + List modelClues = modelClueMapper.selectByModelId(103); + if (modelClues != null && !modelClues.isEmpty()) { + for (ModelClue modelClue : modelClues) { + SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupExternalDepart::getExternalId, modelClue.getInvolveDepartId()).last("LIMIT 1")); + if (supExternalDepart != null) { + if (supExternalDepart.getInternalId() != null) { + modelClueMapper.updateInvolveDepartId(modelClue.getId(), supExternalDepart.getInternalId()); + } + } + } + } else { + System.out.println("No records found for model_id 103."); + } + return; + } Model model = modelMapper.selectById(modelId); List modelClues = new ArrayList<>(); if (!Objects.isNull(model) && model.getModelSql() != null) { @@ -1041,6 +1057,7 @@ public class ModelClueService extends ServiceImpl { if (statisticsDepart != null && statisticsDepart.getGroupId() != null && statisticsDepart.getGroupId() == 11L) { continue; } + newModelClue.setInvolveDepartId(supExternalDepart.getInternalId()); } } newModelClue.setData(JSONObject.toJSONString(newMap)); diff --git a/src/main/resources/mapper/ModelClueMapper.xml b/src/main/resources/mapper/ModelClueMapper.xml index b1fa0fd..b01e83d 100644 --- a/src/main/resources/mapper/ModelClueMapper.xml +++ b/src/main/resources/mapper/ModelClueMapper.xml @@ -12,5 +12,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${ew.getCustomSqlSegment} + + + + UPDATE model_clue SET involve_depart_id = #{newDepartId} WHERE id = #{id} + + \ No newline at end of file From 294010e61f02fb0155249e98baeb2f9eda1bbc88 Mon Sep 17 00:00:00 2001 From: kami <605128600@qq.com> Date: Tue, 19 Nov 2024 16:07:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A3=8E=E9=99=A9=E5=88=86=E9=A1=B9?= =?UTF-8?q?=E9=99=90=E5=88=B6=E5=9C=A85=E6=9D=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sensitivePerception/RiskPersonalController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java index 513b69e..d1db9b7 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java @@ -83,7 +83,7 @@ public class RiskPersonalController { .eq(RiskScoreRule::getLevel, 2)); List models = modelService.list(new LambdaQueryWrapper().in(Model::getRiskScoreRuleId, rules2.stream().map(RiskScoreRule::getId).toList())); - List records = models.isEmpty() ? new ArrayList<>() : riskModelTaskClueService.page(Page.of(1, 5), new LambdaQueryWrapper() + List records = models.isEmpty() ? new ArrayList<>() : riskModelTaskClueService.page(Page.of(1, 100), new LambdaQueryWrapper() .eq(RiskModelTaskClue::getIdCode, riskPersonal.getIdCode()) .in(RiskModelTaskClue::getModelId, models.stream().map(Model::getId).toList()) .eq(RiskModelTaskClue::getDel, "0") @@ -98,4 +98,4 @@ public class RiskPersonalController { return Result.success(riskPersonalDetail); } -} \ No newline at end of file +}