Min 1 年之前
父节点
当前提交
673f0cccb5

+ 12 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -293,11 +293,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         float allday=timeTypeMapper.selectOne(new QueryWrapper<TimeType>()
                 .eq("company_id",companyId)).getAllday();
         //根据公司的id搜索该公司有哪些项目  20231108之前完成的不统计,状态为进行中/已完成
-        List<Project> selectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId).in("status", 1, 2));
-        List<Integer> collectProjectIds = selectList.stream().map(Project::getId).collect(Collectors.toList());
-
-        IPage<Project> projectIPage = projectMapper.selectPage(new Page<>(pageIndex, pageSize), new QueryWrapper<Project>().in("id", collectProjectIds)
-                .isNull("finish_date").or().ge("finish_date", "2023-11-08").eq(projectId!=null,"project_id",projectId));
+        IPage<Project> projectIPage = projectMapper.selectPage(new Page<>(pageIndex, pageSize), new QueryWrapper<Project>().eq("company_id", companyId).in("status", 1, 2)
+                .and(wrapper->wrapper.isNull("finish_date").or().ge("finish_date", "2023-11-08")).eq(projectId!=null,"id",projectId));
 
         //查询到的project列表
         List<Project> records = projectIPage.getRecords();
@@ -338,6 +335,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     groupEstimatedWorkVO.setEstimatedWorkTime(gEstimatedWork);
                     groupEstimatedWorkVO.setId(taskGroup.getId());
                     groupEstimatedWorkVO.setGroupName(taskGroup.getName());
+                    groupEstimatedWorkVO.setProjectId(project.getId());
+                    groupEstimatedWorkVO.setProjectName(project.getProjectName());
 
                     groupEstimatedWorkVOS.add(groupEstimatedWorkVO);
                 }
@@ -345,8 +344,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             project.setGroupEstimatedWorkVOList(groupEstimatedWorkVOS);
         }
         projectIPage.setRecords(records);
-
-        httpRespMsg.data=projectIPage;
+        List<GroupEstimatedWorkVO> lastList=new ArrayList<>();
+        records.forEach(r->{
+            lastList.addAll(r.getGroupEstimatedWorkVOList());
+        });
+        Map<String,Object> resultMap=new HashMap<>();
+        resultMap.put("total",projectIPage.getTotal());
+        resultMap.put("records",lastList);
+        httpRespMsg.data=resultMap;
         return httpRespMsg;
     }
 

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -237,6 +237,7 @@ const StringUtil = {
         arr[i] == '全部部门FTE报表' ? obj.reportFTEAll = true : ''
         arr[i] == '负责部门FTE报表' ? obj.reportFTEPart = true : ''
         arr[i] == '有效工时率表' ? obj.reportEfficent = true : ''
+        arr[i] == '项目预估工时表' ? obj.reportProjectEstimated = true : ''
 
         arr[i] == '新增合同' ? obj.contractNew = true : ''
         arr[i] == '查看全部合同' ? obj.contractView = true : ''

+ 33 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -47,6 +47,7 @@
                   <el-menu-item index="1-25" v-if="permissions.reportProjectConsumptionFirst" @click="ssl(24)"><p>分组耗用进度表</p></el-menu-item>
                   <el-menu-item index="1-26" v-if="permissions.reportProjectConsumptionTwo" @click="ssl(25)"><p>项目耗用进度表</p></el-menu-item>
                   <el-menu-item index="1-27" v-if="permissions.reportStaffTaskAccomplished" @click="ssl(26)"><p>员工任务完成表</p></el-menu-item>
+                  <el-menu-item index="1-28" v-if="permissions.reportProjectEstimated" @click="ssl(27)"><p>项目预估工时表</p></el-menu-item>
                 </el-submenu>
               </el-menu>
           </el-col>
@@ -1190,6 +1191,14 @@
               <el-table-column align="center" prop="planHour" label="计划工时(h)" min-width="150"></el-table-column>
               <el-table-column align="center" prop="consumeTime" label="消耗工时(h)" min-width="150"></el-table-column>
             </el-table>
+
+             <!-- 项目预估工时表 -->
+             <el-table  v-if="ins == 27" key="27" border :data="projectEstimatedWorkData" highlight-current-row v-loading="listLoading" :height="+tableHeight - 1" style="width: 100%;" >
+              <el-table-column align="center" prop="projectName" label="项目名称" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="groupName" label="分组名称" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="estimatedWorkTime" label="预估工时" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="workTime" label="实际工时" min-width="150"></el-table-column>
+            </el-table>
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21 && ins != 24">
           <el-pagination
@@ -1515,14 +1524,14 @@ export default {
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表', '有效工时率表', '项目分类工时占比表', '分类工时明细表',
-      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务完成表'],
+      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务完成表', '项目预估工时表'],
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表','有效工时率表', '项目分类工时占比表', '分类工时明细表',
-      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务完成表'],
+      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务完成表', '项目预估工时表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -1651,7 +1660,8 @@ export default {
         consumptionSchedule: [], // 分组耗用进度表
         consumptionScheduleTwo: [], // 项目耗用进度表
         taskCompletionSheet: [], // 员工任务完成表
-      }
+      },
+      projectEstimatedWorkData: [], // 项目预估工时表
     };
   },
   computed: {},
@@ -1757,6 +1767,7 @@ export default {
       if(this.permissions.reportProjectConsumptionFirst) {this.ssl(24);this.defaultActive = '1-25';return} else
       if(this.permissions.reportProjectConsumptionTwo) {this.ssl(25);this.defaultActive = '1-26';return} else
       if(this.permissions.reportStaffTaskAccomplished) {this.ssl(26);this.defaultActive = '1-27';return} else
+      if(this.permissions.reportProjectEstimated) {this.ssl(27);this.reportProjectEstimated = '1-28';return} else
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName,dataItem = []){
@@ -2008,7 +2019,7 @@ export default {
                 this.getGroupWorktimeAll()
             },
             getList(e) {
-              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26]
+              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26,27]
               if(this.ins == 15) {
                 this.rangeDatas = null
               } else if(!e){
@@ -2088,6 +2099,9 @@ export default {
                 if(this.ins == 26) {
                   this.getTaskCompletionSheet()
                 }
+                if(this.ins == 27) {
+                  this.getProjectEstimatedWork()
+                }
             },
       exportExcel() {
         var url = "/project";
@@ -3791,6 +3805,21 @@ export default {
       this.isbeCustomReport.taskCompletionSheet = data.record
       this.total = data.total
       this.listLoading = false
+    },
+    // 项目预估工时表
+    async getProjectEstimatedWork() {
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+      }
+      this.proJuctId ? parameter.projectId = this.proJuctId : ''
+      this.listLoading = true
+      let { data } = await this.postData('/project/getProjectEstimatedWork', {
+        ...parameter
+      })
+      this.projectEstimatedWorkData = data.records
+      this.total = data.total
+      this.listLoading = false
     }
   },
 };