Sfoglia il codice sorgente

预估工时展示

cs 2 anni fa
parent
commit
c0d951b3b0

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/vo/StageCost.java

@@ -1,5 +1,8 @@
 package com.management.platform.entity.vo;
 
+import lombok.Data;
+
+@Data
 public class StageCost {
     public String stageName;
     public Double cost;

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

@@ -92,8 +92,10 @@
     </select>
     <select id="selectStageSum" resultType="com.management.platform.entity.vo.StageCost">
         select IFNULL(report.stage, '-') AS stage_name, IFNULL(SUM(report.`cost`),0) AS cost,
-        IFNULL(SUM(report.`working_time`), 0) AS working_time
-        FROM report where report.state = 1 and report.`project_id` = #{projectId}
+        IFNULL(SUM(report.`working_time`), 0) AS working_time,
+		IFNULL((SELECT SUM(stages.`stages_time`) from stages WHERE stages.stages_name = report.stage  GROUP BY stages_name), 0)  AS stages_time
+        FROM report
+				where report.state = 1 and report.`project_id` = #{projectId}
         GROUP BY report.stage
     </select>
     <!--获取查询者所在公司每个项目的工时成本-->