Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4da0785a36
|
|
@ -69,7 +69,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
optionalInfo.ifPresent(info -> {
|
optionalInfo.ifPresent(info -> {
|
||||||
leaseApplyRequestVo.setLeaseApplyInfo(info);
|
leaseApplyRequestVo.setLeaseApplyInfo(info);
|
||||||
// 获取领料单详情
|
// 获取领料单详情
|
||||||
List<LeaseApplyDetails> details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getTaskId()));
|
List<LeaseApplyDetails> details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId()));
|
||||||
if (!CollectionUtils.isEmpty(details)) {
|
if (!CollectionUtils.isEmpty(details)) {
|
||||||
leaseApplyRequestVo.setLeaseApplyDetailsList(details);
|
leaseApplyRequestVo.setLeaseApplyDetailsList(details);
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode);
|
leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode);
|
||||||
int count = leaseApplyInfoMapper.insertLeaseApplyInfo(leaseApplyRequestVo.getLeaseApplyInfo());
|
int count = leaseApplyInfoMapper.insertLeaseApplyInfo(leaseApplyRequestVo.getLeaseApplyInfo());
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), tmTask.getTaskId());
|
return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyRequestVo.getLeaseApplyInfo().getId());
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("新增任务失败,lease_apply_info表插入0条");
|
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)) {
|
if (!CollectionUtils.isEmpty(leaseApplyDetailsList)) {
|
||||||
for (LeaseApplyDetails details : leaseApplyDetailsList) {
|
for (LeaseApplyDetails details : leaseApplyDetailsList) {
|
||||||
details.setParentId(taskId); // 设置领料taskId
|
details.setParentId(parentId); // 设置info.parentId
|
||||||
details.setCreateTime(DateUtils.getNowDate());
|
details.setCreateTime(DateUtils.getNowDate());
|
||||||
details.setCreateBy(SecurityUtils.getUsername());
|
details.setCreateBy(SecurityUtils.getUsername());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue