|
|
|
@ -1101,21 +1101,26 @@ public class GroupServiceImpl implements GroupService { |
|
|
|
map.put("approverTime", System.currentTimeMillis()); |
|
|
|
// 根据当前主订单获取产生的对应子订单
|
|
|
|
List<ApplicationInRecordP> minInRecordList = depositoryRecordMapper.findApplicationInRecordPByToGroupId(mainRecordP.getId()); |
|
|
|
|
|
|
|
// 用于存储最终要删除的id列表
|
|
|
|
List<Integer> deleteIds = new ArrayList<>(); |
|
|
|
if (Integer.compare(approverPass, 1) == 0) { |
|
|
|
for (ApplicationInRecordP minRecordP : |
|
|
|
minInRecordList) { |
|
|
|
map.put("id", minRecordP.getId()); |
|
|
|
result += depositoryRecordService.reviewIn(map, userId, userToken, userAgent); |
|
|
|
deleteIds.add(minRecordP.getId()); |
|
|
|
} |
|
|
|
map.put("id", id); |
|
|
|
} else { |
|
|
|
// 如果是要驳回
|
|
|
|
map.put("state", "驳回"); |
|
|
|
List<Integer> deleteIds = new ArrayList<>(); |
|
|
|
for (ApplicationInRecordP minRecordP : |
|
|
|
minInRecordList) { |
|
|
|
deleteIds.add(minRecordP.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (deleteIds.size() > 0) { |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordByIds(deleteIds); |
|
|
|
} |
|
|
|
return depositoryRecordMapper.updateApplicationInRecord(map); |
|
|
|
|