|
@@ -1391,48 +1391,6 @@
|
|
|
LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
|
|
LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
|
|
|
<where>
|
|
<where>
|
|
|
a.del_flag = 0
|
|
a.del_flag = 0
|
|
|
-<!-- <if test="type == 1">-->
|
|
|
|
|
-<!-- and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
|
|
|
|
|
- <!-- AND (-->
|
|
|
|
|
- <!-- a.ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="userIds != null and userIds.size()>0">-->
|
|
|
|
|
- <!-- AND a.create_by IN-->
|
|
|
|
|
- <!-- <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
- <!-- OR (-->
|
|
|
|
|
- <!-- d.top_ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="contactsIds != null and contactsIds.size()>0">-->
|
|
|
|
|
- <!-- AND d.contacts_id IN-->
|
|
|
|
|
- <!-- <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
-<!-- <if test="type == 2">-->
|
|
|
|
|
-<!-- and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
|
|
|
|
|
- <!-- AND (-->
|
|
|
|
|
- <!-- a.ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="userIds != null and userIds.size()>0">-->
|
|
|
|
|
- <!-- AND a.create_by IN-->
|
|
|
|
|
- <!-- <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
- <!-- OR (-->
|
|
|
|
|
- <!-- d.top_ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="contactsIds != null and contactsIds.size()>0">-->
|
|
|
|
|
- <!-- AND d.contacts_id IN-->
|
|
|
|
|
- <!-- <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
<if test="query.keywords != null and query.keywords != ''">
|
|
<if test="query.keywords != null and query.keywords != ''">
|
|
|
and (
|
|
and (
|
|
|
a.t_order_no like concat('%',#{query.keywords},'%')
|
|
a.t_order_no like concat('%',#{query.keywords},'%')
|
|
@@ -1611,48 +1569,6 @@
|
|
|
LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
|
|
LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
|
|
|
<where>
|
|
<where>
|
|
|
a.del_flag = 0
|
|
a.del_flag = 0
|
|
|
-<!-- <if test="type == 1">-->
|
|
|
|
|
-<!-- and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
|
|
|
|
|
- <!-- AND (-->
|
|
|
|
|
- <!-- a.ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="userIds != null and userIds.size()>0">-->
|
|
|
|
|
- <!-- AND a.create_by IN-->
|
|
|
|
|
- <!-- <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
- <!-- OR (-->
|
|
|
|
|
- <!-- d.top_ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="contactsIds != null and contactsIds.size()>0">-->
|
|
|
|
|
- <!-- AND d.contacts_id IN-->
|
|
|
|
|
- <!-- <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
-<!-- <if test="type == 2">-->
|
|
|
|
|
-<!-- and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
|
|
|
|
|
- <!-- AND (-->
|
|
|
|
|
- <!-- a.ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="userIds != null and userIds.size()>0">-->
|
|
|
|
|
- <!-- AND a.create_by IN-->
|
|
|
|
|
- <!-- <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
- <!-- OR (-->
|
|
|
|
|
- <!-- d.top_ent_id = #{entId}-->
|
|
|
|
|
- <!-- <if test="contactsIds != null and contactsIds.size()>0">-->
|
|
|
|
|
- <!-- AND d.contacts_id IN-->
|
|
|
|
|
- <!-- <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
|
|
|
|
|
- <!-- #{item}-->
|
|
|
|
|
- <!-- </foreach>-->
|
|
|
|
|
- <!-- </if>-->
|
|
|
|
|
- <!-- )-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
<if test="query.keywords != null and query.keywords != ''">
|
|
<if test="query.keywords != null and query.keywords != ''">
|
|
|
and (
|
|
and (
|
|
|
a.t_order_no like concat('%',#{query.keywords},'%')
|
|
a.t_order_no like concat('%',#{query.keywords},'%')
|
|
@@ -1691,6 +1607,9 @@
|
|
|
<if test="query.unloadAddressCode != null and query.unloadAddressCode != ''">
|
|
<if test="query.unloadAddressCode != null and query.unloadAddressCode != ''">
|
|
|
and c.city_code = #{query.unloadAddressCode}
|
|
and c.city_code = #{query.unloadAddressCode}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="query.billingMode != null and query.billingMode != ''">
|
|
|
|
|
+ and a.billing_mode =#{query.billingMode}
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
group by a.status
|
|
group by a.status
|
|
|
</select>
|
|
</select>
|