|
@@ -31,8 +31,8 @@
|
|
<result column="start_date" property="startDate" />
|
|
<result column="start_date" property="startDate" />
|
|
<result column="meeting_id" property="meetingId" />
|
|
<result column="meeting_id" property="meetingId" />
|
|
<result column="service_id" property="serviceId" />
|
|
<result column="service_id" property="serviceId" />
|
|
|
|
+ <result column="ahead_tid" property="aheadTid" />
|
|
</resultMap>
|
|
</resultMap>
|
|
-
|
|
|
|
<resultMap id="timeResultMap" type="com.management.platform.entity.TimeTask" >
|
|
<resultMap id="timeResultMap" type="com.management.platform.entity.TimeTask" >
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
<result column="name" property="name" />
|
|
<result column="name" property="name" />
|
|
@@ -93,11 +93,11 @@
|
|
<result column="stages_name" property="stagesName" />
|
|
<result column="stages_name" property="stagesName" />
|
|
<result column="department_name" property="departmentName" />
|
|
<result column="department_name" property="departmentName" />
|
|
</resultMap>
|
|
</resultMap>
|
|
-
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id, name, task_desc, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date, meeting_id, service_id
|
|
|
|
|
|
+ id, name, task_desc, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date, meeting_id, service_id, ahead_tid
|
|
</sql>
|
|
</sql>
|
|
|
|
+
|
|
<select id="simpleList" resultMap="BaseResultMap">
|
|
<select id="simpleList" resultMap="BaseResultMap">
|
|
select id, name, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date
|
|
select id, name, creater_id, creater_name, creator_color, executor_id, executor_name, executor_color, task_level, task_status, create_date, end_date, project_id, stages_id, company_id, indate, parent_tid, group_id, seq, plan_hours, task_type, parent_tname, finish_date, start_date
|
|
from task
|
|
from task
|
|
@@ -109,7 +109,7 @@
|
|
<select id="nameList" resultMap="BaseResultMap">
|
|
<select id="nameList" resultMap="BaseResultMap">
|
|
select id, name, task_level, stages_id, company_id, indate, group_id, seq,task_type,task_desc
|
|
select id, name, task_level, stages_id, company_id, indate, group_id, seq,task_type,task_desc
|
|
from task
|
|
from task
|
|
- ${ew.customSqlSegment}
|
|
|
|
|
|
+ ${ew.customSqlSegment}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--计算执行人任务分布-->
|
|
<!--计算执行人任务分布-->
|
|
@@ -131,7 +131,7 @@
|
|
<select id="getStagesPanel" resultType="java.util.Map">
|
|
<select id="getStagesPanel" resultType="java.util.Map">
|
|
SELECT a.stages_id AS stagesId, stages.`stages_name` AS name, COUNT(1) AS value
|
|
SELECT a.stages_id AS stagesId, stages.`stages_name` AS name, COUNT(1) AS value
|
|
FROM task a
|
|
FROM task a
|
|
- LEFT JOIN stages ON stages.id = a.`stages_id`
|
|
|
|
|
|
+ LEFT JOIN stages ON stages.id = a.`stages_id`
|
|
WHERE a.project_id = #{projectId}
|
|
WHERE a.project_id = #{projectId}
|
|
GROUP BY a.stages_id
|
|
GROUP BY a.stages_id
|
|
ORDER BY stages.`sequence`
|
|
ORDER BY stages.`sequence`
|
|
@@ -140,7 +140,7 @@
|
|
<!--计算耗时排名前十的任务-->
|
|
<!--计算耗时排名前十的任务-->
|
|
<select id="getTopCostTask" resultType="java.util.Map">
|
|
<select id="getTopCostTask" resultType="java.util.Map">
|
|
SELECT task.id , task.name AS name, IFNULL(SUM(report.`working_time`),0) AS value FROM task
|
|
SELECT task.id , task.name AS name, IFNULL(SUM(report.`working_time`),0) AS value FROM task
|
|
- LEFT JOIN report ON report.`task_id` = task.id
|
|
|
|
|
|
+ LEFT JOIN report ON report.`task_id` = task.id
|
|
WHERE task.project_id = #{projectId} and report.state = 1
|
|
WHERE task.project_id = #{projectId} and report.state = 1
|
|
GROUP BY task.id ORDER BY SUM(report.`working_time`) DESC LIMIT 10
|
|
GROUP BY task.id ORDER BY SUM(report.`working_time`) DESC LIMIT 10
|
|
</select>
|
|
</select>
|
|
@@ -148,7 +148,7 @@
|
|
<!-- 查询任务实际工时和计划工时对比,仅查询有实际工时的数据 -->
|
|
<!-- 查询任务实际工时和计划工时对比,仅查询有实际工时的数据 -->
|
|
<select id="getTaskTimeCompare" resultType="java.util.Map">
|
|
<select id="getTaskTimeCompare" resultType="java.util.Map">
|
|
SELECT task.id , task.name AS name, task.plan_hours as planHours, IFNULL(SUM(report.`working_time`),0) AS workHours FROM report
|
|
SELECT task.id , task.name AS name, task.plan_hours as planHours, IFNULL(SUM(report.`working_time`),0) AS workHours FROM report
|
|
- LEFT JOIN task ON report.`task_id` = task.id AND report.state = 1
|
|
|
|
|
|
+ LEFT JOIN task ON report.`task_id` = task.id AND report.state = 1
|
|
WHERE task.project_id = #{projectId}
|
|
WHERE task.project_id = #{projectId}
|
|
GROUP BY task.id
|
|
GROUP BY task.id
|
|
</select>
|
|
</select>
|
|
@@ -236,7 +236,7 @@
|
|
select * from task where
|
|
select * from task where
|
|
task.task_type=1
|
|
task.task_type=1
|
|
<if test="ids!=null">
|
|
<if test="ids!=null">
|
|
- and task.project_id in
|
|
|
|
|
|
+ and task.project_id in
|
|
<foreach collection="ids" index="index" close=")" open="(" separator="," item="item">
|
|
<foreach collection="ids" index="index" close=")" open="(" separator="," item="item">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|