瀏覽代碼

新增获取项目打卡月份数据表

anderx 1 年之前
父節點
當前提交
fab17a763f

+ 6 - 2
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -861,8 +861,12 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     @Override
     public Object getAllProjectMonth() {
         SysUser user = SecurityUtils.getLoginUser().getUser();
-        Long companyId= 0L;
-        companyId = user.getDept().getCompanyId();
+        Long companyId= null;
+        if (user.getUserId()!=1){
+            companyId = user.getDept().getCompanyId();
+            if (companyId==null)user.getDept().getDeptId();
+        }
+
         return projectTaskMapper.getAllProjectMonth(companyId);
     }