Jelajahi Sumber

修改app驾驶舱

jiawuxian 1 tahun lalu
induk
melakukan
8a6b73a4c1

+ 6 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/dto/app/AppOrgBaseInfoDto.java

@@ -14,12 +14,18 @@ public class AppOrgBaseInfoDto {
     private int unreachedCount;
     @ApiModelProperty("营业网点数数量")
     private int bankingCount;
+    @ApiModelProperty("在行数量")
+    private int onlineATMCount;
     @ApiModelProperty("离行数量")
     private int offATMCount;
     @ApiModelProperty("营业网点GA38-2021达标数量")
     private int bankingGA382021 ;
     @ApiModelProperty("营业网点GA38-20215达标数量")
     private int bankingGA382015 ;
+    @ApiModelProperty("在行GA38-2021达标数量")
+    private int onlineGA382021 ;
+    @ApiModelProperty("在行GA38-2015达标数量")
+    private int onlineGA382015;
     @ApiModelProperty("离行GA38-2021达标数量")
     private int offATMGA382021 ;
     @ApiModelProperty("离行GA38-2015达标数量")

+ 29 - 15
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/service/impl/AppCockpitServiceImpl.java

@@ -128,21 +128,35 @@ public class AppCockpitServiceImpl implements AppCockpitService {
         vo.getSecurityFacilities().setGa382021(baseInfoDto.getBankingGA382021() + baseInfoDto.getOffATMGA382021());
         vo.getSecurityFacilities().setGa38Unreached(baseInfoDto.getUnreachedCount());
 
-        vo.setBanking2021(new AppGa38RateVo());
-        vo.getBanking2021().setTotal(baseInfoDto.getBankingCount());
-        vo.getBanking2021().setRate(NumberUtils.computeRate(baseInfoDto.getBankingCount(), baseInfoDto.getBankingGA382021()));
-
-        vo.setBanking2015(new AppGa38RateVo());
-        vo.getBanking2015().setTotal(baseInfoDto.getBankingCount());
-        vo.getBanking2015().setRate(NumberUtils.computeRate(baseInfoDto.getBankingCount(), baseInfoDto.getBankingGA382015()));
-
-        vo.setOfflineATM2021(new AppGa38RateVo());
-        vo.getOfflineATM2021().setTotal(baseInfoDto.getOffATMCount());
-        vo.getOfflineATM2021().setRate(NumberUtils.computeRate(baseInfoDto.getOffATMCount(), baseInfoDto.getOffATMGA382021()));
-
-        vo.setOfflineATM2015(new AppGa38RateVo());
-        vo.getOfflineATM2015().setTotal(baseInfoDto.getOffATMCount());
-        vo.getOfflineATM2015().setRate(NumberUtils.computeRate(baseInfoDto.getOffATMCount(), baseInfoDto.getOffATMGA382015()));
+        vo.setBankingGa38(new AppGa38RateVo());
+        vo.getBankingGa38().setGa382021(baseInfoDto.getBankingGA382021());
+        vo.getBankingGa38().setGa382015(baseInfoDto.getBankingGA382015());
+        vo.getBankingGa38().setNotreach(baseInfoDto.getBankingCount()-baseInfoDto.getBankingGA382021()-baseInfoDto.getBankingGA382015());
+
+        vo.setOnlineGa38(new AppGa38RateVo());
+        vo.getOnlineGa38().setGa382021(baseInfoDto.getOnlineGA382021());
+        vo.getOnlineGa38().setGa382015(baseInfoDto.getOnlineGA382015());
+        vo.getOnlineGa38().setNotreach(baseInfoDto.getOnlineATMCount()-baseInfoDto.getOnlineGA382021()-baseInfoDto.getOnlineGA382015());
+
+        vo.setOfflineGa38(new AppGa38RateVo());
+        vo.getOfflineGa38().setGa382021(baseInfoDto.getOffATMGA382021());
+        vo.getOfflineGa38().setGa382015(baseInfoDto.getOffATMGA382015());
+        vo.getOfflineGa38().setNotreach(baseInfoDto.getOffATMCount()-baseInfoDto.getOffATMGA382021()-baseInfoDto.getOffATMGA382015());
+//        vo.setBanking2021(new AppGa38RateVo());
+//        vo.getBanking2021().setTotal(baseInfoDto.getBankingCount());
+//        vo.getBanking2021().setRate(NumberUtils.computeRate(baseInfoDto.getBankingCount(), baseInfoDto.getBankingGA382021()));
+//
+//        vo.setBanking2015(new AppGa38RateVo());
+//        vo.getBanking2015().setTotal(baseInfoDto.getBankingCount());
+//        vo.getBanking2015().setRate(NumberUtils.computeRate(baseInfoDto.getBankingCount(), baseInfoDto.getBankingGA382015()));
+//
+//        vo.setOfflineATM2021(new AppGa38RateVo());
+//        vo.getOfflineATM2021().setTotal(baseInfoDto.getOffATMCount());
+//        vo.getOfflineATM2021().setRate(NumberUtils.computeRate(baseInfoDto.getOffATMCount(), baseInfoDto.getOffATMGA382021()));
+//
+//        vo.setOfflineATM2015(new AppGa38RateVo());
+//        vo.getOfflineATM2015().setTotal(baseInfoDto.getOffATMCount());
+//        vo.getOfflineATM2015().setRate(NumberUtils.computeRate(baseInfoDto.getOffATMCount(), baseInfoDto.getOffATMGA382015()));
 
         vo.setBusinessStoreInfo(new LinkedHashMap<>());
         vo.getBusinessStoreInfo().put("一类库", baseInfoDto.getBusinessLibraryOne());

+ 16 - 11
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/vo/app/AppBaseInfoVo.java

@@ -14,17 +14,22 @@ public class AppBaseInfoVo {
     @ApiModelProperty("安全防范设施改造情况")
     private AppBaseInfoSecurityFacilitiesVo securityFacilities;
 
-    @ApiModelProperty("GA382021-营业网点")
-    private AppGa38RateVo banking2021;
-
-    @ApiModelProperty("GA382021-离行")
-    private AppGa38RateVo offlineATM2021;
-
-    @ApiModelProperty("GA382015-营业网点")
-    private AppGa38RateVo banking2015;
-
-    @ApiModelProperty("GA382015-离行")
-    private AppGa38RateVo offlineATM2015;
+//    @ApiModelProperty("GA382021-营业网点")
+//    private AppGa38RateVo banking2021;
+//
+//    @ApiModelProperty("GA382021-离行")
+//    private AppGa38RateVo offlineATM2021;
+//
+//    @ApiModelProperty("GA382015-营业网点")
+//    private AppGa38RateVo banking2015;
+//
+//    @ApiModelProperty("GA382015-离行")
+//
+//    private AppGa38RateVo offlineATM2015;
+
+    private AppGa38RateVo onlineGa38;
+    private AppGa38RateVo offlineGa38;
+     private AppGa38RateVo bankingGa38;
 
     @ApiModelProperty("网点业务库总览(一、二、三、四类库)")
     private Map<String,Integer> businessStoreInfo;

+ 10 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/vo/app/AppGa38RateVo.java

@@ -1,6 +1,7 @@
 package com.xunmei.core.board.vo.app;
 
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -8,7 +9,13 @@ import lombok.Data;
  */
 @Data
 public class AppGa38RateVo {
-    private  Integer total;
-
-    private float rate;
+//    private  Integer total;
+//
+//    private float rate;
+    @ApiModelProperty("ga382015")
+    private int ga382015;
+    @ApiModelProperty("ga382021")
+    private int ga382021;
+    @ApiModelProperty("未达标")
+    private int notreach;
 }

+ 24 - 9
soc-modules/soc-modules-core/src/main/resources/mapper/board/AppCockpitMapper.xml

@@ -111,11 +111,14 @@
         SELECT count(0)                                              as total,
                sum(if(oh.org_id is null, 1, 0))                      as unreachedCount,
                sum(if(o.type = 4, 1, 0))                             as bankingCount,
+               sum(if(o.type = 4 and oe.self_service_bank=1, 1, 0))  as onlineATMCount,
                sum(if(o.type = 5, 1, 0))                             as offATMCount,
-               sum(if(o.type = 4, oh.ga382021, 0)) as bankingGA382021,
-               sum(if(o.type = 4, oh.ga382015, 0)) as bankingGA382015,
-               sum(if(o.type = 5, oh.ga382021, 0)) as offATMGA382021,
-               sum(if(o.type = 5, oh.ga382015 , 0)) as offATMGA382015,
+               sum(if(o.type = 4 and oh.banking2021>0 and oh.banking2021 is not null, 1, 0)) as bankingGA382021,
+               sum(if(o.type = 4 and oh.banking2015>0 and oh.banking2015 is not null,1, 0)) as bankingGA382015,
+               sum(if(o.type = 4 and oe.self_service_bank=1 and oh.online2021>0 and oh.online2021 is not null,1, 0)) as onlineGA382021,
+               sum(if(o.type = 4 and oe.self_service_bank=1 and oh.online2015>0 and oh.online2015 is not null,1, 0)) as onlineGA382015,
+               sum(if(o.type = 5 and oh.offline2021>0 and oh.offline2021 is not null,1, 0)) as offATMGA382021,
+               sum(if(o.type = 5 and oh.offline2015>0 and oh.offline2015 is not null,1 , 0)) as offATMGA382015,
                sum(oe.business_library_type = 1)           as businessLibraryOne,
                sum(oe.business_library_type = 2)           as businessLibraryTwo,
                sum(oe.business_library_type = 3)           as businessLibraryThree,
@@ -126,13 +129,25 @@
                sum(if(o.type = 5, oe.lobby_equipment,0))    as offATMObbyDeviceCount,
                sum(if(o.type = 5, oe.wall_penetrating_equipment,0))     as offATMWallDeviceCount
         FROM sys_org o
-                 LEFT JOIN (SELECT org_id,
-                                   sum(standard = 1) AS ga382021,
-                                   sum(standard = 2) AS ga382015
+                 LEFT JOIN (select org_id,
+                                   banking2021,
+                                   if(banking2015>0 and banking2021=0,1,0) as banking2015,
+                                   if(online2021 >0 or banking2021>0 ,1,0) as online2021,
+                                   if((online2015>0 or banking2015>0) and online2021=0 and banking2021=0 ,1,0) as  online2015,
+                                   offline2021,
+                                   if(offline2015>0 and offline2021=0,1,0) as offline2015
+                            from (
+                        SELECT org_id,
+                                   sum(type=1 and standard = 1) banking2021,
+                                   sum(type=1 and standard = 2) banking2015,
+                                   sum(type=2 and standard = 1) online2021,
+                                   sum(type=2 and standard = 2) online2015,
+                                   sum(type=3 and standard = 1) offline2021,
+                                   sum(type=3 and standard = 2) offline2015
                             FROM sys_org_physical_defense_construction
-                            WHERE type = 1
+                            WHERE type = 1 or type=2
                                OR type = 3
-                            GROUP BY org_id) oh ON o.id = oh.org_id
+                            GROUP BY org_id) t1) oh ON o.id = oh.org_id
                  LEFT JOIN sys_org_extend oe on o.id = oe.org_id
         WHERE o.deleted = 0
           and o.is_lock = 0

+ 1 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/board/CockpitMapper.xml

@@ -113,6 +113,7 @@
         #{startDate} >= r.start_date
         and #{endDate}  <![CDATA[<=]]> r.end_date
         ))
+
         and org_path like concat(#{orgPath},'%')
         GROUP BY
         org_id,org_path