Browse Source

fix--首页案核数和审计数修改

master
buaixuexideshitongxue 1 month ago
parent
commit
4480c6ad48
  1. 6
      src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
  2. 80
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

6
src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java

@ -85,4 +85,10 @@ public enum ProblemSourcesEnum {
public static final List<String> GROUP_21_22_23_24_25 = List.of("21", "22", "23", "24", "25"); public static final List<String> GROUP_21_22_23_24_25 = List.of("21", "22", "23", "24", "25");
public static final List<String> ALL = List.of(
"13", "14", "15", "16", "17", "18", "19", "20",
"21", "22", "23", "24", "25", "26", "27", "28",
"29", "30", "2", "3", "4", "8", "9", "32"
);
} }

80
src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

@ -183,9 +183,17 @@ public class DatavServiceImpl implements DatavService {
szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16); szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16);
long szdcCount = negativeResourceService.count(szdcQueryParam); long szdcCount = negativeResourceService.count(szdcQueryParam);
// 案件核查 // 案件核查
DataCaseVerifQueryParam ajhcQueryParam = new DataCaseVerifQueryParam(); LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
ajhcQueryParam.setCreateTime(dates); dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
long ajhcCount = dataCaseVerifResourceService.count(ajhcQueryParam); List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue()));
List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
// 交办案件数
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
long ajhcCount = dataCaseVerifs.size()+ jbNegatvieList.size();
// 局长信箱 // 局长信箱
QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>(); QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>();
mailQueryWrapper.ne("mail_state", VALID_SIGN); mailQueryWrapper.ne("mail_state", VALID_SIGN);
@ -215,10 +223,17 @@ public class DatavServiceImpl implements DatavService {
long gabxfCount = dataPetitionComplaintResourceService.count(policeParam); long gabxfCount = dataPetitionComplaintResourceService.count(policeParam);
// 审计项目数 // 审计项目数
// 政府投资审计总数
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam(); ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam();
reportProjectQueryParam.setArchivingStart(request.getBeginTime()); reportProjectQueryParam.setPublicationDateStart(request.getBeginTime());
reportProjectQueryParam.setArchivingEnd(request.getEndTime()); reportProjectQueryParam.setPublicationDateEnd(request.getEndTime());
long sjxmCount = reportProjectResourceService.count(reportProjectQueryParam); List<ReportProject> reportProjects = reportProjectResourceService.query(reportProjectQueryParam);
// 其他项目总数
DataAuditQueryParam dataAuditQueryParam = new DataAuditQueryParam();
dataAuditQueryParam.setAuditTimeStart(request.getBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setAuditTimeEnd(request.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
List<DataAudit> dataAuditList = dataAuditResourceService.query(dataAuditQueryParam);
long sjxmCount = reportProjects.size() + dataAuditList.size();
overview.setSupervisionPro(xcdcCount); overview.setSupervisionPro(xcdcCount);
overview.setNumSupervisionPro(szdcCount); overview.setNumSupervisionPro(szdcCount);
@ -240,7 +255,8 @@ public class DatavServiceImpl implements DatavService {
supDepartGroupParam.setParentLevel(2); supDepartGroupParam.setParentLevel(2);
supDepartGroupParam.setChildLevel(3); supDepartGroupParam.setChildLevel(3);
Map<String, DepartAndSubDepartDto> departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam); Map<String, DepartAndSubDepartDto> departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam);
// 交办
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
for (Map.Entry<String, DepartAndSubDepartDto> entry : departAndSubDepart.entrySet()) { for (Map.Entry<String, DepartAndSubDepartDto> entry : departAndSubDepart.entrySet()) {
String departId = entry.getKey(); String departId = entry.getKey();
DepartAndSubDepartDto departDto = entry.getValue(); DepartAndSubDepartDto departDto = entry.getValue();
@ -262,12 +278,13 @@ public class DatavServiceImpl implements DatavService {
long numSupervisionProCount = negativeResourceService.count(group14To16Param); long numSupervisionProCount = negativeResourceService.count(group14To16Param);
// 案件核查 // 案件核查
NegativeQueryParam group17To20Param = new NegativeQueryParam(); LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
group17To20Param.setCrtTime(dates); dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
group17To20Param.setInvolveDepartIds(allDepartIds); List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(entry.getKey(), request.getBeginTime(), request.getEndTime());
group17To20Param.setProblemSourcesCode(ProblemSourcesEnum.GROUP_17_18_19_20); List<Negative> negatives = negativeMapper.getNegativeListData(entry.getKey(), request.getBeginTime(), request.getEndTime(), proCode);
long caseVerificationProCount = negativeResourceService.count(group17To20Param); // 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> proCode.contains(one.getProblemSourcesCode())).toList();
long caseVerificationProCount = dataCaseVerifs.size() + jbNegatvieList.size();
// 12337 // 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>(); QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime()); queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
@ -290,10 +307,18 @@ public class DatavServiceImpl implements DatavService {
long policeMail = dataPetitionComplaintResourceService.count(policeParam); long policeMail = dataPetitionComplaintResourceService.count(policeParam);
// 审计项目数 // 审计项目数
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam(); ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam();
reportProjectQueryParam.setArchivingStart(request.getBeginTime()); reportProjectQueryParam.setPublicationDateStart(request.getBeginTime());
reportProjectQueryParam.setArchivingEnd(request.getEndTime()); reportProjectQueryParam.setPublicationDateEnd(request.getEndTime());
reportProjectQueryParam.setAuditUnitIds(allDepartIds); // 用报审单位
long reportProjectCount = reportProjectResourceService.count(reportProjectQueryParam); reportProjectQueryParam.setProjectUnitIds(allDepartIds);
List<ReportProject> reportProjects = reportProjectResourceService.query(reportProjectQueryParam);
// 其他项目总数
DataAuditQueryParam dataAuditQueryParam = new DataAuditQueryParam();
dataAuditQueryParam.setAuditTimeStart(request.getBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setAuditTimeEnd(request.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setSecondLevelDeptId(Long.valueOf(entry.getKey()));
List<DataAudit> dataAuditList = dataAuditResourceService.query(dataAuditQueryParam);
// 局长信箱 // 局长信箱
SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam(); SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam();
supExternalDepartQueryParam.setInternalIds(Collections.singleton(departDto.getParentId())); supExternalDepartQueryParam.setInternalIds(Collections.singleton(departDto.getParentId()));
@ -304,12 +329,6 @@ public class DatavServiceImpl implements DatavService {
.filter(list -> !list.isEmpty()) .filter(list -> !list.isEmpty())
.map(list -> list.get(0)) .map(list -> list.get(0))
.orElseThrow(() -> new RuntimeException("未查询到" + departDto.getParentName() + "的外部部门信息")); .orElseThrow(() -> new RuntimeException("未查询到" + departDto.getParentName() + "的外部部门信息"));
// MailQueryParam mailQueryParam = new MailQueryParam();
// mailQueryParam.setSecondDeptId(depart.getExternalId());
// mailQueryParam.setMailTime(dates);
// long mailCount = mailResourceService.count(mailQueryParam);
QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>(); QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>();
mailQueryWrapper.ne("mail_state", VALID_SIGN); mailQueryWrapper.ne("mail_state", VALID_SIGN);
mailQueryWrapper.between("mail_time", request.getBeginTime(), request.getEndTime()); mailQueryWrapper.between("mail_time", request.getBeginTime(), request.getEndTime());
@ -320,7 +339,7 @@ public class DatavServiceImpl implements DatavService {
globalMapIconVo.setNumSupervisionPro(numSupervisionProCount); globalMapIconVo.setNumSupervisionPro(numSupervisionProCount);
globalMapIconVo.setCaseVerificationPro(caseVerificationProCount); globalMapIconVo.setCaseVerificationPro(caseVerificationProCount);
globalMapIconVo.setComplaintPro(xf12337Count + countryMail + policeMail); globalMapIconVo.setComplaintPro(xf12337Count + countryMail + policeMail);
globalMapIconVo.setAuditPro(reportProjectCount); globalMapIconVo.setAuditPro((long) (reportProjects.size()+dataAuditList.size()));
globalMapIconVo.setMailboxNumber(mailCount); globalMapIconVo.setMailboxNumber(mailCount);
globalMapIconVo.calcTotal(); globalMapIconVo.calcTotal();
globalMapIconVoList.add(globalMapIconVo); globalMapIconVoList.add(globalMapIconVo);
@ -1347,6 +1366,7 @@ public class DatavServiceImpl implements DatavService {
public Result<JSONObject> getCaseAriseSituationRate(DataVRequest request) { public Result<JSONObject> getCaseAriseSituationRate(DataVRequest request) {
Date beginTime = request.getBeginTime(); Date beginTime = request.getBeginTime();
Date endTime = request.getEndTime(); Date endTime = request.getEndTime();
log.info("getCaseAriseSituationRate beginTime={}, endTime={}", beginTime, endTime);
// 发案环节 // 发案环节
List<EchartsVo> incidentLinkList = rpcApplyMapper.getIncidentLink(beginTime, endTime); List<EchartsVo> incidentLinkList = rpcApplyMapper.getIncidentLink(beginTime, endTime);
// 发案警种 // 发案警种
@ -1355,12 +1375,16 @@ public class DatavServiceImpl implements DatavService {
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam();
supDepartQueryParam.setStatisticsGroupId(3); supDepartQueryParam.setStatisticsGroupId(3);
List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam); List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam);
log.info("fxsjDw size={}", fxsjDw == null ? 0 : fxsjDw.size());
List<EchartsVo> incidentOrgList = new ArrayList<>(); List<EchartsVo> incidentOrgList = new ArrayList<>();
for (SupDepart supDepart : fxsjDw) { for (SupDepart supDepart : fxsjDw) {
List<RpcApply> rpcApplyList = rpcApplyMapper.getIncidentOrg(beginTime, endTime, supDepart.getId()); // List<RpcApply> rpcApplyList = rpcApplyMapper.getIncidentOrg(beginTime, endTime, supDepart.getId());
if (CollectionUtil.isNotEmpty(rpcApplyList)) { Integer count = rpcApplyMapper.countIncidentOrg(beginTime, endTime, supDepart.getId());
EchartsVo barItem = new EchartsVo(supDepart.getShortName(), rpcApplyList.size()); log.info("departId={}, departName={}, count={}",
incidentOrgList.add(barItem); supDepart.getId(), supDepart.getShortName(), count);
// log.info("rpcApplyList=====================" + rpcApplyList);
if (count != null && count > 0) {
incidentOrgList.add(new EchartsVo(supDepart.getShortName(), count));
} }
} }
JSONObject data = new JSONObject() JSONObject data = new JSONObject()

Loading…
Cancel
Save