فهرست منبع

修复FTE表sql语句错误bug

seyason 1 سال پیش
والد
کامیت
32a7dc74e3

+ 4 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -11149,13 +11149,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         long total  = 0;
         List<Map<String,Object>> resultList = null;
-        List<Integer> branchDepartment =null;
-        //若用户传入departmentId参数,则查询该部门所有子部门,添加到branchDepartment集合中
-//        if(departmentId!=null){
-//            branchDepartment = getBranchDepartment(departmentId, allDepartmentList);
-//        }
         String startDate = null;
         String endDate = null;
+        System.out.println("month==="+month);
         LocalDate time = LocalDate.parse(month, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         startDate = time.with(TemporalAdjusters.firstDayOfMonth()).toString();
         endDate = time.with(TemporalAdjusters.lastDayOfMonth()).toString();
@@ -11165,10 +11161,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(pageIndex!=null&&pageSize!=null){
             Integer size=pageSize;
             Integer start=(pageIndex-1)*size;
-            resultList=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,start,size,area,branchDepartment,deptIds);
-            total=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,null,null,area,branchDepartment,deptIds).size();
+            resultList=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,start,size,area,null,deptIds);
+            total=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,null,null,area,null,deptIds).size();
         }else{
-            resultList=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,null,null,area,branchDepartment,deptIds);
+            resultList=projectMapper.getFTEData(targetUser.getCompanyId(),startDate,endDate,null,null,area,null,deptIds);
         }
         for (Map<String, Object> map : resultList) {
             map.put("FTE",Float.parseFloat(map.get("workTime") == null?"0":map.get("workTime").toString())/monthTime);

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -1734,13 +1734,13 @@
             and u.plate1 = #{area}
         </if>
         <if test="branchDepartment!=null and branchDepartment.size()>0">
-            and us.department_id in
+            and u.department_id in
             <foreach collection="branchDepartment" open="(" close=")" separator="," item="item">
                 #{item}
             </foreach>
         </if>
         <if test="deptIds!=null and deptIds.size()>0">
-            and us.department_id in
+            and u.department_id in
             <foreach collection="deptIds" open="(" item="item" close=")" separator=",">
                 #{item}
             </foreach>