重新评审账号增加正则表达式

This commit is contained in:
dxc
2022-01-04 13:41:56 +08:00
parent e8017b1d7f
commit ff1362c885
2 changed files with 14 additions and 0 deletions

View File

@ -569,4 +569,9 @@ public class ProjectCommonUtil {
* 集团编码
*/
public static final String PROVINCES_BLOC = "001000";
/**
* 账号兼职正则表达式
*/
public static final String REG_PATTEN = "^.+_\\d*$";
}

View File

@ -43,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
@ -247,6 +248,13 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_NOT_UPDATE.customValidName(baseResponse.getMessage(),!baseResponse.isSuccess());
}
LoginUserDetailVO loginUserDetailVO = baseResponse.getData();
//正则验证是否为兼职岗位
if (Pattern.matches(ProjectCommonUtil.REG_PATTEN, loginUserDetailVO.getStaffId())) {
log.info("查询用户中心兼岗职位id={}ou={}", loginUserDetailVO.getStaffId(), loginUserDetailVO.getOu());
loginUserDetailVO.setStaffId(loginUserDetailVO.getStaffId().substring(0, loginUserDetailVO.getStaffId().indexOf("_")));
}
approve.setWfSectionNo(wfSectionNo);
approve.setWfSectionName(wfSectionName);
approve.setBusinessType(record.getBidMethodSubDict());
@ -273,6 +281,7 @@ public class ProjectReEvaluationServiceImpl extends BaseServiceImpl<ProjectReEva
return response.getData();
}
/**
* 修改重新评审信息状态
* @param id 主键