|
|
|
@ -29,7 +29,7 @@ import com.logpm.warehouse.service.IWarehouseWaybillService;
|
|
|
|
|
import com.logpm.warehouse.vo.WarehouseWaybillVO; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.springblade.common.constant.order.OrderStatusConstant; |
|
|
|
|
import org.springblade.common.constant.order.*; |
|
|
|
|
import org.springblade.common.constant.TenantNum; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
@ -166,15 +166,18 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
Date date = new Date(); |
|
|
|
|
|
|
|
|
|
distributionStockArticleEntity = new DistributionStockArticleEntity(); |
|
|
|
|
distributionStockArticleEntity.setOrderCode(warehouseWaybill.getWaybillNo()); |
|
|
|
|
distributionStockArticleEntity.setServiceNumber(warehouseWaybill.getServiceNo()); |
|
|
|
|
distributionStockArticleEntity.setOrderCode(waybillNo); |
|
|
|
|
distributionStockArticleEntity.setWaybillNumber(waybillNo); |
|
|
|
|
distributionStockArticleEntity.setWaybillId(warehouseWaybill.getId()); |
|
|
|
|
distributionStockArticleEntity.setWarehouseId(warehouseWaybill.getId()); |
|
|
|
|
distributionStockArticleEntity.setMallName(warehouseWaybill.getConsigneeName()); |
|
|
|
|
distributionStockArticleEntity.setMallId(warehouseWaybill.getConsigneeId()); |
|
|
|
|
distributionStockArticleEntity.setDescriptionGoods(warehouseWaybill.getGoodsName()); |
|
|
|
|
distributionStockArticleEntity.setWarehouse(warehouseWaybill.getDepartureWarehouseName()); |
|
|
|
|
distributionStockArticleEntity.setWarehouseEntryTime(date); |
|
|
|
|
distributionStockArticleEntity.setTotalNumber(totalCount); |
|
|
|
|
distributionStockArticleEntity.setHandQuantity(stockCount); |
|
|
|
|
distributionStockArticleEntity.setHandQuantity(totalCount); |
|
|
|
|
//零担订单默认齐套
|
|
|
|
|
distributionStockArticleEntity.setCompleteSet(1); |
|
|
|
|
|
|
|
|
@ -199,7 +202,19 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
distributionStockArticleEntity.setCustomerTelephone(warehouseWaybill.getConsigneeMobile()); |
|
|
|
|
distributionStockArticleEntity.setCustomerAddress(warehouseWaybill.getConsigneeAddress()); |
|
|
|
|
distributionStockArticleEntity.setGenre(1); |
|
|
|
|
distributionStockArticleEntity.setCreateUser(1123598821738675201L); |
|
|
|
|
distributionStockArticleEntity.setSortingQuantity(0); //分拣件数
|
|
|
|
|
distributionStockArticleEntity.setDeliveryQuantity(0); //配送件数
|
|
|
|
|
distributionStockArticleEntity.setTransferQuantity(0); //中转件数
|
|
|
|
|
distributionStockArticleEntity.setSigninQuantity(0); //签收件数
|
|
|
|
|
distributionStockArticleEntity.setFreezeStatus(OrderFreezeStatusConstant.weidongjie.getValue()); //冻结状态
|
|
|
|
|
distributionStockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue()); //预约状态
|
|
|
|
|
distributionStockArticleEntity.setStockupStatus(OrderStockupStatusConstant.daibeihuo.getValue()); //备货状态
|
|
|
|
|
distributionStockArticleEntity.setGroundingStatus(OrderGroundingStatusConstant.daishangjia.getValue()); //上架状态
|
|
|
|
|
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue()); |
|
|
|
|
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
distributionStockArticleEntity.setConsigneeUnit(customerName);//收货单位(经销商)
|
|
|
|
|
distributionStockArticleEntity.setConsigneePerson(warehouseWaybill.getConsigneeName());//收货人
|
|
|
|
|
distributionStockArticleEntity.setReserve1("zero"); |
|
|
|
@ -373,6 +388,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
String takeCompany = wayBillEntity.getTakeCompany();//收货单位
|
|
|
|
|
BasicdataClientEntity sendClient = basicdataClientClient.findByName(sendCompany); |
|
|
|
|
BasicdataClientEntity takeClient = basicdataClientClient.findByName(takeCompany); |
|
|
|
|
warehouseWaybill.setServiceType(1);// 默认为商配
|
|
|
|
|
if (!Objects.isNull(sendClient)) { |
|
|
|
|
Long clientEntityId = sendClient.getId();//基础客户
|
|
|
|
|
warehouseWaybill.setShipperId(clientEntityId); |
|
|
|
@ -387,11 +403,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
} |
|
|
|
|
warehouseWaybill.setShipper(sendCompany); |
|
|
|
|
warehouseWaybill.setShipperName(wayBillEntity.getSendPerson()); |
|
|
|
|
warehouseWaybill.setShipperMobile(wayBillEntity.getSendMobile()); |
|
|
|
|
warehouseWaybill.setShipperMobile(wayBillEntity.getSendPhone()); |
|
|
|
|
warehouseWaybill.setShipperAddress(wayBillEntity.getSendAddress()); |
|
|
|
|
warehouseWaybill.setConsignee(takeCompany); |
|
|
|
|
warehouseWaybill.setConsigneeName(wayBillEntity.getTakePerson()); |
|
|
|
|
warehouseWaybill.setConsigneeMobile(wayBillEntity.getTakeMobile()); |
|
|
|
|
warehouseWaybill.setConsigneeMobile(wayBillEntity.getTakePhone()); |
|
|
|
|
warehouseWaybill.setConsigneeAddress(wayBillEntity.getTakeAddress()); |
|
|
|
|
warehouseWaybill.setDestination(wayBillEntity.getArriveSite()); |
|
|
|
|
warehouseWaybill.setGoodsName(packname); |
|
|
|
@ -411,6 +427,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO); |
|
|
|
|
warehouseWaybill.setWaybillType(2); |
|
|
|
|
warehouseWaybill.setReceivedStatus(0); |
|
|
|
|
warehouseWaybill.setTenantId(TenantNum.HUITONGCODE); |
|
|
|
|
|
|
|
|
|
BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent); |
|
|
|
|
if (!Objects.isNull(agentClient)) { |
|
|
|
|