Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 9 months ago
parent
commit
52ca8eebde
  1. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java
  2. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java
  3. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java
  4. 20
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java

@ -153,7 +153,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService {
try {
if ("1".equals(status) || "4".equals(status)) {
// 始发仓和目的仓入库
panFactoryDataService.handleDataToPlatform(unitNo, operationTime);
panFactoryDataService.handleDataToPlatform(unitNo, operationTime,Integer.parseInt(currentWarehouseId));
} else {
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>> 错误的状态");
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java

@ -38,7 +38,7 @@ public class OpReceivingDataHandler {
String receivingTime = object.getString("receivingTime");
//真正处理需要的数据
try {
panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime);
panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime,null);
} catch (CustomerException e) {
log.error("##################opReceivingDataHandler: 处理欧派收货数据到新系统,orderPackageCode:{},receivingTime:{},msg:{}",

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/IPanFactoryDataService.java

@ -18,7 +18,7 @@ public interface IPanFactoryDataService {
R hwyHandleStatusData(OrderStatusDTO orderStatusDTO);
void handleDataToPlatform(String unitNo,String operationTime);
void handleDataToPlatform(String unitNo,String operationTime,Integer oldWarehouseId);
Long saveData(PanFactoryOrderDTO factoryOrderDTO);
}

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

@ -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)){

Loading…
Cancel
Save