领料接口优化
This commit is contained in:
parent
8a2c54430e
commit
aaaf03419e
|
|
@ -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<LeaseApplyDetails> leaseApplyDetailsList, Long taskId) {
|
||||
private AjaxResult insertPurchaseCheckDetails(List<LeaseApplyDetails> 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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue