|
|
@@ -367,44 +367,44 @@
|
|
|
b.order_arrears orderArrears,b.dun_start_time dunStartTime,date_format(b.dun_start_time,'%Y-%m-%d %H:%i:%S')dunStartTimes
|
|
|
from t_order_new a left join t_order_mid b on a.order_no =b.order_no
|
|
|
where b.order_receivables >0
|
|
|
- <if test="in.userName != null">
|
|
|
- and b.buyer_name like concat('%',#{in.userName},'%')
|
|
|
+ <if test="userName != null">
|
|
|
+ and b.buyer_name like concat('%',#{userName},'%')
|
|
|
</if>
|
|
|
- <if test="in.in.legalAffairs != null">
|
|
|
- and b.legal_affairs = #{in.legalAffairs}
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ and b.legal_affairs = #{legalAffairs}
|
|
|
</if>
|
|
|
- <if test="in.in.contractNo != null">
|
|
|
- and a.contract_no like concat('%',#{in.contractNo},'%')
|
|
|
+ <if test="contractNo != null">
|
|
|
+ and a.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
- <if test="in.in.aid != null">
|
|
|
- and b.salesman_id = #{in.aid}
|
|
|
+ <if test="aid != null">
|
|
|
+ and b.salesman_id = #{aid}
|
|
|
</if>
|
|
|
- <if test="in.in.depId != null">
|
|
|
- and a.order_dep = #{in.depId}
|
|
|
+ <if test="depId != null">
|
|
|
+ and a.order_dep = #{depId}
|
|
|
</if>
|
|
|
order by b.dun_start_time desc
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
- <select id="legalAffairsOrderList" resultType="integer">
|
|
|
+ <select id="legalAffairsOrderCount" resultType="integer">
|
|
|
select count(*)
|
|
|
from t_order_new a left join t_order_mid b on a.order_no =b.order_no
|
|
|
where b.order_receivables >0
|
|
|
- <if test="in.userName != null">
|
|
|
- and b.buyer_name like concat('%',#{in.userName},'%')
|
|
|
+ <if test="userName != null">
|
|
|
+ and b.buyer_name like concat('%',#{userName},'%')
|
|
|
</if>
|
|
|
- <if test="in.in.legalAffairs != null">
|
|
|
- and b.legal_affairs = #{in.legalAffairs}
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ and b.legal_affairs = #{legalAffairs}
|
|
|
</if>
|
|
|
- <if test="in.in.contractNo != null">
|
|
|
- and a.contract_no like concat('%',#{in.contractNo},'%')
|
|
|
+ <if test="contractNo != null">
|
|
|
+ and a.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
- <if test="in.in.aid != null">
|
|
|
- and b.salesman_id = #{in.aid}
|
|
|
+ <if test="aid != null">
|
|
|
+ and b.salesman_id = #{aid}
|
|
|
</if>
|
|
|
- <if test="in.in.depId != null">
|
|
|
- and a.order_dep = #{in.depId}
|
|
|
+ <if test="depId != null">
|
|
|
+ and a.order_dep = #{depId}
|
|
|
</if>
|
|
|
</select>
|
|
|
</mapper>
|