|
@@ -93,14 +93,7 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
|
dataList = examOrganizationRelationDao.queryExamOrgans(params);
|
|
|
List<Integer> organIds = dataList.stream().map(ExamOrganizationRelation::getOrganId).collect(Collectors.toList());
|
|
|
-// List<ExamOrganizationRelation> countInfos = examOrganizationRelationDao.countExamOrganStudentAndPayment(queryInfo.getExamId(), organIds);
|
|
|
-// Map<Integer, ExamOrganizationRelation> organCountInfoMap = countInfos.stream().collect(Collectors.toMap(ExamOrganizationRelation::getOrganId, e -> e));
|
|
|
for (ExamOrganizationRelationExtraDto examOrganizationRelation : dataList) {
|
|
|
-// ExamOrganizationRelation countInfo = organCountInfoMap.get(examOrganizationRelation.getOrganId());
|
|
|
-// if(Objects.nonNull(countInfo)){
|
|
|
-// examOrganizationRelation.setTotalRegistrationStudentNum(countInfo.getTotalRegistrationStudentNum());
|
|
|
-// examOrganizationRelation.setTotalPaymentAmount(countInfo.getTotalPaymentAmount());
|
|
|
-// }
|
|
|
if(examOrganizationRelation.getOrganId().equals(queryInfo.getOrganId())){
|
|
|
examOrganizationRelation.setSelfOrgan(1);
|
|
|
}
|
|
@@ -111,6 +104,12 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public List<ExamOrganizationRelationExtraDto> getChildOrgans(Long examId, Integer organId) {
|
|
|
+ List<Integer> childOrganIds = organizationService.getChildOrganIds(organId, false);
|
|
|
+ return examOrganizationRelationDao.getExamChildOrgans(examId,childOrganIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void addExamOrganizations(Long examId, String orgainIdsStr) {
|
|
|
if(Objects.isNull(examId)){
|
|
@@ -204,13 +203,6 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
throw new BizException("合作单位信息错误");
|
|
|
}
|
|
|
|
|
|
- SysConfig baseUrlConfig = sysConfigService.findByParamName(SysConfigService.BASE_API_URL);
|
|
|
- String baseUrl="";
|
|
|
- if(Objects.nonNull(baseUrlConfig)){
|
|
|
- baseUrl=baseUrlConfig.getParanValue();
|
|
|
- }
|
|
|
- baseUrl = baseUrl+"/#/signUp?";
|
|
|
-
|
|
|
Map<Integer, Organization> idOrganMap = organs.stream().collect(Collectors.toMap(Organization::getId, o -> o));
|
|
|
for (ExamOrganizationRelation og : organizationRelations) {
|
|
|
if(organIdsWithExam.contains(og.getOrganId())){
|
|
@@ -239,9 +231,6 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
og.setTotalTransAmount(BigDecimal.ZERO);
|
|
|
og.setSelfRegistrationStudentNum(BigDecimal.ZERO.intValue());
|
|
|
og.setSelfPaymentAmount(BigDecimal.ZERO);
|
|
|
- String registrationUrl = baseUrl + "examId=" + examinationBasic.getId() + "&organId=" + og.getOrganId();
|
|
|
- String registShortUrl = shortUrlService.createShortUrl(registrationUrl);
|
|
|
- og.setUrl(registShortUrl);
|
|
|
}
|
|
|
examOrganizationRelationDao.batchInsert(organizationRelations);
|
|
|
}
|
|
@@ -314,15 +303,26 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
throw new BizException("考级信息错误");
|
|
|
}
|
|
|
|
|
|
+ SysConfig baseUrlConfig = sysConfigService.findByParamName(SysConfigService.BASE_API_URL);
|
|
|
+ String baseUrl="";
|
|
|
+ if(Objects.nonNull(baseUrlConfig)){
|
|
|
+ baseUrl=baseUrlConfig.getParanValue();
|
|
|
+ }
|
|
|
+ baseUrl = baseUrl+"/#/signUp?";
|
|
|
+
|
|
|
List<ExamOrganizationRelation> needUpdate=new ArrayList<>();
|
|
|
for (ExamOrganizationRelation examOrgan : examOrgans) {
|
|
|
if(YesOrNoEnum.YES.equals(examOrgan.getSendUrlFlag())){
|
|
|
continue;
|
|
|
}
|
|
|
- needUpdate.add(examOrgan);
|
|
|
|
|
|
+ String registrationUrl = baseUrl + "examId=" + examinationBasic.getId() + "&organId=" + examOrgan.getOrganId();
|
|
|
+ String registShortUrl = shortUrlService.createShortUrl(registrationUrl);
|
|
|
+ examOrgan.setUrl(registShortUrl);
|
|
|
examOrgan.setSendUrlFlag(1);
|
|
|
|
|
|
+ needUpdate.add(examOrgan);
|
|
|
+
|
|
|
SysUser organUser = sysUserDao.getWithOrgan(examOrgan.getOrganId());
|
|
|
Map<Integer, String> userPhoneMap = new HashMap<>();
|
|
|
userPhoneMap.put(examOrgan.getOrganId(), organUser.getPhone());
|