|
@@ -1,42 +1,19 @@
|
|
package com.keao.edu.user.service.impl;
|
|
package com.keao.edu.user.service.impl;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.HashSet;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Objects;
|
|
|
|
-import java.util.Set;
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
-
|
|
|
|
-import com.keao.edu.common.service.SysMessageService;
|
|
|
|
-import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
|
-import com.keao.edu.user.dao.*;
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
-import org.springframework.transaction.annotation.Isolation;
|
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
-
|
|
|
|
-import com.keao.edu.auth.api.client.SysMessageFeignService;
|
|
|
|
import com.keao.edu.auth.api.client.SysUserFeignService;
|
|
import com.keao.edu.auth.api.client.SysUserFeignService;
|
|
-import com.keao.edu.auth.api.entity.SysMessageParams;
|
|
|
|
import com.keao.edu.auth.api.entity.SysUser;
|
|
import com.keao.edu.auth.api.entity.SysUser;
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
import com.keao.edu.common.entity.SysConfig;
|
|
import com.keao.edu.common.entity.SysConfig;
|
|
import com.keao.edu.common.enums.MessageTypeEnum;
|
|
import com.keao.edu.common.enums.MessageTypeEnum;
|
|
import com.keao.edu.common.exception.BizException;
|
|
import com.keao.edu.common.exception.BizException;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
|
|
+import com.keao.edu.common.service.SysMessageService;
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
|
+import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
|
+import com.keao.edu.user.dao.*;
|
|
import com.keao.edu.user.dto.ExamOrganizationRelationExtraDto;
|
|
import com.keao.edu.user.dto.ExamOrganizationRelationExtraDto;
|
|
-import com.keao.edu.user.entity.ExamOrganizationRelation;
|
|
|
|
-import com.keao.edu.user.entity.ExaminationBasic;
|
|
|
|
-import com.keao.edu.user.entity.Organization;
|
|
|
|
-import com.keao.edu.user.entity.TenantInfo;
|
|
|
|
|
|
+import com.keao.edu.user.entity.*;
|
|
import com.keao.edu.user.enums.ExamStatusEnum;
|
|
import com.keao.edu.user.enums.ExamStatusEnum;
|
|
import com.keao.edu.user.enums.YesOrNoEnum;
|
|
import com.keao.edu.user.enums.YesOrNoEnum;
|
|
import com.keao.edu.user.page.ExamOrganizationRelationQueryInfo;
|
|
import com.keao.edu.user.page.ExamOrganizationRelationQueryInfo;
|
|
@@ -46,6 +23,16 @@ import com.keao.edu.user.service.ShortUrlService;
|
|
import com.keao.edu.user.service.SysConfigService;
|
|
import com.keao.edu.user.service.SysConfigService;
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
import com.keao.edu.util.date.DateUtil;
|
|
import com.keao.edu.util.date.DateUtil;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Isolation;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
+
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, ExamOrganizationRelation> implements ExamOrganizationRelationService {
|
|
public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, ExamOrganizationRelation> implements ExamOrganizationRelationService {
|
|
@@ -70,6 +57,8 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
private SysUserDao sysUserDao;
|
|
private SysUserDao sysUserDao;
|
|
@Autowired
|
|
@Autowired
|
|
private SysMessageService sysMessageService;
|
|
private SysMessageService sysMessageService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamLifecycleLogDao examLifecycleLogDao;
|
|
|
|
|
|
public static final Set<ExamStatusEnum> EDIT_ABLE_EXAM_STATUS=new HashSet<>(Arrays.asList(ExamStatusEnum.SETTING,ExamStatusEnum.NOT_START,ExamStatusEnum.APPLYING,ExamStatusEnum.APPLIED));
|
|
public static final Set<ExamStatusEnum> EDIT_ABLE_EXAM_STATUS=new HashSet<>(Arrays.asList(ExamStatusEnum.SETTING,ExamStatusEnum.NOT_START,ExamStatusEnum.APPLYING,ExamStatusEnum.APPLIED));
|
|
|
|
|
|
@@ -234,7 +223,6 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
String registrationUrl = baseUrl + "examId=" + examinationBasic.getId() + "&organId=" + og.getOrganId();
|
|
String registrationUrl = baseUrl + "examId=" + examinationBasic.getId() + "&organId=" + og.getOrganId();
|
|
String registShortUrl = shortUrlService.createShortUrl(registrationUrl);
|
|
String registShortUrl = shortUrlService.createShortUrl(registrationUrl);
|
|
og.setUrl(registShortUrl);
|
|
og.setUrl(registShortUrl);
|
|
- organizationRelations.add(og);
|
|
|
|
}
|
|
}
|
|
examOrganizationRelationDao.batchInsert(organizationRelations);
|
|
examOrganizationRelationDao.batchInsert(organizationRelations);
|
|
}
|
|
}
|
|
@@ -295,6 +283,8 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(needUpdate)){
|
|
if(!CollectionUtils.isEmpty(needUpdate)){
|
|
examOrganizationRelationDao.batchUpdate(needUpdate);
|
|
examOrganizationRelationDao.batchUpdate(needUpdate);
|
|
|
|
+
|
|
|
|
+ examLifecycleLogDao.insert(new ExamLifecycleLog(examinationBasic.getId().intValue(), "发送考级连接", examinationBasic.getCreatorId()));
|
|
}
|
|
}
|
|
|
|
|
|
if(examinationBasic.getStatus().equals(ExamStatusEnum.SETTING)){
|
|
if(examinationBasic.getStatus().equals(ExamStatusEnum.SETTING)){
|