|
|
@ -44,32 +44,30 @@ public class DealWithDataHandler { |
|
|
|
String status = orderStatusDTO.getStatus(); |
|
|
|
String status = orderStatusDTO.getStatus(); |
|
|
|
String unitNo = orderStatusDTO.getUnitNo(); |
|
|
|
String unitNo = orderStatusDTO.getUnitNo(); |
|
|
|
String operationTime = orderStatusDTO.getOperationTime(); |
|
|
|
String operationTime = orderStatusDTO.getOperationTime(); |
|
|
|
if("4".equals(status)){ |
|
|
|
if ("4".equals(status)) { |
|
|
|
//继续判断是否到达目的仓
|
|
|
|
//继续判断是否到达目的仓
|
|
|
|
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
|
|
|
|
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
|
|
|
|
//查询destinationWarehouse logiBillNo plantId数据
|
|
|
|
//查询destinationWarehouse logiBillNo plantId数据
|
|
|
|
Map<String,String> supplyData = advanceDetailClient.getSupplyData(unitNo); |
|
|
|
Map<String, String> supplyData = advanceDetailClient.getSupplyData(unitNo); |
|
|
|
String destinationWarehouseId = supplyData.get("destinationWarehouseId");//目的仓id
|
|
|
|
String destinationWarehouseId = supplyData.get("destinationWarehouseId");//目的仓id
|
|
|
|
if(StringUtil.isBlank(currentWarehouseId)||StringUtil.isBlank(destinationWarehouseId)){ |
|
|
|
if (StringUtil.isBlank(currentWarehouseId) || StringUtil.isBlank(destinationWarehouseId)) { |
|
|
|
log.warn("##############dealWithDataHandler: 仓库数据有问题currentWarehouseId={} destinationWarehouseId={}",currentWarehouseId,destinationWarehouseId); |
|
|
|
log.warn("##############dealWithDataHandler: 仓库数据有问题currentWarehouseId={} destinationWarehouseId={}", currentWarehouseId, destinationWarehouseId); |
|
|
|
throw new CustomerException(405,"仓库数据有误"); |
|
|
|
throw new CustomerException(405, "仓库数据有误"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
if(!currentWarehouseId.equals(destinationWarehouseId)){ |
|
|
|
if (!currentWarehouseId.equals(destinationWarehouseId)) { |
|
|
|
log.info("##############dealWithDataHandler: 不用处理的状态 currentWarehouseId={} destinationWarehouseId={}",currentWarehouseId,destinationWarehouseId); |
|
|
|
log.info("##############dealWithDataHandler: 不用处理的状态 currentWarehouseId={} destinationWarehouseId={}", currentWarehouseId, destinationWarehouseId); |
|
|
|
// channel.basicAck(deliveryTag,false);
|
|
|
|
// channel.basicAck(deliveryTag,false);
|
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
//真正的处理需要的数据
|
|
|
|
//真正的处理需要的数据
|
|
|
|
try{ |
|
|
|
try { |
|
|
|
panFactoryDataService.handleDataToPlatform(unitNo,operationTime); |
|
|
|
panFactoryDataService.handleDataToPlatform(unitNo, operationTime); |
|
|
|
}catch (Exception e){ |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
}else{ |
|
|
|
log.info("##############dealWithDataHandler: 不用处理的状态 status={}", status); |
|
|
|
log.info("##############dealWithDataHandler: 不用处理的状态 status={}",status); |
|
|
|
|
|
|
|
// channel.basicAck(deliveryTag,false);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|