|
|
@@ -144,16 +144,15 @@
|
|
|
SELECT count(1)
|
|
|
FROM
|
|
|
truck
|
|
|
- left join tms_work_order wo on truck.truck_id = wo.truck_id
|
|
|
+ left join tms_work_order wo on truck.truck_id = wo.truck_id and 40 > wo.order_status
|
|
|
left join tms_work_cycle wc on truck.truck_id = wc.truck_id and wc.status = 1
|
|
|
- and 40 > wo.order_status
|
|
|
+ WHERE truck.org_id = #{orgId} and wo.id is null
|
|
|
<if test="orderType != null and orderType == 1">
|
|
|
and wc.jing_weight = 0 and wo.type = #{orderType}
|
|
|
</if>
|
|
|
<if test="orderType != null and orderType == 2">
|
|
|
and wc.jing_weight > 0 and wo.type = #{orderType}
|
|
|
</if>
|
|
|
- WHERE truck.org_id = #{orgId} and wo.id is null
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|