mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-27 17:48:16 +08:00
【高级搜索】员工查询列表修改
This commit is contained in:
parent
c010337320
commit
750d00f8fd
5 changed files with 55 additions and 18 deletions
|
@ -0,0 +1,41 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity.userauth.user;
|
||||
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.common.entity.CommonPageInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName: SysUserStaffQueryDo
|
||||
* @Description: 员工列表查询条件实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/7/16 22:42
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("员工列表查询条件实体类")
|
||||
public class SysUserStaffQueryDo extends CommonPageInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "员工姓名")
|
||||
private Integer userName;
|
||||
|
||||
@ApiModelProperty(value = "身份证")
|
||||
private Integer userIdCard;
|
||||
|
||||
@ApiModelProperty(value = "公司")
|
||||
private Integer companyName;
|
||||
|
||||
@ApiModelProperty(value = "部门")
|
||||
private Integer departmentName;
|
||||
|
||||
@ApiModelProperty(value = "职位")
|
||||
private Integer jobName;
|
||||
|
||||
}
|
|
@ -11,6 +11,7 @@ import com.skyeye.annotation.api.ApiOperation;
|
|||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserStaffMation;
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserStaffQueryDo;
|
||||
import com.skyeye.eve.service.SysEveUserStaffService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -38,15 +39,7 @@ public class SysEveUserStaffController {
|
|||
* @param outputObject
|
||||
*/
|
||||
@ApiOperation(id = "staff001", value = "查看所有员工列表", method = "POST", allUse = "1")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "limit", name = "limit", value = "分页参数,每页多少条数据", required = "required,num"),
|
||||
@ApiImplicitParam(id = "page", name = "page", value = "分页参数,第几页", required = "required,num"),
|
||||
@ApiImplicitParam(id = "userName", name = "userName", value = "员工姓名"),
|
||||
@ApiImplicitParam(id = "userIdCard", name = "userIdCard", value = "身份证"),
|
||||
@ApiImplicitParam(id = "userSex", name = "userSex", value = "员工性别 0保密 1男 2女"),
|
||||
@ApiImplicitParam(id = "companyName", name = "companyName", value = "公司"),
|
||||
@ApiImplicitParam(id = "departmentName", name = "departmentName", value = "部门"),
|
||||
@ApiImplicitParam(id = "jobName", name = "jobName", value = "职位")})
|
||||
@ApiImplicitParams(classBean = SysUserStaffQueryDo.class)
|
||||
@RequestMapping("/post/SysEveUserStaffController/querySysUserStaffList")
|
||||
public void querySysUserStaffList(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserStaffService.querySysUserStaffList(inputObject, outputObject);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
package com.skyeye.eve.dao;
|
||||
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserStaffQueryDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -19,7 +20,7 @@ import java.util.Map;
|
|||
*/
|
||||
public interface SysEveUserStaffDao {
|
||||
|
||||
List<Map<String, Object>> querySysUserStaffList(Map<String, Object> map);
|
||||
List<Map<String, Object>> querySysUserStaffList(SysUserStaffQueryDo sysUserStaffQuery);
|
||||
|
||||
Map<String, Object> querySysUserStaffMationByIdCard(Map<String, Object> map);
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.skyeye.common.util.ToolUtil;
|
|||
import com.skyeye.eve.dao.SysEveUserDao;
|
||||
import com.skyeye.eve.dao.SysEveUserStaffDao;
|
||||
import com.skyeye.eve.dao.WagesFieldTypeDao;
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserStaffQueryDo;
|
||||
import com.skyeye.eve.service.SysEveUserService;
|
||||
import com.skyeye.eve.service.SysEveUserStaffService;
|
||||
import com.skyeye.exception.CustomException;
|
||||
|
@ -101,9 +102,9 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
*/
|
||||
@Override
|
||||
public void querySysUserStaffList(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.querySysUserStaffList(map);
|
||||
SysUserStaffQueryDo sysUserStaffQuery = inputObject.getParams(SysUserStaffQueryDo.class);
|
||||
Page pages = PageHelper.startPage(sysUserStaffQuery.getPage(), sysUserStaffQuery.getLimit());
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.querySysUserStaffList(sysUserStaffQuery);
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.skyeye.eve.dao.SysEveUserStaffDao">
|
||||
|
||||
<select id="querySysUserStaffList" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
<select id="querySysUserStaffList" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_number jobNumber,
|
||||
|
@ -27,16 +27,16 @@
|
|||
LEFT JOIN company_job p ON a.job_id = p.id
|
||||
LEFT JOIN company_department q ON a.department_id = q.id
|
||||
LEFT JOIN company_mation u ON a.company_id = u.id
|
||||
WHERE 1=1
|
||||
<where>
|
||||
<if test="sqlExtract != '' and sqlExtract != null">
|
||||
${sqlExtract}
|
||||
</if>
|
||||
<if test="userName != '' and userName != null">
|
||||
AND a.user_name LIKE '%${userName}%'
|
||||
</if>
|
||||
<if test="userIdCard != '' and userIdCard != null">
|
||||
AND a.user_idcard LIKE '%${userIdCard}%'
|
||||
</if>
|
||||
<if test="userSex != '' and userSex != null">
|
||||
AND a.user_sex = #{userSex}
|
||||
</if>
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND a.company_id = #{companyName}
|
||||
</if>
|
||||
|
@ -46,6 +46,7 @@
|
|||
<if test="jobName != '' and jobName != null">
|
||||
AND a.job_id = #{jobName}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.id
|
||||
ORDER BY a.state ASC, a.entry_time DESC
|
||||
</select>
|
||||
|
|
Loading…
Reference in a new issue