jiawuxian 1 rok temu
rodzic
commit
5daaba1c98

+ 1 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/panel/dto/PanelListDto.java

@@ -21,6 +21,7 @@ public class PanelListDto {
     @ApiModelProperty(value = "当前用户菜单权限id")
     private List<Long> permList;
 
+
     private Date startTime;
     private Date endTime;
 

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/controller/WebCockpitController.java

@@ -96,7 +96,7 @@ public class WebCockpitController extends BaseController {
     @ApiOperation(value = "统计机构信息")
     @GetMapping("/orgsecurityinfo")
     public AjaxResult orgSecurityInfo(Long orgId) {
-        return success(cockpitService.orgInfo(orgId));
+        return success(cockpitService.orgSecurityInfo(orgId));
     }
 
 

+ 27 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/service/impl/CockpitServiceImpl.java

@@ -56,6 +56,7 @@ public class CockpitServiceImpl implements CockpitService {
 //        String orgPath = org.getPath();
         List<WebSafetyCheckVo> list = cockpitMapper.safetyCheck(date, DateUtil.endOfDay(new Date()), org.getPath());
         List<SysDictData> dicts = remoteDictDataService.selectDictByeType("check_type", SecurityConstants.INNER);
+        dicts.sort(Comparator.comparing(SysDictData::getDictSort));
         List<WebSafetyCheckVo> r = dicts.stream().map(d -> {
             Optional<WebSafetyCheckVo> voOpt = list.stream().filter(i -> ObjectUtil.equal(i.getType(), d.getDictValue())).findFirst();
             WebSafetyCheckVo vo;
@@ -64,8 +65,31 @@ public class CockpitServiceImpl implements CockpitService {
             } else {
                 vo = new WebSafetyCheckVo();
             }
-
-            vo.setType(d.getDictLabel());
+            String label = d.getDictLabel();
+            switch (d.getDictValue()) {
+                case "1":
+                    label = "省联社检查";
+                    break;
+                case "2":
+                    label = "办事处检查";
+                    break;
+                case "3":
+                    label = "网点自查";
+                    break;
+                case "4":
+                    label = "全面检查";
+                    break;
+                case "5":
+                    label = "阶段性检查";
+                    break;
+                case "6":
+                    label = "专项检查";
+                    break;
+                case "7":
+                    label = "其它检查";
+                    break;
+            }
+            vo.setType(label);
             return vo;
         }).collect(Collectors.toList());
 
@@ -103,6 +127,7 @@ public class CockpitServiceImpl implements CockpitService {
             WebDrillInfoVo vo = new WebDrillInfoVo();
             vo.setOrgName(i.getOrgName());
             vo.setTotal((int) i.getTaskTotal());
+            vo.setCompleted((int) i.getCompletedCount());
             vo.setCompletedRate(i.getCompletedRate());
             return vo;
         }).collect(Collectors.toList());
@@ -144,7 +169,6 @@ public class CockpitServiceImpl implements CockpitService {
         return r;
     }
 
-
     /**
      * 机构信息
      *

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/vo/web/WebDrillInfoVo.java

@@ -11,5 +11,6 @@ public class WebDrillInfoVo {
 
     private int total;
 
+    private int completed;
     private float completedRate;
 }

+ 3 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/board/CockpitMapper.xml

@@ -135,12 +135,13 @@
           and o.path like concat(#{orgPath}, '%');
     </select>
     <select id="orgSecurityInfo" resultType="com.xunmei.core.board.vo.web.OrgSecurityInfoVo">
-        select sum(if(o.askari = 1, 1, 0))  as equippedCount,
-               sum(if(o.askari != 1, 1, 0)) as unequippedCount
+        select sum(if(oe.askari = 1, 1, 0))  as equippedCount,
+               sum(if(oe.askari != 1, 1, 0)) as unequippedCount
         from sys_org o
                  LEFT JOIN sys_org_extend oe on o.id = oe.org_id
         WHERE o.deleted = 0
           and o.is_lock = 0
+          and o.type=4
           and o.path like concat(#{orgPath}, '%');
     </select>
     <select id="currentMonthVisitInfo" resultType="com.xunmei.core.board.vo.web.VisitInfoVo">