|
|
|
@ -1,11 +1,14 @@ |
|
|
|
package com.biutag.supervision.job; |
|
|
|
package com.biutag.supervision.job; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.constants.enums.ComfortStatus; |
|
|
|
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; |
|
|
|
import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
import com.biutag.supervision.mapper.DwdAsjZfbaAjjbxxMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
@ -18,6 +21,7 @@ import java.time.ZoneId; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY; |
|
|
|
import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY; |
|
|
|
|
|
|
|
|
|
|
|
@ -87,13 +91,61 @@ public class Job { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final DwdAsjZfbaShrxx2Service dwdAsjZfbaShrxx2Service; |
|
|
|
|
|
|
|
private final RpcApplyService rpcApplyService; |
|
|
|
|
|
|
|
private final SupPoliceService policeService; |
|
|
|
|
|
|
|
private final SupDepartService departService; |
|
|
|
|
|
|
|
private final DwdAsjZfbaAjjbxxMapper dwdAsjZfbaAjjbxxMapper; |
|
|
|
|
|
|
|
|
|
|
|
// 每天一次 23:30:00
|
|
|
|
// 每天一次 23:30:00
|
|
|
|
//@Scheduled(cron = "0 30 23 * * ?")
|
|
|
|
@Scheduled(cron = "0 30 23 * * ?") |
|
|
|
public void rights() { |
|
|
|
public void rights() { |
|
|
|
|
|
|
|
log.info("rights--------------------"); |
|
|
|
|
|
|
|
// 维权
|
|
|
|
|
|
|
|
List<DwdAsjZfbaShrxx2> shrxxList = dwdAsjZfbaShrxx2Service.listAll(); |
|
|
|
|
|
|
|
log.info("数据:{}条", shrxxList.size()); |
|
|
|
|
|
|
|
shrxxList.forEach(item -> { |
|
|
|
|
|
|
|
RpcApply rpcApply = new RpcApply(); |
|
|
|
|
|
|
|
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()); |
|
|
|
|
|
|
|
// 案件信息
|
|
|
|
|
|
|
|
rpcApply.setFactReason(ajjbxx.getJyaq()); |
|
|
|
|
|
|
|
if ("刑事".equals(ajjbxx.getAjbzmc())) { |
|
|
|
|
|
|
|
rpcApply.setInfringerHandle("刑事追究"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ("行政".equals(ajjbxx.getAjbzmc())) { |
|
|
|
|
|
|
|
rpcApply.setInfringerHandle("行政处罚"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 申请类型
|
|
|
|
|
|
|
|
rpcApply.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); |
|
|
|
|
|
|
|
// 已办结
|
|
|
|
|
|
|
|
rpcApply.setRpcStatus(ComfortStatus.completed.name()); |
|
|
|
|
|
|
|
// 数据来源
|
|
|
|
|
|
|
|
rpcApply.setSource("gbase"); |
|
|
|
|
|
|
|
rpcApplyService.save(rpcApply); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|