feat: bug-802 生产补料单取消申请数量不能大于需求量的校验
This commit is contained in:
parent
f5ff21cdc1
commit
309ec6bdba
|
|
@ -170,15 +170,15 @@ public class OutProduceController extends BaseController {
|
|||
@Transactional
|
||||
@PostMapping("1/save")
|
||||
public ApiResult<Void> save1(@Valid @RequestBody @NotEmpty List<Zwm3a07VO> datas) {
|
||||
List<String> materialNos = new ArrayList<>();
|
||||
datas.forEach(item -> {
|
||||
BigDecimal max = item.getBdmng();
|
||||
if (item.getSqsl().compareTo(max) > 0) {
|
||||
materialNos.add(item.getMatnr());
|
||||
}
|
||||
});
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||
.throwMessage("以下物料的申请数量超出限制:" + StrUtil.join(",", materialNos));
|
||||
// List<String> materialNos = new ArrayList<>();
|
||||
// datas.forEach(item -> {
|
||||
// BigDecimal max = item.getBdmng();
|
||||
// if (item.getSqsl().compareTo(max) > 0) {
|
||||
// materialNos.add(item.getMatnr());
|
||||
// }
|
||||
// });
|
||||
// VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||
// .throwMessage("以下物料的申请数量超出限制:" + StrUtil.join(",", materialNos));
|
||||
Map<String, List<Zwm3a07VO>> maps = datas.stream().collect(Collectors.groupingBy(Zwm3a07VO::getKey2));
|
||||
maps.forEach((key, items) -> {
|
||||
WmsOutProduce order = Convert.convert(WmsOutProduce.class, items.get(0));
|
||||
|
|
|
|||
Loading…
Reference in New Issue