Browse Source

任务报表增加实际成本显示

seyason 1 year ago
parent
commit
2709c24246

+ 11 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CompanyController.java

@@ -53,6 +53,17 @@ public class CompanyController {
     @Resource
     private ExpenseMainTypeService expenseMainTypeService;
 
+    @RequestMapping("/testTimeout")
+    public HttpRespMsg testTimeout(){
+        HttpRespMsg msg = new HttpRespMsg();
+        try {
+            Thread.sleep(90*1000);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+        return msg;
+    }
+
     @RequestMapping("/getStaffCountMax")
     public HttpRespMsg getStaffCountMax(Integer companyId){
         HttpRespMsg msg = new HttpRespMsg();

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskMapper.xml

@@ -170,6 +170,7 @@
     <select id="getProjectTask" resultType="java.util.Map">
         SELECT task.id,tg.id as groupId, task.`name`,task.executor_name,task.executor_id,DATE_FORMAT(task.`end_date`, '%Y-%m-%d') as end_date, task.`plan_hours`,
         (SELECT IFNULL(SUM(working_time),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1) AS real_hours,
+        (SELECT IFNULL(SUM(cost),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1) AS real_cost,
         task.`task_status`, task.`task_type`,
         project.`project_code`, project.`project_name`,tg.name as groupName
         FROM task

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -269,6 +269,11 @@
                         <font :style="'color:'+(scope.row.real_hours > scope.row.plan_hours?'red':'')">{{scope.row.real_hours == null? 0:scope.row.real_hours.toFixed(1)}}</font>
                     </template>
                 </el-table-column>
+                <el-table-column prop="real_cost" label="实际成本"  width="150" v-if="user.companyId == 3092 || user.companyId==7 || user.companyId==10">
+                   <template slot-scope="scope">
+                        {{scope.row.real_cost == null? 0:scope.row.real_cost.toFixed(2)}}
+                    </template>
+                </el-table-column>
                 <el-table-column prop="task_status" :label="$t('state.states')" width="80" >
                     <template slot-scope="scope">
                         {{taskStatusTxt[scope.row.task_status]}}