|
|
@@ -764,7 +764,7 @@ from
|
|
|
a.task_receiver = b.id
|
|
|
where a.contract_id = #{contractId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
- <select id="selectProjectTaskByPage" resultType="com.goafanti.techproject.bo.TaskListBo">
|
|
|
+ <select id="selectMyProjectTaskByPage" resultType="com.goafanti.techproject.bo.TaskListBo">
|
|
|
select
|
|
|
a.id as taskId,
|
|
|
a.commodity_id as commodityId,
|
|
|
@@ -783,10 +783,7 @@ from
|
|
|
e.nickname as buyerName,
|
|
|
f.name as taskReceiverName
|
|
|
from
|
|
|
- (select *
|
|
|
- from contract_task_log
|
|
|
- where task_receiver= #{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
|
|
|
- x.contract_task_id=a.id left join business_project b on
|
|
|
+ contract_task a left join business_project b on
|
|
|
a.commodity_id = b.id left join business_varieties c on
|
|
|
b.cid = c.id left join contract d on
|
|
|
a.contract_id = d.id left join user e on
|
|
|
@@ -829,14 +826,11 @@ from
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectProjectTaskCount" resultType="java.lang.Integer">
|
|
|
+ <select id="selectMyProjectTaskCount" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(0)
|
|
|
from
|
|
|
- (select *
|
|
|
- from contract_task_log
|
|
|
- where task_receiver= #{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
|
|
|
- x.contract_task_id=a.id left join business_project b on
|
|
|
+ contract_task a left join business_project b on
|
|
|
a.commodity_id = b.id left join business_varieties c on
|
|
|
b.cid = c.id left join contract d on
|
|
|
a.contract_id = d.id left join user e on
|
|
|
@@ -873,6 +867,41 @@ from
|
|
|
<if test="categoryId != null and categoryId != ''">
|
|
|
and c.id = #{categoryId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+
|
|
|
+ <if test="taskReceiverId != null and taskReceiverId != ''">
|
|
|
+ and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null">
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="taskStatus != null">
|
|
|
+ and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="projectNo != null and projectNo != ''">
|
|
|
+ and d.serial_number = #{projectNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null and buyerName != ''">
|
|
|
+ and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="taskReceiverName != null and taskReceiverName != ''">
|
|
|
+ and f.name = #{taskReceiverName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="categoryId != null and categoryId != ''">
|
|
|
+ and c.id = #{categoryId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by a.task_distribution_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@@ -998,4 +1027,146 @@ from
|
|
|
and g.name = #{principalName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectProjectTaskByPage" resultType="com.goafanti.techproject.bo.TaskListBo">
|
|
|
+ select
|
|
|
+ a.id as taskId,
|
|
|
+ a.commodity_id as commodityId,
|
|
|
+ a.serial_number as taskNo,
|
|
|
+ a.task_status as taskStatus,
|
|
|
+ a.deleted_sign as deleteSign,
|
|
|
+ date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDistributionTimes,
|
|
|
+ a.task_comment as taskComment,
|
|
|
+ a.publish_status as publishStatus,
|
|
|
+ b.bname as commodityName ,
|
|
|
+ c.cname as categoryName,
|
|
|
+ c.id as categoryId,
|
|
|
+ d.serial_number as projectNo,
|
|
|
+ d.status,
|
|
|
+ d.deleted_sign as deletedSign,
|
|
|
+ e.nickname as buyerName,
|
|
|
+ f.name as taskReceiverName
|
|
|
+ from
|
|
|
+ (select *
|
|
|
+ from contract_task_log
|
|
|
+ where task_receiver=#{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
|
|
|
+ x.contract_task_id=a.id left join business_project b on
|
|
|
+ a.commodity_id = b.id left join business_varieties c on
|
|
|
+ b.cid = c.id left join contract d on
|
|
|
+ a.contract_id = d.id left join user e on
|
|
|
+ d.uid = e.id left join admin f on
|
|
|
+ a.task_receiver = f.id
|
|
|
+ where 1=1
|
|
|
+ <if test="taskReceiverId != null and taskReceiverId != ''">
|
|
|
+ and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null">
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="taskStatus != null">
|
|
|
+ and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="projectNo != null and projectNo != ''">
|
|
|
+ and d.serial_number = #{projectNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null and buyerName != ''">
|
|
|
+ and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="taskReceiverName != null and taskReceiverName != ''">
|
|
|
+ and f.name = #{taskReceiverName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="categoryId != null and categoryId != ''">
|
|
|
+ and c.id = #{categoryId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by a.task_distribution_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProjectTaskCount" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from
|
|
|
+ (select *
|
|
|
+ from contract_task_log
|
|
|
+ where task_receiver=#{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
|
|
|
+ x.contract_task_id=a.id left join business_project b on
|
|
|
+ a.commodity_id = b.id left join business_varieties c on
|
|
|
+ b.cid = c.id left join contract d on
|
|
|
+ a.contract_id = d.id left join user e on
|
|
|
+ d.uid = e.id left join admin f on
|
|
|
+ a.task_receiver = f.id
|
|
|
+ where 1=1
|
|
|
+ <if test="taskReceiverId != null and taskReceiverId != ''">
|
|
|
+ and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null">
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="taskStatus != null">
|
|
|
+ and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="projectNo != null and projectNo != ''">
|
|
|
+ and d.serial_number = #{projectNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null and buyerName != ''">
|
|
|
+ and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="taskReceiverName != null and taskReceiverName != ''">
|
|
|
+ and f.name = #{taskReceiverName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="categoryId != null and categoryId != ''">
|
|
|
+ and c.id = #{categoryId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="taskReceiverId != null and taskReceiverId != ''">
|
|
|
+ and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null">
|
|
|
+ and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="taskStatus != null">
|
|
|
+ and a.task_status = #{taskStatus,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="projectNo != null and projectNo != ''">
|
|
|
+ and d.serial_number = #{projectNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null and buyerName != ''">
|
|
|
+ and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="taskReceiverName != null and taskReceiverName != ''">
|
|
|
+ and f.name = #{taskReceiverName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="categoryId != null and categoryId != ''">
|
|
|
+ and c.id = #{categoryId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|