diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java index 2df397b71..a128cb61d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java @@ -70,6 +70,9 @@ public class DistributionParcelListEntity extends TenantEntity { */ @ApiModelProperty(value = "仓库") private String warehouse; + + @ApiModelProperty(value = "仓库ID") + private Long warehouseId; /** * 状态 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java index 103e544c6..2756c34cf 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java @@ -120,6 +120,12 @@ public class DistributionStockArticleEntity extends TenantEntity { @ApiModelProperty(value = "仓库") private String warehouse; + /** + * 仓库ID + */ + @ApiModelProperty(value = "仓库ID") + private Long warehouseId; + @TableField(exist = false) private String stateName; @TableField(exist = false) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 24a41db00..cd6913bd2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -248,6 +248,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl supplyData = advanceDetailClient.getSupplyData(unitNo); String destinationWarehouse = supplyData.get("destinationWarehouse");//目的仓名称 + String takeCompany = supplyData.get("takeCompany"); + // 查询数据对应的仓库名称 BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse); //判断新系统是否有这条订单数据 @@ -363,7 +365,10 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { distributionStockArticleEntity.setOrderSelfNumbering(orderSelfNum); distributionStockArticleEntity.setMallName(takeCompany); distributionStockArticleEntity.setDescriptionGoods(advanceEntity.getFirstPackName()); + distributionStockArticleEntity.setWarehouse(destinationWarehouse); + distributionStockArticleEntity.setWarehouseId(distributionStockArticleEntity.getId()); + distributionStockArticleEntity.setWarehouseEntryTime(date); distributionStockArticleEntity.setTotalNumber(total); distributionStockArticleEntity.setHandQuantity(0); @@ -433,10 +438,13 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { DistributionParcelListEntity entity = new DistributionParcelListEntity(); BeanUtil.copyProperties(vo,entity); entity.setConditions(1); + entity.setWarehouse(distributionStockArticleEntity.getWarehouse()); + entity.setWarehouseId(distributionStockArticleEntity.getId()); entity.setStockArticleId(id); // 绑定部门--仓库 entity.setCreateDept(Long.parseLong(basicdataWarehouseEntity.getDepartment())); entity.setCreateUser(1123598821738675201L); + entity.setTenantId(TenantNum.HUITONGCODE); boolean b = distributionParcelListClient.add(entity); if(!b){ logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderSelfNum={}",orderSelfNum);