Browse Source

feat(all): 配送明细报表

1 优化广播推送逻辑
pre-production
zhaoqiaobo 3 weeks ago
parent
commit
59e9c68ade
  1. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/job/ExpenseJob.java
  2. 1207
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java
  3. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReportListener.java
  4. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/job/ExpenseJob.java

@ -49,13 +49,24 @@ public class ExpenseJob {
return ReturnT.SUCCESS;
}
/**
* 计算车次成本 车次号
* 计算自主配送车次成本 车次号
* @return
* @throws Exception
*/
@XxlJob("calculateTripCostJob")
public ReturnT<String> calculateTripCostJob(String param) throws Exception {
deliverFinishReportListener.calculateTripCost(param);
@XxlJob("calculateZzTripCostJob")
public ReturnT<String> calculateZzTripCostJob(String param) throws Exception {
deliverFinishReportListener.calculateTripCost(param, "自主配送");
return ReturnT.SUCCESS;
}
/**
* 计算三方配送车次成本 车次号
* @return
* @throws Exception
*/
@XxlJob("calculateSfTripCostJob")
public ReturnT<String> calculateSfTripCostJob(String param) throws Exception {
deliverFinishReportListener.calculateTripCost(param, "三方配送");
return ReturnT.SUCCESS;
}

1207
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java

File diff suppressed because it is too large Load Diff

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReportListener.java

@ -492,7 +492,8 @@ public class ReportListener {
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = ReportConstants.REPORT_QUALITY_CAR_FINAL_QUEUE, durable = "true"),
exchange = @Exchange(name = ReportConstants.REPORT_QUALITY_CAR_FINAL_EXCHANGE, type = ExchangeTypes.TOPIC),
exchange = @Exchange(name = ReportConstants.REPORT_QUALITY_CAR_FINAL_EXCHANGE, type = ExchangeTypes.TOPIC,
delayed = FactoryDataConstants.Mq.DELAYED),
key = ReportConstants.REPORT_QUALITY_CAR_FINAL_ROUTINGKEY
), ackMode = "MANUAL")
public void carExpenseDispatchDetailFinal(String msg, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long tag) {

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1668,6 +1668,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanEntity.setLoadedNub(parcelNumberVO.getReservationNum());
}
loadscanEntity.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
loadscanEntity.setIsZero(1);
distributionLoadscanService.save(loadscanEntity);
//更新装车数量
@ -1710,7 +1713,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanServiceOne.setLoadedNub(parcelNumberVO.getReservationNum());
}
distributionLoadscanService.updateById(loadscanServiceOne);
lingdans.add(loadscanServiceOne);
distributionParcelNumberService.updateById(parcelNumberEntity);
//维护零担订单在库 以及维护状态
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelNumberVO.getStockArticleId());
@ -4149,6 +4151,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionDeliveryTripartiteEntity tripartiteEntity = Func.copy(tripartite, DistributionDeliveryTripartiteEntity.class);
tripartiteEntity.setDeliveryId(deliveryListEntity.getId());
distributionDeliveryTripartiteService.save(tripartiteEntity);
deliveryListEntity.setPrice(tripartite.getDeliveryFee());
deliveryListEntity.setDistributionCompany(tripartite.getDistributionCompany());
deliveryListEntity.setDistributionCompanyId(tripartite.getDistributionCompanyId());
deliveryListEntity.setDriverName(tripartiteEntity.getDriverName());
@ -6537,7 +6540,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
for (DistributionLoadscanEntity distributionLoadscanEntity : pushNodeList) {
Map<String, Object> broadcastDataByZeroOrderAndParcId = baseMapper.getBroadcastDataByZeroOrderAndParcId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getWarehouseId(), distributionLoadscanEntity.getPackageId());
Map<String, Object> broadcastDataByZeroOrderAndParcId = baseMapper.getBroadcastDataByZeroOrderAndParcId(distributionLoadscanEntity.getDeliveryId(), distributionDeliveryListEntity.getWarehouseId(), distributionLoadscanEntity.getPackageId());
if(ObjectUtil.isNotEmpty(broadcastDataByZeroOrderAndParcId)){
PackageData packageData = BeanUtil.copy(broadcastDataByZeroOrderAndParcId, PackageData.class);
assert packageData != null;
@ -10694,6 +10697,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
nodeFanoutMsg.setTenantId(AuthUtil.getTenantId());
FinishDistributionTrainVO finishDistributionTrainVO = new FinishDistributionTrainVO();
finishDistributionTrainVO.setTrainNumber(deliveryListEntity.getTrainNumber());
if(StrUtil.isNotEmpty(deliveryListEntity.getKind())){
if(StrUtil.equals(deliveryListEntity.getKind(),"1")){
finishDistributionTrainVO.setDeliveryKind("自主配送");
} else {
finishDistributionTrainVO.setDeliveryKind("三方配送");
}
}
nodeFanoutMsg.setMain(finishDistributionTrainVO);
return nodeFanoutMsg;
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -5840,6 +5840,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setIsZero(1);
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijipiliangqianshou.getValue());
distributionLoadscanService.updateById(distributionLoadscanEntity);
distributionLoadscanEntityLists.add(distributionLoadscanEntity);
JSONObject jsonObject = new JSONObject();
@ -6292,8 +6294,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (distributionParcelListEntity.getIsZero() != null && 1 == distributionParcelListEntity.getIsZero()) {
// 零担
packageData.setPackageType(PackageTypeEnums.LTL);
packageData.setNumber(distributionLoadscanEntity.getReceivedQuantity());
DistributionParcelListEntity byId = distributionParcelListService.getById(distributionLoadscanEntity.getPackageId());
packageData.setNumber(distributionParcelListEntity.getReceivedQuantity());
DistributionParcelListEntity byId = distributionParcelListService.getById(distributionParcelListEntity.getPackageId());
if (Func.isNotEmpty(byId)) {
packageData.setOrderCode(byId.getOrderCode());
packageData.setBrand(byId.getBrandName());

Loading…
Cancel
Save