From cc6966d81f3e7b734628fa7fda732379bea523d5 Mon Sep 17 00:00:00 2001 From: pengwei Date: Sat, 11 Oct 2025 11:05:49 +0800 Subject: [PATCH] =?UTF-8?q?fit:=E7=BB=B4=E6=9D=83=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=88=E5=8D=95=E4=BD=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/biutag/supervision/job/Job.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index dea24b3..50f5877 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -160,21 +160,34 @@ public class Job { } //获取单位进行处理 if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ + String unitName = ajjbxx.getBadwidmc(); log.info("单位名称:",ajjbxx.getBadwidmc()); - SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,ajjbxx.getBadwidmc())); + if(!unitName.contains("长沙市公安局")){ + unitName = ajjbxx.getBadwidmc().split("湖南省")[1]; + } + SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,unitName)); if(ObjectUtil.isNotEmpty(supDepart)){ rpcApply.setDepartId(supDepart.getId()); rpcApply.setDepartName(supDepart.getShortName()); } //获取二级单位的信息 - String[] depts = ajjbxx.getBadwidmc().split("局"); String StatisticsGroupName = null; - if(depts.length >= 2){ - StatisticsGroupName = depts[0]+"局"+depts[1]+"局"; + //判断是否为非长沙市公安局 + if(!unitName.contains("长沙市公安局")){ + //非长沙市公安局 + String[] depts = ajjbxx.getBadwidmc().split("局")[0].split("省"); + if(depts.length > 0){ + StatisticsGroupName="湖南省长沙市公安局" + depts[1]+"局"; + } + }else{ - StatisticsGroupName = depts[0]+"局"; + //长沙市公安局 + StatisticsGroupName ="长沙市公安局"; } + + + SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,StatisticsGroupName)); if(ObjectUtil.isNotEmpty(groupDept)){ rpcApply.setSecondDepartId(groupDept.getId());