diff --git a/src/main/java/com/cm/bigdata/controller/apis/casescore/CaseScoreController.java b/src/main/java/com/cm/bigdata/controller/apis/casescore/CaseScoreController.java index 983993e..59d4497 100644 --- a/src/main/java/com/cm/bigdata/controller/apis/casescore/CaseScoreController.java +++ b/src/main/java/com/cm/bigdata/controller/apis/casescore/CaseScoreController.java @@ -216,6 +216,8 @@ public class CaseScoreController extends AbstractController { caseSuperviseVO.setAreaId(caseScoreDTO.getAreaId()); caseSuperviseVO.setAreaName(caseScoreDTO.getAreaName()); caseSuperviseVO.setSuperviseCount("0"); + caseSuperviseVO.setInspectCount(String.valueOf(caseScoreDTO.getInspectTimeout().size())); + caseSuperviseVO.setCloseCount(String.valueOf(caseScoreDTO.getCloseTimeout().size())); caseSuperviseService.saveCaseSupervise(caseSuperviseVO); } diff --git a/src/main/java/com/cm/bigdata/controller/apis/casesupervise/CaseSuperviseController.java b/src/main/java/com/cm/bigdata/controller/apis/casesupervise/CaseSuperviseController.java index c06bec2..62f7f38 100644 --- a/src/main/java/com/cm/bigdata/controller/apis/casesupervise/CaseSuperviseController.java +++ b/src/main/java/com/cm/bigdata/controller/apis/casesupervise/CaseSuperviseController.java @@ -168,8 +168,8 @@ public class CaseSuperviseController extends AbstractController { @ApiOperation(value = "导出excel(案件督察)", notes = "导出excel(案件督察)接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("excelpersonscore") - public void excelPersonScore(HttpServletResponse response) throws Exception { + @GetMapping("excelcasescore") + public void excelCaseScore(HttpServletResponse response) throws Exception { Map params = requestParams(); String excelName = params.get("year") + "年"+ params.get("quarter") +"季度街镇村案件督察分数统计表"; diff --git a/src/main/resources/mybatis/mapper/casesupervise/casesupervise-mapper.xml b/src/main/resources/mybatis/mapper/casesupervise/casesupervise-mapper.xml index f801b4e..da91134 100644 --- a/src/main/resources/mybatis/mapper/casesupervise/casesupervise-mapper.xml +++ b/src/main/resources/mybatis/mapper/casesupervise/casesupervise-mapper.xml @@ -159,8 +159,8 @@ t1.area_id, t1.area_name, SUM(t1.supervise_count) supervise_count, - SUM(t1.inspect_count) inspect_count, - t1.close_count, + MAX(t1.inspect_count) inspect_count, + MAX(t1.close_count) close_count, t1.case_supervise_id FROM gen_case_supervise t1 diff --git a/src/main/resources/static/route/bossscore/list-bossscore.html b/src/main/resources/static/route/bossscore/list-bossscore.html index 7691feb..e603565 100644 --- a/src/main/resources/static/route/bossscore/list-bossscore.html +++ b/src/main/resources/static/route/bossscore/list-bossscore.html @@ -103,9 +103,15 @@ var year; if(!value) { date = new Date(); + yearDate = date.getFullYear(); }else { - year = value + '-12-31'; - date = new Date(year); + if(value != new Date().getFullYear()) { + year = value + '-12-31'; + date = new Date(year); + }else { + date = new Date(); + } + yearDate = value; } var month = date.getMonth() + 1; if(month >= 1 && month <=3) { diff --git a/src/main/resources/static/route/casesupervise/list-casesupervise.html b/src/main/resources/static/route/casesupervise/list-casesupervise.html index 172f532..d613b7e 100644 --- a/src/main/resources/static/route/casesupervise/list-casesupervise.html +++ b/src/main/resources/static/route/casesupervise/list-casesupervise.html @@ -63,9 +63,15 @@ var year; if(!value) { date = new Date(); + yearDate = date.getFullYear(); }else { - year = value + '-12-31'; - date = new Date(year); + if(value != new Date().getFullYear()) { + year = value + '-12-31'; + date = new Date(year); + }else { + date = new Date(); + } + yearDate = value; } var month = date.getMonth() + 1; if(month >= 1 && month <=3) { @@ -94,6 +100,44 @@ quarterFun(); + $(document).on('click', '#excel', function() { + var year = $('#year').val(); + var quarter = $('#quarter').val(); + excel(year,quarter); + }); + + function excel(v1,v2){ + if(v1 === ''){ + layer.msg('请选择导出数据年份') + } + if(v2 === ''){ + layer.msg('请选择导出数据季度') + } + var v2Str = ""; + if(v2 === '1'){ + v2Str = '第一季度' + } + if(v2 === '2'){ + v2Str = '第二季度' + } + if(v2 === '3'){ + v2Str = '第三季度' + } + if(v2 === '4'){ + v2Str = '第四季度' + } + + top.dialog.msg('确定要导出'+v1+'年'+v2Str+'的数据吗?', { + time: 0, + btn: [top.dataMessage.button.yes, top.dataMessage.button.no], + shade: 0.3, + yes: function (index) { + top.dialog.close(index); + window.open(top.restAjax.path('api/casesupervise/excelcasescore?year={year}&quarter={quarter}', [v1,v2])); + } + }); + } + // 初始化表格 function initTable() { table.render({ diff --git a/src/main/resources/static/route/personscore/list-personscore.html b/src/main/resources/static/route/personscore/list-personscore.html index 5080665..89cc6ad 100644 --- a/src/main/resources/static/route/personscore/list-personscore.html +++ b/src/main/resources/static/route/personscore/list-personscore.html @@ -101,9 +101,15 @@ var year; if(!value) { date = new Date(); + yearDate = date.getFullYear(); }else { - year = value + '-12-31'; - date = new Date(year); + if(value != new Date().getFullYear()) { + year = value + '-12-31'; + date = new Date(year); + }else { + date = new Date(); + } + yearDate = value; } var month = date.getMonth() + 1; if(month >= 1 && month <=3) { diff --git a/src/main/resources/static/route/scoredetail/list-scoredetail.html b/src/main/resources/static/route/scoredetail/list-scoredetail.html index d454269..eae160d 100644 --- a/src/main/resources/static/route/scoredetail/list-scoredetail.html +++ b/src/main/resources/static/route/scoredetail/list-scoredetail.html @@ -103,9 +103,15 @@ var year; if(!value) { date = new Date(); + yearDate = date.getFullYear(); }else { - year = value + '-12-31'; - date = new Date(year); + if(value != new Date().getFullYear()) { + year = value + '-12-31'; + date = new Date(year); + }else { + date = new Date(); + } + yearDate = value; } var month = date.getMonth() + 1; if(month >= 1 && month <=3) {