Commit fdbb1ca4 authored by nie'hong's avatar nie'hong

完善工时统计

parent dbb662f8
......@@ -111,7 +111,7 @@
<select id="selectListByMonth" resultMap="projectStatisticsByMonth">
select <if test="projectId == null and projectIds == null">project_id,'合计' AS project_name,</if> <if test="projectId != null"> project_name, dept_name,</if> <if test=" projectIds != null"> project_id,project_name, dept_name,</if> group_CONCAT(DISTINCT YEAR (statistics_start),'年',MONTH (statistics_start),'月') AS date,year(statistics_start) AS year, sum(total_time) AS total_time, sum(cost) AS cost
select <if test="projectId == null and projectIds == null">'合计' AS project_name,</if> <if test="projectId != null"> project_name, dept_name,</if> <if test=" projectIds != null"> project_id,project_name, dept_name,</if> group_CONCAT(DISTINCT YEAR (statistics_start),'年',MONTH (statistics_start),'月') AS date,year(statistics_start) AS year, sum(total_time) AS total_time, sum(cost) AS cost
from work_project_time_cost ptc join work_project p on ptc.project_id = p.id join work_dept d on p.dept_id = d.id
<where>
<if test="projectId != null ">
......
......@@ -751,6 +751,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 计算项目工时和成本合计
this.addProjectStatisticsTotalTime(projectStatisticsByMonths, "项目合计");
return projectStatisticsByMonths;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment