Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
da5131b414
@ -234,7 +234,7 @@ public interface IApplyService {
|
||||
|
||||
/**
|
||||
* 统计机构星期的报名信息
|
||||
* @param week
|
||||
* @param weekTime
|
||||
* @param applyInstitutionId
|
||||
* @param applyClassId
|
||||
* @return
|
||||
|
@ -175,7 +175,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
@Override
|
||||
public String saveReturnId(String token, ApplyVO applyVO) {
|
||||
//检查报名数据
|
||||
checkSaveData(applyVO.getApplyCardNumber(),applyVO.getApplyClassId());
|
||||
checkSaveData(token,applyVO.getApplyCardNumber(),applyVO.getApplyClassId());
|
||||
String applyId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(applyVO);
|
||||
params.put("applyId", applyId);
|
||||
@ -196,11 +196,16 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
return applyId;
|
||||
}
|
||||
|
||||
public void checkSaveData(String applyCardNumber,String ApplyClassId){
|
||||
if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){
|
||||
public void checkSaveData(String token,String applyCardNumber,String ApplyClassId){
|
||||
// if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){
|
||||
// throw new SaveException("您以报名过该项目");
|
||||
// }
|
||||
|
||||
if(countApplyCreator(token,ApplyClassId) != 0){
|
||||
throw new SaveException("您以报名过该项目");
|
||||
}
|
||||
|
||||
|
||||
ClassPlanDTO classPlanDTO = classPlanService.get(ApplyClassId);
|
||||
if(classPlanDTO == null){
|
||||
throw new ParamsException("未查询到计划信息");
|
||||
@ -352,6 +357,25 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计当前登录账号 报名的培训计划的次数(不包括撤回)
|
||||
*/
|
||||
public Integer countApplyCreator(String creator,String applyClassId){
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("creator",creator);
|
||||
params.put("applyClassId",applyClassId);
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("0");
|
||||
applyAuditStates.add("2");
|
||||
applyAuditStates.add("3");
|
||||
applyAuditStates.add("-1");
|
||||
params.put("applyAuditStates",applyAuditStates);
|
||||
return count(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 统计证件号码 报名的培训计划的次数(不包括撤回)
|
||||
*/
|
||||
|
@ -614,6 +614,9 @@
|
||||
<if test="applyInstitutionId != null and applyInstitutionId != ''">
|
||||
AND t1.apply_institution_id = #{applyInstitutionId}
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
AND t1.creator = #{creator}
|
||||
</if>
|
||||
<if test="applyAuditStates != null and applyAuditStates != ''">
|
||||
AND t1.apply_audit_state IN
|
||||
<foreach collection="applyAuditStates" index="index" open="(" separator="," close=")">
|
||||
|
@ -273,8 +273,6 @@
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
initTeacherEChart: function(){
|
||||
top.restAjax.get('api/indexcount/count-teacher-num', {}, null, function(code, data) {
|
||||
var dataList = [];
|
||||
|
Loading…
Reference in New Issue
Block a user