25 changed files with 147 additions and 207 deletions
@ -0,0 +1,45 @@
|
||||
package com.logpm.distribution.receiver; |
||||
|
||||
import cn.hutool.core.util.ObjectUtil; |
||||
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; |
||||
import com.rabbitmq.client.Channel; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.common.constant.RabbitConstant; |
||||
import org.springframework.amqp.rabbit.annotation.RabbitHandler; |
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener; |
||||
import org.springframework.messaging.Message; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.Map; |
||||
import java.util.Objects; |
||||
|
||||
@Slf4j |
||||
@RabbitListener(queues = RabbitConstant.SELF_PICKUP_SCAN_QUEUE) |
||||
@Component |
||||
@AllArgsConstructor |
||||
public class BillLadingScanDataQueueHandler { |
||||
private final IWarehouseUpdownTypeClient warehouseUpdownTypeClient; |
||||
|
||||
@RabbitHandler |
||||
public void billLadingScanDataHandler(Map map, Message message, Channel channel) { |
||||
log.info("自提订单扫描数据接收成功"); |
||||
Object o = map.get("coding"); |
||||
Object warehouseIdObj = map.get("warehouseId"); |
||||
|
||||
if (!ObjectUtil.isAllEmpty(o, warehouseIdObj)) { |
||||
|
||||
String coding = Objects.toString(o); |
||||
|
||||
Long warehouseId = (Long) warehouseIdObj; |
||||
warehouseUpdownTypeClient.downPackageOrDelTray(coding, warehouseId, "签收下架解托"); |
||||
|
||||
}else{ |
||||
log.warn("自提订单扫描数据接收失败"); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue