From 0808b6d0c1d3f6b99759a9ddcd11ad937f7016f0 Mon Sep 17 00:00:00 2001 From: pengwei Date: Fri, 10 Oct 2025 15:52:37 +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&=20=E6=8F=90=E9=86=92=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=A1=A5=E5=85=85=E9=9D=9E=E7=A9=BA=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/biutag/supervision/job/Job.java | 18 ++++++++---------- .../service/AlarmNotificationService.java | 3 ++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index 8d7a384..dea24b3 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -140,7 +140,6 @@ public class Job { // 警号 rpcApply.setApplicantEmpNo(police.getEmpNo()); // //警员身份 - // SupDepart depart = departService.getById(police.getOrgId()); // rpcApply.setDepartId(depart.getId()); // rpcApply.setDepartId(depart.getName()); @@ -161,11 +160,12 @@ public class Job { } //获取单位进行处理 if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ - + log.info("单位名称:",ajjbxx.getBadwidmc()); SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,ajjbxx.getBadwidmc())); - rpcApply.setDepartId(supDepart.getId()); - rpcApply.setDepartName(supDepart.getShortName()); - + if(ObjectUtil.isNotEmpty(supDepart)){ + rpcApply.setDepartId(supDepart.getId()); + rpcApply.setDepartName(supDepart.getShortName()); + } //获取二级单位的信息 String[] depts = ajjbxx.getBadwidmc().split("局"); String StatisticsGroupName = null; @@ -176,7 +176,9 @@ public class Job { } SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,StatisticsGroupName)); - rpcApply.setSecondDepartId(groupDept.getId()); + if(ObjectUtil.isNotEmpty(groupDept)){ + rpcApply.setSecondDepartId(groupDept.getId()); + } } // 案件信息 rpcApply.setFactReason(ajjbxx.getJyaq()); @@ -226,11 +228,8 @@ public class Job { rpcApplyPerson.setEmpType(police.getJobType()); } rpcApplyPerson.setEmpNo(rpcApply.getApplicantEmpNo()); - //存储受害人信息 rpcApplyPersonService.save(rpcApplyPerson); - - //存储犯人信息 List wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh())); log.info("违法人员信息数据:{}条", wfrwfxxes.size()); @@ -251,7 +250,6 @@ public class Job { rpcInfringerResultService.save(rpcInfringerResult); }); } - }); } diff --git a/src/main/java/com/biutag/supervision/service/AlarmNotificationService.java b/src/main/java/com/biutag/supervision/service/AlarmNotificationService.java index 45b036b..5430da8 100644 --- a/src/main/java/com/biutag/supervision/service/AlarmNotificationService.java +++ b/src/main/java/com/biutag/supervision/service/AlarmNotificationService.java @@ -1,5 +1,6 @@ package com.biutag.supervision.service; +import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -63,7 +64,7 @@ public class AlarmNotificationService extends ServiceImpl().setRecords(new ArrayList<>()).setTotal(0); } LambdaQueryWrapper query = new LambdaQueryWrapper() - .in(AlarmNotification::getNotificationDepartId, user.getAuthDepartIds()) + .in(CollectionUtil.isNotEmpty(user.getAuthDepartIds()), AlarmNotification::getNotificationDepartId, user.getAuthDepartIds()) .eq(AlarmNotification::getReplyState, ReplyStateEnum.UN_REPLIED.getValue()); return page(Page.of(param.getCurrent(), param.getSize()), query.orderByDesc(AlarmNotification::getAlarmTime)); }