|
|
@ -369,6 +369,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId); |
|
|
|
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId); |
|
|
|
|
|
|
|
|
|
|
|
Long id = null; |
|
|
|
Long id = null; |
|
|
|
|
|
|
|
String waybillNoNum = null; |
|
|
|
if (Objects.isNull(distributionStockArticleEntity)) { |
|
|
|
if (Objects.isNull(distributionStockArticleEntity)) { |
|
|
|
Date date = CommonUtil.StringToDate(operationTime); |
|
|
|
Date date = CommonUtil.StringToDate(operationTime); |
|
|
|
|
|
|
|
|
|
|
@ -431,7 +432,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
|
|
|
|
|
|
|
|
//存入运单信息
|
|
|
|
//存入运单信息
|
|
|
|
saveWaybillEntity(orderDetailEntity.getWaybillNo()); |
|
|
|
saveWaybillEntity(orderDetailEntity.getWaybillNo()); |
|
|
|
|
|
|
|
waybillNoNum = orderDetailEntity.getWaybillNo(); |
|
|
|
// 增加订单 经销商信息 和门店信息
|
|
|
|
// 增加订单 经销商信息 和门店信息
|
|
|
|
buildDealerAndStore(distributionStockArticleEntity, advanceEntity); |
|
|
|
buildDealerAndStore(distributionStockArticleEntity, advanceEntity); |
|
|
|
|
|
|
|
|
|
|
@ -457,7 +458,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//查询包件信息数据
|
|
|
|
//查询包件信息数据
|
|
|
|
saveOrderPackage(unitNo, distributionStockArticleEntity, id, basicdataWarehouseEntity); |
|
|
|
saveOrderPackage(unitNo, distributionStockArticleEntity, id, basicdataWarehouseEntity,waybillNoNum); |
|
|
|
//包件保存成功去修改订单的数量
|
|
|
|
//包件保存成功去修改订单的数量
|
|
|
|
distributionStockArticleClient.addHandQuantity(id,1); |
|
|
|
distributionStockArticleClient.addHandQuantity(id,1); |
|
|
|
// todo 这里需要根据包件状态修改状态
|
|
|
|
// todo 这里需要根据包件状态修改状态
|
|
|
@ -476,8 +477,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
* @param id |
|
|
|
* @param id |
|
|
|
* @param basicdataWarehouseEntity |
|
|
|
* @param basicdataWarehouseEntity |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, Long id, BasicdataWarehouseEntity basicdataWarehouseEntity) { |
|
|
|
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, Long id, BasicdataWarehouseEntity basicdataWarehouseEntity,String waybillNoNum) { |
|
|
|
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo); |
|
|
|
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo); |
|
|
|
|
|
|
|
WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNoNum); |
|
|
|
DistributionParcelListEntity entity = new DistributionParcelListEntity(); |
|
|
|
DistributionParcelListEntity entity = new DistributionParcelListEntity(); |
|
|
|
BeanUtil.copyProperties(vo, entity); |
|
|
|
BeanUtil.copyProperties(vo, entity); |
|
|
|
entity.setOrderPackageCode(vo.getPacketBarCode()); |
|
|
|
entity.setOrderPackageCode(vo.getPacketBarCode()); |
|
|
@ -490,6 +492,8 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); |
|
|
|
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); |
|
|
|
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); |
|
|
|
entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); |
|
|
|
|
|
|
|
entity.setWaybillNumber(waybillNoNum); |
|
|
|
|
|
|
|
entity.setWarehouseId(warehouseWaybill.getId()); |
|
|
|
// 绑定部门--仓库
|
|
|
|
// 绑定部门--仓库
|
|
|
|
if (!Objects.isNull(basicdataWarehouseEntity)) { |
|
|
|
if (!Objects.isNull(basicdataWarehouseEntity)) { |
|
|
|
entity.setCreateDept(basicdataWarehouseEntity.getDepartment()); |
|
|
|
entity.setCreateDept(basicdataWarehouseEntity.getDepartment()); |
|
|
@ -502,6 +506,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
if(ObjectUtils.isNotNull(basicMaterialEntity)){ |
|
|
|
if(ObjectUtils.isNotNull(basicMaterialEntity)){ |
|
|
|
entity.setMaterialId(basicdataWarehouseEntity.getId()); |
|
|
|
entity.setMaterialId(basicdataWarehouseEntity.getId()); |
|
|
|
entity.setMaterialCode(basicMaterialEntity.getProductCode()); |
|
|
|
entity.setMaterialCode(basicMaterialEntity.getProductCode()); |
|
|
|
|
|
|
|
entity.setMaterialUnit(basicMaterialEntity.getLogpmUnit()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
boolean b = distributionParcelListClient.add(entity); |
|
|
|
boolean b = distributionParcelListClient.add(entity); |
|
|
@ -580,7 +585,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { |
|
|
|
warehouseWaybill.setReplacePrice(wayBillEntity.getReplacePrice()); |
|
|
|
warehouseWaybill.setReplacePrice(wayBillEntity.getReplacePrice()); |
|
|
|
warehouseWaybill.setReceivedReplacePrice(BigDecimal.ZERO); |
|
|
|
warehouseWaybill.setReceivedReplacePrice(BigDecimal.ZERO); |
|
|
|
warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO); |
|
|
|
warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO); |
|
|
|
warehouseWaybill.setWaybillType(1); |
|
|
|
warehouseWaybill.setWaybillType(wayBillEntity.getType()); |
|
|
|
warehouseWaybill.setReceivedStatus(0); |
|
|
|
warehouseWaybill.setReceivedStatus(0); |
|
|
|
|
|
|
|
|
|
|
|
BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent); |
|
|
|
BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent); |
|
|
|