Browse Source

fix:1、信访大屏中央地图数字结束时间调整

master
pengwei 8 months ago
parent
commit
16c66faa56
  1. 1
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  2. 1
      src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java
  3. 132
      src/main/java/com/biutag/supervision/job/Job.java
  4. 11
      src/main/java/com/biutag/supervision/mapper/DwdAsjZfbaWfrwfxxMapper.java
  5. 8
      src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaAjjbxx.java
  6. 23
      src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaWfrwfxx.java
  7. 1
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java
  8. 11
      src/main/java/com/biutag/supervision/service/DwdAsjZfbaWfrwfxxService.java

1
src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java

@ -116,6 +116,7 @@ public class DataVMailViewController {
// @Cacheable(cacheNames = "Supervision:Screen:MailMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getMailMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
// 信访数据总数概览
List<MailMapIconVo> mailMapIconList = dataMailService.getMailMapIcon(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("mailMapIconList", mailMapIconList);

1
src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java

@ -70,6 +70,7 @@ public class DataVRightsComfortController {
List<RpcApply> list = rpcApplyService.list(new LambdaQueryWrapper<RpcApply>()
.between(RpcApply::getCrtTime, beginTime, finalEndTime)
.eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
//获取案件编号
Set<String> caseNumbers = list.stream().map(RpcApply::getCaseNumber).collect(Collectors.toSet());
// 维权案件总数
result.setRightsNumber(caseNumbers.size());

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

@ -1,14 +1,20 @@
package com.biutag.supervision.job;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.IdUtil;
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.update.LambdaUpdateWrapper;
import com.biutag.supervision.constants.enums.ComfortStatus;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.service.BusinessDepartService;
import com.biutag.supervision.service.BusinessPoliceService;
import com.biutag.supervision.service.MailService;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum;
import com.biutag.supervision.mapper.DwdAsjZfbaAjjbxxMapper;
import com.biutag.supervision.mapper.DwdAsjZfbaWfrwfxxMapper;
import com.biutag.supervision.mapper.RpcInfringerResultMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.TimeUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -20,6 +26,7 @@ import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY;
@ -88,6 +95,121 @@ public class Job {
TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())));
});
}
private final DwdAsjZfbaShrxx2Service dwdAsjZfbaShrxx2Service;
private final RpcApplyService rpcApplyService;
private final SupPoliceService policeService;
private final SupDepartService departService;
private final DwdAsjZfbaAjjbxxMapper dwdAsjZfbaAjjbxxMapper;
private final SupDepartMapper supDepartMapper;
private final RpcApplyPersonService rpcApplyPersonService;
private final DwdAsjZfbaWfrwfxxMapper dwdAsjZfbaWfrwfxxMapper;
private final RpcInfringerResultService rpcInfringerResultService;
// 每天一次 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 -> {
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());
//获取单位进行处理
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");
rpcApplyService.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);
});
}
});
}
}

11
src/main/java/com/biutag/supervision/mapper/DwdAsjZfbaWfrwfxxMapper.java

@ -0,0 +1,11 @@
package com.biutag.supervision.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.DwdAsjZfbaWfrwfxx;
@DS("slave2")
public interface DwdAsjZfbaWfrwfxxMapper extends BaseMapper<DwdAsjZfbaWfrwfxx> {
}

8
src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaAjjbxx.java

@ -29,4 +29,12 @@ public class DwdAsjZfbaAjjbxx {
@TableField("jyaq")
private String jyaq;
//受案单位
@TableField("badwidmc")
private String badwidmc;
//具体案件类型
@TableField("ajlbmc")
private String ajlbmc;
}

23
src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaWfrwfxx.java

@ -0,0 +1,23 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;
/**
* 违法人信息表
* */
@Getter
@Setter
public class DwdAsjZfbaWfrwfxx {
@TableField("ajbh")
private String ajbh;
@TableField("xm")
private String xm;
@TableField("clfs")
private String clfs;
}

1
src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java

@ -27,6 +27,7 @@ public class RpcApplyPerson {
@TableField("provide_relief")
private String provideRelief;
// 受伤程度
private String injurySeverity;
private String injurySeverityName;

11
src/main/java/com/biutag/supervision/service/DwdAsjZfbaWfrwfxxService.java

@ -0,0 +1,11 @@
package com.biutag.supervision.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.mapper.DwdAsjZfbaWfrwfxxMapper;
import com.biutag.supervision.pojo.entity.DwdAsjZfbaWfrwfxx;
import org.springframework.stereotype.Service;
@Service
public class DwdAsjZfbaWfrwfxxService extends ServiceImpl<DwdAsjZfbaWfrwfxxMapper, DwdAsjZfbaWfrwfxx> {
}
Loading…
Cancel
Save