|
|
|
@ -23,7 +23,6 @@ import com.logpm.distribution.feign.IDistributionParcelListClient;
|
|
|
|
|
import com.logpm.distribution.feign.IDistributionStockArticleClient; |
|
|
|
|
import com.logpm.factory.comfac.dto.OrderInfoDTO; |
|
|
|
|
import com.logpm.factory.comfac.dto.OrderStatusDTO; |
|
|
|
|
import com.logpm.factory.comfac.service.IOrderStatusLogService; |
|
|
|
|
import com.logpm.factory.pan.dto.PanFactoryOrderDTO; |
|
|
|
|
import com.logpm.factory.pan.dto.PanPackageInfoDTO; |
|
|
|
|
import com.logpm.factory.pan.dto.PanPackageListDTO; |
|
|
|
@ -455,11 +454,19 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
@Override |
|
|
|
|
public void handleDataToPlatform(String unitNo, String operationTime) { |
|
|
|
|
public void handleDataToPlatform(String unitNo, String operationTime,Integer oldWarehouseId) { |
|
|
|
|
log.info("############handleDataToPlatform: 处理数据到platform unitNo={}", unitNo); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(oldWarehouseId); |
|
|
|
|
if(Objects.isNull(basicdataWarehouseEntity)){ |
|
|
|
|
log.warn("############handleDataToPlatform: 仓库信息不存在 oldWarehouseId={}",oldWarehouseId); |
|
|
|
|
throw new CustomerException(405, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long warehouseId = basicdataWarehouseEntity.getId(); |
|
|
|
|
|
|
|
|
|
//先查询包件是否已存入到新系统数据库
|
|
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo); |
|
|
|
|
DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(unitNo,warehouseId); |
|
|
|
|
if (ObjectUtils.isEmpty(distributionParcelListEntity)) { |
|
|
|
|
//未找到包件信息那就去新增
|
|
|
|
|
//1.根据包条码去老系统数据库找到对应的包条信息
|
|
|
|
@ -501,12 +508,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
// Integer oldId = orderDetailEntity.getNowWarehouseId();
|
|
|
|
|
|
|
|
|
|
// 查询数据对应的仓库名称
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse); |
|
|
|
|
if(Objects.isNull(basicdataWarehouseEntity)){ |
|
|
|
|
log.warn("############handleDataToPlatform: 仓库信息不存在 destinationWarehouse={}",destinationWarehouse); |
|
|
|
|
throw new CustomerException(405, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
Long warehouseId = basicdataWarehouseEntity.getId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// OrderCountEntity orderCountEntity = orderCountClient.getEntityByOrderCode(orderSelfNum,oldId);
|
|
|
|
|
// if(Objects.isNull(orderCountEntity)){
|
|
|
|
|