app退料逻辑修改

This commit is contained in:
15856 2024-12-04 10:41:05 +08:00
parent 69e40de680
commit 8ceed4408f
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,7 @@ public class AppBackApplyController extends BaseController {
@PostMapping("upload")
@RequiresPermissions("return:apply:apply")
public AjaxResult upload(@RequestBody BackApplyInfo record) {
logger.info("upload upload提交物料型号及数量 {}",record);
try {
if (CollUtil.isEmpty(record.getBackApplyDetails())) {
return AjaxResult.error("退料设备明细为空,请重新选择后上传!");
@ -225,6 +226,7 @@ public class AppBackApplyController extends BaseController {
backApplyService.updateBackInfo(record.getParentId(),record.getCompanyId());
for (BackApplyInfo backApplyInfo : record.getBackApplyDetails()) {
backApplyInfo.setParentId(record.getParentId());
backApplyInfo.setAuditNum(record.getBackNum());
boolean re = backApplyService.upload(backApplyInfo) > 0;
if (!re) {
return AjaxResult.error("退料任务明细插入失败");