浏览代码

feat:运力实时调度统计车辆数bug

wangweiyu 4 年之前
父节点
当前提交
58b900a87f
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/main/resources/mapper/TruckMapper.xml

+ 2 - 3
src/main/resources/mapper/TruckMapper.xml

@@ -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>