From 750d00f8fda4b82a5bab83df0f20d47ff0a70a3e Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 17 Jul 2022 10:49:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E3=80=91=E5=91=98=E5=B7=A5=E6=9F=A5=E8=AF=A2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userauth/user/SysUserStaffQueryDo.java | 41 +++++++++++++++++++ .../controller/SysEveUserStaffController.java | 11 +---- .../skyeye/eve/dao/SysEveUserStaffDao.java | 3 +- .../impl/SysEveUserStaffServiceImpl.java | 7 ++-- .../mapper/userauth/SysEveUserStaffMapper.xml | 11 ++--- 5 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserStaffQueryDo.java diff --git a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserStaffQueryDo.java b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserStaffQueryDo.java new file mode 100644 index 00000000..af992a37 --- /dev/null +++ b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserStaffQueryDo.java @@ -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; + +} diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveUserStaffController.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveUserStaffController.java index c9b6ea10..4b6254f3 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveUserStaffController.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveUserStaffController.java @@ -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); diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveUserStaffDao.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveUserStaffDao.java index 65c709c3..90763a05 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveUserStaffDao.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveUserStaffDao.java @@ -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> querySysUserStaffList(Map map); + List> querySysUserStaffList(SysUserStaffQueryDo sysUserStaffQuery); Map querySysUserStaffMationByIdCard(Map map); diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveUserStaffServiceImpl.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveUserStaffServiceImpl.java index b8d80435..06c60589 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveUserStaffServiceImpl.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveUserStaffServiceImpl.java @@ -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 map = inputObject.getParams(); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = sysEveUserStaffDao.querySysUserStaffList(map); + SysUserStaffQueryDo sysUserStaffQuery = inputObject.getParams(SysUserStaffQueryDo.class); + Page pages = PageHelper.startPage(sysUserStaffQuery.getPage(), sysUserStaffQuery.getLimit()); + List> beans = sysEveUserStaffDao.querySysUserStaffList(sysUserStaffQuery); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } diff --git a/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveUserStaffMapper.xml b/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveUserStaffMapper.xml index 0b06c3f9..23a4e04d 100644 --- a/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveUserStaffMapper.xml +++ b/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveUserStaffMapper.xml @@ -2,7 +2,7 @@ - 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 + + + ${sqlExtract} + AND a.user_name LIKE '%${userName}%' AND a.user_idcard LIKE '%${userIdCard}%' - - AND a.user_sex = #{userSex} - AND a.company_id = #{companyName} @@ -46,6 +46,7 @@ AND a.job_id = #{jobName} + GROUP BY a.id ORDER BY a.state ASC, a.entry_time DESC