fix:过滤需求单目标仓库为空数据
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user