diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java index d411bb2..ba26ab9 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java @@ -80,6 +80,36 @@ public class DataVCaseVerifController { return Result.success(data); } // endregion + /** + * 案件问题性质 + * */ + @GetMapping("/getCaseType") + public Result getCaseType(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); + //执法办案 + List enforceList = dataCaseVerifMapper.getCaseTypeNumber(beginTime,endTime,5); + //内部管理 + List interiorList = dataCaseVerifMapper.getCaseTypeNumber(beginTime,endTime,1); + //纪律作风 + List disciplineList = dataCaseVerifMapper.getCaseTypeNumber(beginTime,endTime,4); + JSONObject jsonObject =new JSONObject().fluentPut("enforceList",enforceList) + .fluentPut("interiorList",interiorList) + .fluentPut("disciplineList",disciplineList); + return Result.success(jsonObject); + } + + /** + * 获取禁闭处理情况数据 + * */ + @GetMapping("/getConfinementBar") + public Result getConfinementBar(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){ + List list =dataCaseVerifMapper.getConfinementData(beginTime,endTime); + JSONObject jsonObject =new JSONObject().fluentPut("confinementList",list); + return Result.success(jsonObject); + } + // region 中间 diff --git a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java index 2ada091..315cc10 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java @@ -37,4 +37,27 @@ public interface DataCaseVerifMapper extends BaseMapper { "AND businessTypeCode = #{businessId} " + "GROUP BY threeLevelContent ") List getCaseProblemProperty(Date beginTime, Date endTime, Integer businessId); -} \ No newline at end of file + + +/** + * 案件问题性质 + * */ + @Select(" SELECT " + + " twoLevelContent as name, " + + " COUNT(*) as value " + + " from " + + " negative_problem_relation npr LEFT JOIN " + + " negative ng on npr.negativeId = ng.id " + + " where npr.oneLevelCode = #{code} " + + " and ng.problemSourcesCode in (17, 18, 19, 20) " + + " and ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + + " GROUP BY twoLevelContent ") + List getCaseTypeNumber(Date beginTime, Date endTime, Integer code); + + + + @Select(" SELECT matter as name, COUNT(*) as value from confinement " + + " WHERE start_time BETWEEN #{beginTime} AND #{endTime} " + + " GROUP BY matter ") + List getConfinementData(Date beginTime, Date endTime); +}