|
@@ -4,72 +4,112 @@
|
|
<!-- 获得任务总数 -->
|
|
<!-- 获得任务总数 -->
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
SELECT
|
|
SELECT
|
|
- COUNT(id)
|
|
|
|
- FROM publish_task_info
|
|
|
|
- WHERE delete_flag = '0'
|
|
|
|
- AND common_id = #{commonId}
|
|
|
|
|
|
+ COUNT(p.id)
|
|
|
|
+ FROM publish_task_info p
|
|
|
|
+ LEFT JOIN cargo_owner_info c on c.common_id = p.common_id and c.delete_flag = 0
|
|
|
|
+ WHERE p.delete_flag = '0'
|
|
|
|
+ <if test="commonId != null and commonId != ''">
|
|
|
|
+ AND p.common_id = #{commonId}
|
|
|
|
+ </if>
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
- AND (lower(task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(unload_city) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
|
|
+ AND (lower(p.task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND p.status_key = '1'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND p.status_key = '3'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND p.status_key = '5'
|
|
|
|
+ </if>
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<!-- 获得任务列表 -->
|
|
<!-- 获得任务列表 -->
|
|
<select id="getListByCondition" parameterType="Map"
|
|
<select id="getListByCondition" parameterType="Map"
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.PublishTaskInfo">
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.PublishTaskInfo">
|
|
SELECT
|
|
SELECT
|
|
- id,
|
|
|
|
- task_no as taskNo,
|
|
|
|
- cargo_owner as cargoOwner,
|
|
|
|
- goods_name as goodsName,
|
|
|
|
- send_private as sendPrivate,
|
|
|
|
- send_city as sendCity,
|
|
|
|
- send_area as sendArea,
|
|
|
|
- send_detailed_address as sendDetailedAddress,
|
|
|
|
- send_longitude as sendLongitude,
|
|
|
|
- send_latitude as sendLatitude,
|
|
|
|
- unsend_longitude as unsendLongitude,
|
|
|
|
- unsend_latitude as unsendLatitude,
|
|
|
|
- unload_private as unloadPrivate,
|
|
|
|
- unload_city as unloadCity,
|
|
|
|
- unload_area as unloadArea,
|
|
|
|
- unload_detailed_address as unloadDetailedAddress,
|
|
|
|
- distance,
|
|
|
|
- billing_method as billingMethod,
|
|
|
|
- freight_price as freightPrice,
|
|
|
|
- freight_advance as freightAdvance,
|
|
|
|
- sender,
|
|
|
|
- sender_phone as senderPhone,
|
|
|
|
- receiver,
|
|
|
|
- receiver_phone as receiverPhone,
|
|
|
|
- weight,
|
|
|
|
- loading_date_start as loadingDateStart,
|
|
|
|
- loading_date_end as loadingDateEnd,
|
|
|
|
- car_length_small as carLengthSmall,
|
|
|
|
- car_length as carLength,
|
|
|
|
- load_weight_small as loadWeightSmall,
|
|
|
|
- load_weight as loadWeight,
|
|
|
|
- task_description as taskDescription,
|
|
|
|
- task_validity as taskValidity,
|
|
|
|
- car_model as carModel,
|
|
|
|
- show_hide as showHide,
|
|
|
|
- refresh_times as refreshTimes,
|
|
|
|
- status,
|
|
|
|
- create_date as createDate,
|
|
|
|
- update_date as updateDate
|
|
|
|
- FROM publish_task_info
|
|
|
|
- WHERE delete_flag = '0'
|
|
|
|
- AND common_id = #{commonId}
|
|
|
|
|
|
+ p.id,
|
|
|
|
+ p.task_no as taskNo,
|
|
|
|
+ p.cargo_owner as cargoOwner,
|
|
|
|
+ p.goods_name as goodsName,
|
|
|
|
+ p.send_private as sendPrivate,
|
|
|
|
+ p.send_city as sendCity,
|
|
|
|
+ p.send_area as sendArea,
|
|
|
|
+ p.send_detailed_address as sendDetailedAddress,
|
|
|
|
+ p.send_longitude as sendLongitude,
|
|
|
|
+ p.send_latitude as sendLatitude,
|
|
|
|
+ p.unsend_longitude as unsendLongitude,
|
|
|
|
+ p.unsend_latitude as unsendLatitude,
|
|
|
|
+ p.unload_private as unloadPrivate,
|
|
|
|
+ p.unload_city as unloadCity,
|
|
|
|
+ p.unload_area as unloadArea,
|
|
|
|
+ p.unload_detailed_address as unloadDetailedAddress,
|
|
|
|
+ p.distance,
|
|
|
|
+ p.billing_method as billingMethod,
|
|
|
|
+ p.freight_price as freightPrice,
|
|
|
|
+ p.freight_advance as freightAdvance,
|
|
|
|
+ p.sender,
|
|
|
|
+ p.sender_phone as senderPhone,
|
|
|
|
+ p.receiver,
|
|
|
|
+ p.receiver_phone as receiverPhone,
|
|
|
|
+ p.weight,
|
|
|
|
+ p.loading_date_start as loadingDateStart,
|
|
|
|
+ p.loading_date_end as loadingDateEnd,
|
|
|
|
+ p.car_length_small as carLengthSmall,
|
|
|
|
+ p.car_length as carLength,
|
|
|
|
+ p.load_weight_small as loadWeightSmall,
|
|
|
|
+ p.load_weight as loadWeight,
|
|
|
|
+ p.task_description as taskDescription,
|
|
|
|
+ p.task_validity as taskValidity,
|
|
|
|
+ p.car_model as carModel,
|
|
|
|
+ p.show_hide as showHide,
|
|
|
|
+ p.refresh_times as refreshTimes,
|
|
|
|
+ p.status,
|
|
|
|
+ p.create_date as createDate,
|
|
|
|
+ p.update_date as updateDate,
|
|
|
|
+ c.name as cargoOwnerName,
|
|
|
|
+ c.phone as cargoOwnerPhone,
|
|
|
|
+ cu.avatar_url as cargoOwnerPortrait
|
|
|
|
+ FROM publish_task_info p
|
|
|
|
+ LEFT JOIN cargo_owner_info c on c.common_id = p.common_id and c.delete_flag = 0
|
|
|
|
+ LEFT JOIN common_user cu on cu.id = p.common_id and cu.delete_flag = 0
|
|
|
|
+ WHERE p.delete_flag = '0'
|
|
|
|
+ <if test="commonId != null and commonId != ''">
|
|
|
|
+ AND p.common_id = #{commonId}
|
|
|
|
+ </if>
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
- AND (lower(task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(unload_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(unload_city) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
- </if>
|
|
|
|
- ORDER BY create_date DESC
|
|
|
|
|
|
+ AND (lower(p.task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(p.unload_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND p.status_key = '1'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND p.status_key = '3'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND p.status_key = '5'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY p.create_date DESC
|
|
<if test="currentPage != null and currentPage != ''">
|
|
<if test="currentPage != null and currentPage != ''">
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
</if>
|
|
</if>
|