From 28aa2c3f300ac9bb982a437550d0592024136690 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Fri, 15 Jan 2021 11:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E5=8A=9F=E8=83=BD=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=8F=8Abug=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/bossscore/BossScoreController.java | 48 +++++ .../impl/DeptAssessServiceImpl.java | 4 +- .../mapper/scoredetail/scoredetail-mapper.xml | 2 +- .../route/bossscore/list-bossscore.html | 43 ++++ .../casesupervise/list-casesupervise.html | 3 + .../list-deptassesschangescore.html | 4 +- .../partymeetingscore/list-partymeeting.html | 202 +++++++++--------- .../route/personscore/list-personscore.html | 3 + .../route/scoredetail/list-scoredetail.html | 3 + 9 files changed, 207 insertions(+), 105 deletions(-) diff --git a/src/main/java/com/cm/bigdata/controller/apis/bossscore/BossScoreController.java b/src/main/java/com/cm/bigdata/controller/apis/bossscore/BossScoreController.java index 9c19be6..62198d9 100644 --- a/src/main/java/com/cm/bigdata/controller/apis/bossscore/BossScoreController.java +++ b/src/main/java/com/cm/bigdata/controller/apis/bossscore/BossScoreController.java @@ -1,11 +1,13 @@ package com.cm.bigdata.controller.apis.bossscore; +import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cm.bigdata.config.properties.PartyBuildingProperties; import com.cm.bigdata.config.properties.ScoreProperties; import com.cm.bigdata.pojo.dtos.boss.BossDTO; import com.cm.bigdata.pojo.dtos.configforscore.ConfigForScoreDTO; +import com.cm.bigdata.pojo.dtos.deptassess.DeptAssessDTO; import com.cm.bigdata.pojo.dtos.scoredetail.ScoreDetailDTO; import com.cm.bigdata.pojo.dtos.worknote.WorkNoteForScoreDTO; import com.cm.bigdata.pojo.vos.scoredetail.ScoreDetailVO; @@ -37,6 +39,8 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; +import javax.servlet.http.HttpServletResponse; +import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.util.*; @@ -357,4 +361,48 @@ public class BossScoreController extends AbstractController { return year; } + /*@ApiOperation(value = "导出excel(立案情况)", notes = "导出excel(立案情况)接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("excelworknote") + public void excelWorkNote(HttpServletResponse response) throws Exception { + Map params = requestParams(); + + String excelName = params.get("year") + "年"+ params.get("quarter") +"季度街镇村立案情况考核分数统计表"; + String fileName = URLEncoder.encode(excelName, "UTF-8"); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + + String [] headers = {"街镇村","上报数量","每件得分","总得分"}; + List> listHeader = new ArrayList<>(); + for (String item : headers){ + List title = new ArrayList<>(); + title.add(item); + listHeader.add(title); + } + + List deptAssessDTOs = deptAssessDao.listDeptAssess(params); + List> listData = new ArrayList<>(); + for (DeptAssessDTO d : deptAssessDTOs) { + List data = new ArrayList(); + data.add(d.getDeptName()); + data.add(d.getDeptTotalYear()); + data.add(d.getDeptTotalQuarter()); + data.add(d.getDeptCaseNum().toString()); + data.add("加"+d.getDeptCaseSettleScore().toString()+"分"); + data.add(d.getDeptCaseTimeoutNum().toString()); + data.add("加"+d.getDeptCaseTimeoutScore().toString()+"分"); + data.add(d.getDeptCaseGrossScore().toString()); + Integer num = deptInspectorService.countDeptInspectorNum(d.getDeptTotalYear(),d.getDeptTotalQuarter(),d.getDeptId()); + data.add("扣"+num.toString()+"分"); + data.add(d.getDeptCaseTotalScore().toString()+"分"); + double zdy = deptAssessChangeScoreService.getDeptChangeScore(d.getDeptAssessId()); + data.add(zdy+"分"); + Double eventScore = totalEvenSocre(d.getDeptCaseTotalScore(),zdy); + data.add(eventScore.toString()+"分"); + data.add(d.getDeptTotalTime()); + listData.add(data); + } + + EasyExcel.write(response.getOutputStream()).sheet("职能部门考核分数表").head(listHeader).doWrite(listData); + }*/ + } \ No newline at end of file diff --git a/src/main/java/com/cm/bigdata/service/deptassess/impl/DeptAssessServiceImpl.java b/src/main/java/com/cm/bigdata/service/deptassess/impl/DeptAssessServiceImpl.java index f59f3d1..6a1566f 100644 --- a/src/main/java/com/cm/bigdata/service/deptassess/impl/DeptAssessServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/deptassess/impl/DeptAssessServiceImpl.java @@ -82,8 +82,8 @@ public class DeptAssessServiceImpl extends AbstractService implements IDeptAsses * @throws Exception */ public void excelManualDeptData(String deptTotalYear, String deptTotalQuarter, HttpServletResponse response) throws Exception{ - String excelName = "y年q季度职能部门考核分数统计表"; - String fileName = URLEncoder.encode("党费管理Excel模板", "UTF-8"); + String excelName = deptTotalYear + "年"+ deptTotalQuarter +"季度职能部门考核分数统计表"; + String fileName = URLEncoder.encode(excelName, "UTF-8"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); String [] headers = {"部门名称","统计年份","统计季度","部门已处理案件数量","案件处理情况分数","部门超时案件数量","案件处置时效分数","案件处理结果分数", "案件督查分数","总分","自定义共加分","最终得分","数据统计时间" diff --git a/src/main/resources/mybatis/mapper/scoredetail/scoredetail-mapper.xml b/src/main/resources/mybatis/mapper/scoredetail/scoredetail-mapper.xml index 81eda12..c38efeb 100644 --- a/src/main/resources/mybatis/mapper/scoredetail/scoredetail-mapper.xml +++ b/src/main/resources/mybatis/mapper/scoredetail/scoredetail-mapper.xml @@ -179,7 +179,7 @@