任务BUG修改

This commit is contained in:
秦鸿展
2026-02-09 14:02:08 +08:00
parent bea406051f
commit 9cdb5a8896
3 changed files with 14 additions and 19 deletions
@@ -20,7 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
/**
* 货主租赁明细Api
@@ -148,6 +150,10 @@ public class ShipperLeaseDetailsApi extends BaseController{
{
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDO(shipperLeaseDetailsDTO);
List<WarehouseOccupancyRate> warehouseOccupancyRates = leaseApplicationService.warehouseOccupancyRate(shipperLeaseDetailsDO);
// 按照businessDate倒序排序
warehouseOccupancyRates = warehouseOccupancyRates.stream()
.sorted(Comparator.comparing(WarehouseOccupancyRate::getBusinessDate, Comparator.nullsLast(Comparator.reverseOrder())))
.collect(Collectors.toList());
return getDataTable(warehouseOccupancyRates);
}
@@ -336,8 +336,11 @@ public class StockReceiptOrderDomainService {
if (CollectionUtils.isEmpty(stockReceiptOrderPOList)) {
throw new ServiceException("收货单不存在或已下发,请重新选择");
}
//是否任务合并下发
//是否任务合并下发:如果前端没有传递或为null,默认设置为2(否)
Integer taskDistributionMerge = stockReceiptOrderDO.getTaskDistributionMerge();
if (taskDistributionMerge == null) {
taskDistributionMerge = 2; // 默认不合并下发
}
//收货生成任务下发
genDeliveTask(stockReceiptOrderPOList, stockReceiptOrderDO);
//标记收货单任务已下发
@@ -893,30 +893,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="extAttr1 == ''">
AND a.EXT_ATTR_1 = #{extAttr1}
</if>
<if test="boxPalletNo == ''">
AND a.BOX_PALLET_NO = #{boxPalletNo}
</if>
<if test="sheetRefNo == ''">
AND a.SHEET_REF_NO = #{sheetRefNo}
</if>
<if test="batchRefNo == ''">
AND a.BATCH_REF_NO = #{batchRefNo}
</if>
<!-- 如果 Batch Ref NO's、Sheet Ref NO's、箱号/卡板号三个值为空,忽略这些查询条件 -->
<!-- 已移除 boxPalletNo == '' 和 boxPalletNo == null 的查询条件 -->
<!-- 已移除 sheetRefNo == '' 和 sheetRefNo == null 的查询条件 -->
<!-- 已移除 batchRefNo == '' 和 batchRefNo == null 的查询条件 -->
<if test="extAttr2 == null">
AND a.EXT_ATTR_2 is null
</if>
<if test="extAttr1 == null">
AND a.EXT_ATTR_1 is null
</if>
<if test="boxPalletNo == null">
AND a.BOX_PALLET_NO is null
</if>
<if test="sheetRefNo == null">
AND a.SHEET_REF_NO is null
</if>
<if test="batchRefNo == null">
AND a.BATCH_REF_NO is null
</if>
</select>
<!-- 根据库存ID查询库存信息(包含批次属性字段) -->