Quellcode durchsuchen

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

zhulu vor 1 Jahr
Ursprung
Commit
1841248c81

+ 4 - 0
project_data/sql/0.0.5/quartz/quartz.sql

@@ -0,0 +1,4 @@
+UPDATE sys_job set `status`=0 WHERE job_name='生成每周履职任务';
+UPDATE sys_job set `status`=0 WHERE job_name='生成每月履职任务';
+UPDATE sys_job set `status`=0 WHERE job_name='调阅监控每日每周任务补救';
+-- UPDATE sys_job set `status`=0 WHERE job_name='调阅监控每月季度半年年任务补救接口';

+ 6 - 2
soc-gateway/src/main/java/com/xunmei/gateway/filter/XssFilter.java

@@ -96,8 +96,12 @@ public class XssFilter implements GlobalFilter, Ordered
             @Override
             public HttpHeaders getHeaders()
             {
-                HttpHeaders headers = super.getHeaders();
-                return headers;
+                HttpHeaders httpHeaders = new HttpHeaders();
+                httpHeaders.putAll(super.getHeaders());
+                // 由于修改了请求体的body,导致content-length长度不确定,因此需要删除原先的content-length
+                httpHeaders.remove(HttpHeaders.CONTENT_LENGTH);
+                httpHeaders.set(HttpHeaders.TRANSFER_ENCODING, "chunked");
+                return httpHeaders;
             }
 
         };

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

@@ -59,42 +59,42 @@ public class CockpitServiceImpl implements CockpitService {
         List<SysDictData> dicts = remoteDictDataService.selectDictByeType("check_type", SecurityConstants.INNER);
         dicts.sort(Comparator.comparing(SysDictData::getDictSort));
         List<WebSafetyCheckVo> r = dicts.stream()
-                .filter(d->ObjectUtil.notEqual(d.getDictValue(),"1") && ObjectUtil.notEqual(d.getDictValue(),"2") )
+                .filter(d -> ObjectUtil.notEqual(d.getDictValue(), "1") && ObjectUtil.notEqual(d.getDictValue(), "2"))
                 .map(d -> {
-            Optional<WebSafetyCheckVo> voOpt = list.stream().filter(i -> ObjectUtil.equal(i.getType(), d.getDictValue())).findFirst();
-            WebSafetyCheckVo vo;
-            if (voOpt.isPresent()) {
-                vo = voOpt.get();
-            } else {
-                vo = new WebSafetyCheckVo();
-            }
-            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());
+                    Optional<WebSafetyCheckVo> voOpt = list.stream().filter(i -> ObjectUtil.equal(i.getType(), d.getDictValue())).findFirst();
+                    WebSafetyCheckVo vo;
+                    if (voOpt.isPresent()) {
+                        vo = voOpt.get();
+                    } else {
+                        vo = new WebSafetyCheckVo();
+                    }
+                    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());
 
         return r;
     }
@@ -115,7 +115,7 @@ 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);
-        list= taskStatistic(list, dto.getOrgId());
+        list = taskStatistic(list, dto.getOrgId());
 
         list.sort(Comparator.comparing(TaskStatisticVo::getCompletedRate));
         Collections.reverse(list);
@@ -203,8 +203,14 @@ public class CockpitServiceImpl implements CockpitService {
     public OrgSecurityInfoVo orgSecurityInfo(Long orgId) {
         SysOrg org = getOrgThrowIfNull(orgId);
         OrgSecurityInfoVo vo = cockpitMapper.orgSecurityInfo(org.getPath());
-        vo.setEquippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getEquippedCount()));
-        vo.setUnequippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getUnequippedCount()));
+        if (ObjectUtil.isNotNull(vo)) {
+            vo.setEquippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getEquippedCount()));
+            vo.setUnequippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getUnequippedCount()));
+        } else {
+            vo = new OrgSecurityInfoVo();
+            vo.setEquippedRate(1f);
+            vo.setUnequippedRate(1f);
+        }
 
         return vo;
     }
@@ -228,8 +234,6 @@ public class CockpitServiceImpl implements CockpitService {
             vo.setPaperRate(NumberUtils.computeRate(total, vo.getPaperCount()));
         }
 
-
-
         return vo;
     }
 
@@ -242,7 +246,7 @@ public class CockpitServiceImpl implements CockpitService {
         if (ObjectUtil.isNull(questionDto)) {
             questionDto = new WebSyntheticQuestionDto();
         }
-        Map<String, Object> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), range.getStartTime(),range.getEndTime());
+        Map<String, Object> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), range.getStartTime(), range.getEndTime());
 
         QuestionStatisticVo vo = new QuestionStatisticVo();
         vo.setTotal(questionDto.getTotal());
