员工姓名、工号、账号判重

master
river 4 years ago
parent 7a5eef0b12
commit 4e1de30fda
  1. 74
      dq-financial-crms/src/main/resources/bootstrap.properties
  2. 74
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  3. 3
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  4. 5
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
  5. 86
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  6. 25
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  7. 18
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java
  8. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java
  9. 52
      dq-govern-gateway/src/main/resources/bootstrap.properties
  10. 1
      dq-govern-gateway/src/main/resources/jwt.properties

@ -1,59 +1,59 @@
# 开发和测试环境(dev) # 开发和测试环境(dev)
#服务名称 #服务名称
#spring.application.name=dq-financial-crms
##配置中心地址
#spring.cloud.nacos.config.server-addr=192.168.31.142:8848
#spring.cloud.nacos.config.namespace=1f69d47e-0aeb-4a1e-8ab4-0e84dfb86354
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=dev
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=dev
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=dev
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
# 正式环境(prod)
#服务名称
spring.application.name=dq-financial-crms spring.application.name=dq-financial-crms
#配置中心地址 #配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848 spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd spring.cloud.nacos.config.namespace=1f69d47e-0aeb-4a1e-8ab4-0e84dfb86354
#spring.cloud.nacos.config.group=prod #spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod spring.cloud.nacos.config.ext-config[1].group=dev
spring.cloud.nacos.config.ext-config[1].refresh=true spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod spring.cloud.nacos.config.ext-config[2].group=dev
spring.cloud.nacos.config.ext-config[2].refresh=true spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=dq123456 spring.redis.password=123456
spring.redis.database=0 spring.redis.database=0
spring.redis.timeout=30000 spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8 spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
# 正式环境(prod)
#服务名称
#spring.application.name=dq-financial-crms
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -1,58 +1,58 @@
# 开发和测试环境(dev) # 开发和测试环境(dev)
#spring.application.name=dq-financial-hrms-auth
#
#spring.cloud.nacos.config.server-addr=192.168.31.142:8848
#spring.cloud.nacos.config.namespace=7632bdaa-3381-4669-b3f9-2fc73be451e8
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=dev
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=dev
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=dev
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
#正式环境(prod)
spring.application.name=dq-financial-hrms-auth spring.application.name=dq-financial-hrms-auth
spring.cloud.nacos.config.server-addr=120.78.127.12:8848 spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 spring.cloud.nacos.config.namespace=7632bdaa-3381-4669-b3f9-2fc73be451e8
#spring.cloud.nacos.config.group=prod #spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod spring.cloud.nacos.config.ext-config[1].group=dev
spring.cloud.nacos.config.ext-config[1].refresh=true spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod spring.cloud.nacos.config.ext-config[2].group=dev
spring.cloud.nacos.config.ext-config[2].refresh=true spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=dq123456 spring.redis.password=123456
spring.redis.database=0 spring.redis.database=0
spring.redis.timeout=30000 spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8 spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
#正式环境(prod)
#spring.application.name=dq-financial-hrms-auth
#
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -89,7 +89,8 @@ public class EmployeeController implements EmployeeControllerApi {
*/ */
@PostMapping("/save") @PostMapping("/save")
//@RequiresPermissions("hrms:employee:save") //@RequiresPermissions("hrms:employee:save")
public ResponseResult save(@RequestBody EmployeeInfoVO employeeInfoVO) { public ResponseResult save(@RequestBody @Valid EmployeeInfoVO employeeInfoVO) {
Boolean result = employeeService.save(employeeInfoVO); Boolean result = employeeService.save(employeeInfoVO);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL); return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL);

@ -81,4 +81,9 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
Boolean updateEmployeeAndUser(EmployeeEntity employeeEntity); Boolean updateEmployeeAndUser(EmployeeEntity employeeEntity);
Integer employeeNameCount(String name);
Integer userAccountCount(String account);
Integer employeeJobNumberCount(String jobNumber);
} }

