新增申购单点击产品录入时显示系统繁忙

dev2.0
黄泽腾 2 years ago
parent e91a030744
commit ce3ceeeff7

@ -287,7 +287,7 @@ public class PurOrderReceiveController extends BaseController {
return ResultVOUtils.error(999, "库存不足!");
}
}
if (listInv != null && listInv.size() > 0) {
if (listInv != null && listInv.size() > 0 && updateReceiveDetailRequest.getCount() != null) {
if (listInv.get(0).getReCount() < updateReceiveDetailRequest.getCount()) {
return ResultVOUtils.error(999, "库存不足!");
}
@ -296,7 +296,7 @@ public class PurOrderReceiveController extends BaseController {
boolean falg = receivedetailService.updateReceiveDetail(updateReceiveDetailRequest);
if (falg) {
return ResultVOUtils.success();
return ResultVOUtils.success("成功");
} else {
return ResultVOUtils.error(555, "更新失败!");
}
@ -432,16 +432,16 @@ public class PurOrderReceiveController extends BaseController {
purApplyService.insert(purApplyEntity);
//用stream流复制list
List<PurApplyDetailEntity> purApplyDetailEntityList = purReceiveDetailEntityList.stream().map(e -> {
PurApplyDetailEntity d = new PurApplyDetailEntity();
d.setOrderIdFk(purApplyEntity.getId() + "");
d.setProductId(e.getRelIdFk());
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(e.getNameCode());
d.setProductName(udiProductEntity.getCpmctymc());
d.setCount(e.getCount());
d.setSupId(e.getSupId());
d.setZczbhhzbapzbh(udiProductEntity.getZczbhhzbapzbh());
return d;
})
PurApplyDetailEntity d = new PurApplyDetailEntity();
d.setOrderIdFk(purApplyEntity.getId() + "");
d.setProductId(e.getRelIdFk());
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(e.getNameCode());
d.setProductName(udiProductEntity.getCpmctymc());
d.setCount(e.getCount());
d.setSupId(e.getSupId());
d.setZczbhhzbapzbh(udiProductEntity.getZczbhhzbapzbh());
return d;
})
.collect(Collectors.toList());
purApplyDetailService.insertPurApplyDetailEntity(purApplyDetailEntityList);

Loading…
Cancel
Save