Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
d1d948f64d
  1. 93
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

93
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

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

Loading…
Cancel
Save