Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 4 months ago
parent
commit
e7e27331cb
  1. 17
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  3. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java
  4. 21
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  5. 21
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

17
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java

@ -2,6 +2,7 @@ package com.logpm.warehouse.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@ -190,6 +191,22 @@ public class FinanceWaybillExportVO implements Serializable {
private BigDecimal thirdOperationFee;
@ExcelProperty(value = "回扣")
private BigDecimal rebate;
@ExcelProperty(value = "收款状态")
private String payStatus;
@ExcelProperty(value = "结算状态")
private String settlementStatus;
@ExcelProperty(value = "签收数量")
private Integer signNum;
@ExcelProperty(value = "签收时间")
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date signTime;
@ExcelProperty(value = "配送时间")
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date deliveryTime;
@ExcelProperty(value = "签收人")
private String signUserName;
@ExcelProperty(value = "配送司机")
private String deliveryDriverName;
@ExcelProperty(value = "品类数量")
private String goodsTypeNum;
@ExcelProperty(value = "品类开单运费")

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -2171,7 +2171,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
DistributionDeliveryDetailsEntity one = distributionDeliveryDetailsService.getOne(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, reservationId)
.eq(DistributionDeliveryDetailsEntity::getStockListId, stockupDTO.getStockListId())
.apply("inventory_status in (1,2)")
.apply("inventory_status in (1,3)")
);
if (ObjectUtils.isNull(one)) {
log.info("自提库存品数据为空!!");
@ -2767,13 +2767,13 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
boolean fa = false;
if (distributionStockupEntity.getStockupStatus().equals(StockupStatusConstant.beihuozhong.getValue())) {
distributionStockup.setId(stockupDTO.getStockupId());
if (i > 0) {
// 有数量
fa = true;
} else if (i == 0) {
//修改完成状态
//修改备货状态
distributionStockup.setId(stockupDTO.getStockupId());
distributionStockup.setStockupStatus(StockupStatusConstant.yibeihuo.getValue());
reservationEntity.setId(stockupDTO.getReservationId());

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

@ -84,10 +84,10 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
// 按签收车次+签收车次分组封装为map
Map<String, List<QualityDeliverEntity>> collect = new HashMap<>();
for (QualityDeliverEntity entity : entities) {
if (!collect.containsKey(entity.getSignCarNumber() + entity.getSignTrainNumber())) {
collect.put(entity.getSignCarNumber() + entity.getSignTrainNumber(), CollUtil.newArrayList(entity));
if (!collect.containsKey(entity.getSignCarNumber() + entity.getPlanTrainNumber())) {
collect.put(entity.getSignCarNumber() + entity.getPlanTrainNumber(), CollUtil.newArrayList(entity));
} else {
collect.get(entity.getSignCarNumber() + entity.getSignTrainNumber()).add(entity);
collect.get(entity.getSignCarNumber() + entity.getPlanTrainNumber()).add(entity);
}
}
@ -110,20 +110,20 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
BigDecimal pointAllowCost = BigDecimal.ZERO;
BigDecimal guarCost = BigDecimal.ZERO;
BigDecimal fuelCost = BigDecimal.ZERO;
trainDetailEntity.setSettlementStatus("未结算");
for (QualityDeliverEntity qualityDeliverEntity : value) {
trainDetailEntity.setTotalOrderQuantity(qualityDeliverEntity.getOrderNumber());
trainDetailEntity.setDeliveryVehicle(qualityDeliverEntity.getSignCarNumber());
trainDetailEntity.setDistributionModel(qualityDeliverEntity.getSignCarType());
trainDetailEntity.setTrainNumber(qualityDeliverEntity.getSignTrainNumber());
trainDetailEntity.setTrainNumber(qualityDeliverEntity.getPlanTrainNumber());
// 签收车次号 = 配送任务车次号 取配送时间
if (ObjectUtil.equals(qualityDeliverEntity.getSignTrainNumber(), qualityDeliverEntity.getDealerCode())) {
Date deliveryTime = qualityDeliverEntity.getDeliveryTime();
if (ObjectUtil.isNotEmpty(deliveryTime)) {
trainDetailEntity.setDeliveryDate(DateUtil.formatDate(deliveryTime));
}
String deliveryType = qualityDeliverEntity.getDeliveryType();
if (StrUtil.isNotEmpty(deliveryType)) {
trainDetailEntity.setDistributionType(deliveryType);
}
Date deliveryTime = qualityDeliverEntity.getDeliveryTime();
if (ObjectUtil.isNotEmpty(deliveryTime)) {
trainDetailEntity.setDeliveryDate(DateUtil.formatDate(deliveryTime));
}
String deliveryType = qualityDeliverEntity.getDeliveryType();
if (StrUtil.isNotEmpty(deliveryType)) {
trainDetailEntity.setDistributionType(deliveryType);
}
trainDetailEntity.setDestinationWarehouse(qualityDeliverEntity.getWarehouseName());
trainDetailEntity.setDeliveryDriver(qualityDeliverEntity.getSignUserName());
@ -177,6 +177,8 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
if (CollUtil.isNotEmpty(orderCodeSet)) {
trainDetailEntity.setPlannedTotalQuantity(orderCodeSet.size());
}
trainDetailEntity.setTotalReceiptCost(Convert.toInt(totalSignNumber));
trainDetailEntity.setTotalLoadedPieces(Convert.toInt(totalLoadNumber));
trainDetailEntity.setDistributionCost(Convert.toDouble(distributionCost));
trainDetailEntity.setStairCarryingFee(Convert.toDouble(apstairsCost));
trainDetailEntity.setGoodsAllocationCost(Convert.toDouble(apartCost));
@ -389,7 +391,7 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
}
}
}
if(CollUtil.isNotEmpty(qualityDeliverEntityMap)){
if (CollUtil.isNotEmpty(qualityDeliverEntityMap)) {
// 发送消息
}

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

@ -9022,6 +9022,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
AtomicReference<Integer> loadingZeroFlag = new AtomicReference<>(0);
List<Map<String, Object>> ls = new ArrayList<>();
//查询有哪些在当前仓做计划的订单
List<TrunklineCarsOrderEntity> carsOrderEntityList = trunklineCarsOrderService.findListByLoadIdAndNodeId(loadId, warehouseId);
//把carsOrderEntityList通过type分组成两个新的集合
@ -9029,6 +9030,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<TrunklineCarsOrderEntity> zeroOrderList = carsOrderEntityList.stream().filter(e -> e.getType().equals(2)).collect(Collectors.toList());
//零担批量装车
zeroOrderList.stream().forEach(e -> {
Map<String, Object> map = new HashMap<>();
//零担订单
Integer realNum = e.getRealNum();
String orderCode = e.getOrderCode();
@ -9045,6 +9047,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
loadingZeroFlag.set(1);
if(realNum.equals(planNum)){
loadingZeroFlag.set(0);
}else{
map.put("waybillNo", waybillNo);
map.put("orderCode", orderCode);
map.put("planNum", planNum);
map.put("realNum", realNum);
map.put("handQuantity", handQuantity);
ls.add(map);
}
}
});
@ -9157,6 +9166,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
log.error("推送数据失败",e1);
}
}
}else{
Map<String, Object> map = new HashMap<>();
map.put("waybillNo", waybillNo);
map.put("orderCode", orderCode);
map.put("planNum", planNum);
map.put("realNum", realNum);
map.put("handQuantity", size);
ls.add(map);
}
});
@ -9192,9 +9209,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer i = loadingZeroFlag.get();
if(i == 1){
return R.success("装车完成,但存在零担未装车,请去确认装车数量");
return R.data(ls,"装车完成,但存在零担未装车,请去确认装车数量");
}else{
return R.success("装车完成");
return R.data(ls,"装车完成");
}
}