@@ -253,8 +257,8 @@ public class CockpitServiceImpl implements CockpitService {
         vo.setReformed(NumberUtils.computeRate(questionDto.getTotal(), questionDto.getReformedCount()));
 
         if (overdueCount.size() > 0) {
-            Long count =(Long) overdueCount.get("count");
-            BigDecimal overdue = (BigDecimal)overdueCount.get("overdueCount");
+            Long count = (Long) overdueCount.get("count");
+            BigDecimal overdue = (BigDecimal) overdueCount.get("overdueCount");
             vo.setOverdue(NumberUtils.computeRate(count.intValue(), overdue.intValue()));
         } else {
             vo.setOverdue(1f);

+ 8 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/mapper/CoreAnnouncementNotificationMapper.java

@@ -85,9 +85,13 @@ public interface CoreAnnouncementNotificationMapper extends BaseMapper<CoreAnnou
     void deleteOrg(@Param("notificationId") Long id);
 
     void deleteNotificationToUsers(@Param("notificationId") Long notificationId);
-List<MessageAppPageVo> selectAll(@Param("orgId") Long orgId,@Param("roles") Long[]roles);
+
+    List<MessageAppPageVo> selectAll(@Param("orgId") Long orgId, @Param("roles") Long[] roles);
+
     Page<MessageAppPageVo> selectAppPage(@Param("page") Page<MessageAppPageVo> page, @Param("request") CoreAnnouncementNotificationAppPageDto request);
-List<Long> selectReadByUser(Long userId);
+
+    List<Long> selectReadByUser(Long userId);
+
     List<CoreAnnouncementNotificationToUser> selectNotificationToUsers(@Param("request") CoreAnnouncementNotificationAppPageDto request, @Param("records") List<MessageAppPageVo> records);
 
     CoreAnnouncementNotificationToUser checkIsRead(@Param("request") CoreAnnouncementNotificationAppPageDto request);
@@ -95,5 +99,6 @@ List<Long> selectReadByUser(Long userId);
     void insertNotificationUser(@Param("notificationUser") CoreAnnouncementNotificationToUser notificationUser);
 
     Integer selectNoRead(Long userId);
-List<Long> selectAllTongZhi(@Param("orgId") Long orgId,@Param("orgType") Integer orgType,@Param("roles") Long[]roles);
+
+    List<Long> selectAllTongZhi(@Param("orgId") Long orgId, @Param("orgType") Integer orgType, @Param("roles") Long[] roles);
 }

+ 16 - 6
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafeLevelServiceImpl.java

@@ -79,6 +79,21 @@ public class CoreSafeLevelServiceImpl extends ServiceImpl<CoreSafeLevelMapper, C
         return coreSafeLevelMapper.insert(coreSafeLevel);
     }
 
+    private void checkParam(CoreSafeLevel coreSafeLevel) {
+        if (ObjectUtil.isEmpty(coreSafeLevel.getMaxValue()) || ObjectUtil.isEmpty(coreSafeLevel.getMinValue())) {
+            throw new RuntimeException("区间最大值或最小值不能为空!");
+        }
+        if (coreSafeLevel.getMaxValue().intValue() < 0 || coreSafeLevel.getMinValue().intValue() < 0) {
+            throw new RuntimeException("区间最大值或最小值不能小于0!");
+        }
+        if (ObjectUtil.equals(coreSafeLevel.getMaxValue(), coreSafeLevel.getMinValue())) {
+            throw new RuntimeException("区间最大值或最小值不能小于相等!");
+        }
+        if (coreSafeLevel.getMinValue().intValue() > coreSafeLevel.getMaxValue().intValue()) {
+            throw new RuntimeException("区间最小值不能大于最大值!");
+        }
+    }
+
     /**
      * 修改安全等级配置
      *
@@ -87,12 +102,7 @@ public class CoreSafeLevelServiceImpl extends ServiceImpl<CoreSafeLevelMapper, C
      */
     @Override
     public int updateCoreSafeLevel(CoreSafeLevel coreSafeLevel) {
-        if (coreSafeLevel.getMaxValue().intValue() < 0 || coreSafeLevel.getMinValue().intValue() < 0) {
-            throw new RuntimeException("区间最大值或最小值不能小于0!");
-        }
-        if (ObjectUtil.equals(coreSafeLevel.getMaxValue(), coreSafeLevel.getMinValue())) {
-            throw new RuntimeException("区间最大值或最小值不能小于相等!");
-        }
+        checkParam(coreSafeLevel);
         final List<CoreSafeLevel> list = coreSafeLevelMapper.selectList(null);
         list.removeIf(item -> ObjectUtil.equal(item.getId(), coreSafeLevel.getId()));
         for (CoreSafeLevel level : list) {

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/message/CoreAnnouncementNotificationMapper.xml

@@ -82,7 +82,7 @@
     </select>
     <select id="selectAppPage"
             resultType="com.xunmei.common.core.domain.message.vo.MessageAppPageVo">
-        select T.*,T.file_list as strFileList from (select a.* from core_announcement_notification a
+        select T.*,T.file_list as strFileList,T.org_name as publishOrg from (select a.* from core_announcement_notification a
                          left join core_announcement_notification_to_role b on a.id = b.announcement_notification_id
                          left join core_announcement_notification_to_org c on a.id = c.announcement_notification_id
                          where a.messag_status = 1 and c.org_id = #{request.orgId} and (a.messag_type = 0 or (b.role_id in