diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index e448c2d6..9c61da60 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -128,7 +128,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode); int count = leaseApplyInfoMapper.insertLeaseApplyInfo(leaseApplyRequestVo.getLeaseApplyInfo()); if (count > 0) { - return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), tmTask.getTaskId()); + return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyRequestVo.getLeaseApplyInfo().getId()); } else { return AjaxResult.error("新增任务失败,lease_apply_info表插入0条"); } @@ -174,10 +174,10 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { } } - private AjaxResult insertPurchaseCheckDetails(List leaseApplyDetailsList, Long taskId) { + private AjaxResult insertPurchaseCheckDetails(List leaseApplyDetailsList, Long parentId) { if (!CollectionUtils.isEmpty(leaseApplyDetailsList)) { for (LeaseApplyDetails details : leaseApplyDetailsList) { - details.setParentId(taskId); // 设置领料taskId + details.setParentId(parentId); // 设置info.parentId details.setCreateTime(DateUtils.getNowDate()); details.setCreateBy(SecurityUtils.getUsername()); }