退料申请代码优化

This commit is contained in:
liang.chao 2024-09-29 18:03:10 +08:00
parent f85c9d5831
commit 1ed1afc0ee
1 changed files with 1 additions and 1 deletions

View File

@ -218,9 +218,9 @@ public class BackApplyController extends BaseController {
if (CollUtil.isEmpty(record.getBackApplyDetails())) { if (CollUtil.isEmpty(record.getBackApplyDetails())) {
return AjaxResult.error("退料设备明细为空,请重新选择后上传!"); return AjaxResult.error("退料设备明细为空,请重新选择后上传!");
} }
backApplyService.updateBackInfo(record.getParentId(),record.getCompanyId());
for (BackApplyInfo backApplyInfo : record.getBackApplyDetails()) { for (BackApplyInfo backApplyInfo : record.getBackApplyDetails()) {
backApplyInfo.setParentId(record.getParentId()); backApplyInfo.setParentId(record.getParentId());
backApplyService.updateBackInfo(record.getParentId(),record.getCompanyId());
boolean re = backApplyService.upload(backApplyInfo) > 0; boolean re = backApplyService.upload(backApplyInfo) > 0;
if (!re) { if (!re) {
return AjaxResult.error("退料任务明细插入失败"); return AjaxResult.error("退料任务明细插入失败");