Browse Source

fit:维权定时任务(单位获取失败)& 提醒列表补充非空条件

master
pengwei 4 months ago
parent
commit
0808b6d0c1
  1. 12
      src/main/java/com/biutag/supervision/job/Job.java
  2. 3
      src/main/java/com/biutag/supervision/service/AlarmNotificationService.java

12
src/main/java/com/biutag/supervision/job/Job.java

@ -140,7 +140,6 @@ public class Job {
// 警号 // 警号
rpcApply.setApplicantEmpNo(police.getEmpNo()); rpcApply.setApplicantEmpNo(police.getEmpNo());
// //警员身份 // //警员身份
// SupDepart depart = departService.getById(police.getOrgId()); // SupDepart depart = departService.getById(police.getOrgId());
// rpcApply.setDepartId(depart.getId()); // rpcApply.setDepartId(depart.getId());
// rpcApply.setDepartId(depart.getName()); // rpcApply.setDepartId(depart.getName());
@ -161,11 +160,12 @@ public class Job {
} }
//获取单位进行处理 //获取单位进行处理
if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){
log.info("单位名称:",ajjbxx.getBadwidmc());
SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,ajjbxx.getBadwidmc())); SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,ajjbxx.getBadwidmc()));
if(ObjectUtil.isNotEmpty(supDepart)){
rpcApply.setDepartId(supDepart.getId()); rpcApply.setDepartId(supDepart.getId());
rpcApply.setDepartName(supDepart.getShortName()); rpcApply.setDepartName(supDepart.getShortName());
}
//获取二级单位的信息 //获取二级单位的信息
String[] depts = ajjbxx.getBadwidmc().split("局"); String[] depts = ajjbxx.getBadwidmc().split("局");
String StatisticsGroupName = null; String StatisticsGroupName = null;
@ -176,8 +176,10 @@ public class Job {
} }
SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,StatisticsGroupName)); SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,StatisticsGroupName));
if(ObjectUtil.isNotEmpty(groupDept)){
rpcApply.setSecondDepartId(groupDept.getId()); rpcApply.setSecondDepartId(groupDept.getId());
} }
}
// 案件信息 // 案件信息
rpcApply.setFactReason(ajjbxx.getJyaq()); rpcApply.setFactReason(ajjbxx.getJyaq());
if ("刑事".equals(ajjbxx.getAjbzmc())) { if ("刑事".equals(ajjbxx.getAjbzmc())) {
@ -226,11 +228,8 @@ public class Job {
rpcApplyPerson.setEmpType(police.getJobType()); rpcApplyPerson.setEmpType(police.getJobType());
} }
rpcApplyPerson.setEmpNo(rpcApply.getApplicantEmpNo()); rpcApplyPerson.setEmpNo(rpcApply.getApplicantEmpNo());
//存储受害人信息 //存储受害人信息
rpcApplyPersonService.save(rpcApplyPerson); rpcApplyPersonService.save(rpcApplyPerson);
//存储犯人信息 //存储犯人信息
List<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh())); List<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh()));
log.info("违法人员信息数据:{}条", wfrwfxxes.size()); log.info("违法人员信息数据:{}条", wfrwfxxes.size());
@ -251,7 +250,6 @@ public class Job {
rpcInfringerResultService.save(rpcInfringerResult); rpcInfringerResultService.save(rpcInfringerResult);
}); });
} }
}); });
} }

3
src/main/java/com/biutag/supervision/service/AlarmNotificationService.java

@ -1,5 +1,6 @@
package com.biutag.supervision.service; package com.biutag.supervision.service;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -63,7 +64,7 @@ public class AlarmNotificationService extends ServiceImpl<AlarmNotificationMappe
return new Page<AlarmNotification>().setRecords(new ArrayList<>()).setTotal(0); return new Page<AlarmNotification>().setRecords(new ArrayList<>()).setTotal(0);
} }
LambdaQueryWrapper<AlarmNotification> query = new LambdaQueryWrapper<AlarmNotification>() LambdaQueryWrapper<AlarmNotification> query = new LambdaQueryWrapper<AlarmNotification>()
.in(AlarmNotification::getNotificationDepartId, user.getAuthDepartIds()) .in(CollectionUtil.isNotEmpty(user.getAuthDepartIds()), AlarmNotification::getNotificationDepartId, user.getAuthDepartIds())
.eq(AlarmNotification::getReplyState, ReplyStateEnum.UN_REPLIED.getValue()); .eq(AlarmNotification::getReplyState, ReplyStateEnum.UN_REPLIED.getValue());
return page(Page.of(param.getCurrent(), param.getSize()), query.orderByDesc(AlarmNotification::getAlarmTime)); return page(Page.of(param.getCurrent(), param.getSize()), query.orderByDesc(AlarmNotification::getAlarmTime));
} }

Loading…
Cancel
Save