Browse Source

feat(all): 增加节点报表

dist.1.3.0
zhaoqiaobo 7 months ago
parent
commit
1727cb8536
  1. 7
      blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java
  2. 18
      blade-biz-common/src/main/java/org/springblade/common/constant/report/ReportConstants.java
  3. 1
      blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java
  4. 50
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java
  5. 5
      blade-service/logpm-distribution/pom.xml
  6. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/ReportQualityDeliverDTO.java
  7. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/QualityDeliverMapper.java
  8. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/QualityDeliverMapper.xml
  9. 139
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java
  10. 159
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java
  11. 101
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java
  12. 139
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java
  13. 141
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java
  14. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IQualityDeliverService.java
  15. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  16. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java

7
blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java

@ -163,13 +163,14 @@ public abstract class FanoutConstants {
*/
public interface reservation {
// 自主预约
// 自主预约 org.springblade.common.model.ReservationVO
interface OwnReservation {
String EXCHANGE = "fanout.reservation.own" + ModuleNameConstant.DEVAUTH;
interface QUEUE {
String OWNRESERVATION_LOG = "fanout.reservation.own.log" + ModuleNameConstant.DEVAUTH;
String REPORT = "fanout.reservation.OwnReservation.report" + ModuleNameConstant.DEVAUTH;
}
}
@ -199,7 +200,7 @@ public abstract class FanoutConstants {
// main: {"id":"备货任务ID", "stockupCode":"备货编码", "typeService":"服务类型 1 商 2 市 3 自", "stockupDate":"备货时间"}
interface QUEUE {
String REPORT = "fanout.distribution.stock.report" + ModuleNameConstant.DEVAUTH;
}
}
@ -210,7 +211,7 @@ public abstract class FanoutConstants {
// main: {"id":"备货任务ID", "stockupCode":"备货编码", "typeService":"服务类型 1 商 2 市 3 自", "stockupDate":"备货时间"}
interface QUEUE {
String REPORT = "fanout.distribution.DeliveryAndLoading.report" + ModuleNameConstant.DEVAUTH;
}
}

18
blade-biz-common/src/main/java/org/springblade/common/constant/report/ReportConstants.java

@ -0,0 +1,18 @@
package org.springblade.common.constant.report;
/**
* excel处理常量类
*
* @author zhaoqiaobo
* @create 2024-03-18 10:30
*/
public class ReportConstants {
/**
* 配送明细报表
*/
public static final String REPORT_QUALITY_DELIVER_EXCHANGE = "report.quality.deliver.exchange";
public static final String REPORT_QUALITY_DELIVER_QUEUE = "report.quality.deliver.queue";
public static final String REPORT_QUALITY_DELIVER_ROUTINGKEY = "report.quality.deliver.key";
}

1
blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java

@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springblade.common.enums.BrandEnums;
import org.springblade.common.enums.PackageTypeEnums;
import java.io.Serializable;

50
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/QualityDeliverEntity.java → blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java

@ -1,4 +1,4 @@
package com.logpm.report.entity;
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
@ -28,6 +28,11 @@ import java.util.Date;
@Builder
public class QualityDeliverEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
* 业务状态
*/
@ApiModelProperty(value = "业务状态 90 签收 100 签收复核 110拒签")
private Integer bizStatus;
/**
* 事业线
*/
@ -208,16 +213,37 @@ public class QualityDeliverEntity extends TenantEntity {
*/
@ApiModelProperty(value = "末端仓入库时间")
private String endWarehouseInTime;
/**
* 计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/
@ApiModelProperty(value = "计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号")
private String planTrainNumber;
/**
* 计划预约单号 只有商市配自提采用自提车次号 三方中转采用三方中转车次号
*/
@ApiModelProperty(value = "计划预约单号 只有商市配,自提采用自提车次号 三方中转采用三方中转车次号")
private String planReservationCode;
/**
* 计划预约人
*/
@ApiModelProperty(value = "计划预约人")
private String planReservationUser;
/**
* 计划预约时间
*/
@ApiModelProperty(value = "计划预约时间")
private Date planReservationTime;
/**
* 计划数量
*/
@ApiModelProperty(value = "预约计划数量")
private Integer planNum;
/**
* 计划预约创建时间
*/
@ApiModelProperty(value = "计划预约创建时间")
private Date planReservationCreateTime;
/**
* 计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/
@ApiModelProperty(value = "计划配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号")
private String planTrainNumber;
/**
* 配送日期
*/
@ -251,13 +277,8 @@ public class QualityDeliverEntity extends TenantEntity {
/**
* 计划时间
*/
@ApiModelProperty(value = "计划时间")
@ApiModelProperty(value = "配送计划时间")
private Date deliveryPlanTime;
/**
* 计划数量
*/
@ApiModelProperty(value = "计划数量")
private Integer planNum;
/**
* 计划类型新增 补录
*/
@ -283,6 +304,11 @@ public class QualityDeliverEntity extends TenantEntity {
*/
@ApiModelProperty(value = "备货时间")
private Date stockupFinishTime;
/**
* 备货作业时间
*/
@ApiModelProperty(value = "备货作业时间")
private Date stockupCreateTime;
/**
* 备货数量
*/

5
blade-service/logpm-distribution/pom.xml

@ -133,11 +133,6 @@
<artifactId>logpm-business-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-report-api</artifactId>
<version>3.2.0.RELEASE</version>
</dependency>
</dependencies>

24
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/ReportQualityDeliverDTO.java

@ -0,0 +1,24 @@
package com.logpm.distribution.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springblade.common.enums.BizOperationEnums;
import java.io.Serializable;
/**
*
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ReportQualityDeliverDTO implements Serializable {
private String data;
private BizOperationEnums operation;
}

30
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/QualityDeliverMapper.java

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.distribution.entity.QualityDeliverEntity;
/**
* 配送明细 Mapper 接口
*
* @author zqb
* @since 2024-08-23
*/
public interface QualityDeliverMapper extends BaseMapper<QualityDeliverEntity> {
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/QualityDeliverMapper.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.distribution.mapper.QualityDeliverMapper">
<!-- 通用查询映射结果 -->
<resultMap id="qualityDeliverResultMap" type="com.logpm.distribution.entity.QualityDeliverEntity">
</resultMap>
</mapper>

139
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java

@ -0,0 +1,139 @@
package com.logpm.distribution.receiver.report;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.ReportQualityDeliverDTO;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.service.IQualityDeliverService;
import com.logpm.factorydata.feign.IFactoryDataClient;
import com.logpm.factorydata.vo.SendMsg;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.report.ReportConstants;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.model.DistributionLoadVO;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.StockUpVO;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* 装车生成明细报表
*
* @author zhaoqiaobo
* @create 2024-03-18 0:02
*/
@Slf4j
@Component
@AllArgsConstructor
public class LoadingReportListener {
@Resource
private IQualityDeliverService qualityDeliverService;
@Resource
private IFactoryDataClient factoryDataClient;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FanoutConstants.distribution.DeliveryAndLoading.QUEUE.REPORT, durable = "true"),
exchange = @Exchange(name = FanoutConstants.distribution.DeliveryAndLoading.EXCHANGE, type = ExchangeTypes.FANOUT)
))
@Transactional(rollbackFor = Exception.class)
public void buildReport(String msg) {
log.info("备货生成明细报表: {}", msg);
if (StrUtil.isEmpty(msg)) {
return;
}
NodeFanoutMsg bean = JSONUtil.toBean(msg, NodeFanoutMsg.class);
Long warehouseId = bean.getWarehouseId();
BizOperationEnums bizOperation = bean.getBizOperation();
List<PackageData> details = bean.getDetails();
Object main = bean.getMain();
JSONObject entries = JSONUtil.parseObj(main);
DistributionLoadVO vo = JSONUtil.toBean(entries, DistributionLoadVO.class);
if (BizOperationEnums.MODIFY.equals(bizOperation) || BizOperationEnums.DELETE.equals(bizOperation)) {
// 根据预约单号查询出所有这个预约单下的数据 先置空
LambdaUpdateWrapper<QualityDeliverEntity> wrapper = Wrappers.<QualityDeliverEntity>lambdaUpdate()
.set(QualityDeliverEntity::getStockupCode, null)
.set(QualityDeliverEntity::getStockupUserName, null)
.set(QualityDeliverEntity::getStockupFinishTime, null)
.set(QualityDeliverEntity::getStockNum, null)
.set(QualityDeliverEntity::getStockAllocation, null)
.set(QualityDeliverEntity::getStockupCreateTime, null)
.ne(QualityDeliverEntity::getBizStatus, 110);
qualityDeliverService.update(wrapper);
}
if (CollUtil.isNotEmpty(details)) {
for (PackageData detail : details) {
QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder()
.warehouseName(bean.getWarehouse())
.warehouseId(warehouseId)
.stockupUserName(bean.getOperator())
.stockupCreateTime(bean.getOperatorTime())
// 备货区 TODO
// .stockAllocation(vo.get)
.build();
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) {
qualityDeliverEntity.setConditions(1);
qualityDeliverEntity.setStockNum(1);
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setStockNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {
qualityDeliverEntity.setIncomingBatch(detail.getPickupBatch());
qualityDeliverEntity.setMallName(detail.getMallName());
qualityDeliverEntity.setMaterielCode(detail.getMaterialCode());
qualityDeliverEntity.setMaterielName(detail.getMaterialName());
qualityDeliverEntity.setConditions(3);
qualityDeliverEntity.setStockNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
}
}
}
}
}

159
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java

@ -1,22 +1,25 @@
package com.logpm.distribution.receiver.report;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.report.entity.QualityDeliverEntity;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.ReportQualityDeliverDTO;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.service.IQualityDeliverService;
import com.logpm.factorydata.feign.IFactoryDataClient;
import com.logpm.factorydata.vo.SendMsg;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.report.ReportConstants;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.model.DistributionTaskVO;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springframework.amqp.core.ExchangeTypes;
@ -25,12 +28,10 @@ import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 配送计划生成明细报表
@ -44,81 +45,103 @@ import java.util.stream.Collectors;
public class PlanReportListener {
@Resource
private IDistributionParcelListService parcelListService;
@Resource
private IDistributionDeliveryListService deliveryListService;
private IQualityDeliverService qualityDeliverService;
@Resource
private IBasicdataWarehouseClient warehouseClient;
private IFactoryDataClient factoryDataClient;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FanoutConstants.distribution.DeliveryAndPlan.QUEUE.REPORT, durable = "true"),
exchange = @Exchange(name = FanoutConstants.distribution.DeliveryAndPlan.EXCHANGE, type = ExchangeTypes.FANOUT)
))
public void nodeDataPushDelayed(String msg) {
log.info("配送计划生成明细报表: {}", msg);
@Transactional(rollbackFor = Exception.class)
public void buildReport(String msg) {
log.info("预约计划生成明细报表: {}", msg);
if (StrUtil.isEmpty(msg)) {
return;
}
NodeFanoutMsg bean = JSONUtil.toBean(msg, NodeFanoutMsg.class);
// Long warehouseId = bean.getWarehouseId();
Long warehouseId = bean.getWarehouseId();
BizOperationEnums bizOperation = bean.getBizOperation();
List<PackageData> details = bean.getDetails();
Object main = bean.getMain();
// main: {"distributionCompany":"承运商", "driverName":"司机姓名", "id":"任务ID", "kind":"任务类型 1-自主 2-外协", "taskTime":"任务时间", "trainNumber":"车次号","type":"配送类型 1商配 2市配", "vehicleName":"车牌号"}
JSONObject entries = JSONUtil.parseObj(main);
BasicdataWarehouseEntity warehouseEntity = null;
// if (ObjectUtil.isNotEmpty(warehouseId)) {
// List<BasicdataWarehouseEntity> warehouseEntities = warehouseClient.findWarehousesByIds(CollUtil.newArrayList(warehouseId));
// if (CollUtil.isNotEmpty(warehouseEntities)) {
// warehouseEntity = warehouseEntities.get(0);
// }
// }
if (BizOperationEnums.ADD.equals(bizOperation)) {
List<QualityDeliverEntity> entities = new ArrayList<>();
// 新增
// 查询出基础信息插入基础表
// 订制品 库存品 零担
if (CollUtil.isNotEmpty(details)) {
// 按 packageType 分组
Map<PackageTypeEnums, List<PackageData>> detailMap = details.stream().collect(Collectors.groupingBy(PackageData::getPackageType));
if (detailMap.containsKey(PackageTypeEnums.CMP)) {
// 订制品
List<PackageData> packageData = detailMap.get(PackageTypeEnums.CMP);
// List<DistributionParcelListEntity> listByOrderPackageCode = parcelListService.findListByOrderPackageCode(packageData.stream().map(PackageData::getPackageCode).collect(Collectors.toList()), bean.getWarehouseId());
Map<String, DistributionParcelListEntity> parcelListMap = null;
// if (CollUtil.isNotEmpty(listByOrderPackageCode)) {
// 转map
// parcelListMap = listByOrderPackageCode.stream().collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, e -> e));
// }
for (PackageData packageDatum : packageData) {
QualityDeliverEntity entity = QualityDeliverEntity.builder()
.orderCode(packageDatum.getOrderCode())
.businessUnit(ObjectUtil.isNotEmpty(warehouseEntity) ? warehouseEntity.getBusinessLine() : "")
.warehouseName(bean.getWarehouse())
// .warehouseId(bean.getWarehouseId())
.build();
if (MapUtil.isNotEmpty(parcelListMap) && parcelListMap.containsKey(packageDatum.getPackageCode())) {
DistributionParcelListEntity parcelListEntity = parcelListMap.get(packageDatum.getPackageCode());
if (ObjectUtil.isNotEmpty(parcelListEntity)) {
entity.setBrandName(parcelListEntity.getBrandName());
}
}
DistributionTaskVO vo = JSONUtil.toBean(entries, DistributionTaskVO.class);
if (BizOperationEnums.MODIFY.equals(bizOperation) || BizOperationEnums.DELETE.equals(bizOperation)) {
// 根据预约单号查询出所有这个预约单下的数据 先置空
LambdaUpdateWrapper<QualityDeliverEntity> wrapper = Wrappers.<QualityDeliverEntity>lambdaUpdate()
.set(QualityDeliverEntity::getPlanTrainNumber, null)
.set(QualityDeliverEntity::getDeliveryTime, null)
.set(QualityDeliverEntity::getDeliveryType, null)
.set(QualityDeliverEntity::getDeliveryKind, null)
.set(QualityDeliverEntity::getVehicleName, null)
.set(QualityDeliverEntity::getDriverName, null)
.set(QualityDeliverEntity::getDistributionCompany, null)
.set(QualityDeliverEntity::getDeliveryPlanTime, null)
.set(QualityDeliverEntity::getDeliveryCreateUserName, null)
.eq(QualityDeliverEntity::getPlanTrainNumber, vo.getTrainNumber())
.ne(QualityDeliverEntity::getBizStatus, 110);
qualityDeliverService.update(wrapper);
}
if (CollUtil.isNotEmpty(details)) {
for (PackageData detail : details) {
QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder()
.warehouseName(bean.getWarehouse())
.warehouseId(warehouseId)
.planTrainNumber(vo.getTrainNumber())
.deliveryTime(DateUtil.parseDate(vo.getTaskTime()))
.deliveryType(vo.getType())
.deliveryKind(vo.getKind())
.vehicleName(vo.getVehicleName())
.driverName(vo.getDriverName())
.distributionCompany(vo.getDistributionCompany())
.deliveryPlanTime(bean.getOperatorTime())
.deliveryCreateUserName(bean.getOperator())
.build();
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) {
qualityDeliverEntity.setConditions(1);
qualityDeliverEntity.setPlanNum(1);
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setPlanNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {
qualityDeliverEntity.setIncomingBatch(detail.getPickupBatch());
qualityDeliverEntity.setMallName(detail.getMallName());
qualityDeliverEntity.setMaterielCode(detail.getMaterialCode());
qualityDeliverEntity.setMaterielName(detail.getMaterialName());
qualityDeliverEntity.setConditions(3);
qualityDeliverEntity.setPlanNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (detailMap.containsKey(PackageTypeEnums.INV)) {
// 库存品
} else if (detailMap.containsKey(PackageTypeEnums.LTL)) {
// 零担
}
}
} else if (BizOperationEnums.DELETE.equals(bizOperation)) {
// 删除
} else if (BizOperationEnums.MODIFY.equals(bizOperation)) {
// 修改
}
}

101
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java

@ -0,0 +1,101 @@
package com.logpm.distribution.receiver.report;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.ReportQualityDeliverDTO;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.service.IQualityDeliverService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.report.ReportConstants;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* 配送明细基础表处理类
*
* @author zhaoqiaobo
* @create 2024-03-18 0:02
*/
@Slf4j
@Component
@AllArgsConstructor
public class QualityDeliverListener {
@Resource
private IQualityDeliverService qualityDeliverService;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = ReportConstants.REPORT_QUALITY_DELIVER_QUEUE, durable = "true"),
exchange = @Exchange(name = ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE, type = ExchangeTypes.TOPIC),
key = ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY
))
public void data(String msg) {
log.info("明细报表: {}", msg);
if (StrUtil.isEmpty(msg)) {
return;
}
ReportQualityDeliverDTO bean = JSONUtil.toBean(msg, ReportQualityDeliverDTO.class);
String data = bean.getData();
QualityDeliverEntity qualityDeliverEntity = JSONUtil.toBean(data, QualityDeliverEntity.class);
switch (bean.getOperation()) {
case MODIFY:
Integer conditions = qualityDeliverEntity.getConditions();
if (1 == conditions) {
QualityDeliverEntity entity = qualityDeliverService.getOne(Wrappers.<QualityDeliverEntity>lambdaQuery()
.eq(QualityDeliverEntity::getOrderPackageCode, qualityDeliverEntity.getOrderPackageCode())
.lt(QualityDeliverEntity::getBizStatus, 110));
if (ObjectUtil.isNotEmpty(entity)) {
qualityDeliverService.update(qualityDeliverEntity, Wrappers.<QualityDeliverEntity>lambdaUpdate()
.eq(QualityDeliverEntity::getOrderPackageCode, qualityDeliverEntity.getOrderPackageCode())
.lt(QualityDeliverEntity::getBizStatus, 110));
} else {
// 获取基础数据赋值
qualityDeliverService.save(qualityDeliverEntity);
}
} else if (2 == conditions) {
QualityDeliverEntity entity = qualityDeliverService.getOne(Wrappers.<QualityDeliverEntity>lambdaQuery()
.eq(QualityDeliverEntity::getIncomingBatch, qualityDeliverEntity.getIncomingBatch())
.eq(QualityDeliverEntity::getMallName, qualityDeliverEntity.getMallName())
.eq(QualityDeliverEntity::getMaterielCode, qualityDeliverEntity.getMaterielCode())
.lt(QualityDeliverEntity::getBizStatus, 110));
if (ObjectUtil.isNotEmpty(entity)) {
qualityDeliverService.update(qualityDeliverEntity, Wrappers.<QualityDeliverEntity>lambdaUpdate()
.eq(QualityDeliverEntity::getIncomingBatch, qualityDeliverEntity.getIncomingBatch())
.eq(QualityDeliverEntity::getMallName, qualityDeliverEntity.getMallName())
.eq(QualityDeliverEntity::getMaterielCode, qualityDeliverEntity.getMaterielCode())
.lt(QualityDeliverEntity::getBizStatus, 110));
} else {
// 获取基础数据赋值
qualityDeliverService.save(qualityDeliverEntity);
}
} else if (3 == conditions) {
QualityDeliverEntity entity = qualityDeliverService.getOne(Wrappers.<QualityDeliverEntity>lambdaQuery()
.eq(QualityDeliverEntity::getOrderCode, qualityDeliverEntity.getOrderCode())
.eq(QualityDeliverEntity::getCostCategory, qualityDeliverEntity.getCostCategory())
.lt(QualityDeliverEntity::getBizStatus, 110));
if (ObjectUtil.isNotEmpty(entity)) {
qualityDeliverService.update(qualityDeliverEntity, Wrappers.<QualityDeliverEntity>lambdaUpdate()
.eq(QualityDeliverEntity::getOrderCode, qualityDeliverEntity.getOrderCode())
.eq(QualityDeliverEntity::getCostCategory, qualityDeliverEntity.getCostCategory())
.lt(QualityDeliverEntity::getBizStatus, 110));
} else {
// 获取基础数据赋值
qualityDeliverService.save(qualityDeliverEntity);
}
}
break;
default:
return;
}
}
}

139
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java

@ -0,0 +1,139 @@
package com.logpm.distribution.receiver.report;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.ReportQualityDeliverDTO;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.service.IQualityDeliverService;
import com.logpm.factorydata.feign.IFactoryDataClient;
import com.logpm.factorydata.vo.SendMsg;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.report.ReportConstants;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.ReservationVO;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* 预约计划生成明细报表
*
* @author zhaoqiaobo
* @create 2024-03-18 0:02
*/
@Slf4j
@Component
@AllArgsConstructor
public class ReservationPlanReportListener {
@Resource
private IQualityDeliverService qualityDeliverService;
@Resource
private IFactoryDataClient factoryDataClient;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FanoutConstants.reservation.OwnReservation.QUEUE.REPORT, durable = "true"),
exchange = @Exchange(name = FanoutConstants.reservation.OwnReservation.EXCHANGE, type = ExchangeTypes.FANOUT)
))
@Transactional(rollbackFor = Exception.class)
public void buildReport(String msg) {
log.info("预约计划生成明细报表: {}", msg);
if (StrUtil.isEmpty(msg)) {
return;
}
NodeFanoutMsg bean = JSONUtil.toBean(msg, NodeFanoutMsg.class);
Long warehouseId = bean.getWarehouseId();
BizOperationEnums bizOperation = bean.getBizOperation();
List<PackageData> details = bean.getDetails();
Object main = bean.getMain();
JSONObject entries = JSONUtil.parseObj(main);
ReservationVO vo = JSONUtil.toBean(entries, ReservationVO.class);
if (BizOperationEnums.MODIFY.equals(bizOperation) || BizOperationEnums.DELETE.equals(bizOperation)) {
// 根据预约单号查询出所有这个预约单下的数据 先置空
LambdaUpdateWrapper<QualityDeliverEntity> wrapper = Wrappers.<QualityDeliverEntity>lambdaUpdate()
.set(QualityDeliverEntity::getPlanReservationCreateTime, null)
.set(QualityDeliverEntity::getPlanReservationCode, null)
.set(QualityDeliverEntity::getPlanReservationTime, null)
.set(QualityDeliverEntity::getPlanReservationUser, null)
.set(QualityDeliverEntity::getPlanNum, null)
.eq(QualityDeliverEntity::getPlanReservationCode, vo.getReservationCode())
.ne(QualityDeliverEntity::getBizStatus, 110);
qualityDeliverService.update(wrapper);
}
if (CollUtil.isNotEmpty(details)) {
for (PackageData detail : details) {
QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder()
.warehouseName(bean.getWarehouse())
.warehouseId(warehouseId)
.orderPackageCode(detail.getPackageCode())
.planReservationCreateTime(bean.getOperatorTime())
.planReservationCode(vo.getReservationCode())
.planReservationTime(vo.getReservationDate())
.planReservationUser(bean.getOperator())
.build();
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) {
qualityDeliverEntity.setConditions(1);
qualityDeliverEntity.setPlanNum(1);
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setPlanNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {
qualityDeliverEntity.setIncomingBatch(detail.getPickupBatch());
qualityDeliverEntity.setMallName(detail.getMallName());
qualityDeliverEntity.setMaterielCode(detail.getMaterialCode());
qualityDeliverEntity.setMaterielName(detail.getMaterialName());
qualityDeliverEntity.setConditions(3);
qualityDeliverEntity.setPlanNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
}
}
}
}
}

141
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java

@ -0,0 +1,141 @@
package com.logpm.distribution.receiver.report;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.ReportQualityDeliverDTO;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.service.IQualityDeliverService;
import com.logpm.factorydata.feign.IFactoryDataClient;
import com.logpm.factorydata.vo.SendMsg;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.constant.report.ReportConstants;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.StockUpVO;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* 备货生成明细报表
*
* @author zhaoqiaobo
* @create 2024-03-18 0:02
*/
@Slf4j
@Component
@AllArgsConstructor
public class StockReportListener {
@Resource
private IQualityDeliverService qualityDeliverService;
@Resource
private IFactoryDataClient factoryDataClient;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FanoutConstants.distribution.stock.QUEUE.REPORT, durable = "true"),
exchange = @Exchange(name = FanoutConstants.distribution.stock.EXCHANGE, type = ExchangeTypes.FANOUT)
))
@Transactional(rollbackFor = Exception.class)
public void buildReport(String msg) {
log.info("备货生成明细报表: {}", msg);
if (StrUtil.isEmpty(msg)) {
return;
}
NodeFanoutMsg bean = JSONUtil.toBean(msg, NodeFanoutMsg.class);
Long warehouseId = bean.getWarehouseId();
BizOperationEnums bizOperation = bean.getBizOperation();
List<PackageData> details = bean.getDetails();
Object main = bean.getMain();
JSONObject entries = JSONUtil.parseObj(main);
StockUpVO vo = JSONUtil.toBean(entries, StockUpVO.class);
if (BizOperationEnums.MODIFY.equals(bizOperation) || BizOperationEnums.DELETE.equals(bizOperation)) {
// 根据预约单号查询出所有这个预约单下的数据 先置空
LambdaUpdateWrapper<QualityDeliverEntity> wrapper = Wrappers.<QualityDeliverEntity>lambdaUpdate()
.set(QualityDeliverEntity::getStockupCode, null)
.set(QualityDeliverEntity::getStockupUserName, null)
.set(QualityDeliverEntity::getStockupFinishTime, null)
.set(QualityDeliverEntity::getStockNum, null)
.set(QualityDeliverEntity::getStockAllocation, null)
.set(QualityDeliverEntity::getStockupCreateTime, null)
.eq(QualityDeliverEntity::getStockupCode, vo.getStockupCode())
.ne(QualityDeliverEntity::getBizStatus, 110);
qualityDeliverService.update(wrapper);
}
if (CollUtil.isNotEmpty(details)) {
for (PackageData detail : details) {
QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder()
.warehouseName(bean.getWarehouse())
.warehouseId(warehouseId)
.stockupCode(vo.getStockupCode())
.stockupUserName(bean.getOperator())
.stockupFinishTime(vo.getStockupDate())
.stockupCreateTime(bean.getOperatorTime())
// 备货区 TODO
// .stockAllocation(vo.get)
.build();
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) {
qualityDeliverEntity.setConditions(1);
qualityDeliverEntity.setStockNum(1);
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setStockNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {
qualityDeliverEntity.setIncomingBatch(detail.getPickupBatch());
qualityDeliverEntity.setMallName(detail.getMallName());
qualityDeliverEntity.setMaterielCode(detail.getMaterialCode());
qualityDeliverEntity.setMaterielName(detail.getMaterialName());
qualityDeliverEntity.setConditions(3);
qualityDeliverEntity.setStockNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {
ReportQualityDeliverDTO dto = ReportQualityDeliverDTO.builder().data(JSONUtil.toJsonStr(qualityDeliverEntity)).operation(BizOperationEnums.MODIFY).build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(ReportConstants.REPORT_QUALITY_DELIVER_EXCHANGE)
.routingKey(ReportConstants.REPORT_QUALITY_DELIVER_ROUTINGKEY)
.message(JSONUtil.toJsonStr(dto))
.delay(3000)
.build());
}
}
}
}
}
}

30
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IQualityDeliverService.java

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service;
import com.logpm.distribution.entity.QualityDeliverEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 配送明细 服务类
*
* @author zqb
* @since 2024-08-23
*/
public interface IQualityDeliverService extends BaseService<QualityDeliverEntity> {
}

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -32,7 +32,6 @@ import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionParcelDetailsEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
@ -43,7 +42,14 @@ import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.service.IDistributionParcelDetailsService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListInfoService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistrilbutionBillPackageService;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListNodeVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
@ -85,7 +91,18 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;
/**

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.service.impl;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.mapper.QualityDeliverMapper;
import com.logpm.distribution.service.IQualityDeliverService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 配送明细 服务实现类
*
* @author zqb
* @since 2024-08-23
*/
@Service
public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMapper, QualityDeliverEntity> implements IQualityDeliverService {
}
Loading…
Cancel
Save