fix(component): 解决PDA无扫描确认功能中的空数据处理问题

- 移除请求中数据为空的项目项
- 添加对请求数据有效性的验证检查
- 防止因空数据导致的业务异常
This commit is contained in:
曹鹏飞 2026-06-14 21:14:33 +08:00
parent ab3498e452
commit 725e88d59c
1 changed files with 2 additions and 0 deletions

View File

@ -448,6 +448,8 @@ public class ComponentOutboundController extends BaseController {
@Transactional
@PostMapping("pda/confirmNoScanning")
public ApiResult<Void> confirmPdaNoScanning(@Valid @RequestBody NoScanningRequest request) {
request.getItems().removeIf(it -> CollectionUtil.isEmpty(it.getDatas()));
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(request.getItems())).throwMessage("无效数据");
WmsComponentPacking packing = wmscomponentPackingService.lambdaQuery()
.eq(Objects.nonNull(request.getId()), WmsComponentPacking::getId, request.getId())
.eq(StrUtil.isNotBlank(request.getNo()), WmsComponentPacking::getNo, request.getNo())