From 83661211ec21dca514533d218bc996eaa2bbdbfc Mon Sep 17 00:00:00 2001 From: sjh Date: Tue, 12 Nov 2024 18:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E25=E5=8F=B7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=EF=BC=9A=E9=87=8D=E7=82=B9=E4=BA=BA=E5=91=98=E7=AE=A1=E6=8E=A7?= =?UTF-8?q?=E4=BA=BA=E6=95=B0=E8=BF=87=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supervision/service/ModelClueService.java | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/biutag/supervision/service/ModelClueService.java b/src/main/java/com/biutag/supervision/service/ModelClueService.java index 0d8d148..f7927c2 100644 --- a/src/main/java/com/biutag/supervision/service/ModelClueService.java +++ b/src/main/java/com/biutag/supervision/service/ModelClueService.java @@ -236,7 +236,10 @@ public class ModelClueService extends ServiceImpl { } else if (modelId == 22) { // 22号模型:执法记录仪使用不规范问题 getModelCluesForModel22(sql, modelClues); return modelClues; - } else { + } else if (modelId == 25) { // 25号模型:重点人员管控人数过多 + getModelCluesForModel25(sql, modelClues); + return modelClues; + }else { System.out.println("模型" + modelId + "开始查询数据库"); modelClues = modelClueDataMapper.selectDataByDynamicSql(sql); System.out.println("模型" + modelId + "查询数据库完毕,数量为:" + modelClues.size()); @@ -780,6 +783,33 @@ public class ModelClueService extends ServiceImpl { } } + private void getModelCluesForModel25(String sql, List modelClues) { + System.out.println("模型25开始查询数据库"); + List> sqlList = modelClueDataMapper.selectByUniqueKeys(sql); + System.out.println("模型25查询数据库完毕"); + if (sqlList.isEmpty()) { + return; + } + for (Map map : sqlList) { + ModelClue newModelClue = new ModelClue(); + newModelClue.setUniqueKey((String) map.get("xzdpcsdm") + map.get("xzdzzr")); + newModelClue.setNegativeIdEx((String) map.get("xzdpcsdm") + map.get("xzdzzr")); + newModelClue.setInvolveDepartName((String) map.get("xzdpcs")); + SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupExternalDepart::getInternalId, map.get("xzdpcsdm")).last("LIMIT 1")); + if (supExternalDepart != null) { + if (supExternalDepart.getInternalId() != null) { + newModelClue.setInvolveDepartId(supExternalDepart.getInternalId()); + } + } + newModelClue.setData(JSONObject.toJSONString(map)); + newModelClue.setDistributionState("0"); + newModelClue.setThingDesc( + "灵敏感知系统发现" + newModelClue.getInvolveDepartName() + "民警" + map.get("xzdzzr") + + "的管控人数为" + map.get("num") + "人。"); + modelClues.add(newModelClue); + } + } + private void mergeModelClues(List modelClues2, List modelClues1 , int no) { for (ModelClue modelClue2 : modelClues2) { Iterator iterator1 = modelClues1.iterator();