21
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -669,7 +669,7 @@
and lww.pay_status = #{param.payStatus}
</if>
<if test="param.settlementStatus != null">
and lww.freeze_time = #{param.settlementStatus}
and lww.settlement_status = #{param.settlementStatus}
</if>
GROUP BY lww.id
order by lww.create_time desc
@ -787,6 +787,19 @@
lww.claiming_value claimingValue,
lww.third_operation_fee thirdOperationFee,
lww.rebate rebate,
CASE WHEN lww.pay_status='10' THEN '未付款'
WHEN lww.pay_status='20' THEN '部分付款'
WHEN lww.pay_status='30' THEN '已付款'
ELSE '未知' END payStatus,
CASE WHEN lww.settlement_status='10' THEN '未结算'
WHEN lww.settlement_status='20' THEN '部分结算'
WHEN lww.settlement_status='30' THEN '已结算'
ELSE '未知' END settlementStatus,
lww.sign_num signNum,
lww.sign_time signTime,
lww.delivery_time deliveryTime,
lww.sign_user_name signUserName,
lww.delivery_driver_name deliveryDriverName,
GROUP_CONCAT(concat(lwwd.product_name,'(',lwwd.num,')')) goodsTypeNum,
GROUP_CONCAT(concat(lwwd.product_name,'(',lwwd.price,')')) goodsTypePrice,
GROUP_CONCAT(concat(lwwd.product_name,'(',IFNULL(lwwd.delivery_price,0),')')) goodsTypeDeliveryPrice,
@ -946,6 +959,12 @@
<if test="param.freezeTimeEndDate != null">
and lww.freeze_time &lt;= #{param.freezeTimeEndDate}
</if>
<if test="param.payStatus != null">
and lww.pay_status = #{param.payStatus}
</if>
<if test="param.settlementStatus != null">
and lww.settlement_status = #{param.settlementStatus}
</if>
GROUP BY lww.id
order by lww.create_time desc
</select>

Loading…
Cancel
Save