|
@@ -30,8 +30,8 @@
|
|
|
<result column="finish_date" property="finishDate" />
|
|
|
<result column="start_date" property="startDate" />
|
|
|
<result column="meeting_id" property="meetingId" />
|
|
|
- <result column="sap_task_code" property="sapTaskCode" />
|
|
|
<result column="ahead_tid" property="aheadTid" />
|
|
|
+ <result column="sap_task_code" property="sapTaskCode" />
|
|
|
</resultMap>
|
|
|
<resultMap id="timeResultMap" type="com.management.platform.entity.TimeTask" >
|
|
|
<id column="id" property="id" />
|
|
@@ -60,6 +60,8 @@
|
|
|
<result column="finish_date" property="finishDate" />
|
|
|
<result column="start_date" property="startDate" />
|
|
|
<result column="meeting_id" property="meetingId" />
|
|
|
+ <result column="ahead_tid" property="aheadTid" />
|
|
|
+ <result column="sap_task_code" property="sapTaskCode" />
|
|
|
<result column="work_hours" property="workHours" />
|
|
|
</resultMap>
|
|
|
<resultMap id="RichResultMap" type="com.management.platform.entity.Task">
|
|
@@ -90,13 +92,15 @@
|
|
|
<result column="project_name" property="projectName" />
|
|
|
<result column="start_date" property="startDate" />
|
|
|
<result column="meeting_id" property="meetingId" />
|
|
|
+ <result column="ahead_tid" property="aheadTid" />
|
|
|
+ <result column="sap_task_code" property="sapTaskCode" />
|
|
|
<result column="stages_name" property="stagesName" />
|
|
|
<result column="department_name" property="departmentName" />
|
|
|
</resultMap>
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<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 </sql>
|
|
|
-
|
|
|
+ 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, ahead_tid, sap_task_code
|
|
|
+ </sql>
|
|
|
<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
|
|
|
from task
|
|
@@ -108,7 +112,7 @@
|
|
|
<select id="nameList" resultMap="BaseResultMap">
|
|
|
select id, name, task_level, stages_id, company_id, indate, group_id, seq,task_type,task_desc
|
|
|
from task
|
|
|
- ${ew.customSqlSegment}
|
|
|
+ ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
<!--计算执行人任务分布-->
|
|
@@ -139,7 +143,7 @@
|
|
|
<!--计算耗时排名前十的任务-->
|
|
|
<select id="getTopCostTask" resultType="java.util.Map">
|
|
|
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
|
|
|
GROUP BY task.id ORDER BY SUM(report.`working_time`) DESC LIMIT 10
|
|
|
</select>
|
|
@@ -147,7 +151,7 @@
|
|
|
<!-- 查询任务实际工时和计划工时对比,仅查询有实际工时的数据 -->
|
|
|
<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
|
|
|
- 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}
|
|
|
GROUP BY task.id
|
|
|
</select>
|
|
@@ -235,7 +239,7 @@
|
|
|
select * from task where
|
|
|
task.task_type=1
|
|
|
<if test="ids!=null">
|
|
|
- and task.project_id in
|
|
|
+ and task.project_id in
|
|
|
<foreach collection="ids" index="index" close=")" open="(" separator="," item="item">
|
|
|
#{item}
|
|
|
</foreach>
|