@ -273,6 +273,28 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
|| employeeInfoVO.getPhone().length() == 0){ || employeeInfoVO.getPhone().length() == 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_INFO_NOT_NULL); ExceptionCast.cast(HrmsCode.EMPLOYEE_INFO_NOT_NULL);
} }
// 判重
Integer numberCount = this.getBaseMapper().employeeJobNumberCount(employeeInfoVO.getJobNumber());
if (numberCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
if (accountCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
String name = employeeInfoVO.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
}else {
employeeInfoVO.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
}
String account = employeeInfoVO.getAccount(); String account = employeeInfoVO.getAccount();
EmployeeEntity employee = new EmployeeEntity(); EmployeeEntity employee = new EmployeeEntity();
BeanUtils.copyProperties(employeeInfoVO, employee); BeanUtils.copyProperties(employeeInfoVO, employee);
@ -303,10 +325,41 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
if (employeeInfoVO.getRoleIds() == null || employeeInfoVO.getRoleIds().size() == 0) { if (employeeInfoVO.getRoleIds() == null || employeeInfoVO.getRoleIds().size() == 0) {
ExceptionCast.cast(HrmsCode.ROLE_NOT_NULL); ExceptionCast.cast(HrmsCode.ROLE_NOT_NULL);
} }
if (employeeInfoVO.getName().length() == 0
|| employeeInfoVO.getAccount().length() == 0
|| employeeInfoVO.getCompanyMail().length() == 0
|| employeeInfoVO.getJobNumber().length() == 0
|| employeeInfoVO.getPhone().length() == 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_INFO_NOT_NULL);
}
// 判重
Integer numberCount = this.getBaseMapper().employeeJobNumberCount(employeeInfoVO.getJobNumber());
if (numberCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
Integer accountCount = this.getBaseMapper().userAccountCount(employeeInfoVO.getAccount());
if (accountCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
String name = employeeInfoVO.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
name = employeeInfoVO.getName() + PromptSuccess.LETTERS[i];
}else {
employeeInfoVO.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
}
// 员工对应的用户信息
UserEntity user = new UserEntity(); UserEntity user = new UserEntity();
user.setAccount(employeeInfoVO.getAccount()); user.setAccount(employeeInfoVO.getAccount());
user.setCreateTime(new Date()); user.setCreateTime(new Date());
user.setMotifyTime(new Date()); user.setMotifyTime(new Date());
user.setPhoneAccount(employeeInfoVO.getPhone());
Boolean result1 = this.getBaseMapper().insertUser(user); Boolean result1 = this.getBaseMapper().insertUser(user);
EmployeeEntity employee = new EmployeeEntity(); EmployeeEntity employee = new EmployeeEntity();
if (result1) { if (result1) {
@ -382,15 +435,38 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
ExceptionCast.cast(HrmsCode.EXCEL_DATA_IS_NULL); ExceptionCast.cast(HrmsCode.EXCEL_DATA_IS_NULL);
} }
for (Object e : employees) { for (Object e : employees) {
// 判空
BeanUtils.copyProperties(e, employeeExcelImport); BeanUtils.copyProperties(e, employeeExcelImport);
if (employeeExcelImport.getName() == null) { if (employeeExcelImport.getName() == null || employeeExcelImport.getName().length() == 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_NAME_IS_NULL); ExceptionCast.cast(HrmsCode.EMPLOYEE_NAME_IS_NULL);
} }
if (employeeExcelImport.getAccount() == null) { if (employeeExcelImport.getAccount() == null || employeeExcelImport.getAccount().length() == 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_ACCOUNT_IS_NULL); ExceptionCast.cast(HrmsCode.EMPLOYEE_ACCOUNT_IS_NULL);
} }
if (employeeExcelImport.getJobNumber() == null) { if (employeeExcelImport.getJobNumber() == null || employeeExcelImport.getJobNumber().length() == 0) {
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOBNUMBER_IS_NULL); ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_IS_NULL);
}
// 判重
Integer jobNumberCount = this.getBaseMapper().employeeJobNumberCount(employeeExcelImport.getJobNumber());
if (jobNumberCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_JOB_NUMBER_EXIST);
}
Integer accountCount = this.getBaseMapper().userAccountCount(employeeExcelImport.getAccount());
if (accountCount > 0){
ExceptionCast.cast(HrmsCode.EMPLOYEE_USER_ACCOUNT_EXIST);
}
String name = employeeExcelImport.getName();
for (int i = 0;i < PromptSuccess.LETTERS.length;i++){
Integer nameCount = this.getBaseMapper().employeeNameCount(name);
if (nameCount > 0){
name = employeeExcelImport.getName() + PromptSuccess.LETTERS[i];
}else {
employeeExcelImport.setName(name);
break;
}
if (i == PromptSuccess.LETTERS.length - 1){
ExceptionCast.cast(HrmsCode.EMPLOYEE_REPETITION_EXCEED);
}
} }
user.setAccount(employeeExcelImport.getAccount()); user.setAccount(employeeExcelImport.getAccount());
user.setCreateTime(new Date()); user.setCreateTime(new Date());
@ -400,6 +476,8 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
this.getBaseMapper().updatePassword(user.getId(),Md5Util.md5(PromptSuccess.RESET_PASSWORD+user.getId())); this.getBaseMapper().updatePassword(user.getId(),Md5Util.md5(PromptSuccess.RESET_PASSWORD+user.getId()));
BeanUtils.copyProperties(e, employee); BeanUtils.copyProperties(e, employee);
employee.setUserId(user.getId()); employee.setUserId(user.getId());
// 此处员工姓名可能重复,所以要如下设置
employee.setName(employeeExcelImport.getName());
this.getBaseMapper().insertEmployee(employee); this.getBaseMapper().insertEmployee(employee);
// 部门 // 部门
String[] departmentNames = employeeExcelImport.getDepartmentNameList().split("&"); String[] departmentNames = employeeExcelImport.getDepartmentNameList().split("&");

