|
@@ -50,65 +50,67 @@
|
|
|
<select id="getListByCondition" parameterType="Map"
|
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.OrderInfo">
|
|
|
SELECT
|
|
|
- id,
|
|
|
- order_no as orderNo,
|
|
|
- goods_name as goodsName,
|
|
|
- send_private as sendPrivate,
|
|
|
- send_city as sendCity,
|
|
|
- send_area as sendArea,
|
|
|
- unload_private as unloadPrivate,
|
|
|
- unload_city as unloadCity,
|
|
|
- unload_area as unloadArea,
|
|
|
- comp_name as compName,
|
|
|
- cargo_owner as cargoOwner,
|
|
|
- distance,
|
|
|
- freight,
|
|
|
- billing_method as billingMethod,
|
|
|
- order_status as orderStatus,
|
|
|
- order_status_key as orderStatusKey,
|
|
|
- create_date as createDate,
|
|
|
- update_date as updateDate
|
|
|
- FROM order_info
|
|
|
- WHERE delete_flag = '0'
|
|
|
- AND common_id = #{commonId}
|
|
|
+ o.id,
|
|
|
+ o.order_no as orderNo,
|
|
|
+ o.goods_name as goodsName,
|
|
|
+ o.send_private as sendPrivate,
|
|
|
+ o.send_city as sendCity,
|
|
|
+ o.send_area as sendArea,
|
|
|
+ o.unload_private as unloadPrivate,
|
|
|
+ o.unload_city as unloadCity,
|
|
|
+ o.unload_area as unloadArea,
|
|
|
+ o.comp_name as compName,
|
|
|
+ o.cargo_owner as cargoOwner,
|
|
|
+ o.distance,
|
|
|
+ o.freight,
|
|
|
+ o.billing_method as billingMethod,
|
|
|
+ o.order_status as orderStatus,
|
|
|
+ o.order_status_key as orderStatusKey,
|
|
|
+ o.create_date as createDate,
|
|
|
+ o.update_date as updateDate,
|
|
|
+ c.id as carrierId
|
|
|
+ FROM order_info o
|
|
|
+ LEFT JOIN carrier_info c on c.order_id = o.id and c.delete_flag = 0
|
|
|
+ WHERE o.delete_flag = '0'
|
|
|
+ AND o.common_id = #{commonId}
|
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
- AND (lower(order_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(cargo_owner) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(unload_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(unload_area) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
+ AND (lower(o.order_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.cargo_owner) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.unload_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(o.unload_area) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
</if>
|
|
|
<if test="searchType != null and searchType != ''">
|
|
|
<if test="searchType == 1">
|
|
|
- AND order_status_key = '1'
|
|
|
- OR order_status_key = '3'
|
|
|
+ AND o.order_status_key = '1'
|
|
|
+ OR o.order_status_key = '3'
|
|
|
</if>
|
|
|
<if test="searchType == 2">
|
|
|
- AND order_status_key = '5'
|
|
|
- OR order_status_key = '7'
|
|
|
- OR order_status_key = '9'
|
|
|
- OR order_status_key = '11'
|
|
|
- OR order_status_key = '13'
|
|
|
+ AND o.order_status_key = '5'
|
|
|
+ OR o.order_status_key = '7'
|
|
|
+ OR o.order_status_key = '9'
|
|
|
+ OR o.order_status_key = '11'
|
|
|
+ OR o.order_status_key = '13'
|
|
|
</if>
|
|
|
<if test="searchType == 3">
|
|
|
- AND order_status_key = '15'
|
|
|
- OR order_status_key = '17'
|
|
|
- OR order_status_key = '19'
|
|
|
- OR order_status_key = '21'
|
|
|
+ AND o.order_status_key = '15'
|
|
|
+ OR o.order_status_key = '17'
|
|
|
+ OR o.order_status_key = '19'
|
|
|
+ OR o.order_status_key = '21'
|
|
|
</if>
|
|
|
<if test="searchType == 4">
|
|
|
- AND order_status_key = '23'
|
|
|
- OR order_status_key = '29'
|
|
|
+ AND o.order_status_key = '23'
|
|
|
+ OR o.order_status_key = '29'
|
|
|
</if>
|
|
|
<if test="searchType == 5">
|
|
|
- AND order_status_key = '25'
|
|
|
- OR order_status_key = '27'
|
|
|
+ AND o.order_status_key = '25'
|
|
|
+ OR o.order_status_key = '27'
|
|
|
</if>
|
|
|
</if>
|
|
|
- ORDER BY create_date DESC
|
|
|
+ ORDER BY o.create_date DESC
|
|
|
<if test="currentPage != null and currentPage != ''">
|
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
|
</if>
|
|
@@ -195,8 +197,8 @@
|
|
|
d.driver_call as driverCall
|
|
|
FROM order_info o
|
|
|
LEFT JOIN driver_info d on d.common_id = o.common_id and d.delete_flag = 0
|
|
|
- WHERE delete_flag = '0'
|
|
|
- AND cargo_common_id = #{cargoCommonId}
|
|
|
+ WHERE o.delete_flag = '0'
|
|
|
+ AND o.cargo_common_id = #{cargoCommonId}
|
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
AND (lower(o.order_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(o.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|