|
|
@@ -1185,17 +1185,21 @@ create_time = values(create_time)
|
|
|
<select id="selectTaskDetailsList" resultMap="TaskDetailsMap">
|
|
|
select
|
|
|
a.*
|
|
|
- from task_details a left join t_order_task b on a.id =b.progress_tid
|
|
|
- left join admin c on b.task_receiver=c.id
|
|
|
- left join t_order_mid d on b.order_no=d.order_no
|
|
|
- left join t_order_new e on b.order_no=e.order_no
|
|
|
- where (c.superior_id= #{aid} or c.id= #{aid})
|
|
|
+ from task_details a
|
|
|
<include refid="selectTaskDetailsSql"/>
|
|
|
<if test="page_sql !=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
<sql id="selectTaskDetailsSql">
|
|
|
+ left join t_order_task b on a.id =b.progress_tid
|
|
|
+ left join admin c on b.task_receiver=c.id
|
|
|
+ left join t_order_mid d on b.order_no=d.order_no
|
|
|
+ left join t_order_new e on b.order_no=e.order_no
|
|
|
+ <if test="serviceYear !=null">
|
|
|
+ left join t_task_member f on b.id=f.tid
|
|
|
+ </if>
|
|
|
+ where (c.superior_id= #{aid} or c.id= #{aid})
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and d.buyer_name like concat('%',#{userName},'%')
|
|
|
</if>
|
|
|
@@ -1206,14 +1210,58 @@ create_time = values(create_time)
|
|
|
<if test="contractNo !=null">
|
|
|
and e.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="serviceYear !=null">
|
|
|
+ and f.service_year like concat('%',#{serviceYear},'%')
|
|
|
+ </if>
|
|
|
+ <if test="projectDebtorId !=null">
|
|
|
+ and b.task_receiver = #{projectDebtorId}
|
|
|
+ </if>
|
|
|
+ <if test="projectStatus !=null">
|
|
|
+ and b.project_status = #{projectStatus}
|
|
|
+ </if>
|
|
|
+ <if test="outSourcingStatus !=null">
|
|
|
+ and b.outsource= #{outSourcingStatus}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime !=null">
|
|
|
+ and b.update_time between #{updateTime} and #{updateTime} + interval 1 day
|
|
|
+ </if>
|
|
|
+ <if test="progress !=null">
|
|
|
+ and a.progress = #{progress}
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel !=null">
|
|
|
+ <if test="applicationLevel == '1'">
|
|
|
+ and e.total_amount < 3
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel == '2'">
|
|
|
+ and a.application_level > 3 and e.total_amount < 8
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel == '3'">
|
|
|
+ and a.application_level > 8
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="reviewProvince !=null">
|
|
|
+ and a.review_province = #{reviewProvince}
|
|
|
+ </if>
|
|
|
+ <if test="finalSettlementStatus !=null">
|
|
|
+ and a.final_settlement_status = #{finalSettlementStatus}
|
|
|
+ </if>
|
|
|
+ <if test="adDeliverStatus !=null">
|
|
|
+ and a.ad_deliver_status = #{adDeliverStatus}
|
|
|
+ </if>
|
|
|
+ <if test="torchStatus !=null">
|
|
|
+ and a.torch_status = #{torchStatus}
|
|
|
+ </if>
|
|
|
+ <if test="statisticsStatus !=null">
|
|
|
+ and a.statistics_status = #{statisticsStatus}
|
|
|
+ </if>
|
|
|
+ <if test="chStatus !=null">
|
|
|
+ and a.ch_status = #{chStatus}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
<select id="selectTaskDetailsCount" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(*)
|
|
|
- from task_details a left join t_order_task b on a.id =b.progress_tid
|
|
|
- left join admin c on b.task_receiver=c.id
|
|
|
- where (c.superior_id= #{aid} or c.id= #{aid})
|
|
|
+ from task_details a
|
|
|
<include refid="selectTaskDetailsSql"/>
|
|
|
</select>
|
|
|
</mapper>
|