|
@@ -33,7 +33,9 @@
|
|
|
<result column="ahead_tid" property="aheadTid" />
|
|
|
<result column="sap_task_code" property="sapTaskCode" />
|
|
|
<result column="plan_cost" property="planCost" />
|
|
|
+ <result column="attach_file_required" property="attachFileRequired" />
|
|
|
</resultMap>
|
|
|
+
|
|
|
<resultMap id="timeResultMap" type="com.management.platform.entity.TimeTask" >
|
|
|
<id column="id" property="id" />
|
|
|
<result column="name" property="name" />
|
|
@@ -97,16 +99,16 @@
|
|
|
<result column="sap_task_code" property="sapTaskCode" />
|
|
|
<result column="stages_name" property="stagesName" />
|
|
|
<result column="department_name" property="departmentName" />
|
|
|
-
|
|
|
-<!-- <result column="charge_one_id" property="chargeOneId" />-->
|
|
|
-<!-- <result column="charge_one_status" property="chargeOneStatus" />-->
|
|
|
-<!-- <result column="charge_one_time" property="chargeOneTime" />-->
|
|
|
-<!-- <result column="charge_two_id" property="chargeTwoId" />-->
|
|
|
-<!-- <result column="charge_two_status" property="chargeTwoStatus" />-->
|
|
|
-<!-- <result column="charge_two_time" property="chargeTwoTime" />-->
|
|
|
-<!-- <result column="charge_stage" property="chargeStage" />-->
|
|
|
-<!-- <result column="final_charge_status" property="finalChargeStatus" />-->
|
|
|
-<!-- <result column="file_reject_reason" property="fileRejectReason"></result>-->
|
|
|
+ <result column="attach_file_required" property="attachFileRequired" />
|
|
|
+ <!-- <result column="charge_one_id" property="chargeOneId" />-->
|
|
|
+ <!-- <result column="charge_one_status" property="chargeOneStatus" />-->
|
|
|
+ <!-- <result column="charge_one_time" property="chargeOneTime" />-->
|
|
|
+ <!-- <result column="charge_two_id" property="chargeTwoId" />-->
|
|
|
+ <!-- <result column="charge_two_status" property="chargeTwoStatus" />-->
|
|
|
+ <!-- <result column="charge_two_time" property="chargeTwoTime" />-->
|
|
|
+ <!-- <result column="charge_stage" property="chargeStage" />-->
|
|
|
+ <!-- <result column="final_charge_status" property="finalChargeStatus" />-->
|
|
|
+ <!-- <result column="file_reject_reason" property="fileRejectReason"></result>-->
|
|
|
</resultMap>
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
@@ -679,61 +681,61 @@
|
|
|
<select id="getTaskFileChargePageTotal" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from
|
|
|
- (
|
|
|
- select tf.task_id
|
|
|
- from task_files tf
|
|
|
- left join task on tf.task_id = task.id
|
|
|
- left join project p on task.project_id = p.id
|
|
|
- <where>
|
|
|
- tf.need_file_charge = 1
|
|
|
- and tf.final_charge_status = 0
|
|
|
- and task.task_status = 0
|
|
|
- and task.company_id = #{queryBO.companyId}
|
|
|
- and case tf.charge_stage
|
|
|
- when 1 then tf.charge_one_id = #{queryBO.userId} and tf.charge_one_status = 0
|
|
|
- when 2 then tf.charge_two_id = #{queryBO.userId} and tf.charge_two_status = 0
|
|
|
- end
|
|
|
- <if test="queryBO.taskName != null and queryBO.taskName != ''">
|
|
|
- and task.name like concat('%',#{queryBO.taskName},'%')
|
|
|
- </if>
|
|
|
- <if test="deptIds!=null and deptIds.size()>0">
|
|
|
- and p.dept_id in
|
|
|
- <foreach collection="deptIds" open="(" close=")" separator="," item="item">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- group by tf.task_id
|
|
|
- )tmp1
|
|
|
+ (
|
|
|
+ select tf.task_id
|
|
|
+ from task_files tf
|
|
|
+ left join task on tf.task_id = task.id
|
|
|
+ left join project p on task.project_id = p.id
|
|
|
+ <where>
|
|
|
+ tf.need_file_charge = 1
|
|
|
+ and tf.final_charge_status = 0
|
|
|
+ and task.task_status = 0
|
|
|
+ and task.company_id = #{queryBO.companyId}
|
|
|
+ and case tf.charge_stage
|
|
|
+ when 1 then tf.charge_one_id = #{queryBO.userId} and tf.charge_one_status = 0
|
|
|
+ when 2 then tf.charge_two_id = #{queryBO.userId} and tf.charge_two_status = 0
|
|
|
+ end
|
|
|
+ <if test="queryBO.taskName != null and queryBO.taskName != ''">
|
|
|
+ and task.name like concat('%',#{queryBO.taskName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="deptIds!=null and deptIds.size()>0">
|
|
|
+ and p.dept_id in
|
|
|
+ <foreach collection="deptIds" open="(" close=")" separator="," item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by tf.task_id
|
|
|
+ )tmp1
|
|
|
</select>
|
|
|
<select id="getProjectAllTaskTimeCost"
|
|
|
resultType="com.management.platform.entity.vo.ProjectTaskTimeCostVO">
|
|
|
SELECT task.id as taskId,ifnull(task_executor.`plan_hours`,0) as planHours,
|
|
|
- (SELECT IFNULL(SUM(working_time),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1
|
|
|
- and report.creator_id = task_executor.executor_id) AS realHours,
|
|
|
- task_executor.executor_id as executorId
|
|
|
+ (SELECT IFNULL(SUM(working_time),0) FROM report WHERE report.`task_id` = task.id AND report.`state` = 1
|
|
|
+ and report.creator_id = task_executor.executor_id) AS realHours,
|
|
|
+ task_executor.executor_id as executorId
|
|
|
FROM task
|
|
|
- LEFT JOIN project ON project.id = task.`project_id`
|
|
|
- left join task_executor on task_executor.task_id=task.id
|
|
|
+ LEFT JOIN project ON project.id = task.`project_id`
|
|
|
+ left join task_executor on task_executor.task_id=task.id
|
|
|
WHERE task.project_id = #{projectId}
|
|
|
and project.id = #{projectId}
|
|
|
</select>
|
|
|
<select id="getProjectTaskTimeCostByIds" resultType="com.management.platform.entity.vo.ProjectTimeCostVO">
|
|
|
select project_id,sum(planHours) as planHoursSum,sum(realHours) as realHoursSum
|
|
|
from
|
|
|
- (
|
|
|
- SELECT task.project_id,task.id as taskId,ifnull(task_executor.`plan_hours`,0) as planHours,
|
|
|
- (SELECT IFNULL(SUM(working_time),0) FROM report
|
|
|
- WHERE report.`task_id` = task.id AND report.`state` = 1 and report.creator_id = task_executor.executor_id) AS realHours,
|
|
|
- task_executor.executor_id as executorId
|
|
|
- FROM task
|
|
|
- LEFT JOIN project ON project.id = task.`project_id`
|
|
|
- left join task_executor on task_executor.task_id=task.id
|
|
|
- WHERE task.project_id in
|
|
|
- <foreach collection="projectIds" item="projectId" separator="," open="(" close=")">
|
|
|
- #{projectId}
|
|
|
- </foreach>
|
|
|
- )tmp1
|
|
|
+ (
|
|
|
+ SELECT task.project_id,task.id as taskId,ifnull(task_executor.`plan_hours`,0) as planHours,
|
|
|
+ (SELECT IFNULL(SUM(working_time),0) FROM report
|
|
|
+ WHERE report.`task_id` = task.id AND report.`state` = 1 and report.creator_id = task_executor.executor_id) AS realHours,
|
|
|
+ task_executor.executor_id as executorId
|
|
|
+ FROM task
|
|
|
+ LEFT JOIN project ON project.id = task.`project_id`
|
|
|
+ left join task_executor on task_executor.task_id=task.id
|
|
|
+ WHERE task.project_id in
|
|
|
+ <foreach collection="projectIds" item="projectId" separator="," open="(" close=")">
|
|
|
+ #{projectId}
|
|
|
+ </foreach>
|
|
|
+ )tmp1
|
|
|
group by project_id
|
|
|
</select>
|
|
|
</mapper>
|