feat(srm): 添加无码收货单项列表获取功能
- 新增 getListForNoScan 接口用于获取可无码收货单项列表 - 添加 NoScanItemVO 数据传输对象定义 - 实现订单项过滤逻辑,排除已收货完成或存在二维码的物料 - 集成 noScanningBaseControllerService 二维码检查服务 - 计算待收货数量并映射为返回对象列表
This commit is contained in:
parent
2ad2f28b4f
commit
64e2bfd431
|
|
@ -187,6 +187,30 @@ public class NormalPGIController extends BaseController {
|
|||
return ApiResult.success(pdaOrderVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可无码收货单项列表
|
||||
* @param orderId 订单ID
|
||||
*/
|
||||
@GetMapping("getListForNoScan")
|
||||
@ApiMark(moduleName = "送货单管理", apiName = "获取可无码收货单项列表")
|
||||
public ApiResult<List<NoScanItemVO>> getListForNoScan(@RequestParam Long orderId) {
|
||||
List<WmsSrmOrderItem> items = wmsSrmOrderItemService.lambdaQuery()
|
||||
.eq(WmsSrmOrderItem::getOrderId, orderId)
|
||||
.list();
|
||||
items.removeIf(item -> item.getDeliveryQty().compareTo(item.getReceiptQty()) <= 0
|
||||
|| noScanningBaseControllerService.existsQrCode(item.getItemCode()));
|
||||
return ApiResult.success(
|
||||
items.stream()
|
||||
.map(item -> new NoScanItemVO()
|
||||
.setRowNo(item.getLineNumber())
|
||||
.setOrderItemId(item.getId())
|
||||
.setMaterialNo(item.getItemCode())
|
||||
.setMaterialDesc(item.getItemName())
|
||||
.setNum(item.getDeliveryQty().subtract(item.getReceiptQty())))
|
||||
.toList()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无码收货确认(质检物料生成待检单;非质检物料:无二维码直接入库,有二维码则生成上架任务)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class NoScanItemVO {
|
||||
|
||||
/**
|
||||
* 行号
|
||||
*/
|
||||
private String rowNo;
|
||||
|
||||
/**
|
||||
* 订单项ID
|
||||
*/
|
||||
private Long orderItemId;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String materialDesc;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
}
|
||||
Loading…
Reference in New Issue