|
|
@@ -17,7 +17,6 @@ import com.sckw.mongo.model.SckwLogisticsOrder;
|
|
|
import com.sckw.mongo.model.SckwWaybillOrder;
|
|
|
import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
|
import com.sckw.order.api.model.CompleteLogisticsOrderParam;
|
|
|
-import com.sckw.order.api.model.OrderDetailRes;
|
|
|
import com.sckw.stream.model.SckwBusSum;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
@@ -34,6 +33,7 @@ import org.springframework.cloud.stream.function.StreamBridge;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.util.*;
|
|
|
@@ -137,6 +137,53 @@ public class KwtWaybillOrderService {
|
|
|
return waybillOrders;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param wOrderId
|
|
|
+ * @desc 变更车辆/司机查询
|
|
|
+ * @author zk
|
|
|
+ * @date 2023/8/2
|
|
|
+ **/
|
|
|
+ public HttpResult changeWaybillOrder(@RequestParam("wOrderId") Long wOrderId){
|
|
|
+ //车辆运单信息
|
|
|
+ KwtWaybillOrder waybillOrder = waybillOrderDao.selectById(wOrderId);
|
|
|
+ //循环派车信息
|
|
|
+ KwtLogisticsOrderCirculate circulate = logisticsOrderCirculateDao.selectById(wOrderId);
|
|
|
+ if (waybillOrder == null && circulate == null) {
|
|
|
+ return HttpResult.error("车辆运单不存在!");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> result = new HashMap();
|
|
|
+ result.put("id", wOrderId);
|
|
|
+ result.put("wOrderId", wOrderId);
|
|
|
+ if (waybillOrder != null){
|
|
|
+ result.put("wOrderNo", waybillOrder.getWOrderNo());
|
|
|
+ result.put("status", waybillOrder.getStatus());
|
|
|
+ result.put("truckNo", waybillOrder.getTruckNo());
|
|
|
+ result.put("truckId", waybillOrder.getTruckId());
|
|
|
+
|
|
|
+ result.put("driverId", waybillOrder.getDriverId());
|
|
|
+ result.put("driverPhone", waybillOrder.getDriverPhone());
|
|
|
+ result.put("driverIdcard", waybillOrder.getDriverIdcard());
|
|
|
+ result.put("driverName", waybillOrder.getDriverName());
|
|
|
+ } else {
|
|
|
+ result.put("status", circulate.getStatus());
|
|
|
+ result.put("truckNo", circulate.getTruckNo());
|
|
|
+ result.put("truckId", circulate.getTruckId());
|
|
|
+ result.put("driverId", circulate.getDriverId());
|
|
|
+ result.put("driverPhone", circulate.getDriverPhone());
|
|
|
+ result.put("driverIdcard", circulate.getDriverIdcard());
|
|
|
+ result.put("driverName", circulate.getDriverName());
|
|
|
+ }
|
|
|
+
|
|
|
+ Object truckId = result.get("truckId");
|
|
|
+ if (truckId != null) {
|
|
|
+ RTruckVo truck = findTruck(Long.parseLong(String.valueOf(truckId)));
|
|
|
+ result.put("trailerNo", truck != null ? truck.getTrailerNo() : null);
|
|
|
+ }
|
|
|
+
|
|
|
+ return HttpResult.ok(result);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param params
|
|
|
* @desc 变更司机
|
|
|
@@ -1721,6 +1768,16 @@ public class KwtWaybillOrderService {
|
|
|
remoteFleetService.updateById(truck);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param truckId 车辆档案ID
|
|
|
+ * @desc 车辆信息
|
|
|
+ * @author zk
|
|
|
+ * @date 2023/8/3
|
|
|
+ **/
|
|
|
+ public RTruckVo findTruck(Long truckId) {
|
|
|
+ return remoteFleetService.findTruck(truckId);
|
|
|
+ }
|
|
|
+
|
|
|
/** 当前物流订单是全量下游则只能全量可运、否则可委托量或全量
|
|
|
校验上游是否全量,并获取全量跟节点物流订单或贸易订单(可委派量)
|
|
|
1、派车、循环派车接单需校验贸易订单/物流订单是否委派完成;
|