소스 검색

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc into V0.0.5

zhulu 1 년 전
부모
커밋
df27e0b121

+ 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达标数量")

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/mapper/CockpitMapper.java

@@ -45,7 +45,7 @@ public interface CockpitMapper extends BaseMapper {
      * @param startDate
      * @return
      */
-    Map<String,Long> selectOverDueQuestionCount(@Param("orgPath") String orgPath, @Param("startDate") Date startDate);
+    Map<String,Object> selectOverDueQuestionCount(@Param("orgPath") String orgPath, @Param("startDate") Date startDate,@Param("endDate") Date endDate);
 
 }
 

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

@@ -106,7 +106,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
             }
         });
 
-        return r;
+        return r.stream().limit(10).collect(Collectors.toList());
     }
 
     /**
@@ -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());

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

@@ -25,6 +25,7 @@ import org.apache.http.annotation.Obsolete;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -114,7 +115,12 @@ public class CockpitServiceImpl implements CockpitService {
         SysOrg org = getOrgThrowIfNull(dto.getOrgId());
         String orgPath = org.getPath();
         List<TaskStatisticVo> list = cockpitMapper.edu(date, DateUtil.endOfDay(new Date()), orgPath);
-        return taskStatistic(list, dto.getOrgId());
+        list= taskStatistic(list, dto.getOrgId());
+
+        list.sort(Comparator.comparing(TaskStatisticVo::getCompletedRate));
+        Collections.reverse(list);
+
+        return list;
     }
 
     @Override
@@ -134,6 +140,9 @@ public class CockpitServiceImpl implements CockpitService {
             return vo;
         }).collect(Collectors.toList());
 
+        r.sort(Comparator.comparing(WebDrillInfoVo::getCompletedRate));
+        Collections.reverse(r);
+
         return r;
     }
 
@@ -168,6 +177,9 @@ public class CockpitServiceImpl implements CockpitService {
             }
         });
 
+        r.sort(Comparator.comparing(OrgGA38StatisticVo::getReachRate));
+        Collections.reverse(r);
+
         return r;
     }
 
@@ -224,13 +236,13 @@ public class CockpitServiceImpl implements CockpitService {
     @Override
     public QuestionStatisticVo question(TaskStatisticDto dto) {
         SysOrg org = getOrgThrowIfNull(dto.getOrgId());
-        Date date = getStartDate(dto.getPeriod());
+        DateRange range = getStartAndEnd(dto.getPeriod());
 
-        WebSyntheticQuestionDto questionDto = cockpitMapper.selectQuestion(org.getPath(), date);
+        WebSyntheticQuestionDto questionDto = cockpitMapper.selectQuestion(org.getPath(), range.getStartTime());
         if (ObjectUtil.isNull(questionDto)) {
             questionDto = new WebSyntheticQuestionDto();
         }
-        Map<String, Long> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), date);
+        Map<String, Object> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), range.getStartTime(),range.getEndTime());
 
         QuestionStatisticVo vo = new QuestionStatisticVo();
         vo.setTotal(questionDto.getTotal());
@@ -241,11 +253,11 @@ public class CockpitServiceImpl implements CockpitService {
         vo.setReformed(NumberUtils.computeRate(questionDto.getTotal(), questionDto.getReformedCount()));
 
         if (overdueCount.size() > 0) {
-            Long count = overdueCount.get("count");
-            Long overdue = overdueCount.get("overdueCount");
-            vo.setClosed(NumberUtils.computeRate(count.intValue(), overdue.intValue()));
+            Long count =(Long) overdueCount.get("count");
+            BigDecimal overdue = (BigDecimal)overdueCount.get("overdueCount");
+            vo.setOverdue(NumberUtils.computeRate(count.intValue(), overdue.intValue()));
         } else {
-            vo.setClosed(1f);
+            vo.setOverdue(1f);
         }
 
         return vo;
@@ -270,6 +282,9 @@ public class CockpitServiceImpl implements CockpitService {
             }
         });
 
+        r.sort(Comparator.comparing(TaskStatisticVo::getCompletedRate));
+        Collections.reverse(r);
+
         return r;
     }
 
@@ -289,14 +304,15 @@ public class CockpitServiceImpl implements CockpitService {
         }
     }
 
-//    private DateRange getStartAndEnd(Integer period) {
-//        Date start = getStartDate(period);
-//        Date end = DateUtil.endOfDay(new Date());
-//        return new DateRange(start, end);
-//    }
+    private DateRange getStartAndEnd(Integer period) {
+        Date start = getStartDate(period);
+        Date end = DateUtil.endOfDay(new Date());
+        return new DateRange(start, end);
+    }
 
     private List<TaskStatisticVo> getTaskChildren(Long orgId) {
         List<SysOrg> children = remoteOrgService.selectChildrenFromDb(orgId, SecurityConstants.INNER);
+//        children.sort(Comparator.comparing(SysOrg::getSort));
         List<TaskStatisticVo> list = new ArrayList<>();
 
         for (SysOrg child : children) {

+ 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;
 }

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/domain/Question.java

@@ -143,7 +143,7 @@ public class Question extends BaseEntity {
     @ApiModelProperty(value = "整改状态。10未整改,11已整改")
     private Integer reformStatus;
 
-    @ApiModelProperty(value = "逾期状态值")
+    @ApiModelProperty(value = "逾期状态值,1:已逾期")
     @TableField(exist = false)
     private Integer overdueStatus;
 

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/AppQuestionServiceImpl.java

@@ -88,7 +88,7 @@ public class AppQuestionServiceImpl extends ServiceImpl<QuestionMapper, Question
             if (ObjectUtil.notEqual(r.getConfirmStatus(), QuestionConfirmEnum.Closed.getValue()) &&
                     r.getReformDeadline().before(DateUtil.beginOfDay(new Date()))) {
                 //任务未结束并且过了整改结束日期
-                r.setOverdueStatus(QuestionConfirmEnum.OverDue.getValue());
+                r.setOverdueStatus(QuestionReformEnum.OverDue.getValue());
             }
         });
 //        Page<QuestionPageDto> r =page.

+ 13 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/QuestionServiceImpl.java

@@ -93,9 +93,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         //获取数据
         page = baseMapper.pageQuestion(page, query, DateUtil.beginOfDay(new Date()));
         page.getRecords().forEach(r -> {
-            if (ObjectUtil.notEqual(r.getConfirmStatus(), QuestionConfirmEnum.Closed.getValue()) &&
-                    r.getReformDeadline().before(DateUtil.beginOfDay(new Date()))) {
-                //任务未结束并且过了整改结束日期
+            if(isOverdue(r)){
                 r.setOverdueStatus(QuestionConfirmEnum.OverDue.getValue());
             }
         });
@@ -136,10 +134,21 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     .stream().map(i -> i.getImgPath()).collect(Collectors.toList());
             vo.setImages(images);
         }
-
+        if(isOverdue(q)){
+            vo.setOverdueStatus(QuestionReformEnum.OverDue.getValue());
+        }
         return vo;
     }
 
+    private boolean isOverdue(Question q){
+        if (ObjectUtil.notEqual(q.getConfirmStatus(), QuestionConfirmEnum.Closed.getValue()) &&
+                q.getReformDeadline().before(DateUtil.beginOfDay(new Date()))) {
+            //任务未结束并且过了整改结束日期
+            return true;
+        }else{
+            return  false;
+        }
+    }
     /**
      * 新增隐患问题清单
      *

+ 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

+ 57 - 16
soc-modules/soc-modules-core/src/main/resources/mapper/board/CockpitMapper.xml

@@ -12,7 +12,18 @@
         inner join  core_resumption_plan p on r.plan_id=p.id and p.plan_cycle &lt; 5
         <!--                INNER  join ( SELECT id,path FROM sys_org WHERE path LIKE CONCAT(( SELECT path FROM sys_org WHERE id =#{orgId}), '%' ) AND deleted = 0 ) o on r.org_Id=o.id-->
         WHERE
-        (plan_start_time >= #{startDate} and plan_end_time&lt;=#{endDate})
+        ((
+        #{startDate}   <![CDATA[<=]]> r.plan_start_time
+        and #{endDate} >= r.plan_start_time
+        )
+        or (
+        #{startDate}    <![CDATA[<=]]> r.plan_end_time
+        and #{endDate} >= r.plan_end_time
+        )
+        or (
+        #{startDate} >= r.plan_start_time
+        and #{endDate}  <![CDATA[<=]]> r.plan_end_time
+        ))
         and org_path like concat(#{orgPath},'%')
         GROUP BY org_id,org_path
     </select>
@@ -37,7 +48,7 @@
                count(0)                      as total,
                sum(if(t.`status` = 3, 1, 0)) as completed
         FROM core_safety_task t
-                 INNER JOIN core_safecheck_plan p on t.plan_id = p.id
+        INNER JOIN core_safecheck_plan p on t.plan_id = p.id
         where t.org_path like concat(#{orgPath}, '%')
           and ((
                            #{startDate}   <![CDATA[<=]]> t.plan_start_time
@@ -64,8 +75,18 @@
         core_monitoring_retrieval_task r
         <!--                INNER  join ( SELECT id,path FROM sys_org WHERE path LIKE CONCAT(( SELECT path FROM sys_org WHERE id =#{orgId}), '%' ) AND deleted = 0 ) o on r.org_Id=o.id-->
         WHERE
-        ((plan_start_time >= #{startDate} and plan_end_time&lt;=#{endDate}) or (plan_start_time&lt;=#{startDate} and
-        plan_end_time>=#{startDate}))
+        ((
+        #{startDate}   <![CDATA[<=]]> r.plan_start_time
+        and #{endDate} >= r.plan_start_time
+        )
+        or (
+        #{startDate}    <![CDATA[<=]]> r.plan_end_time
+        and #{endDate} >= r.plan_end_time
+        )
+        or (
+        #{startDate} >= r.plan_start_time
+        and #{endDate}  <![CDATA[<=]]> r.plan_end_time
+        ))
         and org_path like concat(#{orgPath},'%')
         GROUP BY
         org_id,org_path
@@ -75,13 +96,24 @@
         org_id,
         org_path,
         count( 0 ) AS task_total,
-        SUM( CASE `status` WHEN 4 THEN 1 ELSE 0 END ) AS completed_count
+        SUM( CASE `status` WHEN 2 THEN 1 ELSE 0 END ) AS completed_count
         FROM
         core_edu_training_task r
         <!--                INNER  join ( SELECT id,path FROM sys_org WHERE path LIKE CONCAT(( SELECT path FROM sys_org WHERE id =#{orgId}), '%' ) AND deleted = 0 ) o on r.org_Id=o.id-->
         WHERE
-        ((start_date >= #{startDate} and end_date&lt;=#{endDate}) or (start_date&lt;=#{startDate} and
-        end_date>=#{startDate}))
+         ((
+        #{startDate}   <![CDATA[<=]]> r.start_date
+        and #{endDate} >= r.start_date
+        )
+        or (
+        #{startDate}    <![CDATA[<=]]> r.end_date
+        and #{endDate} >= r.end_date
+        )
+        or (
+        #{startDate} >= r.start_date
+        and #{endDate}  <![CDATA[<=]]> r.end_date
+        ))
+
         and org_path like concat(#{orgPath},'%')
         GROUP BY
         org_id,org_path
@@ -91,13 +123,23 @@
         org_id,
         org_path,
         count( 0 ) AS task_total,
-        SUM( CASE `status` WHEN 4 THEN 1 ELSE 0 END ) AS completed_count
+        SUM( CASE `status` WHEN 3 THEN 1 ELSE 0 END ) AS completed_count
         FROM
         core_drill_task r
         <!--                INNER  join ( SELECT id,path FROM sys_org WHERE path LIKE CONCAT(( SELECT path FROM sys_org WHERE id =#{orgId}), '%' ) AND deleted = 0 ) o on r.org_Id=o.id-->
         WHERE
-        ((start_date >= #{startDate} and end_date&lt;=#{endDate}) or (start_date&lt;=#{startDate} and
-        end_date>=#{startDate}))
+        ((
+        #{startDate}   <![CDATA[<=]]> r.start_date
+        and #{endDate} >= r.start_date
+        )
+        or (
+        #{startDate}    <![CDATA[<=]]> r.end_date
+        and #{endDate} >= r.end_date
+        )
+        or (
+        #{startDate} >= r.start_date
+        and #{endDate}  <![CDATA[<=]]> r.end_date
+        ))
         and org_path like concat(#{orgPath},'%')
         GROUP BY
         org_id,org_path
@@ -111,9 +153,9 @@
         from sys_org o
                  LEFT JOIN (SELECT org_id,
                                    sum(standard = 1)                                                 AS ga382021,
-                                   sum(IF(standard = 1, IF(date_of_compliance >= #{date}, 1, 0), 0)) AS ga382021current,
+                                   sum(IF(standard = 1 and date_of_compliance >= #{date}, 1,0)) AS ga382021current,
                                    sum(standard = 2)                                                 AS ga382015,
-                                   sum(IF(standard = 2, IF(date_of_compliance >= #{date}, 1, 0), 0)) AS ga382015current
+                                   sum(IF(standard = 2 and date_of_compliance >= #{date}, 1, 0)) AS ga382015current
                             FROM sys_org_physical_defense_construction
                             WHERE type = 1
                                OR type = 3
@@ -136,7 +178,7 @@
     </select>
     <select id="orgSecurityInfo" resultType="com.xunmei.core.board.vo.web.OrgSecurityInfoVo">
         select sum(if(oe.askari = 1, 1, 0))  as equippedCount,
-               sum(if(oe.askari != 1, 1, 0)) as unequippedCount
+               sum(if(oe.askari != 1 || oe.askari is null, 1, 0)) as unequippedCount
         from sys_org o
                  LEFT JOIN sys_org_extend oe on o.id = oe.org_id
         WHERE o.deleted = 0
@@ -172,7 +214,7 @@
         SELECT count(0)                                  as total,
                sum(
                        IF
-                           (q.confirm_status = 0, 1, 0)) AS confirmedCount,
+                           (q.confirm_status = 0, 1, 0)) AS unconfirmedCount,
                sum(qf.count)                             AS dissentCount,
                sum(
                        IF
@@ -194,8 +236,7 @@
     </select>
     <select id="selectOverDueQuestionCount" resultType="Map">
         SELECT count(0)                                              as count,
-               if(reform_status != 11 and confirm_status != 3, 1, 0) as overdueCount
+               sum(if(reform_status != 11 and confirm_status != 3 and reform_deadline >= #{startDate} and reform_deadline &lt;=#{endDate}, 1, 0)) as overdueCount
         FROM core_question
-        WHERE reform_deadline >= #{startDate}
     </select>
 </mapper>

+ 1 - 1
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/LocalSysFileServiceImpl.java

@@ -319,7 +319,7 @@ public class LocalSysFileServiceImpl implements ISysFileService {
         String checkTime = data.getTaskStartTime();
         String checkUser = data.getCheckUser();
 
-        Font titleFont = new Font(fs, 8, Font.NORMAL);
+        Font titleFont = new Font(fs, 10, Font.NORMAL);
         PdfUtil.createPDFCell(titleFont, table, "调阅单位", Element.ALIGN_MIDDLE, 10, 0);
         PdfUtil.createPDFCell(titleFont, table, data.getOrgName(), Element.ALIGN_MIDDLE, 13, 0);
         PdfUtil.createPDFCell(titleFont, table, "调阅人", Element.ALIGN_MIDDLE, 8, 0);

+ 8 - 9
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -79,11 +79,11 @@ public class PdfUtil {
         if (rowspan != null && rowspan > 0) {
             cell.setRowspan(rowspan);
         }
-       // cell.setPaddingTop(8f);
+        // cell.setPaddingTop(8f);
         cell.setPaddingLeft(8f);
         cell.setPaddingRight(8f);
         cell.setPaddingBottom(8f);
-        cell.setLeading(1F,1.5F);
+        cell.setLeading(1F, 1.5F);
         if (PdfPCell.ALIGN_MIDDLE != align) {
             cell.setHorizontalAlignment(align);
         } else {
@@ -182,7 +182,7 @@ public class PdfUtil {
         createPDFCell(tableFont, table, "总结", Element.ALIGN_MIDDLE, 1, 1);
         createPDFCell(tableFont, table, data.get("note").toString(), Element.ALIGN_LEFT, 5, 1);
         createPDFCell(tableFont, table, "参会人员签字", Element.ALIGN_MIDDLE, 1, 1);
-        dealEduImageCell((List<String>) data.get("signImage"), table, 5, 30, 30);
+        dealEduImageCell((List<String>) data.get("signImage"), table, 5, 40, 40);
         document.add(table);
 
         //第二页
@@ -192,7 +192,7 @@ public class PdfUtil {
             PdfPTable innerTable = new PdfPTable(6);
             createPDFCell(tableFont, innerTable, "图片附件", Element.ALIGN_MIDDLE, 1, 1);
             //一行展示一张图片
-            dealEduImageCell(new ArrayList<>(stringList), innerTable, 2, 150, 200);
+            dealEduImageCell(new ArrayList<>(stringList), innerTable, 2, 185, 200);
             document.newPage();
             document.add(innerTable);
         }
@@ -366,7 +366,7 @@ public class PdfUtil {
         createPDFCell(tableFont, table, data.get("comment").toString(), Element.ALIGN_LEFT, 5, 1);
         //参会人员签字
         createPDFCell(tableFont, table, "参会人员签字", Element.ALIGN_MIDDLE, 1, 1);
-        dealEduImageCell((List<String>) data.get("signImage"), table, 5, 30, 30);
+        dealEduImageCell((List<String>) data.get("signImage"), table, 5, 40, 40);
         document.add(table);
 
         //第二页
@@ -375,9 +375,8 @@ public class PdfUtil {
         for (List<String> stringList : listList) {
             PdfPTable innerTable = new PdfPTable(6);
             createPDFCell(tableFont, innerTable, "图片附件", Element.ALIGN_MIDDLE, 1, 1);
-            innerTable.setSpacingBefore(10f);
             //一行展示一张图片
-            dealEduImageCell(new ArrayList<>(stringList), innerTable, 2, 150, 200);
+            dealEduImageCell(new ArrayList<>(stringList), innerTable, 2, 185, 200);
             document.newPage();
             document.add(innerTable);
         }
@@ -433,10 +432,10 @@ public class PdfUtil {
             }
             PdfPCell innerCell = new PdfPCell(imageData);
             innerCell.setNoWrap(false);
-          /*  innerCell.setPaddingTop(8f);
+            innerCell.setPaddingTop(8f);
             innerCell.setPaddingLeft(8f);
             innerCell.setPaddingRight(8f);
-            innerCell.setPaddingBottom(8f);*/
+            innerCell.setPaddingBottom(8f);
 
             innerCell.setBorder(Rectangle.NO_BORDER);
             innerCell.setHorizontalAlignment(Element.ALIGN_CENTER);