Browse Source

1.三方中转签收广播注释

dev
zhenghaoyu 3 days ago
parent
commit
a594acaa7f
  1. 67
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

67
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -57,7 +57,6 @@ import org.springblade.common.constant.*;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
@ -9768,22 +9767,22 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// carsLoadAsyncService.sendReportPackageSignData(AuthUtil.getNickName(),AuthUtil.getUserId(),warehouseId,warehouseName,carsLoadEntity,scanCodes);
FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderPackageCodeList(scanCodes);
findParamterDTO.setWarehouseId(warehouseId);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO);
parcelListEntityList.forEach(parcelListEntity -> {
PackageData packageData = new PackageData();
packageData.setWaybillNumber(parcelListEntity.getWaybillNumber());
packageData.setBrand(parcelListEntity.getBrandName());
packageData.setPackageCode(parcelListEntity.getOrderPackageCode());
packageData.setMaterialCode(parcelListEntity.getMaterialCode());
packageData.setMaterialName(parcelListEntity.getMaterialName());
packageData.setNumber(1);
packageData.setOrderCode(parcelListEntity.getOrderCode());
packageData.setPackageType(PackageTypeEnums.CMP);
packageDataList.add(packageData);
});
// FindParamterDTO findParamterDTO = new FindParamterDTO();
// findParamterDTO.setOrderPackageCodeList(scanCodes);
// findParamterDTO.setWarehouseId(warehouseId);
// List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO);
// parcelListEntityList.forEach(parcelListEntity -> {
// PackageData packageData = new PackageData();
// packageData.setWaybillNumber(parcelListEntity.getWaybillNumber());
// packageData.setBrand(parcelListEntity.getBrandName());
// packageData.setPackageCode(parcelListEntity.getOrderPackageCode());
// packageData.setMaterialCode(parcelListEntity.getMaterialCode());
// packageData.setMaterialName(parcelListEntity.getMaterialName());
// packageData.setNumber(1);
// packageData.setOrderCode(parcelListEntity.getOrderCode());
// packageData.setPackageType(PackageTypeEnums.CMP);
// packageDataList.add(packageData);
// });
}else{
@ -9803,19 +9802,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
TrunklineScanZeroDetailEntity entity = new TrunklineScanZeroDetailEntity();
BeanUtil.copy(zeroDetailVO, entity);
zeroDetailList.add(entity);
Long packageId = zeroDetailVO.getPackageId();
DistributionParcelListEntity parcelList = parcelListMap.get(packageId);
if(!Objects.isNull(parcelList)){
PackageData packageData = new PackageData();
packageData.setWaybillNumber(parcelList.getWaybillNumber());
packageData.setBrand(parcelList.getBrandName());
packageData.setProductId(zeroDetailVO.getGoodsId());
packageData.setProductName(zeroDetailVO.getGoodsName());
packageData.setNumber(zeroDetailVO.getUnloadNum());
packageData.setOrderCode(parcelList.getOrderCode());
packageData.setPackageType(PackageTypeEnums.LTL);
packageDataList.add(packageData);
}
// Long packageId = zeroDetailVO.getPackageId();
// DistributionParcelListEntity parcelList = parcelListMap.get(packageId);
// if(!Objects.isNull(parcelList)){
// PackageData packageData = new PackageData();
// packageData.setWaybillNumber(parcelList.getWaybillNumber());
// packageData.setBrand(parcelList.getBrandName());
// packageData.setProductId(zeroDetailVO.getGoodsId());
// packageData.setProductName(zeroDetailVO.getGoodsName());
// packageData.setNumber(zeroDetailVO.getUnloadNum());
// packageData.setOrderCode(parcelList.getOrderCode());
// packageData.setPackageType(PackageTypeEnums.LTL);
// packageDataList.add(packageData);
// }
});
@ -9830,10 +9829,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
});
NodeFanoutMsg<TripartiteVO> tripartiteVONodeFanoutMsg = buildNodeFanoutMessage(carsLoadEntity, packageDataList, warehouseId);
if(!Objects.isNull(tripartiteVONodeFanoutMsg)){
rabbitTemplate.convertAndSend(FanoutConstants.trunkline.tripartite.EXCHANGE, null, com.alibaba.fastjson.JSONObject.toJSONString(tripartiteVONodeFanoutMsg));
}
// NodeFanoutMsg<TripartiteVO> tripartiteVONodeFanoutMsg = buildNodeFanoutMessage(carsLoadEntity, packageDataList, warehouseId);
// if(!Objects.isNull(tripartiteVONodeFanoutMsg)){
// rabbitTemplate.convertAndSend(FanoutConstants.trunkline.tripartite.EXCHANGE, null, com.alibaba.fastjson.JSONObject.toJSONString(tripartiteVONodeFanoutMsg));
// }
return R.success("签收成功");
}

Loading…
Cancel
Save