|
@@ -13,14 +13,12 @@ import com.keao.edu.common.page.QueryInfo;
|
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
|
|
|
-import com.keao.edu.user.dao.ExamOrganizationRelationDao;
|
|
|
-import com.keao.edu.user.dao.ExaminationBasicDao;
|
|
|
-import com.keao.edu.user.dao.OrganizationDao;
|
|
|
-import com.keao.edu.user.dao.TeacherDao;
|
|
|
+import com.keao.edu.user.dao.*;
|
|
|
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.enums.ExamStatusEnum;
|
|
|
import com.keao.edu.user.enums.YesOrNoEnum;
|
|
|
import com.keao.edu.user.page.ExamOrganizationRelationQueryInfo;
|
|
@@ -29,6 +27,8 @@ import com.keao.edu.user.service.OrganizationService;
|
|
|
import com.keao.edu.user.service.ShortUrlService;
|
|
|
import com.keao.edu.user.service.SysConfigService;
|
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
|
+import com.keao.edu.util.date.DateUtil;
|
|
|
+import org.apache.commons.lang.time.DateUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -61,6 +61,8 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
private SysMessageFeignService sysMessageFeignService;
|
|
|
@Autowired
|
|
|
private SysConfigService sysConfigService;
|
|
|
+ @Autowired
|
|
|
+ private TenantInfoDao tenantInfoDao;
|
|
|
|
|
|
public static final Set<ExamStatusEnum> EDIT_ABLE_EXAM_STATUS=new HashSet<>(Arrays.asList(ExamStatusEnum.SETTING,ExamStatusEnum.NOT_START,ExamStatusEnum.APPLYING,ExamStatusEnum.APPLIED));
|
|
|
|
|
@@ -189,6 +191,15 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
throw new BizException("考级项目已关闭");
|
|
|
}
|
|
|
|
|
|
+ StringBuffer expectRegistTime = new StringBuffer(DateUtil.dateToString(examinationBasic.getEnrollStartTime(), "yyyy年MM月dd日"));
|
|
|
+ expectRegistTime.append("-");
|
|
|
+ expectRegistTime.append(DateUtil.dateToString(examinationBasic.getEnrollStartTime(), "yyyy年MM月dd日"));
|
|
|
+
|
|
|
+ TenantInfo tenantInfo = tenantInfoDao.getWithOrgan(examinationBasic.getOrganId());
|
|
|
+ if(Objects.isNull(tenantInfo)){
|
|
|
+ throw new BizException("考级信息错误");
|
|
|
+ }
|
|
|
+
|
|
|
List<ExamOrganizationRelation> needUpdate=new ArrayList<>();
|
|
|
for (ExamOrganizationRelation examOrgan : examOrgans) {
|
|
|
if(YesOrNoEnum.YES.equals(examOrgan.getSendUrlFlag())){
|
|
@@ -203,7 +214,8 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
|
|
|
userPhoneMap.put(examOrgan.getOrganId(), student.getPhone());
|
|
|
|
|
|
SysMessageParams sysMessageParams=new SysMessageParams(MessageSenderPluginContext.MessageSender.YIMEI, MessageTypeEnum.EXAM_REGISTRATION_URL_PUSH,
|
|
|
- userPhoneMap, null, 0, null, null, examOrgan.getUrl());
|
|
|
+ userPhoneMap, null, 0, null, null,
|
|
|
+ tenantInfo.getName(), examinationBasic.getName(), expectRegistTime.toString(), examOrgan.getUrl());
|
|
|
sysMessageFeignService.batchSendMessage(sysMessageParams);
|
|
|
}
|
|
|
|