Browse Source

1.推送皮阿诺开单数据逻辑修改

dev-warehouse
zhenghaoyu 2 years ago
parent
commit
e604971b28
  1. 12
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java

12
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java

@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
@ -48,7 +49,12 @@ public class OpenOrderHandler {
String msg = new String(message.getBody());
log.info("##################我进入这里了 retryCount={}",retryCount++);
OrderInfoDTO orderInfoDTO = (OrderInfoDTO) map.get("messageData");
String orderNo = orderInfoDTO.getOrderNo();//订单自编号
String orderNoStr = orderInfoDTO.getOrderNo();//订单自编号
String[] split = orderNoStr.split(",");
for (String orderNo:split){
if(StringUtil.isBlank(orderNo)){
continue;
}
//通过订单自编号去查询该条订单是属于哪个工厂
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderNo);
if(Objects.isNull(advanceEntity)){
@ -58,6 +64,7 @@ public class OpenOrderHandler {
}
String type = advanceEntity.getType();//品牌
orderInfoDTO.setOrderNo(orderNo);
R r = null;
switch (type){
case FactoryConstant.PIANO:
@ -78,4 +85,7 @@ public class OpenOrderHandler {
// channel.basicAck(deliveryTag,true);
}
}
}
}

Loading…
Cancel
Save