|
@@ -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>
|
|
|
<!--获取查询者所在公司每个项目的工时成本-->
|