fix:过滤需求单目标仓库为空数据

This commit is contained in:
zhaoyf
2026-08-24 19:55:09 +08:00
parent b9fd3576a0
commit af7b223744
2 changed files with 4 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ public class MesToWmsController {
@PostMapping("app/restful/api/v3/wms/mesRequisitionSync")
@SaIgnore
@Log("需求单同步")
public ResponseEntity mesRequisitionSync(@RequestBody List<PmDemandParam> params) {
public ResponseEntity mesRequisitionSync(@RequestBody List<@Valid PmDemandParam> params) {
iPmDemandService.batchCreate(params);
return ResponseData.build();
}

View File

@@ -139,6 +139,9 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
}
}
for (PmDemandParam pmDemandParam : param) {
if (StringUtils.isEmpty(pmDemandParam.getTargetHouseCode())){
throw new BadRequestException("目标库位为空!");
}
if (Objects.equals(pmDemandParam.getStatus(), "1")){
pmDemandParam.setStatus(DemandStatus.CANCEL.getValue());
PmDemand demand = new PmDemand();