QuYueTing há 1 mês atrás
pai
commit
2d6471529d

+ 0 - 5
fhKeeper/formulahousekeeper/copy_deploy_files.bat

@@ -1,5 +0,0 @@
-xcopy timesheet\dist\* timesheet_deploy\static_pc\dist\ /y /e /i /q
-xcopy timesheet_h5\dist\* timesheet_deploy\static_h5\dist\ /y /e /i /q
-xcopy management-platform\target\timesheet-3.4.0.jar timesheet_deploy\ /y
-echo "all deployment files are ready!"
-pause

+ 18 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -337,20 +337,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         int state = 1;
                         for (Map<String, Object> m : rList) {
                             double t = (double) m.get("time");
+                            int curState = (int)m.get("state");
                             reportTime += t;
-
-                            //取最低的状态
+                            //取最低的状态,驳回
                             if (state == 2) {
                                 continue;
                             }
                             if (state == 0) {
-                                if ((int)m.get("state") == 2) {
+                                if (curState == 2) {
                                     state = 2;
                                 } else {
                                     continue;
                                 }
                             } else {
-                                state = (int)m.get("state");
+                                state = curState;
                             }
                         }
                         memb.put("state", state);
@@ -11791,18 +11791,29 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
 
         //获取填报工时记录表
         List<Report> reportList = new ArrayList<>();
+        int HONGHUCompanyId = 7536;
+        int LEAVE_PROJECT_ID = 80333;
         if (canViewAll && StringUtils.isEmpty(userId) && deptId == null) {
             //查看全公司的
-            reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("company_id", companyId).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
+            QueryWrapper<Report> reportQueryWrapper = new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("company_id", companyId).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date");
+            if (companyId == HONGHUCompanyId) {
+                reportQueryWrapper.ne("project_id", LEAVE_PROJECT_ID);//泓浒,排除掉请假项目,请假是自动生成的,不计考勤工时
+            }
+            reportList = reportMapper.selectList(reportQueryWrapper);
         } else if (manageUserList.size() > 0) {
             List<String> userIdList = manageUserList.stream().map(User::getId).collect(Collectors.toList());
             if (userIdList.size() > 0) {
+                QueryWrapper<Report> reportQueryWrapper = new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").between("create_date", firstDay, lastDay).groupBy("creator_id,create_date");
                 if (userIdList.size() == 1) {
+                    reportQueryWrapper.eq("creator_id", userIdList.get(0));
                     //按单个人匹配
-                    reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("creator_id", userIdList.get(0)).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
                 } else {
-                    reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").in("creator_id", userIdList).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
+                    reportQueryWrapper.in("creator_id", userIdList);
+                }
+                if (companyId == HONGHUCompanyId) {
+                    reportQueryWrapper.ne("project_id", LEAVE_PROJECT_ID);//泓浒,排除掉请假项目,请假是自动生成的,不计考勤工时
                 }
+                reportList = reportMapper.selectList(reportQueryWrapper);
             }
         }
         //比对userCorpwxTimeList和reportList,找出工时未填满的记录