Parcourir la source

运单表关联订单表修改

czh il y a 1 an
Parent
commit
dcb93f6b6a

+ 4 - 7
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

@@ -130,13 +130,10 @@
     </select>
     </select>
 
 
     <select id="selectDataByLorderId" resultType="int">
     <select id="selectDataByLorderId" resultType="int">
-        SELECT
-        COUNT(b.id)
-        FROM
-        kwt_waybill_order a
-        LEFT JOIN kwt_logistics_order b ON a.l_order_id = b.id
-        AND a.del_flag = 0
-        AND b.del_flag = 0
+        SELECT COUNT(b.id)
+          FROM kwt_waybill_order_subtask k
+          left join kwt_waybill_order a on k.w_order_id = a.id and a.del_flag = 0 and k.del_flag = 0
+          LEFT JOIN kwt_logistics_order b ON k.l_order_id = b.id AND a.del_flag = 0 AND b.del_flag = 0
         <where>
         <where>
             <if test="id != null and id !=''">
             <if test="id != null and id !=''">
                 and b.id = #{id}
                 and b.id = #{id}