Browse Source

修复任务报错,扩增企业人员同步从5改成7天

seyason 1 year ago
parent
commit
f4096f66f2

+ 6 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -678,13 +678,13 @@ public class TaskController {
         queryWrapper.orderByDesc("id");
         List<Task> list = taskService.nameList(queryWrapper);
         Project project = projectService.getById(projectId);
-
-        //没有权限只能看到自己创建的,负责的和待分配的任务
-        List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部任务");
-        if (functionList.size() == 0 && !userId.equals(project.getInchargerId())) {
-            list = list.stream().filter(t->t.getExecutorId() == null || t.getExecutorId().contains(userId) || t.getCreaterId().equals(userId)).collect(Collectors.toList());
+        if (project != null) {
+            //没有权限只能看到自己创建的,负责的和待分配的任务
+            List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部任务");
+            if (functionList.size() == 0 && !userId.equals(project.getInchargerId())) {
+                list = list.stream().filter(t->t.getExecutorId() == null || t.getExecutorId().contains(userId) || t.getCreaterId().equals(userId)).collect(Collectors.toList());
+            }
         }
-
         msg.data = list;
         return msg;
     }

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -1070,7 +1070,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         try {
             LocalDateTime startDateTime = LocalDateTime.now();
             LocalDateTime endDateTime = LocalDateTime.now();
-            startDateTime = startDateTime.minusDays(5);
+            startDateTime = startDateTime.minusDays(7);
             endDateTime = endDateTime.minusDays(1);
 
             startDateTime = startDateTime.withHour(0).withMinute(0).withSecond(0).withNano(0);