Przeglądaj źródła

司机列表新增卸货企业

donglang 2 dni temu
rodzic
commit
fd86130d55

+ 13 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/param/LogisticsOrderResp.java

@@ -49,6 +49,19 @@ public class LogisticsOrderResp implements Serializable {
      */
     @Schema(description = "承运单位名称")
     private String carriageCompanyName;
+
+    /**
+     * 购买企业id
+     */
+    @Schema(description = "购买企业id")
+    private Long prEntId;
+
+    /**
+     * 购买企业名称
+     */
+    @Schema(description = "购买企业名称")
+    private String prEntName;
+
     /**
      * 商品id
      */

+ 12 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/app/WaybillOrderService.java

@@ -30,6 +30,8 @@ import com.sckw.order.api.model.TradeOrderGoodsVo;
 import com.sckw.product.api.dubbo.GoodsInfoService;
 import com.sckw.product.api.model.KwpGoods;
 import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import com.sckw.system.api.model.dto.res.EntTypeResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import com.sckw.transport.handler.*;
 import com.sckw.transport.model.*;
@@ -568,6 +570,10 @@ public class WaybillOrderService {
         OrderUnitInfoDetailVO supplierEnt = tOrderIdAndUnitMap.getOrDefault(order.getTOrderId() + "-" + "2", new OrderUnitInfoDetailVO());
         orderResp.setSupplierCompanyId(Optional.ofNullable(supplierEnt.getEntId()).map(String::valueOf).orElse(null));
         orderResp.setSupplierCompanyName(supplierEnt.getFirmName());
+        //采购企业
+        OrderUnitInfoDetailVO proEnt = tOrderIdAndUnitMap.getOrDefault(order.getTOrderId() + "-" + "1", new OrderUnitInfoDetailVO());
+        orderResp.setPrEntId(proEnt.getEntId());
+        orderResp.setPrEntName(proEnt.getFirmName());
 
         //装货地址
         KwtLogisticsOrderAddress shipmentAddress = logOrderIdAndAddressMap.getOrDefault(order.getId() + "-" + AddressTypeEnum.SHIPMENT.getCode(), new KwtLogisticsOrderAddress());
@@ -640,6 +646,12 @@ public class WaybillOrderService {
         KwtLogisticsOrderUnit carriageEnt = logOrderIdAndUnitMap.getOrDefault(order.getId() + "-" + 2, new KwtLogisticsOrderUnit());
         orderResp.setCarriageCompanyId(Optional.ofNullable(carriageEnt.getEntId()).map(String::valueOf).orElse(null));
         orderResp.setCarriageCompanyName(carriageEnt.getFirmName());
+        //采购企业: 原矿运输就是从山上运输到山下
+        EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(538040297439891457L);
+        orderResp.setPrEntId(538040297439891457L);
+        if (entCacheResDto != null) {
+            orderResp.setPrEntName(entCacheResDto.getFirmName());
+        }
 
         //装货地址
         KwtLogisticsOrderAddress shipmentAddress = logOrderIdAndAddressMap.getOrDefault(order.getId() + "-" + AddressTypeEnum.SHIPMENT.getCode(), new KwtLogisticsOrderAddress());