luowei 1 年之前
父節點
當前提交
24dbd03c94

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluateTaskController.java

@@ -112,6 +112,8 @@ public class CoreEvaluateTaskController extends BaseController {
     @GetMapping("/statistics")
     public AjaxResult statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
         AjaxResult ajaxResult = AjaxResult.success();
+        SysOrg sysOrg = remoteOrgService.selectSysOrgById(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
+        ajaxResult.put("orgName", sysOrg.getShortName());
         if (null != evaluateTaskStatisticsDTO.getPlanId()) {
             CoreEvaluatePlanVO coreEvaluatePlanVO = coreEvaluatePlanService.selectCoreEvaluatePlanById(evaluateTaskStatisticsDTO.getPlanId());
             LocalDate localDate = LocalDate.now();
@@ -142,12 +144,10 @@ public class CoreEvaluateTaskController extends BaseController {
             } catch (Exception e) {
                 e.printStackTrace();
             }
-
             ajaxResult.put("tittle", coreEvaluatePlanVO.getEvaluateName() + "(" + dateTitle);
         }
         ajaxResult.put(AjaxResult.DATA_TAG, coreEvaluateTaskService.statistics(evaluateTaskStatisticsDTO));
-        SysOrg sysOrg = remoteOrgService.selectSysOrgById(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
-        ajaxResult.put("orgName", sysOrg.getShortName());
+
         return ajaxResult;
     }
 

+ 9 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluateTaskServiceImpl.java

@@ -135,6 +135,7 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
         }
         List<SysOrg> sysOrgs = remoteOrgService.selectSysOrgByParentId(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
         List<EvaluateTaskExportVO> list = new ArrayList<>();
+        Double all = 0d;
         for (int i = 0; i < sysOrgs.size(); i++) {
             EvaluateTaskExportVO evaluateTaskExportVO = new EvaluateTaskExportVO();
             evaluateTaskExportVO.setOrderNum(i + 1);
@@ -143,7 +144,7 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
             LinkedHashMap linkedHashMap = baseMapper.statisticsAll(evaluateTaskStatisticsDTO);
             if (null == linkedHashMap) {
                 evaluateTaskExportVO.setEvaluatedOrgName("");
-                evaluateTaskExportVO.setScore(0);
+                evaluateTaskExportVO.setScore(0d);
             } else {
                 evaluateTaskExportVO.setEvaluatedOrgName(linkedHashMap.get("被评价机构名称").toString());
             }
@@ -151,16 +152,22 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
                 Object id = linkedHashMap.get("id");
                 List<Map> contentByTaskId = baseMapper.getContentByTaskId((Long) id, evaluateTaskStatisticsDTO.getStartTime(), evaluateTaskStatisticsDTO.getEndTime());
                 if (CollectionUtils.isNotEmpty(contentByTaskId)) {
-                    int total = 0;
+                    double total = 0;
                     for (int l = 0; l < contentByTaskId.size(); l++) {
                         Double score = Double.valueOf(contentByTaskId.get(l).get("score").toString());
                         total += score;
                     }
                     evaluateTaskExportVO.setScore(total);
+                    all += total;
                 }
             }
             list.add(evaluateTaskExportVO);
+
         }
+        EvaluateTaskExportVO evaluateTaskExportVO = new EvaluateTaskExportVO();
+        evaluateTaskExportVO.setOrgName("平均得分");
+        evaluateTaskExportVO.setScore((double) all / list.size());
+        list.add(evaluateTaskExportVO);
         if (ObjectUtil.isEmpty(list)) {
             throw new RuntimeException("导出数据为空!");
         }

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/vo/EvaluateTaskExportVO.java

@@ -16,5 +16,5 @@ public class EvaluateTaskExportVO {
     @ExcelProperty("被评价机构名称")
     private String evaluatedOrgName;
     @ExcelProperty("评价得分")
-    private Integer score;
+    private Double score;
 }

+ 12 - 12
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/SecurityWorkExport.java

@@ -18,34 +18,34 @@ import lombok.Data;
 @HeadRowHeight(16) //表头行高
 @ContentRowHeight(16) //数据行高
 public class SecurityWorkExport {
-    @ExcelProperty(value = "序号", index = 0)
+    @ExcelProperty(value ={"序号",""} , index = 0)
     @TableField(exist = false)
     private String xh;
     @ExcelProperty(value = "地区", index = 1)
     private String city;
-    @ExcelProperty(value = "单位", index = 2)
+    @ExcelProperty(value = {"项目","单位"}, index = 2)
     private String orgName;
-    @ExcelProperty(value = "营业网点总量", index = 3)
+    @ExcelProperty(value = {"营业网点总数","营业网点总量"}, index = 3)
     private Integer networkNumber;
-    @ExcelProperty(value = "营业网点达标数量(符合GA38-2015、2021标准)", index = 4)
+    @ExcelProperty(value = {"营业网点总数","营业网点达标数量(符合GA38-2015、2021标准)"}, index = 4)
     private Integer reachNumber;
-    @ExcelProperty(value = "自有产权网点数", index = 5)
+    @ExcelProperty(value = {"营业网点总数","自有产权网点数"}, index = 5)
     private Integer ownPropertyNumber;
-    @ExcelProperty(value = "区域外网点数", index = 6)
+    @ExcelProperty(value = {"营业网点总数","区域外网点数"}, index = 6)
     private Integer areaOutsideNumber;
-    @ExcelProperty(value = "业务库总量", index = 7)
+    @ExcelProperty(value = {"业务库","业务库总量"}, index = 7)
     private Integer businessLibraryTotal;
-    @ExcelProperty(value = "一类库", index = 8)
+    @ExcelProperty(value = {"业务库","一类库"}, index = 8)
     private Integer oneLibrary;
-    @ExcelProperty(value = "二类库", index = 9)
+    @ExcelProperty(value = {"业务库","二类库"}, index = 9)
     private Integer twoLibrary;
-    @ExcelProperty(value = "三类库", index = 10)
+    @ExcelProperty(value = {"业务库","三类库"}, index = 10)
     private Integer threeLibrary;
-    @ExcelProperty(value = "四类库", index = 11)
+    @ExcelProperty(value = {"业务库","四类库"}, index = 11)
     private Integer fourLibrary;
     @ExcelProperty(value = "保管箱库", index = 12)
     private Integer collectLibrary;
-    @ExcelProperty(value = "在行式总量", index = 13)
+    @ExcelProperty(value = {"自助银行","在行式总量"}, index = 13)
     private Integer onLineTotal;
     @ExcelProperty(value = "在行式达标数量(符合GA38-2021标准)", index = 14)
     private Integer onLineReachNumber;