|
|
|
@ -2,6 +2,7 @@ package com.logpm.distribution.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
@ -43,6 +44,7 @@ import org.springblade.common.constant.DistributionTypeConstant;
|
|
|
|
|
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.Inventory.InventoryPackageStatusConstant; |
|
|
|
|
import org.springblade.common.constant.Inventory.InventorySigningStatusConstant; |
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.constant.WorkNodeEnums; |
|
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
|
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; |
|
|
|
@ -62,6 +64,7 @@ import org.springblade.common.constant.stockup.StockupTypeConstant;
|
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Isolation; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -118,6 +121,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
|
|
|
|
|
private final ITrunklineWaybillTrackClient trunklineWaybillTrackClient; |
|
|
|
|
private final IWarehouseWaybillClient waybillClient; |
|
|
|
|
private final FactoryDataMessageSender factoryDataMessageSender; |
|
|
|
|
private final RabbitTemplate rabbitTemplate; |
|
|
|
|
|
|
|
|
|
// private final
|
|
|
|
|
|
|
|
|
@ -1440,7 +1444,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
@LogpmAsync("asyncExecutor") |
|
|
|
|
public void sendReviewFactory(Long signingId, String warehouseName, Long warehouseId) { |
|
|
|
|
String brands = "梦天,欧派,志邦";//可追加
|
|
|
|
|
String brands = "梦天,欧派,志邦,皮阿诺";//可追加
|
|
|
|
|
log.info(">>>>>>>>>>> 签收推送 对象 {}", "signingId:=" + signingId + "warehouseName:=" + warehouseName + "warehouseId:=" + warehouseId); |
|
|
|
|
//查询签收信息
|
|
|
|
|
DistributionSignforEntity distributionSignforEntity = distributionSignforMapper.selectById(signingId); |
|
|
|
@ -1565,6 +1569,28 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
|
|
|
|
|
factoryDataMessageSender.sendNodeDataByBrand(msg); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(brand.get("皮阿诺"))) { |
|
|
|
|
List<MtReceiveContentDTO> zb = brand.get("皮阿诺"); |
|
|
|
|
if (CollUtil.isNotEmpty(zb)) { |
|
|
|
|
for (MtReceiveContentDTO mtReceiveContentDTO : zb) { |
|
|
|
|
try { |
|
|
|
|
// 发送入库消息
|
|
|
|
|
com.logpm.distribution.dto.OrderStatusDTO orderStatusDTO = new com.logpm.distribution.dto.OrderStatusDTO(); |
|
|
|
|
// 通过包件id 查询包件
|
|
|
|
|
orderStatusDTO.setUnitNo(mtReceiveContentDTO.getUnitNo()); |
|
|
|
|
orderStatusDTO.setOrderNo(mtReceiveContentDTO.getOrderCode()); |
|
|
|
|
orderStatusDTO.setStatus("7"); |
|
|
|
|
orderStatusDTO.setOperationTime(DateUtil.now()); |
|
|
|
|
orderStatusDTO.setCurrentWarehouse(warehouseId.toString()); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("messageData", JSONUtil.toJsonStr(orderStatusDTO)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.HWY_ORDER_STATUS_EXCHANGE, RabbitConstant.HWY_ORDER_STATUS_ROUTING, map); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("入库推送失败:{}", e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//....工厂
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|