Browse Source

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

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

Loading…
Cancel
Save