|
|
|
@ -3,11 +3,17 @@ package com.biutag.supervision.service.report; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.biutag.supervision.constants.enums.CheckStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.CheckStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; |
|
|
|
import com.biutag.supervision.pojo.domain.NegativeVo; |
|
|
|
import com.biutag.supervision.pojo.dto.report.accountability.AccountabilityOverviewSection; |
|
|
|
import com.biutag.supervision.pojo.dto.report.BusinessLineOverviewSection; |
|
|
|
import com.biutag.supervision.pojo.dto.report.businessLine.BusinessLineDetailSection; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.report.businessLine.BusinessLineOverviewSection; |
|
|
|
import com.biutag.supervision.pojo.dto.report.OverviewSection; |
|
|
|
import com.biutag.supervision.pojo.dto.report.OverviewSection; |
|
|
|
import com.biutag.supervision.pojo.dto.report.ReportViewModel; |
|
|
|
import com.biutag.supervision.pojo.dto.report.ReportViewModel; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.report.businessLine.BusinessLinePersonRankItem; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.report.businessLine.BusinessLineRankItem; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.report.unitInvestigation.UnitInvestigationItem; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.report.unitInvestigation.UnitInvestigationOverviewSection; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.enums.report.TrendEnum; |
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.negativeBlame.NegativeBlameQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.negativeBlame.NegativeBlameQueryParam; |
|
|
|
import com.biutag.supervision.pojo.vo.DictProblemSourceTree; |
|
|
|
import com.biutag.supervision.pojo.vo.DictProblemSourceTree; |
|
|
|
@ -23,9 +29,7 @@ import jakarta.annotation.Resource; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.List; |
|
|
|
import java.util.*; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Stream; |
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
@ -52,10 +56,194 @@ public class ReportDataServiceImpl implements ReportDataService { |
|
|
|
vm.setPeriodStart(periodStart); |
|
|
|
vm.setPeriodStart(periodStart); |
|
|
|
vm.setPeriodEnd(periodEnd); |
|
|
|
vm.setPeriodEnd(periodEnd); |
|
|
|
vm.setOverviewSection(buildOverviewSection(request, periodStart, periodEnd)); |
|
|
|
vm.setOverviewSection(buildOverviewSection(request, periodStart, periodEnd)); |
|
|
|
vm.setBusinessLineOverviewSection(buildbusinessLineOverviewSection(request, periodStart, periodEnd)); |
|
|
|
vm.setBusinessLineOverviewSection(buildBusinessLineOverviewSection(request, periodStart, periodEnd)); |
|
|
|
|
|
|
|
vm.setBusinessLineDetailSections(buildBusinessLineDetailSections(request, periodStart, periodEnd)); |
|
|
|
|
|
|
|
vm.setUnitInvestigationSection(buildUnitInvestigationSection(request, periodStart, periodEnd)); |
|
|
|
|
|
|
|
vm.setAccountabilityOverviewSection(buildAccountabilityOverviewSection(request, periodStart, periodEnd)); |
|
|
|
|
|
|
|
// vm.setAccountabilityUnitDetailSection();
|
|
|
|
return vm; |
|
|
|
return vm; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 问责追责总览 |
|
|
|
|
|
|
|
* @param request |
|
|
|
|
|
|
|
* @param periodStart |
|
|
|
|
|
|
|
* @param periodEnd |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private AccountabilityOverviewSection buildAccountabilityOverviewSection(NegativeQueryParam request, String periodStart, String periodEnd) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UnitInvestigationOverviewSection buildUnitInvestigationSection(NegativeQueryParam request, |
|
|
|
|
|
|
|
String periodStart, |
|
|
|
|
|
|
|
String periodEnd) { |
|
|
|
|
|
|
|
UnitInvestigationOverviewSection section = new UnitInvestigationOverviewSection(); |
|
|
|
|
|
|
|
section.setPeriodStart(periodStart); |
|
|
|
|
|
|
|
section.setPeriodEnd(periodEnd); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<UnitInvestigationItem> topUnits = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnitInvestigationItem item1 = new UnitInvestigationItem(); |
|
|
|
|
|
|
|
item1.setRank(1); |
|
|
|
|
|
|
|
item1.setUnitName("北京市分公司"); |
|
|
|
|
|
|
|
item1.setIssuedProblemCount(28); |
|
|
|
|
|
|
|
item1.setVerifiedProblemCount(21); |
|
|
|
|
|
|
|
item1.setVerifiedRate("75.00"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnitInvestigationItem item2 = new UnitInvestigationItem(); |
|
|
|
|
|
|
|
item2.setRank(2); |
|
|
|
|
|
|
|
item2.setUnitName("上海市分公司"); |
|
|
|
|
|
|
|
item2.setIssuedProblemCount(24); |
|
|
|
|
|
|
|
item2.setVerifiedProblemCount(17); |
|
|
|
|
|
|
|
item2.setVerifiedRate("70.83"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnitInvestigationItem item3 = new UnitInvestigationItem(); |
|
|
|
|
|
|
|
item3.setRank(3); |
|
|
|
|
|
|
|
item3.setUnitName("广东省分公司"); |
|
|
|
|
|
|
|
item3.setIssuedProblemCount(19); |
|
|
|
|
|
|
|
item3.setVerifiedProblemCount(13); |
|
|
|
|
|
|
|
item3.setVerifiedRate("68.42"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
topUnits.add(item1); |
|
|
|
|
|
|
|
topUnits.add(item2); |
|
|
|
|
|
|
|
topUnits.add(item3); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
section.setTopUnits(topUnits); |
|
|
|
|
|
|
|
return section; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 业务条线的明细 |
|
|
|
|
|
|
|
* @param request |
|
|
|
|
|
|
|
* @param periodStart |
|
|
|
|
|
|
|
* @param periodEnd |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private List<BusinessLineDetailSection> buildBusinessLineDetailSections(NegativeQueryParam request, String periodStart, String periodEnd) { |
|
|
|
|
|
|
|
List<BusinessLineDetailSection> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 第一条
|
|
|
|
|
|
|
|
BusinessLineDetailSection section1 = new BusinessLineDetailSection(); |
|
|
|
|
|
|
|
section1.setOrderNo("一"); |
|
|
|
|
|
|
|
section1.setBusinessLineName("执法监督"); |
|
|
|
|
|
|
|
section1.setBusinessFatherLineName("执法办案"); |
|
|
|
|
|
|
|
section1.setTotalIssued(12); |
|
|
|
|
|
|
|
section1.setVerifiedTotal(8); |
|
|
|
|
|
|
|
section1.setVerifiedRate(new BigDecimal("66.67")); |
|
|
|
|
|
|
|
section1.setAccountabilityTotal(5); |
|
|
|
|
|
|
|
section1.setAccountabilityRate(new BigDecimal("62.50")); |
|
|
|
|
|
|
|
section1.setPersonalAccountabilityCount(3); |
|
|
|
|
|
|
|
section1.setDepartmentAccountabilityCount(2); |
|
|
|
|
|
|
|
section1.setTopProblemTypes(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("执法程序问题", 3, "37.50"), |
|
|
|
|
|
|
|
buildRankItem("案件管理问题", 2, "25.00"), |
|
|
|
|
|
|
|
buildRankItem("执法作风问题", 2, "25.00") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section1.setTopUnits(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("XX派出所", 2, "25.00"), |
|
|
|
|
|
|
|
buildRankItem("XX大队", 2, "25.00"), |
|
|
|
|
|
|
|
buildRankItem("XX中队", 1, "12.50") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section1.setTopPersons(Arrays.asList( |
|
|
|
|
|
|
|
buildPersonRankItem("张三", "XX派出所", "民警", 2, "25.00"), |
|
|
|
|
|
|
|
buildPersonRankItem("李四", "XX大队", "辅警", 1, "12.50"), |
|
|
|
|
|
|
|
buildPersonRankItem("王五", "XX中队", "民警", 1, "12.50") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section1.setMomRate(new BigDecimal("20.00")); |
|
|
|
|
|
|
|
section1.setMomTrend(TrendEnum.UP); |
|
|
|
|
|
|
|
section1.setYoyRate(new BigDecimal("10.00")); |
|
|
|
|
|
|
|
section1.setYoyTrend(TrendEnum.DOWN); |
|
|
|
|
|
|
|
list.add(section1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 第二条
|
|
|
|
|
|
|
|
BusinessLineDetailSection section2 = new BusinessLineDetailSection(); |
|
|
|
|
|
|
|
section2.setOrderNo("二"); |
|
|
|
|
|
|
|
section2.setBusinessLineName("案件管理"); |
|
|
|
|
|
|
|
section2.setBusinessFatherLineName("执法办案"); |
|
|
|
|
|
|
|
section2.setTotalIssued(9); |
|
|
|
|
|
|
|
section2.setVerifiedTotal(6); |
|
|
|
|
|
|
|
section2.setVerifiedRate(new BigDecimal("66.67")); |
|
|
|
|
|
|
|
section2.setAccountabilityTotal(4); |
|
|
|
|
|
|
|
section2.setAccountabilityRate(new BigDecimal("50.00")); |
|
|
|
|
|
|
|
section2.setPersonalAccountabilityCount(2); |
|
|
|
|
|
|
|
section2.setDepartmentAccountabilityCount(2); |
|
|
|
|
|
|
|
section2.setTopProblemTypes(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("案件审核把关不严", 2, "33.33"), |
|
|
|
|
|
|
|
buildRankItem("卷宗管理不规范", 2, "33.33"), |
|
|
|
|
|
|
|
buildRankItem("系统录入不及时", 1, "16.67") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section2.setTopUnits(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("XX法制大队", 2, "33.33"), |
|
|
|
|
|
|
|
buildRankItem("XX派出所", 1, "16.67"), |
|
|
|
|
|
|
|
buildRankItem("XX治安大队", 1, "16.67") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section2.setTopPersons(Arrays.asList( |
|
|
|
|
|
|
|
buildPersonRankItem("赵六", "XX法制大队", "民警", 2, "33.33"), |
|
|
|
|
|
|
|
buildPersonRankItem("孙七", "XX派出所", "民警", 1, "16.67"), |
|
|
|
|
|
|
|
buildPersonRankItem("周八", "XX治安大队", "辅警", 1, "16.67") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section2.setMomRate(new BigDecimal("12.50")); |
|
|
|
|
|
|
|
section2.setMomTrend(TrendEnum.DOWN); |
|
|
|
|
|
|
|
section2.setYoyRate(new BigDecimal("8.00")); |
|
|
|
|
|
|
|
section2.setYoyTrend(TrendEnum.UP); |
|
|
|
|
|
|
|
list.add(section2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 第三条
|
|
|
|
|
|
|
|
BusinessLineDetailSection section3 = new BusinessLineDetailSection(); |
|
|
|
|
|
|
|
section3.setOrderNo("三"); |
|
|
|
|
|
|
|
section3.setBusinessLineName("作风建设"); |
|
|
|
|
|
|
|
section3.setBusinessFatherLineName("队伍管理"); |
|
|
|
|
|
|
|
section3.setTotalIssued(7); |
|
|
|
|
|
|
|
section3.setVerifiedTotal(5); |
|
|
|
|
|
|
|
section3.setVerifiedRate(new BigDecimal("71.43")); |
|
|
|
|
|
|
|
section3.setAccountabilityTotal(3); |
|
|
|
|
|
|
|
section3.setAccountabilityRate(new BigDecimal("60.00")); |
|
|
|
|
|
|
|
section3.setPersonalAccountabilityCount(2); |
|
|
|
|
|
|
|
section3.setDepartmentAccountabilityCount(1); |
|
|
|
|
|
|
|
section3.setTopProblemTypes(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("纪律作风问题", 2, "40.00"), |
|
|
|
|
|
|
|
buildRankItem("窗口服务问题", 1, "20.00"), |
|
|
|
|
|
|
|
buildRankItem("值班备勤问题", 1, "20.00") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section3.setTopUnits(Arrays.asList( |
|
|
|
|
|
|
|
buildRankItem("XX交警大队", 2, "40.00"), |
|
|
|
|
|
|
|
buildRankItem("XX派出所", 1, "20.00"), |
|
|
|
|
|
|
|
buildRankItem("XX巡特警大队", 1, "20.00") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section3.setTopPersons(Arrays.asList( |
|
|
|
|
|
|
|
buildPersonRankItem("吴九", "XX交警大队", "民警", 2, "40.00"), |
|
|
|
|
|
|
|
buildPersonRankItem("郑十", "XX派出所", "辅警", 1, "20.00"), |
|
|
|
|
|
|
|
buildPersonRankItem("钱一", "XX巡特警大队", "民警", 1, "20.00") |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
section3.setMomRate(new BigDecimal("0.00")); |
|
|
|
|
|
|
|
section3.setMomTrend(TrendEnum.STABLE); |
|
|
|
|
|
|
|
section3.setYoyRate(new BigDecimal("15.00")); |
|
|
|
|
|
|
|
section3.setYoyTrend(TrendEnum.UP); |
|
|
|
|
|
|
|
list.add(section3); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return list; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private BusinessLineRankItem buildRankItem(String name, Integer count, String rate) { |
|
|
|
|
|
|
|
BusinessLineRankItem item = new BusinessLineRankItem(); |
|
|
|
|
|
|
|
item.setName(name); |
|
|
|
|
|
|
|
item.setCount(count); |
|
|
|
|
|
|
|
item.setRate(new BigDecimal(rate)); |
|
|
|
|
|
|
|
return item; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private BusinessLinePersonRankItem buildPersonRankItem(String personName, String unitName, String identityName, Integer count, String rate) { |
|
|
|
|
|
|
|
BusinessLinePersonRankItem item = new BusinessLinePersonRankItem(); |
|
|
|
|
|
|
|
item.setPersonName(personName); |
|
|
|
|
|
|
|
item.setUnitName(unitName); |
|
|
|
|
|
|
|
item.setIdentityName(identityName); |
|
|
|
|
|
|
|
item.setCount(count); |
|
|
|
|
|
|
|
item.setRate(new BigDecimal(rate)); |
|
|
|
|
|
|
|
return item; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 业务条线的总览 |
|
|
|
* 业务条线的总览 |
|
|
|
* @param request |
|
|
|
* @param request |
|
|
|
@ -63,7 +251,7 @@ public class ReportDataServiceImpl implements ReportDataService { |
|
|
|
* @param periodEnd |
|
|
|
* @param periodEnd |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private BusinessLineOverviewSection buildbusinessLineOverviewSection(NegativeQueryParam request, String periodStart, String periodEnd) { |
|
|
|
private BusinessLineOverviewSection buildBusinessLineOverviewSection(NegativeQueryParam request, String periodStart, String periodEnd) { |
|
|
|
// 总体数据
|
|
|
|
// 总体数据
|
|
|
|
NegativeQueryParam ztNegativeQueryParam = request.newQueryParam(); |
|
|
|
NegativeQueryParam ztNegativeQueryParam = request.newQueryParam(); |
|
|
|
List<NegativeQueryVo> ztNegativeList = negativeQueryService.page(ztNegativeQueryParam).getRecords(); |
|
|
|
List<NegativeQueryVo> ztNegativeList = negativeQueryService.page(ztNegativeQueryParam).getRecords(); |
|
|
|
|