重复报名增加报名机构提示
This commit is contained in:
parent
4ded4d64d7
commit
637f850af1
@ -140,4 +140,7 @@ public interface IApplyDao {
|
|||||||
Integer countKaoshi(Map<String, Object> query);
|
Integer countKaoshi(Map<String, Object> query);
|
||||||
|
|
||||||
Integer countKaoShiCiShu(Map<String, Object> query);
|
Integer countKaoShiCiShu(Map<String, Object> query);
|
||||||
|
|
||||||
|
List<String> listApplyInstitutionNameByCreator(String creator);
|
||||||
|
|
||||||
}
|
}
|
@ -53,6 +53,7 @@ import ink.wgink.properties.FileProperties;
|
|||||||
import ink.wgink.properties.ServerProperties;
|
import ink.wgink.properties.ServerProperties;
|
||||||
import ink.wgink.service.user.pojo.vos.UserVO;
|
import ink.wgink.service.user.pojo.vos.UserVO;
|
||||||
import ink.wgink.service.user.service.IUserService;
|
import ink.wgink.service.user.service.IUserService;
|
||||||
|
import ink.wgink.util.ArrayListUtil;
|
||||||
import ink.wgink.util.QRCodeUtil;
|
import ink.wgink.util.QRCodeUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import ink.wgink.util.date.DateUtil;
|
import ink.wgink.util.date.DateUtil;
|
||||||
@ -64,6 +65,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.mock.web.MockMultipartFile;
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@ -71,10 +73,8 @@ import javax.swing.*;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: ApplyServiceImpl
|
* @ClassName: ApplyServiceImpl
|
||||||
@ -456,10 +456,11 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
String applyInstitutionId = applyVO.getApplyInstitutionId();
|
String applyInstitutionId = applyVO.getApplyInstitutionId();
|
||||||
|
|
||||||
if (checkApplyIsFirst(creator, applyWorkTypeId, applyInstitutionId) != 0) {
|
if (checkApplyIsFirst(creator, applyWorkTypeId, applyInstitutionId) != 0) {
|
||||||
throw new SaveException(applyVO.getApplyName() + "[" + applyVO.getApplyPhone() + "]: 已经报名,若姓名与手机号不符,可能是手机号被注册,请联系管理人员处理或更换手机号");
|
throw new SaveException(applyVO.getApplyName() + "【" + applyVO.getApplyPhone() + "】: 已经报名,若姓名与手机号不符,可能是手机号被注册,请联系管理人员处理或更换手机号");
|
||||||
}
|
}
|
||||||
if (checkApplyIsFirst(creator, applyWorkTypeId, null) != 0) {
|
if (checkApplyIsFirst(creator, applyWorkTypeId, null) != 0) {
|
||||||
throw new SaveException(applyVO.getApplyName() + "[" + applyVO.getApplyPhone() + "]: 已报名其他培训机构,请勿重复报名");
|
List<String> applyInstitutionNames = applyDao.listApplyInstitutionNameByCreator(creator);
|
||||||
|
throw new SaveException(applyVO.getApplyName() + "【" + applyVO.getApplyPhone() + "】: 已报名其他培训机构【" + String.join(",", applyInstitutionNames) + "】,请勿重复报名");
|
||||||
}
|
}
|
||||||
if (!examCheckService.getExamCheckFailOrBack(applyWorkTypeId, applyInstitutionId)) {
|
if (!examCheckService.getExamCheckFailOrBack(applyWorkTypeId, applyInstitutionId)) {
|
||||||
throw new SaveException("已经提交开班计划,无法在审核过程中添加学员");
|
throw new SaveException("已经提交开班计划,无法在审核过程中添加学员");
|
||||||
|
@ -840,4 +840,17 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listApplyInstitutionNameByCreator" parameterType="java.lang.String" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
mi.institution_name
|
||||||
|
FROM
|
||||||
|
e_apply ea
|
||||||
|
INNER JOIN
|
||||||
|
m_institution mi
|
||||||
|
ON
|
||||||
|
ea.apply_institution_id = mi.institution_id
|
||||||
|
WHERE
|
||||||
|
ea.creator = #{_parameter}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user