feat:编制情况
This commit is contained in:
1 parent
3d3c8f17e1
commit
53d6dfd551
6 files changed
+63
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
package com.bsd.pjcloud.admin.api.constant;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户在编情况
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum UserStaffingTypeEnum {
|
||||
STAFFING("1", "在编"),
|
||||
NONE_STAFFING("2", "非在编"),
|
||||
;
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static UserStaffingTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -240,9 +240,21 @@ public class SysUser extends Model<SysUser> implements Serializable {
|
||||
@Schema(description = "员工浙政钉编码")
|
||||
private String dingtalkEmployeeCode;
|
||||
|
||||
/**
|
||||
* 员工所属系统类型
|
||||
*/
|
||||
@Schema(description = "员工所属系统类型")
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 是否为全局人脸
|
||||
*/
|
||||
@Schema(description = "是否为全局人脸")
|
||||
private String isGlobalFace;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
@Schema(description = "编制类型")
|
||||
private String staffingType;
|
||||
}
|
||||
+6
@@ -92,6 +92,12 @@ public class UserExcelVO implements Serializable {
|
||||
@ExcelProperty("岗位名称")
|
||||
private String postNameList;
|
||||
|
||||
/**
|
||||
* 编制
|
||||
*/
|
||||
@ExcelProperty("编制")
|
||||
private String staffingType;
|
||||
|
||||
/**
|
||||
* 锁定标记
|
||||
*/
|
||||
|
||||
@@ -241,4 +241,9 @@ public class UserVO implements BaseFacesInterface, Serializable {
|
||||
* 商户相关
|
||||
*/
|
||||
private String merchantName;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
private String staffingType;
|
||||
}
|
||||
+7
@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.admin.api.constant.UserStaffingTypeEnum;
|
||||
import com.bsd.pjcloud.admin.api.constant.UserStateEnum;
|
||||
import com.bsd.pjcloud.admin.api.dto.SysUserFaceDto;
|
||||
import com.bsd.pjcloud.admin.api.dto.UserDTO;
|
||||
@@ -473,6 +474,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
excelVO.setRoleNameList(roleNameList);
|
||||
String postNameList = userVO.getPostList().stream().map(SysPost::getPostName).collect(Collectors.joining(StrUtil.COMMA));
|
||||
excelVO.setPostNameList(postNameList);
|
||||
if (ObjectUtil.isNotEmpty(userVO.getStaffingType())) {
|
||||
UserStaffingTypeEnum staffingTypeEnum = UserStaffingTypeEnum.valueOfByType(userVO.getStaffingType());
|
||||
if (ObjectUtil.isNotEmpty(staffingTypeEnum)) {
|
||||
excelVO.setStaffingType(staffingTypeEnum.getDescription());
|
||||
}
|
||||
}
|
||||
return excelVO;
|
||||
}).collect(Collectors.toList());
|
||||
return userExcelVOList;
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<result column="name" property="name"/>
|
||||
<result column="email" property="email"/>
|
||||
<result column="is_global_face" property="isGlobalFace"/>
|
||||
<result column="staffing_type" property="staffingType"/>
|
||||
<result column="dingtalk_employee_code" property="dingtalkEmployeeCode"/>
|
||||
<collection property="roleList" ofType="com.bsd.pjcloud.admin.api.entity.SysRole"
|
||||
select="com.bsd.pjcloud.admin.mapper.SysRoleMapper.listRolesByUserId" column="user_id">
|
||||
@@ -116,6 +117,7 @@
|
||||
u.create_by,
|
||||
u.create_time ucreate_time,
|
||||
u.update_time uupdate_time,
|
||||
u.staffing_type,
|
||||
d.name dept_name,
|
||||
d.dept_id
|
||||
</sql>
|
||||
@@ -170,6 +172,7 @@
|
||||
u.name,
|
||||
u.email,
|
||||
u.is_global_face,
|
||||
u.staffing_type,
|
||||
d.name dept_name
|
||||
FROM
|
||||
sys_user u
|
||||
@@ -194,6 +197,9 @@
|
||||
<if test="query.deptId != null">
|
||||
AND u.dept_id = #{query.deptId}
|
||||
</if>
|
||||
<if test="query.staffingType != null">
|
||||
AND u.staffing_type = #{query.staffingType}
|
||||
</if>
|
||||
<if test="query.role != null and query.role.size() != 0">
|
||||
and urole.role_id IN
|
||||
<foreach collection="query.role" item="v" open="(" close=")" separator=",">
|
||||
@@ -263,6 +269,7 @@
|
||||
u.nickname,
|
||||
u.name,
|
||||
u.email,
|
||||
u.staffing_type,
|
||||
d.name dept_name
|
||||
FROM
|
||||
sys_user u
|
||||
|
||||
Reference in new issue
Block a user