Browse Source

fix: 补充案件核查(案件问题性质、禁闭处理情况)

master
pengwei 6 months ago
parent
commit
1604916c36
  1. 30
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  2. 25
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java

30
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<JSONObject> getCaseType(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
//执法办案
List<EchartsVo> enforceList = dataCaseVerifMapper.getCaseTypeNumber(beginTime,endTime,5);
//内部管理
List<EchartsVo> interiorList = dataCaseVerifMapper.getCaseTypeNumber(beginTime,endTime,1);
//纪律作风
List<EchartsVo> 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<JSONObject> getConfinementBar(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
List<EchartsVo> list =dataCaseVerifMapper.getConfinementData(beginTime,endTime);
JSONObject jsonObject =new JSONObject().fluentPut("confinementList",list);
return Result.success(jsonObject);
}
// region 中间

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

@ -37,4 +37,27 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
"AND businessTypeCode = #{businessId} " +
"GROUP BY threeLevelContent ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer businessId);
}
/**
* 案件问题性质
* */
@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<EchartsVo> 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<EchartsVo> getConfinementData(Date beginTime, Date endTime);
}

Loading…
Cancel
Save