@ -424,7 +424,7 @@
</insert> </insert>
<insert id="insertUser" keyProperty="id" useGeneratedKeys="true" parameterType="com.daqing.framework.domain.hrms.UserEntity"> <insert id="insertUser" keyProperty="id" useGeneratedKeys="true" parameterType="com.daqing.framework.domain.hrms.UserEntity">
INSERT INTO hrms_user (account,create_time,motify_time) VALUES (#{account},#{createTime},#{motifyTime}) INSERT INTO hrms_user (account,phone_account,create_time,motify_time) VALUES (#{account},#{phoneAccount},#{createTime},#{motifyTime})
</insert> </insert>
<select id="getEmployeeByUserId" parameterType="long" resultMap="employeeInfoByUserId"> <select id="getEmployeeByUserId" parameterType="long" resultMap="employeeInfoByUserId">
@ -463,4 +463,27 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<!-- 新增员工时判断姓名、工号、账号是否存在 -->
<select id="employeeNameCount" parameterType="string" resultType="integer">
SELECT COUNT(e.id)
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.name = #{name}
</select>
<select id="userAccountCount" parameterType="string" resultType="integer">
SELECT COUNT(id) FROM hrms_user WHERE del_or_not = 0 AND account = #{account}
</select>
<select id="employeeJobNumberCount" parameterType="string" resultType="integer">
SELECT COUNT(e.id)
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.job_number = #{jobNumber}
</select>
</mapper> </mapper>

@ -14,23 +14,25 @@ public class PromptSuccess {
public static final String NOT_BEING = "该员工已不存在"; public static final String NOT_BEING = "该员工已不存在";
public static final Integer STOP_STATUS = 1; public static final Integer STOP_STATUS = 1; // 已禁用
public static final Integer START_STATUS = 0; public static final Integer START_STATUS = 0; // 开启
public static final Integer UPCOMING_STOP_STATUS = 2; public static final Integer UPCOMING_STOP_STATUS = 2; // 即将禁用
public static final String RESET_PASSWORD = "666666"; public static final String RESET_PASSWORD = "Aa1234"; // 初始密码
public static final String MATCHES_STRING = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{6,}$"; public static final String MATCHES_STRING = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{6,}$"; // 密码正则(必须包含一个大写一个小写加数字,且不小于六位)
public static final Long OVERDUE_TIME = 70L; // 过期时间,单位为秒 public static final Long OVERDUE_TIME = 70L; // 验证码过期时间,单位为秒
public static final String QR_CODE_FAIL = "1"; // 微信没绑定 public static final String QR_CODE_FAIL = "1"; // 微信没绑定
public static final String QR_CODE_BINDING_SUCCESS = "0"; // 微信已绑定 public static final String QR_CODE_BINDING_SUCCESS = "0"; // 微信已绑定
public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径
public static final String IMAGE_URL_PATH = "http://www.huorantech.cn/headImg/"; public static final String IMAGE_URL_PATH = "http://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径
public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加
} }

