|
|
|
@ -37,7 +37,6 @@ import com.logpm.factory.snm.entity.PanPackageInfo;
|
|
|
|
|
import com.logpm.factory.snm.entity.PanPackageList; |
|
|
|
|
import com.logpm.oldproject.entity.AdvanceDetailEntity; |
|
|
|
|
import com.logpm.oldproject.entity.AdvanceEntity; |
|
|
|
|
import com.logpm.oldproject.entity.OrderDetailEntity; |
|
|
|
|
import com.logpm.oldproject.entity.WayBillEntity; |
|
|
|
|
import com.logpm.oldproject.feign.*; |
|
|
|
|
import com.logpm.oldproject.vo.DistributionParcelListEntityVO; |
|
|
|
@ -574,59 +573,63 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo); |
|
|
|
|
// WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
|
|
|
|
|
|
|
|
|
|
DistributionParcelListEntity entity = new DistributionParcelListEntity(); |
|
|
|
|
BeanUtil.copyProperties(vo, entity); |
|
|
|
|
entity.setOrderPackageCode(vo.getPacketBarCode()); |
|
|
|
|
entity.setConditions(1); |
|
|
|
|
entity.setWarehouse(distributionStockArticleEntity.getWarehouse()); |
|
|
|
|
entity.setWarehouseId(distributionStockArticleEntity.getWarehouseId()); |
|
|
|
|
entity.setStockArticleId(distributionStockArticleEntity.getId()); |
|
|
|
|
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); |
|
|
|
|
entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue()); |
|
|
|
|
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
|
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); |
|
|
|
|
entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
|
entity.setOrderCode(distributionStockArticleEntity.getOrderCode()); |
|
|
|
|
entity.setServiceNumber(distributionStockArticleEntity.getServiceNumber()); |
|
|
|
|
entity.setWaybillNumber(waybillNo); |
|
|
|
|
if(Objects.isNull(vo)){ |
|
|
|
|
logger.warn("##############saveOrderPackage: 未在老系统查询到包件数据 unitNo={}",unitNo); |
|
|
|
|
}else{ |
|
|
|
|
DistributionParcelListEntity entity = new DistributionParcelListEntity(); |
|
|
|
|
BeanUtil.copyProperties(vo, entity); |
|
|
|
|
entity.setOrderPackageCode(vo.getPacketBarCode()); |
|
|
|
|
entity.setConditions(1); |
|
|
|
|
entity.setWarehouse(distributionStockArticleEntity.getWarehouse()); |
|
|
|
|
entity.setWarehouseId(distributionStockArticleEntity.getWarehouseId()); |
|
|
|
|
entity.setStockArticleId(distributionStockArticleEntity.getId()); |
|
|
|
|
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); |
|
|
|
|
entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue()); |
|
|
|
|
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
|
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); |
|
|
|
|
entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
|
entity.setOrderCode(distributionStockArticleEntity.getOrderCode()); |
|
|
|
|
entity.setServiceNumber(distributionStockArticleEntity.getServiceNumber()); |
|
|
|
|
entity.setWaybillNumber(waybillNo); |
|
|
|
|
// if(ObjectUtil.isNotEmpty(warehouseWaybill)){
|
|
|
|
|
// entity.setWarehouseId(warehouseWaybill.getId());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 增加 进销商 名称 编码 发站仓
|
|
|
|
|
// 增加 进销商 名称 编码 发站仓
|
|
|
|
|
|
|
|
|
|
entity.setSendWarehouseName(distributionStockArticleEntity.getSendWarehouseName()); |
|
|
|
|
entity.setSendWarehouseId(distributionStockArticleEntity.getSendWarehouseId()); |
|
|
|
|
entity.setSendWarehouseName(distributionStockArticleEntity.getSendWarehouseName()); |
|
|
|
|
entity.setSendWarehouseId(distributionStockArticleEntity.getSendWarehouseId()); |
|
|
|
|
|
|
|
|
|
//收货仓库
|
|
|
|
|
entity.setAcceptWarehouseName(distributionStockArticleEntity.getAcceptWarehouseName()); |
|
|
|
|
entity.setAcceptWarehouseId(distributionStockArticleEntity.getAcceptWarehouseId()); |
|
|
|
|
//收货仓库
|
|
|
|
|
entity.setAcceptWarehouseName(distributionStockArticleEntity.getAcceptWarehouseName()); |
|
|
|
|
entity.setAcceptWarehouseId(distributionStockArticleEntity.getAcceptWarehouseId()); |
|
|
|
|
|
|
|
|
|
//进销售
|
|
|
|
|
entity.setDealerCode(distributionStockArticleEntity.getDealerCode()); |
|
|
|
|
entity.setDealerName(distributionStockArticleEntity.getDealerName()); |
|
|
|
|
entity.setWarehouseEntryTimeEnd(CommonUtil.StringToDate(operationTime)); |
|
|
|
|
//进销售
|
|
|
|
|
entity.setDealerCode(distributionStockArticleEntity.getDealerCode()); |
|
|
|
|
entity.setDealerName(distributionStockArticleEntity.getDealerName()); |
|
|
|
|
entity.setWarehouseEntryTimeEnd(CommonUtil.StringToDate(operationTime)); |
|
|
|
|
|
|
|
|
|
// 绑定部门--仓库
|
|
|
|
|
if (!Objects.isNull(basicdataWarehouseEntity)) { |
|
|
|
|
entity.setCreateDept(basicdataWarehouseEntity.getDepartment()); |
|
|
|
|
} |
|
|
|
|
entity.setCreateUser(1123598821738675201L); |
|
|
|
|
entity.setTenantId(TenantNum.HUITONGCODE); |
|
|
|
|
if (StringUtil.isNoneBlank(entity.getMaterialName()) && StringUtil.isNoneBlank(entity.getMaterialCode())) { |
|
|
|
|
// 查询物料信息
|
|
|
|
|
String sku = ""; |
|
|
|
|
BasicMaterialEntity basicMaterialEntity = basicMaterialClient.getMaterialOwn(entity.getMaterialCode(), entity.getMaterialName(), sku); |
|
|
|
|
if (ObjectUtils.isNotNull(basicMaterialEntity)) { |
|
|
|
|
entity.setMaterialId(basicMaterialEntity.getId()); |
|
|
|
|
entity.setMaterialCode(basicMaterialEntity.getProductCode()); |
|
|
|
|
entity.setMaterialUnit(basicMaterialEntity.getLogpmUnit()); |
|
|
|
|
// 绑定部门--仓库
|
|
|
|
|
if (!Objects.isNull(basicdataWarehouseEntity)) { |
|
|
|
|
entity.setCreateDept(basicdataWarehouseEntity.getDepartment()); |
|
|
|
|
} |
|
|
|
|
entity.setCreateUser(1123598821738675201L); |
|
|
|
|
entity.setTenantId(TenantNum.HUITONGCODE); |
|
|
|
|
if (StringUtil.isNoneBlank(entity.getMaterialName()) && StringUtil.isNoneBlank(entity.getMaterialCode())) { |
|
|
|
|
// 查询物料信息
|
|
|
|
|
String sku = ""; |
|
|
|
|
BasicMaterialEntity basicMaterialEntity = basicMaterialClient.getMaterialOwn(entity.getMaterialCode(), entity.getMaterialName(), sku); |
|
|
|
|
if (ObjectUtils.isNotNull(basicMaterialEntity)) { |
|
|
|
|
entity.setMaterialId(basicMaterialEntity.getId()); |
|
|
|
|
entity.setMaterialCode(basicMaterialEntity.getProductCode()); |
|
|
|
|
entity.setMaterialUnit(basicMaterialEntity.getLogpmUnit()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
boolean b = distributionParcelListClient.add(entity); |
|
|
|
|
if (!b) { |
|
|
|
|
logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode()); |
|
|
|
|
throw new CustomerException(405, "保存包件信息失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
boolean b = distributionParcelListClient.add(entity); |
|
|
|
|
if (!b) { |
|
|
|
|
logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode()); |
|
|
|
|
throw new CustomerException(405, "保存包件信息失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|