From 1604916c36c3daf837d29b3532bfb8a3cdefafc1 Mon Sep 17 00:00:00 2001 From: pengwei Date: Tue, 27 May 2025 11:04:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E6=A1=88=E4=BB=B6?= =?UTF-8?q?=E6=A0=B8=E6=9F=A5=EF=BC=88=E6=A1=88=E4=BB=B6=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E6=80=A7=E8=B4=A8=E3=80=81=E7=A6=81=E9=97=AD=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=83=85=E5=86=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav/DataVCaseVerifController.java | 30 +++++++++++++++++++ .../mapper/DataCaseVerifMapper.java | 25 +++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) 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); +}