@ -25,7 +25,7 @@ public enum HrmsCode implements ResultCode {
EMPLOYEE_IS_NULL(false,44001,"当前员工已不存在!"), EMPLOYEE_IS_NULL(false,44001,"当前员工已不存在!"),
EMPLOYEE_NAME_IS_NULL(false,44002,"请完善员工姓名!"), EMPLOYEE_NAME_IS_NULL(false,44002,"请完善员工姓名!"),
EMPLOYEE_ACCOUNT_IS_NULL(false,44003,"请完善员工账号!"), EMPLOYEE_ACCOUNT_IS_NULL(false,44003,"请完善员工账号!"),
EMPLOYEE_JOBNUMBER_IS_NULL(false,44004,"请完善员工工号!"), EMPLOYEE_JOB_NUMBER_IS_NULL(false,44004,"请完善员工工号!"),
EMPLOYEE_DEPARTMENT_IS_NULL(false,44005,"请完善员工部门!"), EMPLOYEE_DEPARTMENT_IS_NULL(false,44005,"请完善员工部门!"),
EMPLOYEE_POSITION_IS_NULL(false,44006,"请完善员工职位!"), EMPLOYEE_POSITION_IS_NULL(false,44006,"请完善员工职位!"),
EMPLOYEE_ROLE_IS_NULL(false,44007,"请完善员工角色!"), EMPLOYEE_ROLE_IS_NULL(false,44007,"请完善员工角色!"),
@ -35,6 +35,9 @@ public enum HrmsCode implements ResultCode {
EMPLOYEE_DISABLE_TIME_ERROR(false,44011,"禁用失败,当前禁用开始时间可能大于或等于结束时间!"), EMPLOYEE_DISABLE_TIME_ERROR(false,44011,"禁用失败,当前禁用开始时间可能大于或等于结束时间!"),
EMPLOYEE_USER_IS_NULL(false,44012,"当前员工的用户信息已不存在!"), EMPLOYEE_USER_IS_NULL(false,44012,"当前员工的用户信息已不存在!"),
EMPLOYEE_INFO_NOT_NULL(false,44013,"姓名、账号、手机号、公司邮箱、工号不能为空,请正确填写!"), EMPLOYEE_INFO_NOT_NULL(false,44013,"姓名、账号、手机号、公司邮箱、工号不能为空,请正确填写!"),
EMPLOYEE_JOB_NUMBER_EXIST(false,44014,"员工工号已存在,请重新输入!"),
EMPLOYEE_USER_ACCOUNT_EXIST(false,44015,"员工账号已存在,请重新输入!"),
EMPLOYEE_REPETITION_EXCEED(false,44016,"员工姓名重复过多,请重新输入!"),
POSITION_NOT_NULL(false,55001,"职位不能为空!"), POSITION_NOT_NULL(false,55001,"职位不能为空!"),

@ -1,40 +1,40 @@
服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
# 正式环境(prod)
#服务名称 #服务名称
#spring.application.name=dq-govern-gateway #spring.application.name=dq-govern-gateway
##配置中心地址 ##配置中心地址
#spring.cloud.nacos.config.server-addr=192.168.31.142:8848 #spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25 #spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
# #
#spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml #spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
#spring.cloud.nacos.config.ext-config[0].group=dev #spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true #spring.cloud.nacos.config.ext-config[0].refresh=true
# #
#spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
#spring.redis.port=6379 #spring.redis.port=6379
#spring.redis.password=123456 #spring.redis.password=dq123456
#spring.redis.database=0 #spring.redis.database=0
#spring.redis.timeout=30000 #spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8 #spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1 #spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0 #spring.redis.jedis.pool.min-idle=0
# 正式环境(prod)
#服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0

@ -9,7 +9,6 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-crms/crms/customer/excelImport,\ /api-crms/crms/customer/excelImport,\
/api-hrms/hrms/employee/excelExport,\ /api-hrms/hrms/employee/excelExport,\
/api-hrms/hrms/employee/excelTemplate,\ /api-hrms/hrms/employee/excelTemplate,\
/api-hrms/hrms/employee/excelImport,\
/apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\ /apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\
/apiHrmsAuth/hrms/auth/userlogin/sendCode,\ /apiHrmsAuth/hrms/auth/userlogin/sendCode,\
/apiHrmsAuth/hrms/auth/userlogin/isPhoneExist /apiHrmsAuth/hrms/auth/userlogin/isPhoneExist

Loading…
Cancel
Save