Procházet zdrojové kódy

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

zhulu před 1 rokem
rodič
revize
17c64be681

+ 30 - 13
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/board/mapper/AppCockpitMapper.java

@@ -5,12 +5,14 @@ import com.xunmei.core.board.dto.app.*;
 import com.xunmei.core.board.vo.app.AppOverviewVo;
 import com.xunmei.core.board.vo.app.AppSyntheticInOutVo;
 import org.apache.ibatis.annotations.Param;
-import  java.util.Date;
+
+import java.util.Date;
 import java.util.List;
 
 public interface AppCockpitMapper extends BaseMapper {
     /**
      * 总览-机构信息
+     *
      * @param orgId
      * @return
      */
@@ -18,6 +20,7 @@ public interface AppCockpitMapper extends BaseMapper {
 
     /**
      * 总览-GA38达标数
+     *
      * @param orgPath
      * @param date
      * @return
@@ -26,51 +29,57 @@ public interface AppCockpitMapper extends BaseMapper {
 
     /**
      * 履职本周期、上周期完成情况
+     *
      * @param orgPath
      * @param date
      * @param prevDate
      * @return
      */
-    AppOverviewTaskInfoDto selectOverViewResumptionTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date,@Param("prevdate") Date prevDate);
+    AppOverviewTaskInfoDto selectOverViewResumptionTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date, @Param("prevdate") Date prevDate);
 
     /**
      * 安全检查本周期、上周期完成情况
+     *
      * @param orgPath
      * @param date
      * @param prevDate
      * @return
      */
-    AppOverviewTaskInfoDto selectOverViewSafetyCheckTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date,@Param("prevdate") Date prevDate);
+    AppOverviewTaskInfoDto selectOverViewSafetyCheckTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date, @Param("prevdate") Date prevDate);
 
     /**
      * 教育本周期、上周期完成情况
+     *
      * @param orgPath
      * @param date
      * @param prevDate
      * @return
      */
-    AppOverviewTaskInfoDto selectOverViewEduTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date,@Param("prevdate") Date prevDate);
+    AppOverviewTaskInfoDto selectOverViewEduTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date, @Param("end") Date end, @Param("prevdate") Date prevDate);
 
     /**
      * 预案演练本周期、上周期完成情况
+     *
      * @param orgPath
      * @param date
      * @param prevDate
      * @return
      */
-    AppOverviewTaskInfoDto selectOverViewDrillTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date,@Param("prevdate") Date prevDate);
+    AppOverviewTaskInfoDto selectOverViewDrillTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date, @Param("end") Date end, @Param("prevdate") Date prevDate);
 
     /**
      * 教育本周期、上周期完成情况
+     *
      * @param orgPath
      * @param date
      * @param prevDate
      * @return
      */
-    AppOverviewTaskInfoDto selectOverViewMonitorTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date,@Param("prevdate") Date prevDate);
+    AppOverviewTaskInfoDto selectOverViewMonitorTaskInfo(@Param("orgPath") String orgPath, @Param("date") Date date, @Param("end") Date end, @Param("prevdate") Date prevDate);
 
     /**
      * 问题整改情况
+     *
      * @param orgPath
      * @param date
      * @return
@@ -79,6 +88,7 @@ public interface AppCockpitMapper extends BaseMapper {
 
     /**
      * 获取机构(暂时只查营业网点、离行)基础信息
+     *
      * @param orgPath
      * @return
      */
