|
|
|
|
@ -105,121 +105,121 @@ public class Job {
|
|
|
|
|
private final RpcApplySuperviseService rpcApplySuperviseService; |
|
|
|
|
// 每天一次 23:30:00
|
|
|
|
|
//todo 维权信息
|
|
|
|
|
@Scheduled(cron = "0 30 23 * * ?") |
|
|
|
|
public void rights() { |
|
|
|
|
log.info("rights--------------------"); |
|
|
|
|
log.info("维权信息抓取中---------------------"); |
|
|
|
|
// 维权
|
|
|
|
|
List<DwdAsjZfbaShrxx2> shrxxList = dwdAsjZfbaShrxx2Service.listAll(); |
|
|
|
|
log.info("数据:{}条", shrxxList.size()); |
|
|
|
|
shrxxList.forEach(item -> { |
|
|
|
|
RpcApplySupervise rpcApply = new RpcApplySupervise(); |
|
|
|
|
rpcApply.setRpcId(item.getZj()); |
|
|
|
|
rpcApply.setCrtTime(LocalDateTime.now()); |
|
|
|
|
rpcApply.setUptTime(LocalDateTime.now()); |
|
|
|
|
// 姓名
|
|
|
|
|
rpcApply.setApplicantEmpName(item.getXm()); |
|
|
|
|
// 受害日期
|
|
|
|
|
if (Objects.nonNull(item.getShrq())) { |
|
|
|
|
rpcApply.setHappenTime(item.getShrq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 案件编号
|
|
|
|
|
rpcApply.setCaseNumber(item.getAjbh()); |
|
|
|
|
// 受害人警号
|
|
|
|
|
SupPolice police = policeService.getByIdCode(item.getGmsfhm()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.nonNull(police)) { |
|
|
|
|
// 警号
|
|
|
|
|
rpcApply.setApplicantEmpNo(police.getEmpNo()); |
|
|
|
|
|
|
|
|
|
// SupDepart depart = departService.getById(police.getOrgId());
|
|
|
|
|
// rpcApply.setDepartId(depart.getId());
|
|
|
|
|
// rpcApply.setDepartId(depart.getName());
|
|
|
|
|
} |
|
|
|
|
if (StrUtil.isNotBlank(item.getAjbh())) { |
|
|
|
|
DwdAsjZfbaAjjbxx ajjbxx = dwdAsjZfbaAjjbxxMapper.selectByAjbh(item.getAjbh()); |
|
|
|
|
//获取办案人id
|
|
|
|
|
if(StrUtil.isNotEmpty(ajjbxx.getBar1id())){ |
|
|
|
|
DwdRyZfbaBaryxx dwdRyZfbaBaryxx = dwdRyZfbaBaryxxService.getById(ajjbxx.getBar1id()); |
|
|
|
|
if(ObjectUtil.isNotEmpty(dwdRyZfbaBaryxx)){ |
|
|
|
|
SupPolice policeData = policeService.getByIdCode(dwdRyZfbaBaryxx.getZjhm()); |
|
|
|
|
rpcApply.setInputEmpNo(policeData.getEmpNo()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取单位进行处理
|
|
|
|
|
if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ |
|
|
|
|
|
|
|
|
|
SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,ajjbxx.getBadwidmc())); |
|
|
|
|
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]+"局"; |
|
|
|
|
}else{ |
|
|
|
|
StatisticsGroupName = depts[0]+"局"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,StatisticsGroupName)); |
|
|
|
|
rpcApply.setSecondDepartId(groupDept.getId()); |
|
|
|
|
} |
|
|
|
|
// 案件信息
|
|
|
|
|
rpcApply.setFactReason(ajjbxx.getJyaq()); |
|
|
|
|
if ("刑事".equals(ajjbxx.getAjbzmc())) { |
|
|
|
|
rpcApply.setInfringerHandle("刑事追究"); |
|
|
|
|
rpcApply.setCaseType("1"); |
|
|
|
|
} |
|
|
|
|
if ("行政".equals(ajjbxx.getAjbzmc())) { |
|
|
|
|
rpcApply.setInfringerHandle("行政处罚"); |
|
|
|
|
rpcApply.setCaseType("2"); |
|
|
|
|
} |
|
|
|
|
rpcApply.setCaseCategory(ajjbxx.getAjlbmc()); |
|
|
|
|
} |
|
|
|
|
// 申请类型
|
|
|
|
|
rpcApply.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); |
|
|
|
|
// 已办结
|
|
|
|
|
rpcApply.setRpcStatus(ComfortStatus.completed.name()); |
|
|
|
|
// 数据来源
|
|
|
|
|
rpcApply.setSource("gbase"); |
|
|
|
|
rpcApplySuperviseService.save(rpcApply); |
|
|
|
|
|
|
|
|
|
//受害人列表
|
|
|
|
|
RpcApplyPerson rpcApplyPerson= new RpcApplyPerson(); |
|
|
|
|
rpcApplyPerson.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); |
|
|
|
|
rpcApplyPerson.setInjurySeverity(item.getShcdmc()); |
|
|
|
|
rpcApplyPerson.setCreatTime(LocalDateTime.now()); |
|
|
|
|
rpcApplyPerson.setUdpTime(LocalDateTime.now()); |
|
|
|
|
rpcApplyPerson.setId(IdUtil.fastSimpleUUID()); |
|
|
|
|
if(Objects.nonNull(police)){ |
|
|
|
|
rpcApply.setApplicantEmpNo(police.getEmpNo()); |
|
|
|
|
} |
|
|
|
|
rpcApplyPerson.setRpcId(item.getZj()); |
|
|
|
|
//存储受害人信息
|
|
|
|
|
rpcApplyPersonService.save(rpcApplyPerson); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//存储犯人信息
|
|
|
|
|
List<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh())); |
|
|
|
|
log.info("违法人员信息数据:{}条", wfrwfxxes.size()); |
|
|
|
|
if (ArrayUtil.isNotEmpty(wfrwfxxes)){ |
|
|
|
|
wfrwfxxes.forEach(x->{ |
|
|
|
|
RpcInfringerResult rpcInfringerResult =new RpcInfringerResult(); |
|
|
|
|
rpcInfringerResult.setId(IdUtil.fastSimpleUUID()); |
|
|
|
|
rpcInfringerResult.setRpcId(item.getZj()); |
|
|
|
|
rpcInfringerResult.setTortName(x.getXm()); |
|
|
|
|
rpcInfringerResult.setDefendHandleWayName(x.getClfs()); |
|
|
|
|
//保存犯人信息
|
|
|
|
|
rpcInfringerResultService.save(rpcInfringerResult); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// @Scheduled(cron = "0 30 23 * * ?")
|
|
|
|
|
// public void rights() {
|
|
|
|
|
// log.info("rights--------------------");
|
|
|
|
|
// log.info("维权信息抓取中---------------------");
|
|
|
|
|
// // 维权
|
|
|
|
|
// List<DwdAsjZfbaShrxx2> shrxxList = dwdAsjZfbaShrxx2Service.listAll();
|
|
|
|
|
// log.info("数据:{}条", shrxxList.size());
|
|
|
|
|
// shrxxList.forEach(item -> {
|
|
|
|
|
// RpcApplySupervise rpcApply = new RpcApplySupervise();
|
|
|
|
|
// rpcApply.setRpcId(item.getZj());
|
|
|
|
|
// rpcApply.setCrtTime(LocalDateTime.now());
|
|
|
|
|
// rpcApply.setUptTime(LocalDateTime.now());
|
|
|
|
|
// // 姓名
|
|
|
|
|
// rpcApply.setApplicantEmpName(item.getXm());
|
|
|
|
|
// // 受害日期
|
|
|
|
|
// if (Objects.nonNull(item.getShrq())) {
|
|
|
|
|
// rpcApply.setHappenTime(item.getShrq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// // 案件编号
|
|
|
|
|
// rpcApply.setCaseNumber(item.getAjbh());
|
|
|
|
|
// // 受害人警号
|
|
|
|
|
// SupPolice police = policeService.getByIdCode(item.getGmsfhm());
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// if (Objects.nonNull(police)) {
|
|
|
|
|
// // 警号
|
|
|
|
|
// rpcApply.setApplicantEmpNo(police.getEmpNo());
|
|
|
|
|
//
|
|
|
|
|
//// SupDepart depart = departService.getById(police.getOrgId());
|
|
|
|
|
//// rpcApply.setDepartId(depart.getId());
|
|
|
|
|
//// rpcApply.setDepartId(depart.getName());
|
|
|
|
|
// }
|
|
|
|
|
// if (StrUtil.isNotBlank(item.getAjbh())) {
|
|
|
|
|
// DwdAsjZfbaAjjbxx ajjbxx = dwdAsjZfbaAjjbxxMapper.selectByAjbh(item.getAjbh());
|
|
|
|
|
// //获取办案人id
|
|
|
|
|
// if(StrUtil.isNotEmpty(ajjbxx.getBar1id())){
|
|
|
|
|
// DwdRyZfbaBaryxx dwdRyZfbaBaryxx = dwdRyZfbaBaryxxService.getById(ajjbxx.getBar1id());
|
|
|
|
|
// if(ObjectUtil.isNotEmpty(dwdRyZfbaBaryxx)){
|
|
|
|
|
// SupPolice policeData = policeService.getByIdCode(dwdRyZfbaBaryxx.getZjhm());
|
|
|
|
|
// rpcApply.setInputEmpNo(policeData.getEmpNo());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //获取单位进行处理
|
|
|
|
|
// if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){
|
|
|
|
|
//
|
|
|
|
|
// SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,ajjbxx.getBadwidmc()));
|
|
|
|
|
// 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]+"局";
|
|
|
|
|
// }else{
|
|
|
|
|
// StatisticsGroupName = depts[0]+"局";
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName,StatisticsGroupName));
|
|
|
|
|
// rpcApply.setSecondDepartId(groupDept.getId());
|
|
|
|
|
// }
|
|
|
|
|
// // 案件信息
|
|
|
|
|
// rpcApply.setFactReason(ajjbxx.getJyaq());
|
|
|
|
|
// if ("刑事".equals(ajjbxx.getAjbzmc())) {
|
|
|
|
|
// rpcApply.setInfringerHandle("刑事追究");
|
|
|
|
|
// rpcApply.setCaseType("1");
|
|
|
|
|
// }
|
|
|
|
|
// if ("行政".equals(ajjbxx.getAjbzmc())) {
|
|
|
|
|
// rpcApply.setInfringerHandle("行政处罚");
|
|
|
|
|
// rpcApply.setCaseType("2");
|
|
|
|
|
// }
|
|
|
|
|
// rpcApply.setCaseCategory(ajjbxx.getAjlbmc());
|
|
|
|
|
// }
|
|
|
|
|
// // 申请类型
|
|
|
|
|
// rpcApply.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue());
|
|
|
|
|
// // 已办结
|
|
|
|
|
// rpcApply.setRpcStatus(ComfortStatus.completed.name());
|
|
|
|
|
// // 数据来源
|
|
|
|
|
// rpcApply.setSource("gbase");
|
|
|
|
|
// rpcApplySuperviseService.save(rpcApply);
|
|
|
|
|
//
|
|
|
|
|
// //受害人列表
|
|
|
|
|
// RpcApplyPerson rpcApplyPerson= new RpcApplyPerson();
|
|
|
|
|
// rpcApplyPerson.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue());
|
|
|
|
|
// rpcApplyPerson.setInjurySeverity(item.getShcdmc());
|
|
|
|
|
// rpcApplyPerson.setCreatTime(LocalDateTime.now());
|
|
|
|
|
// rpcApplyPerson.setUdpTime(LocalDateTime.now());
|
|
|
|
|
// rpcApplyPerson.setId(IdUtil.fastSimpleUUID());
|
|
|
|
|
// if(Objects.nonNull(police)){
|
|
|
|
|
// rpcApply.setApplicantEmpNo(police.getEmpNo());
|
|
|
|
|
// }
|
|
|
|
|
// rpcApplyPerson.setRpcId(item.getZj());
|
|
|
|
|
// //存储受害人信息
|
|
|
|
|
// rpcApplyPersonService.save(rpcApplyPerson);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// //存储犯人信息
|
|
|
|
|
// List<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh()));
|
|
|
|
|
// log.info("违法人员信息数据:{}条", wfrwfxxes.size());
|
|
|
|
|
// if (ArrayUtil.isNotEmpty(wfrwfxxes)){
|
|
|
|
|
// wfrwfxxes.forEach(x->{
|
|
|
|
|
// RpcInfringerResult rpcInfringerResult =new RpcInfringerResult();
|
|
|
|
|
// rpcInfringerResult.setId(IdUtil.fastSimpleUUID());
|
|
|
|
|
// rpcInfringerResult.setRpcId(item.getZj());
|
|
|
|
|
// rpcInfringerResult.setTortName(x.getXm());
|
|
|
|
|
// rpcInfringerResult.setDefendHandleWayName(x.getClfs());
|
|
|
|
|
// //保存犯人信息
|
|
|
|
|
// rpcInfringerResultService.save(rpcInfringerResult);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|