updates
This commit is contained in:
parent
6746016cd6
commit
8ba5282f1e
|
|
@ -423,6 +423,15 @@ public class YxVolunteerServiceImpl extends ServiceImpl<YxVolunteerMapper, YxVol
|
|||
VolunteerDTO activeByCreateVolunteerDto = getActiveByCreate(loginUser.getId());
|
||||
//如果有志愿单时才可以添加志愿明细
|
||||
if (activeByCreateVolunteerDto!=null && StringUtils.isNotBlank(activeByCreateVolunteerDto.getId())) {
|
||||
|
||||
List<VolunteerRecordDTO> volunteerRecordEarlyAdmissionList = activeByCreateVolunteerDto.getVolunteerRecordEarlyAdmissionList();
|
||||
List<VolunteerRecordDTO> volunteerRecordUndergraduateAList = activeByCreateVolunteerDto.getVolunteerRecordUndergraduateAList();
|
||||
List<VolunteerRecordDTO> volunteerRecordUndergraduateBList = activeByCreateVolunteerDto.getVolunteerRecordUndergraduateBList();
|
||||
List<VolunteerRecordDTO> volunteerRecordUndergraduateList = activeByCreateVolunteerDto.getVolunteerRecordUndergraduateList();
|
||||
// 将本科批合并
|
||||
volunteerRecordUndergraduateList.addAll(volunteerRecordUndergraduateAList);
|
||||
volunteerRecordUndergraduateList.addAll(volunteerRecordUndergraduateBList);
|
||||
volunteerRecordUndergraduateList.addAll(volunteerRecordEarlyAdmissionList);
|
||||
String volunteerId = activeByCreateVolunteerDto.getId();
|
||||
YxCalculationMajor calculationMajor = null;
|
||||
for (YxVolunteerRecord yxVolunteerRecord : volunteerRecordList) {
|
||||
|
|
@ -437,6 +446,17 @@ public class YxVolunteerServiceImpl extends ServiceImpl<YxVolunteerMapper, YxVol
|
|||
if (calculationMajor == null) {
|
||||
continue;
|
||||
}
|
||||
// 防止志愿顺序重复填报
|
||||
if (!"高职高专".equals(calculationMajor.getBatch())) {
|
||||
// 本科批
|
||||
if (volunteerRecordUndergraduateList.stream().filter(p->p.getIndexs().equals(yxVolunteerRecord.getIndexs())).findAny().isPresent()) {
|
||||
throw new JeecgBootException("保存失败,该志愿顺序已填报!请重新登录账号尝试");
|
||||
}
|
||||
}else{
|
||||
if (activeByCreateVolunteerDto.getVolunteerRecordJuniorCollegeList().stream().filter(p->p.getIndexs().equals(yxVolunteerRecord.getIndexs())).findAny().isPresent()) {
|
||||
throw new JeecgBootException("保存失败,该志愿顺序已填报!请重新登录账号尝试");
|
||||
}
|
||||
}
|
||||
yxVolunteerRecord.setCreateBy(loginUser.getId());
|
||||
yxVolunteerRecord.setVolunteerId(volunteerId);
|
||||
yxVolunteerRecord.setBatch(calculationMajor.getBatch());
|
||||
|
|
|
|||
Loading…
Reference in New Issue