@@ -86,68 +96,75 @@ public interface AppCockpitMapper extends BaseMapper {
 
     /**
      * 综合数据-履职
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-    List<AppSyntheticTaskCategoryDto> selectSyntheticResumption (@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    List<AppSyntheticTaskCategoryDto> selectSyntheticResumption(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
      * 综合数据-安全检查
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-    List<AppSyntheticTaskCategoryDto> selectSyntheticSafetyCheck (@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    List<AppSyntheticTaskCategoryDto> selectSyntheticSafetyCheck(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
      * 综合数据-预案演练
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-     AppSyntheticTaskCategoryDto selectSyntheticDrill (@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    AppSyntheticTaskCategoryDto selectSyntheticDrill(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
-     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
     AppSyntheticQuestionDto selectSyntheticQuestion(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
+
     /**
      * 获取逾期未整改数量
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-    int selectOverDueQuestionCount(@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    int selectOverDueQuestionCount(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
      * 综合数据-教育培训
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-    AppSyntheticTaskCategoryDto  selectSyntheticEdu(@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    AppSyntheticTaskCategoryDto selectSyntheticEdu(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
      * 综合数据-监控调阅
+     *
      * @param orgPath
      * @param startDate
      * @param endDate
      * @return
      */
-    AppSyntheticTaskCategoryDto  selectSyntheticMonitor(@Param("orgPath") String orgPath,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    AppSyntheticTaskCategoryDto selectSyntheticMonitor(@Param("orgPath") String orgPath, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
 
     /**
      * 综合数据-出入管理
+     *
      * @param orgPath
      * @param startDate
      * @param endDate

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

@@ -175,6 +175,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
         AppOverviewVo vo = new AppOverviewVo();
 
         Date currentMonth = DateUtil.beginOfMonth(new Date());
+        Date currentMonthEnd= DateUtil.endOfMonth(new Date());
         Date prevMonth = DateUtil.beginOfMonth(new Date()).offset(DateField.MONTH, -1);
 
         CompletableFuture<AppOverviewVo> orgOverview = CompletableFuture.supplyAsync(() -> {
@@ -221,7 +222,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
 
         CompletableFuture<AppOverviewTaskInfoDto> edu = CompletableFuture.supplyAsync(() ->
                 {
-                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewEduTaskInfo(org.getPath(), currentMonth, prevMonth);
+                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewEduTaskInfo(org.getPath(), currentMonth,currentMonthEnd, prevMonth);
                     if (ObjectUtil.isNull(result)) {
                         result = new AppOverviewTaskInfoDto();
                     }
@@ -232,7 +233,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
 
         CompletableFuture<AppOverviewTaskInfoDto> monitor = CompletableFuture.supplyAsync(() ->
                 {
-                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewMonitorTaskInfo(org.getPath(), currentMonth, prevMonth);
+                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewMonitorTaskInfo(org.getPath(), currentMonth,currentMonthEnd, prevMonth);
                     if (ObjectUtil.isNull(result)) {
                         result = new AppOverviewTaskInfoDto();
                     }
@@ -242,10 +243,11 @@ public class AppCockpitServiceImpl implements AppCockpitService {
         );
 
         Date currentQuarter = DateUtil.beginOfQuarter(new Date());
+        Date currentQuarterEnd = DateUtil.endOfQuarter(new Date());
         Date prevQuarter = DateUtil.beginOfMonth(currentQuarter).offset(DateField.MONTH, -3);
         CompletableFuture<AppOverviewTaskInfoDto> drill = CompletableFuture.supplyAsync(() ->
                 {
-                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewDrillTaskInfo(org.getPath(), currentQuarter, prevQuarter);
+                    AppOverviewTaskInfoDto result = appCockpitMapper.selectOverViewDrillTaskInfo(org.getPath(), currentQuarter,currentQuarterEnd, prevQuarter);
                     if (ObjectUtil.isNull(result)) {
                         result = new AppOverviewTaskInfoDto();
                     }

+ 0 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/service/impl/CoreMessageCenterServiceImpl.java

@@ -97,7 +97,6 @@ public class CoreMessageCenterServiceImpl extends ServiceImpl<CoreMessageCenterM
         Integer integer1 = baseMapper.selectNoRead(userId);
         //通知
         LoginUser loginUser = SecurityUtils.getLoginUser();
-        SysOrg sysOrg = remoteOrgService.selectSysOrgById(loginUser.getOrgId(), SecurityConstants.INNER);
         List<SysRole> roleByUserId = remoteRoleService.getRoleByUserId(loginUser.getUserid(), SecurityConstants.INNER);
         List<Long> collect = roleByUserId.stream().map(SysRole::getId).collect(Collectors.toList());
         Long[] roles;

+ 8 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/controller/SafetyInspectReportController.java

@@ -62,9 +62,14 @@ public class SafetyInspectReportController {
     public AjaxResult selfInspectList(SafetyInspectDTO safetyInspectDTO) {
         AjaxResult ajax = AjaxResult.success();
      if (null== safetyInspectDTO.getYear()){
-         safetyInspectDTO.setCycle(1);
-         LocalDate localDate= LocalDate.now();
-         safetyInspectDTO.setYear(localDate.getYear()+"-"+  localDate.getMonthValue());
+         if (safetyInspectDTO==null||safetyInspectDTO.getCycle()==1){
+             safetyInspectDTO.setCycle(1);
+             LocalDate localDate= LocalDate.now();
+             safetyInspectDTO.setYear(localDate.getYear()+"-"+  localDate.getMonthValue());
+         }else {
+             LocalDate localDate= LocalDate.now();
+             safetyInspectDTO.setYear(localDate.getYear()+"");
+         }
      }
         List<SelfInspectVO> report = safetyInspectService.selfInspectReport(safetyInspectDTO);
         ajax.put(AjaxResult.DATA_TAG, report);

+ 35 - 31
soc-modules/soc-modules-core/src/main/resources/mapper/board/AppCockpitMapper.xml

@@ -46,13 +46,14 @@
           and o.path like concat(#{orgPath}, '%')
     </select>
     <select id="selectOverViewResumptionTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
-        SELECT sum(if(ymd_date >= #{date}, 1, 0))                          as total,
-               sum(if(ymd_date >= #{date}, (if(`status` = 3, 1, 0)), 0))   as completed,
-               sum(if(ymd_date &lt; #{date}, 1, 0))                        as prevTotal,
-               sum(if(ymd_date &lt; #{date}, (if(`status` = 3, 1, 0)), 0)) as prevcompleted
-        FROM core_resumption
-        WHERE ymd_date >= #{prevdate}
-          and org_path like concat(#{orgPath}, '%')
+        SELECT sum(if(t.ymd_date >= #{date}, 1, 0))                          as total,
+               sum(if(t.ymd_date >= #{date}, (if(t.`status` = 3, 1, 0)), 0))   as completed,
+               sum(if(t.ymd_date &lt; #{date}, 1, 0))                        as prevTotal,
+               sum(if(t.ymd_date &lt; #{date}, (if(t.`status` = 3, 1, 0)), 0)) as prevcompleted
+        FROM core_resumption t
+        inner join core_resumption_plan p on t.plan_id=p.id and p.plan_cycle &lt; 5
+        WHERE t.ymd_date >= #{prevdate}
+          and t.org_path like concat(#{orgPath}, '%')
     </select>
 
     <select id="selectOverViewSafetyCheckTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
@@ -61,39 +62,42 @@
                sum(if(t.ymd_date &lt; #{date}, 1, 0))                          as prevTotal,
                sum(if(t.ymd_date &lt; #{date}, (if(t.`status` = 3, 1, 0)), 0)) as prevcompleted
         FROM core_safety_task t
-                 INNER JOIN core_safecheck_plan p on t.plan_id = p.id and p.check_type = 3
+        INNER JOIN core_safecheck_plan p on t.plan_id = p.id and p.check_type = 3
         WHERE ymd_date >= #{prevdate}
           and org_path like concat(#{orgPath}, '%')
     </select>
 
     <select id="selectOverViewEduTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
-        SELECT sum(if(start_date >= #{date}, 1, 0))                          as total,
-               sum(if(start_date >= #{date}, (if(`status` = 2, 1, 0)), 0))   as completed,
-               sum(if(start_date &lt; #{date}, 1, 0))                        as prevTotal,
-               sum(if(start_date &lt; #{date}, (if(`status` = 2, 1, 0)), 0)) as prevcompleted
-        FROM core_edu_training_task
-        WHERE start_date >= #{prevdate}
-          and org_path like concat(#{orgPath}, '%')
+        SELECT sum(if(t.start_date >= #{date}, 1, 0))                          as total,
+               sum(if(t.start_date >= #{date} and t.`status` = 2, 1,  0))   as completed,
+               sum(if(t.start_date &lt; #{date}, 1, 0))                        as prevTotal,
+               sum(if(t.start_date &lt; #{date} and t.`status` = 2, 1, 0)) as prevcompleted
+        FROM core_edu_training_task t
+        inner join core_edu_training_plan p on t.plan_id =p.id and p.plan_cycle &lt; 4
+        WHERE t.start_date >= #{prevdate} and t.start_date &lt;=#{end}
+          and t.org_path like concat(#{orgPath}, '%')
     </select>
 
     <select id="selectOverViewDrillTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
-        SELECT sum(if(start_date >= #{date}, 1, 0))                          as total,
-               sum(if(start_date >= #{date}, (if(`status` = 4, 1, 0)), 0))   as completed,
-               sum(if(start_date &lt; #{date}, 1, 0))                        as prevTotal,
-               sum(if(start_date &lt; #{date}, (if(`status` = 4, 1, 0)), 0)) as prevcompleted
-        FROM core_drill_task
-        WHERE start_date >= #{prevdate}
-          and org_path like concat(#{orgPath}, '%')
+        SELECT sum(if(t.start_date >= #{date}, 1, 0))                          as total,
+               sum(if(t.start_date >= #{date}, (if(t.`status` = 4, 1, 0)), 0))   as completed,
+               sum(if(t.start_date &lt; #{date}, 1, 0))                        as prevTotal,
+               sum(if(t.start_date &lt; #{date}, (if(t.`status` = 4, 1, 0)), 0)) as prevcompleted
+        FROM core_drill_task t
+        inner join core_drill_plan p on t.plan_id=p.id and p.plan_cycle &lt; 5
+        WHERE t.start_date >= #{prevdate}  and t.start_date &lt;=#{end}
+          and t.org_path like concat(#{orgPath}, '%')
     </select>
 
     <select id="selectOverViewMonitorTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
-        SELECT sum(if(ymd_date >= #{date}, 1, 0))                          as total,
-               sum(if(ymd_date >= #{date}, (if(`status` = 2, 1, 0)), 0))   as completed,
-               sum(if(ymd_date &lt; #{date}, 1, 0))                        as prevTotal,
-               sum(if(ymd_date &lt; #{date}, (if(`status` = 2, 1, 0)), 0)) as prevcompleted
-        FROM core_monitoring_retrieval_task
-        WHERE ymd_date >= #{prevdate}
-          and org_path like concat(#{orgPath}, '%')
+        SELECT sum(if(t.ymd_date >= #{date}, 1, 0))                          as total,
+               sum(if(t.ymd_date >= #{date} and t.`status` = 2, 1, 0))   as completed,
+               sum(if(t.ymd_date &lt; #{date}, 1, 0))                        as prevTotal,
+               sum(if(t.ymd_date &lt; #{date} and t.`status` = 2, 1,  0)) as prevcompleted
+        FROM core_monitoring_retrieval_task t
+        inner join core_monitoring_retrieval_plan p on t.plan_id =p.id and p.plan_cycle &lt; 4
+        WHERE t.ymd_date >= #{prevdate} and t.ymd_date &lt; #{end}
+          and t.org_path like concat(#{orgPath}, '%')
     </select>
     <select id="selectOverViewQuestionInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
         SELECT sum(if(confirm_status >= 2, 1, 0)) as total,
@@ -132,7 +136,7 @@
                  LEFT JOIN sys_org_extend oe on o.id = oe.org_id
         WHERE o.deleted = 0
           and o.is_lock = 0
-          and path like concat(#{orgPath}, '%')
+          and o.path like concat(#{orgPath}, '%')
           AND ( o.type = 4
                 OR o.type = 5)
     </select>
@@ -144,7 +148,7 @@
                            (r.STATUS = 3, 1, 0)) AS completed,
                sum(r.exception_count)            AS exceptionCount
         FROM core_resumption r
-                 INNER JOIN core_resumption_plan p ON r.plan_id = p.id
+        INNER JOIN core_resumption_plan p ON r.plan_id = p.id
         WHERE r.ymd_date BETWEEN #{startDate}
             AND #{endDate}
           AND r.org_path LIKE CONCAT(#{orgPath}, '%')

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

@@ -9,10 +9,10 @@
         SUM( CASE `status` WHEN 3 THEN 1 ELSE 0 END ) AS completed_count
         FROM
         core_resumption r
+        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}) or (plan_start_time&lt;=#{startDate} and
-        plan_end_time>=#{startDate}))
+        (plan_start_time >= #{startDate} and plan_end_time&lt;=#{endDate})
         and org_path like concat(#{orgPath},'%')
         GROUP BY org_id,org_path
     </select>

+ 4 - 3
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -13,8 +13,6 @@ import com.xunmei.system.api.domain.SafeCheckTaskRegisterBookVo;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StringEscapeUtils;
 import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.Resource;
 
@@ -22,8 +20,8 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.util.*;
 import java.util.List;
+import java.util.*;
 
 @Slf4j
 public class PdfUtil {
@@ -573,6 +571,9 @@ public class PdfUtil {
         }
         for (int i = 1; i <= data.getCheckDatas().size(); i++) {
             final CheckDataVo checkDataVo = data.getCheckDatas().get(i - 1);
+            if (ObjectUtil.isEmpty(checkDataVo.getResRemark())) {
+                continue;
+            }
             PdfUtil.createPDFCell(tableFont, table, String.valueOf(i), Element.ALIGN_MIDDLE, 2, 1);
             PdfUtil.createPDFCell(tableFont, table, checkDataVo.getItemName(), Element.ALIGN_MIDDLE, 6, 1);
             PdfUtil.createPDFCell(tableFont, table, checkDataVo.getResRemark(), Element.ALIGN_MIDDLE, 6, 1);

+ 2 - 2
soc-modules/soc-modules-gen/src/main/resources/bootstrap.yml

@@ -13,11 +13,11 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
+        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
         # 服务注册地址
         server-addr: 10.87.10.54:8848
       config:
-        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
+        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式