diff --git a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserQueryDo.java b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserQueryDo.java index 868ca0bc..2f078641 100644 --- a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserQueryDo.java +++ b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/userauth/user/SysUserQueryDo.java @@ -24,18 +24,18 @@ import java.io.Serializable; public class SysUserQueryDo extends CommonPageInfo implements Serializable { @ApiModelProperty(value = "用户账号") - private Integer userCode; + private String userCode; @ApiModelProperty(value = "员工姓名") - private Integer userName; + private String userName; @ApiModelProperty(value = "公司") - private Integer companyName; + private String companyName; @ApiModelProperty(value = "部门") - private Integer departmentName; + private String departmentName; @ApiModelProperty(value = "职位") - private Integer jobName; + private String jobName; } 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 index af992a37..f84ae6d0 100644 --- 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 @@ -24,18 +24,18 @@ import java.io.Serializable; public class SysUserStaffQueryDo extends CommonPageInfo implements Serializable { @ApiModelProperty(value = "员工姓名") - private Integer userName; + private String userName; @ApiModelProperty(value = "身份证") - private Integer userIdCard; + private String userIdCard; @ApiModelProperty(value = "公司") - private Integer companyName; + private String companyName; @ApiModelProperty(value = "部门") - private Integer departmentName; + private String departmentName; @ApiModelProperty(value = "职位") - private Integer jobName; + private String jobName; } diff --git a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/wages/WagesPaymentHistoryQueryDo.java b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/wages/WagesPaymentHistoryQueryDo.java new file mode 100644 index 00000000..9af8e952 --- /dev/null +++ b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/wages/WagesPaymentHistoryQueryDo.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye + ******************************************************************************/ + +package com.skyeye.eve.entity.wages; + +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: WagesPaymentHistoryQueryDo + * @Description: 已发放薪资发放历史列表查询条件实体类 + * @author: skyeye云系列--卫志强 + * @date: 2022/7/17 18:21 + * @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved. + * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 + */ +@Data +@ApiModel("已发放薪资发放历史列表查询条件实体类") +public class WagesPaymentHistoryQueryDo extends CommonPageInfo implements Serializable { + + @ApiModelProperty(value = "工号") + private String jobNumber; + + @ApiModelProperty(value = "员工姓名") + private String userName; + + @ApiModelProperty(value = "企业id") + private String companyId; + + @ApiModelProperty(value = "部门id") + private String departmentId; + + @ApiModelProperty(value = "职位id") + private String jobId; + + @ApiModelProperty(value = "月份") + private String payMonth; + + private Integer state; + +} diff --git a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/controller/WagesPaymentHistoryController.java b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/controller/WagesPaymentHistoryController.java index 6734e5b5..66ff4e9b 100644 --- a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/controller/WagesPaymentHistoryController.java +++ b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/controller/WagesPaymentHistoryController.java @@ -4,14 +4,19 @@ package com.skyeye.eve.controller; +import com.skyeye.annotation.api.Api; +import com.skyeye.annotation.api.ApiImplicitParams; +import com.skyeye.annotation.api.ApiOperation; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; +import com.skyeye.eve.entity.wages.WagesPaymentHistoryQueryDo; import com.skyeye.eve.service.WagesPaymentHistoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@Api(value = "薪资发放历史", tags = "薪资发放历史", modelName = "薪资模块") public class WagesPaymentHistoryController { @Autowired @@ -23,6 +28,8 @@ public class WagesPaymentHistoryController { * @param inputObject * @param outputObject */ + @ApiOperation(id = "wagespaymenthistory001", value = "获取所有已发放薪资发放历史列表", method = "POST", allUse = "1") + @ApiImplicitParams(classBean = WagesPaymentHistoryQueryDo.class) @RequestMapping("/post/WagesPaymentHistoryController/queryAllGrantWagesPaymentHistoryList") public void queryAllGrantWagesPaymentHistoryList(InputObject inputObject, OutputObject outputObject) { wagesPaymentHistoryService.queryAllGrantWagesPaymentHistoryList(inputObject, outputObject); @@ -45,6 +52,8 @@ public class WagesPaymentHistoryController { * @param inputObject * @param outputObject */ + @ApiOperation(id = "wagespaymenthistory003", value = "获取所有待发放薪资列表", method = "POST", allUse = "1") + @ApiImplicitParams(classBean = WagesPaymentHistoryQueryDo.class) @RequestMapping("/post/WagesPaymentHistoryController/queryAllNotGrantWagesPaymentHistoryList") public void queryAllNotGrantWagesPaymentHistoryList(InputObject inputObject, OutputObject outputObject) { wagesPaymentHistoryService.queryAllNotGrantWagesPaymentHistoryList(inputObject, outputObject); diff --git a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/dao/WagesPaymentHistoryDao.java b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/dao/WagesPaymentHistoryDao.java index 1c291518..90616b64 100644 --- a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/dao/WagesPaymentHistoryDao.java +++ b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/dao/WagesPaymentHistoryDao.java @@ -4,6 +4,7 @@ package com.skyeye.eve.dao; +import com.skyeye.eve.entity.wages.WagesPaymentHistoryQueryDo; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -19,7 +20,7 @@ import java.util.Map; */ public interface WagesPaymentHistoryDao { - List> queryAllWagesPaymentHistoryList(Map map); + List> queryAllWagesPaymentHistoryList(WagesPaymentHistoryQueryDo wagesPaymentHistoryQuery); List> queryMyWagesPaymentHistoryList(Map map); diff --git a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/service/impl/WagesPaymentHistoryServiceImpl.java b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/service/impl/WagesPaymentHistoryServiceImpl.java index 418a8485..5924d988 100644 --- a/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/service/impl/WagesPaymentHistoryServiceImpl.java +++ b/skyeye-promote/skyeye-wages/src/main/java/com/skyeye/eve/service/impl/WagesPaymentHistoryServiceImpl.java @@ -9,6 +9,7 @@ import com.github.pagehelper.PageHelper; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.eve.dao.WagesPaymentHistoryDao; +import com.skyeye.eve.entity.wages.WagesPaymentHistoryQueryDo; import com.skyeye.eve.service.WagesPaymentHistoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -58,10 +59,10 @@ public class WagesPaymentHistoryServiceImpl implements WagesPaymentHistoryServic */ @Override public void queryAllGrantWagesPaymentHistoryList(InputObject inputObject, OutputObject outputObject) { - Map map = inputObject.getParams(); - map.put("state", STATE.START_GRANT.getState()); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = wagesPaymentHistoryDao.queryAllWagesPaymentHistoryList(map); + WagesPaymentHistoryQueryDo wagesPaymentHistoryQuery = inputObject.getParams(WagesPaymentHistoryQueryDo.class); + wagesPaymentHistoryQuery.setState(STATE.START_GRANT.getState()); + Page pages = PageHelper.startPage(wagesPaymentHistoryQuery.getPage(), wagesPaymentHistoryQuery.getLimit()); + List> beans = wagesPaymentHistoryDao.queryAllWagesPaymentHistoryList(wagesPaymentHistoryQuery); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } @@ -90,10 +91,10 @@ public class WagesPaymentHistoryServiceImpl implements WagesPaymentHistoryServic */ @Override public void queryAllNotGrantWagesPaymentHistoryList(InputObject inputObject, OutputObject outputObject) { - Map map = inputObject.getParams(); - map.put("state", STATE.START_WAIT_GRANT.getState()); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = wagesPaymentHistoryDao.queryAllWagesPaymentHistoryList(map); + WagesPaymentHistoryQueryDo wagesPaymentHistoryQuery = inputObject.getParams(WagesPaymentHistoryQueryDo.class); + wagesPaymentHistoryQuery.setState(STATE.START_WAIT_GRANT.getState()); + Page pages = PageHelper.startPage(wagesPaymentHistoryQuery.getPage(), wagesPaymentHistoryQuery.getLimit()); + List> beans = wagesPaymentHistoryDao.queryAllWagesPaymentHistoryList(wagesPaymentHistoryQuery); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } diff --git a/skyeye-promote/skyeye-wages/src/main/resources/mapper/wages/WagesPaymentHistoryMapper.xml b/skyeye-promote/skyeye-wages/src/main/resources/mapper/wages/WagesPaymentHistoryMapper.xml index e573d28e..40058c6e 100644 --- a/skyeye-promote/skyeye-wages/src/main/resources/mapper/wages/WagesPaymentHistoryMapper.xml +++ b/skyeye-promote/skyeye-wages/src/main/resources/mapper/wages/WagesPaymentHistoryMapper.xml @@ -20,26 +20,31 @@ LEFT JOIN company_mation p ON b.company_id = p.id LEFT JOIN company_department q ON b.department_id = q.id LEFT JOIN company_job e ON b.job_id = e.id - WHERE a.staff_id = b.id - AND a.state = #{state} - - AND b.job_number LIKE '%${jobNumber}%' - - - AND b.user_name LIKE '%${userName}%' - - - AND b.company_id = #{companyId} - - - AND b.department_id = #{departmentId} - - - AND b.job_id = #{jobId} - - - AND a.pay_month = #{payMonth} - + + a.staff_id = b.id + AND a.state = #{state} + + ${sqlExtract} + + + AND b.job_number LIKE '%${jobNumber}%' + + + AND b.user_name LIKE '%${userName}%' + + + AND b.company_id = #{companyId} + + + AND b.department_id = #{departmentId} + + + AND b.job_id = #{jobId} + + + AND a.pay_month = #{payMonth} + + ORDER BY a.create_time DESC diff --git a/skyeye-promote/skyeye-wages/src/main/resources/reqmapping/mapping/wages.xml b/skyeye-promote/skyeye-wages/src/main/resources/reqmapping/mapping/wages.xml index 57969ff6..ab722429 100644 --- a/skyeye-promote/skyeye-wages/src/main/resources/reqmapping/mapping/wages.xml +++ b/skyeye-promote/skyeye-wages/src/main/resources/reqmapping/mapping/wages.xml @@ -216,31 +216,11 @@ - - - - - - - - - - - - - - - - - - - -