Browse Source

feat--对齐案件核查父子屏幕

master
parent
commit
afefb9ea3f
  1. 14
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  2. 37
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  3. 35
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java
  4. 300
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  5. 2
      src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java
  6. 27
      src/main/resources/mapper/SupTaskProblemMapper.xml

14
src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java

@ -91,20 +91,6 @@ public class DataVCaseVerifController {
}
// region 右边
@Deprecated
@Operation(summary = "案件来源占比 & 问责处理情况")
@GetMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
List<EchartsVo> caseSourceRateList = negativeMapper.getCaseSourceRate(beginTime, endTime);
List<EchartsVo> dealSituationPieList = negativeMapper.getDealSituation(beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
}
@Operation(summary = "案件来源占比 & 问责处理情况")
@PostMapping("/getCaseSourceRateAndDealSituation")

37
src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java

@ -47,19 +47,17 @@ public class SubOneCaseVerifController {
public Result<JSONObject> getCaseProblemProperty(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> zfbaPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 6); // 执法办案
List<EchartsVo> fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 11); // 服务管理
// List<EchartsVo> jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 警规
List<EchartsVo> zfbaPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, departId, 5); // 执法办案
List<EchartsVo> fwglPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, departId, 1); // 服务管理
List<EchartsVo> jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, departId,4); // 警规
JSONObject data = new JSONObject()
.fluentPut("zfbaPieList", zfbaPieList)
.fluentPut("fwglPieList", fwglPieList);
.fluentPut("fwglPieList", fwglPieList)
.fluentPut("jgjjPieList", jgjjPieList);
return Result.success(data);
}
// endregion
// region 中间
@Operation(summary = "中央数据总览")
@PostMapping("/getSubOneAllCaseVerificationCount")
public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestBody SubDataVRequest request) {
@ -71,7 +69,6 @@ public class SubOneCaseVerifController {
@Operation(summary = "地图Icon数据")
@PostMapping("/getSubOneCaseVerificationMap")
// @Cacheable(cacheNames = "Supervision:Screen:SubOneCaseVerificationMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneCaseVerificationMap(@RequestBody SubDataVRequest request) {
return subDatavService.getSubOneCaseVerificationMap(request);
@ -90,33 +87,13 @@ public class SubOneCaseVerifController {
@GetMapping("/getSubOneCaseVerificationTrend")
public Result<JSONObject> getSubOneCaseVerificationTrend(@RequestParam String departId,
@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getSubOneTrend(departId, String.valueOf(year), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<EchartsVo> proTrendList = negativeMapper.selectMonthStatByYear(year, departId, proCode);
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data);
}
/**
* 案件来源占比 问责处理情况
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "案件来源占比 & 问责处理情况")
@GetMapping("/getSubOneCaseSourceRateAndDealSituation")
public Result<JSONObject> getSubOneCaseSourceRateAndDealSituation(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> caseSourceRateList = negativeMapper.getSuboOneCaseSourceRate(beginTime, endTime, departId);
List<EchartsVo> dealSituationPieList = negativeMapper.getSubOneDealSituation(beginTime, endTime, departId);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
}
@Operation(summary = "案件来源占比 & 问责处理情况")
@PostMapping("/getSubOneCaseSourceRateAndDealSituation")

35
src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java

@ -20,24 +20,11 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
@Select("select involve_problem name, count(originId) value from data_case_verif where business_type_name = #{businessTypeName} and discovery_time between #{beginTime} and #{endTime} group by involve_problem")
List<PieItem> selectInvolveProblemGroupByBusinessTypeName(String businessTypeName, Date beginTime, Date endTime);
@Select("SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) " +
"GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, count(*) AS `value` " +
"FROM negative ng " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus in (1, 2) " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND businessTypeCode = #{businessId} " +
"GROUP BY threeLevelContent ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer businessId);
/**
* 案件问题性质
@ -57,6 +44,26 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
@Select("SELECT " +
" npr.twoLevelContent AS name, " +
" COUNT(*) AS `value` " +
"FROM " +
"negative ng " +
"LEFT JOIN negative_problem_relation npr ON ng.id = npr.negativeId " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN sup_depart sdd ON sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd ON sdd.pid = sddd.id " +
"WHERE " +
"ng.check_status_code IN (1, 2, 3) " +
"AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " +
"AND (sd.id = #{departId} OR sdd.id = #{departId} OR sddd.id = #{departId}) " +
"GROUP BY npr.twoLevelContent ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType);
@Select(" SELECT matter as name, COUNT(*) as value from confinement " +
" WHERE start_time BETWEEN #{beginTime} AND #{endTime} " +
" GROUP BY matter ")

300
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -116,22 +116,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " +
" sd.short_name AS label, " +
" COUNT(DISTINCT ng.id) AS denominator, " +
" COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) AS numerator, " +
" COUNT( DISTINCT IF(COALESCE(ng.isRectifyCode, 0) != 1, ng.id, NULL)) AS processingNumber, " +
" IFNULL( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 0 ), 0 ) AS value " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"LEFT JOIN sup_depart sd2 ON ng.three_involve_depart_id = sd2.id " +
"WHERE ng.problemSourcesCode IN (27, 28, 29, 30) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id = #{groupId} " +
"GROUP BY second_involve_depart_id, sd.short_name " +
"ORDER BY VALUE DESC;")
List<AuditNegativeVo> getAuditNegativeVo(Date beginTime, Date endTime,String groupId);
@ -169,20 +153,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// region 案件核查大屏
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId);
@Select("SELECT " +
@ -253,14 +224,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY nb.handleResultName")
List<EchartsVo> getDealSituation(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, " +
"count(DISTINCT(ng.id)) as `value` FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus in (1, 2) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent")
List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type);
List<EchartsVo> getMailTrend(Integer year, Integer type);
@ -384,113 +348,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime);
// region 二级大屏现场督察
//分县级 - 现场督察
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo selectRankOverview(Integer departId, Date beginTime, Date endTime);
//分县级 - 现场督察
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime);
//分县级 - 现场督察
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY denominator DESC;")
List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime);
//分县级 - 现场督察
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY denominator DESC;")
List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime);
@Select("SELECT sd.short_name as label, " +
"sd.id AS departId, " +
"count( DISTINCT ng.id) AS denominator, " +
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " +
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " +
"FROM sup_depart sd " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " +
"order by rate desc;")
List<RankVo> getSubOnePoliceChangedRateRank(Integer departId, Date beginTime, Date endTime);
@Select("SELECT sd.short_name as label, " +
"sd.id AS departId, " +
"count( DISTINCT ng.id) AS denominator, " +
"count( DISTINCT IF(ng.processing_status='completed', ng.id, NULL )) AS numerator, " +
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " +
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " +
"FROM sup_depart sd " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " +
"order by rate desc;")
List<RankVo> getSubOneTeamChangedRateRank(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"npr.oneLevelContent as `name`, " +
@ -508,159 +370,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY npr.oneLevelContent; ")
List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id) * 100, 1) AS rectifyRate " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13, 15) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} ")
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime);
@Select("SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value` FROM sup_month_monthname m " +
"LEFT JOIN " +
"( " +
"SELECT ng.* FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id WHERE sd.pid=#{departId} AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (13, 15) " +
") AS temp ON DATE_FORMAT(temp.crtTime, '%m') = m.month " +
"AND YEAR(temp.crtTime) = #{year} " +
"GROUP by m.month_name " +
"ORDER BY m.month ASC;")
List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year);
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " +
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " +
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
// endregion
// region 二级大屏案件核查
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getPoliceCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS name, " +
"COUNT(*) AS `value` FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.check_status_code in (1, 2, 3) " +
"AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` DESC ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType);
@Select("SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishPre, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishOrg " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20)")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameIdCode ) AS punishPre, " +
"COUNT( DISTINCT nb.blameDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF( ng.isRectifyCode=1, ng.id, NULL ) )/COUNT( DISTINCT ng.id )*100, 1 ), 0) AS rate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ")
List<CaseVerificationMapVo> getSubOneCaseVerificationMap(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sdps.label AS `name` , " +
"COUNT( DISTINCT ng.id ) AS `value` " +
@ -795,5 +504,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
)
List<Negative> getYellowBetNegativeList(String id, Date beginTime, Date endTime, String specialSupervision);
List<EchartsVo> selectMonthStatByYear(
@Param("year") Integer year,
@Param("departId") String departId,
@Param("problemSourcesCodeList") List<String> problemSourcesCodeList
);
// endregion
}

2
src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java

@ -1,4 +1,4 @@
package com.biutag.supervision.service.subDatav;
package com.biutag.supervision.service.subDatav;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;

27
src/main/resources/mapper/SupTaskProblemMapper.xml

@ -139,4 +139,31 @@
</select>
<select id="selectMonthStatByYear" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT
m.month_name AS name,
COUNT(t.id) AS value
FROM sup_month_monthname m
LEFT JOIN (
SELECT
ng.id,
ng.crtTime
FROM negative ng
LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id
LEFT JOIN sup_depart sdd ON sd.pid = sdd.id
LEFT JOIN sup_depart sddd ON sdd.pid = sddd.id
WHERE YEAR(ng.crtTime) = #{year}
<if test="problemSourcesCodeList != null and problemSourcesCodeList.size() > 0">
AND ng.problemSourcesCode IN
<foreach collection="problemSourcesCodeList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND ( sd.id = #{departId} OR sdd.id = #{departId} OR sddd.id = #{departId} ) ) t
ON MONTH(t.crtTime) = CAST(m.month AS UNSIGNED)
GROUP BY m.month, m.month_name
ORDER BY CAST(m.month AS UNSIGNED) ASC
</select>
</mapper>

Loading…
Cancel
Save