Selaa lähdekoodia

修改货主订单

haungfuli 3 vuotta sitten
vanhempi
commit
ff5844a459

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/OrderInfo.java

@@ -206,6 +206,11 @@ public class OrderInfo extends BaseModel<OrderInfo> {
     @TableField(exist = false)
     private String driverPortrait;
 
+    /**
+     * 司机称呼
+     */
+    @TableField(exist = false)
+    private String driverCall;
 
     @Override
     protected Serializable pkVal() {

+ 48 - 45
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/OrderInfoMapper.xml

@@ -173,75 +173,78 @@
     <select id="getListsByCondition" 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,
-        cargo_owner_status as cargoOwnerStatus,
-        cargo_owner_status_key as cargoOwnerStatusKey,
-        create_date as createDate,
-        update_date as updateDate
-        FROM order_info
+        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.driver_name as driverName,
+        o.distance,
+        o.freight,
+        o.billing_method as billingMethod,
+        o.cargo_owner_status as cargoOwnerStatus,
+        o.cargo_owner_status_key as cargoOwnerStatusKey,
+        o.create_date as createDate,
+        o.update_date as updateDate,
+        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}
         <if test="searchKeyWord != null and searchKeyWord != ''">
-            AND (lower(order_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(driver_name) 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.driver_name) 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 cargo_owner_status_key = '1'
+                AND o.cargo_owner_status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND cargo_owner_status_key = '3'
+                AND o.cargo_owner_status_key = '3'
             </if>
             <if test="searchType == 3">
-                AND cargo_owner_status_key = '5'
-                OR cargo_owner_status_key = '7'
-                OR cargo_owner_status_key = '9'
-                OR cargo_owner_status_key = '11'
-                OR cargo_owner_status_key = '13'
+                AND o.cargo_owner_status_key = '5'
+                OR o.cargo_owner_status_key = '7'
+                OR o.cargo_owner_status_key = '9'
+                OR o.cargo_owner_status_key = '11'
+                OR o.cargo_owner_status_key = '13'
             </if>
             <if test="searchType == 4">
-                AND cargo_owner_status_key = '15'
-                OR cargo_owner_status_key = '17'
-                OR cargo_owner_status_key = '19'
-                OR cargo_owner_status_key = '21'
+                AND o.cargo_owner_status_key = '15'
+                OR o.cargo_owner_status_key = '17'
+                OR o.cargo_owner_status_key = '19'
+                OR o.cargo_owner_status_key = '21'
             </if>
             <if test="searchType == 5">
-                AND cargo_owner_status_key = '23'
+                AND o.cargo_owner_status_key = '23'
             </if>
             <if test="searchType == 6">
-                AND cargo_owner_status_key = '25'
+                AND o.cargo_owner_status_key = '25'
             </if>
             <if test="searchType == 7">
-                AND cargo_owner_status_key = '27'
+                AND o.cargo_owner_status_key = '27'
             </if>
             <if test="searchType == 8">
-                AND cargo_owner_status_key = '29'
+                AND o.cargo_owner_status_key = '29'
             </if>
             <if test="searchType == 9">
-                AND cargo_owner_status_key = '31'
-                OR cargo_owner_status_key = '33'
+                AND o.cargo_owner_status_key = '31'
+                OR o.cargo_owner_status_key = '33'
             </if>
         </if>
-        ORDER BY create_date DESC
+        ORDER BY o.create_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>