Browse Source

Merge remote-tracking branch 'origin/dist.1.2.0' into dist.1.2.0

dist.1.3.0
pref_mail@163.com 4 months ago
parent
commit
eb1c518488
  1. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/LoadingReportListener.java
  3. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java
  4. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverListener.java
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReViewReportListener.java
  6. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/ReservationPlanReportListener.java
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java
  8. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java
  9. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  10. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java

@ -213,6 +213,11 @@ public class QualityDeliverEntity extends TenantEntity {
*/
@ApiModelProperty(value = "重量")
private BigDecimal weight;
/**
* 品类
*/
@ApiModelProperty(value = "品类")
private String category;
/**
* 成本结算品类
*/
@ -483,7 +488,7 @@ public class QualityDeliverEntity extends TenantEntity {
* 签收数量
*/
@ApiModelProperty(value = "签收数量")
private String signNum;
private Integer signNum;
/**
* 签收配送单号 包含配送车次和自提车次 直发商家 对应干线车次 三方中转 三方中转车次号
*/

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

@ -92,8 +92,7 @@ public class LoadingReportListener {
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
sendReport(bizOperation, qualityDeliverEntity);
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {

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

@ -128,8 +128,7 @@ public class PlanReportListener {
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setPlanNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {

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

@ -103,7 +103,7 @@ public class QualityDeliverListener {
// 零担
LambdaQueryWrapper<QualityDeliverEntity> wrapper = Wrappers.<QualityDeliverEntity>lambdaQuery()
.eq(QualityDeliverEntity::getOrderCode, qualityDeliverEntity.getOrderCode())
.eq(QualityDeliverEntity::getCostCategory, qualityDeliverEntity.getCostCategory())
.eq(QualityDeliverEntity::getCategory, qualityDeliverEntity.getCategory())
.lt(QualityDeliverEntity::getBizStatus, 110);
if (StrUtil.isNotEmpty(qualityDeliverEntity.getPlanReservationCode())) {
wrapper.eq(QualityDeliverEntity::getPlanReservationCode, qualityDeliverEntity.getPlanReservationCode());
@ -195,7 +195,8 @@ public class QualityDeliverListener {
if (ObjectUtil.equals(PackageTypeEnums.CMP.getCode(), conditions)) {
// 订制品
// 构建订制品基础信息
buildCmpBasicInfo(qualityDeliverEntity);
DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId());
buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity);
}
if (ObjectUtil.equals(PackageTypeEnums.INV.getCode(), conditions)) {
// 库存品
@ -203,7 +204,9 @@ public class QualityDeliverListener {
}
if (ObjectUtil.equals(PackageTypeEnums.LTL.getCode(), conditions)) {
// 零担
buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode());
DistributionParcelListEntity parcelListEntity = parcelListService.findByOrderCodeAndCategory(qualityDeliverEntity.getOrderCode(), qualityDeliverEntity.getCategory(), qualityDeliverEntity.getWarehouseId());
buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity);
// buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode());
}
}
@ -220,7 +223,8 @@ public class QualityDeliverListener {
String brandName = stockList.getBrandName();
String sourceType = stockList.getSourceType();
if (StrUtil.equals(sourceType, "1")) {
buildCmpBasicInfo(qualityDeliverEntity);
DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId());
buildCmpBasicInfo(qualityDeliverEntity, parcelListEntity);
} else {
qualityDeliverEntity.setBrandName(brandName);
qualityDeliverEntity.setMallCode(stockList.getMarketCode());
@ -245,8 +249,7 @@ public class QualityDeliverListener {
}
private void buildCmpBasicInfo(QualityDeliverEntity qualityDeliverEntity) {
DistributionParcelListEntity parcelListEntity = parcelListService.selectByOrderPackageCode(qualityDeliverEntity.getOrderPackageCode(), qualityDeliverEntity.getWarehouseId());
private void buildCmpBasicInfo(QualityDeliverEntity qualityDeliverEntity, DistributionParcelListEntity parcelListEntity) {
if (ObjectUtil.isNotEmpty(parcelListEntity)) {
// 品牌
qualityDeliverEntity.setBrandName(parcelListEntity.getBrandName());
@ -282,9 +285,9 @@ public class QualityDeliverListener {
qualityDeliverEntity.setEndWarehouseInTime(parcelListEntity.getWarehouseEntryTimeEnd());
// 构建运单相关信息
buildWaybillInfo(qualityDeliverEntity, waybillNumber);
// 构建订单相关信息
buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), parcelListEntity.getOrderCode());
}
// 构建订单相关信息
buildOrderInfo(qualityDeliverEntity, qualityDeliverEntity.getWarehouseId(), qualityDeliverEntity.getOrderCode());
}
private void buildOrderInfo(QualityDeliverEntity qualityDeliverEntity, Long warehouseId, String orderCode) {

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

@ -80,8 +80,7 @@ public class ReViewReportListener {
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode());
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
sendReport(bizOperation, qualityDeliverEntity);
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {

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

@ -105,8 +105,7 @@ public class ReservationPlanReportListener {
}
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
sendReport(bizOperation, qualityDeliverEntity,BizOperationEnums.MODIFY);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/SignforReportListener.java

@ -78,13 +78,13 @@ public class SignforReportListener {
.build();
if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.CMP)) {
qualityDeliverEntity.setConditions(1);
qualityDeliverEntity.setLoadNum(1);
qualityDeliverEntity.setSignNum(1);
sendReport(bizOperation, qualityDeliverEntity);
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setPlanReservationCode(vo.getReservationCode());
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setSignNum(detail.getNumber());
qualityDeliverEntity.setConditions(2);
sendReport(bizOperation, qualityDeliverEntity);
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.INV)) {
@ -92,6 +92,7 @@ public class SignforReportListener {
qualityDeliverEntity.setMallName(detail.getMallName());
qualityDeliverEntity.setMaterielCode(detail.getMaterialCode());
qualityDeliverEntity.setMaterielName(detail.getMaterialName());
qualityDeliverEntity.setSignNum(1);
qualityDeliverEntity.setConditions(3);
sendReport(bizOperation, qualityDeliverEntity);
}

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

@ -86,8 +86,7 @@ public class StockReportListener {
}
} else if (ObjectUtil.equals(detail.getPackageType(), PackageTypeEnums.LTL)) {
qualityDeliverEntity.setOrderCode(detail.getOrderCode());
qualityDeliverEntity.setCostCategory(detail.getProductName());
qualityDeliverEntity.setRevenueCategory(detail.getProductName());
qualityDeliverEntity.setCategory(detail.getProductName());
qualityDeliverEntity.setConditions(2);
qualityDeliverEntity.setStockNum(detail.getNumber());
if (BizOperationEnums.ADD.equals(bizOperation) || BizOperationEnums.MODIFY.equals(bizOperation)) {

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -255,4 +255,13 @@ public interface IDistributionParcelListService extends BaseService<Distribution
void clearAllocationByIds(List<Long> clearTrayList);
/**
* 查询零担包件
* @param orderCode
* @param category
* @param warehouseId
* @Return com.logpm.distribution.entity.DistributionParcelListEntity
* @Author zqb 2024/9/12
**/
DistributionParcelListEntity findByOrderCodeAndCategory(String orderCode, String category, Long warehouseId);
}

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

@ -1377,6 +1377,19 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
baseMapper.clearAllocationByIds(clearTrayList);
}
@Override
public DistributionParcelListEntity findByOrderCodeAndCategory(String orderCode, String category, Long warehouseId) {
List<DistributionParcelListEntity> list = this.list(Wrappers.<DistributionParcelListEntity>lambdaQuery()
.eq(DistributionParcelListEntity::getOrderCode, orderCode)
.eq(DistributionParcelListEntity::getFirsts, category)
.eq(DistributionParcelListEntity::getWarehouseId, warehouseId)
);
if(CollUtil.isNotEmpty(list)){
return list.get(0);
}
return null;
}
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) {
JSONObject trunklinePackageTrackLog = new JSONObject();

Loading…
Cancel
Save