Ver Fonte

feat:司机未绑定车辆bug

wangweiyu há 4 anos atrás
pai
commit
f28288275a

+ 6 - 1
src/main/java/com/aoyang/tms/controller/param/WorkManagePageParam.java

@@ -59,7 +59,12 @@ public class WorkManagePageParam {
     @ApiModelProperty(value = "未派单")
     private Integer unAllocated;
 
+    @ApiModelProperty(value = "空车未派装车单")
+    private Integer emptyUnAllocated;
+
+    @ApiModelProperty(value = "重车未派卸车单")
+    private Integer heavyUnAllocated;
+
     @ApiModelProperty(value = "未执行运单")
     private Integer unExecuted;
-
 }

+ 13 - 1
src/main/resources/mapper/TruckMapper.xml

@@ -91,6 +91,12 @@
         <if test="param!=null and param.unloadSubmit == 1">
             and wo.type = 2 and wo.order_status = 30
         </if>
+        <if test="param!=null and param.emptyUnAllocated == 1">
+            and wo.type = 1
+        </if>
+        <if test="param!=null and param.heavyUnAllocated == 1">
+            and wo.type = 2
+        </if>
         order by order_status desc, plan_reach_time asc
         ) two on truck.truck_id = two.truck_id
         left join tms_work_cycle wc on truck.truck_id = wc.truck_id and wc.status = 1
@@ -106,7 +112,7 @@
                 and two.shipper_id = #{param.shipperId}
             </if>
             <if test="param!=null and param.surplusCount == 1">
-                and two.id is null
+                and (two.id is null or two.order_status = 0)
             </if>
             <if test="param!=null and param.unExecuted == 1">
                 and two.order_status = 0
@@ -118,6 +124,12 @@
             param.unloadCount == 1 or param.unloadGotoSpot == 1 or param.unloadWait == 1 or param.unloadSubmit == 1">
                 and two.id is not null
             </if>
+            <if test="param!=null and param.emptyUnAllocated == 1">
+                and (wc.jing_weight = 0 or wc.jing_weight is null)
+            </if>
+            <if test="param!=null and param.heavyUnAllocated == 1">
+                and wc.jing_weight > 0
+            </if>
         group by truck.truck_id
     </select>