|
|
@@ -381,18 +381,25 @@ public class LabSecurityApplyController extends BaseController
|
|
|
//获取当前登录用户信息
|
|
|
SysUser tokensysUser = tokenService.getLoginUser().getSysUser();
|
|
|
|
|
|
+ if(!"22".equals(tokensysUser.getUserType())){
|
|
|
+ throw new ServiceException("非学生,不允许申请准入。");
|
|
|
+ }
|
|
|
+
|
|
|
//根据id查询用户信息
|
|
|
R<SysUser> rDate =remoteUserService.getUserInfoByUserId(tokensysUser.getUserId(), SecurityConstants.INNER);
|
|
|
SysUser sysUser = rDate.getData();
|
|
|
|
|
|
- LabSecurityApplyVO labapplyVo=new LabSecurityApplyVO();
|
|
|
- labapplyVo.setBeginTime(beginTime);
|
|
|
- labapplyVo.setEndTime(endTime);
|
|
|
- labapplyVo.setSubjectId(subjectId);
|
|
|
- labapplyVo.setUserId(sysUser.getUserId());
|
|
|
- List<LabSecurityApplyVO> listapplyuser = labSecurityApplyService.selectLabSecurityApplyListByTime(labapplyVo);
|
|
|
- if(listapplyuser.size()>0){
|
|
|
- throw new ServiceException("该时间段已存在准入申请,请修改申请时间后在提交申请!");
|
|
|
+ //PC端根据条件校验,小程序端不做校验(操作流程不同)
|
|
|
+ if(StringUtils.isNotBlank(remark)) {
|
|
|
+ LabSecurityApplyVO labapplyVo = new LabSecurityApplyVO();
|
|
|
+ labapplyVo.setBeginTime(beginTime);
|
|
|
+ labapplyVo.setEndTime(endTime);
|
|
|
+ labapplyVo.setSubjectId(subjectId);
|
|
|
+ labapplyVo.setUserId(sysUser.getUserId());
|
|
|
+ List<LabSecurityApplyVO> listapplyuser = labSecurityApplyService.selectLabSecurityApplyListByTime(labapplyVo);
|
|
|
+ if (listapplyuser.size() > 0) {
|
|
|
+ throw new ServiceException("该时间段已存在准入申请,请修改申请时间后在提交申请。");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//申请时校验是否存在
|