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

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

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

Loading…
Cancel
Save