【薪资模块】薪资发放历史列表整改

This commit is contained in:
weizhiqiang 2022-07-17 20:09:21 +08:00
parent 30cb74b505
commit ee9a14887a
8 changed files with 101 additions and 59 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright 卫志强 QQ598748873@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;
}

View file

@ -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);

View file

@ -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<Map<String, Object>> queryAllWagesPaymentHistoryList(Map<String, Object> map);
List<Map<String, Object>> queryAllWagesPaymentHistoryList(WagesPaymentHistoryQueryDo wagesPaymentHistoryQuery);
List<Map<String, Object>> queryMyWagesPaymentHistoryList(Map<String, Object> map);

View file

@ -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<String, Object> 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<Map<String, Object>> 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<Map<String, Object>> 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<String, Object> 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<Map<String, Object>> 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<Map<String, Object>> beans = wagesPaymentHistoryDao.queryAllWagesPaymentHistoryList(wagesPaymentHistoryQuery);
outputObject.setBeans(beans);
outputObject.settotal(pages.getTotal());
}

View file

@ -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}
<if test="jobNumber != null and jobNumber != ''">
AND b.job_number LIKE '%${jobNumber}%'
</if>
<if test="userName != null and userName != ''">
AND b.user_name LIKE '%${userName}%'
</if>
<if test="companyId != null and companyId != ''">
AND b.company_id = #{companyId}
</if>
<if test="departmentId != null and departmentId != ''">
AND b.department_id = #{departmentId}
</if>
<if test="jobId != null and jobId != ''">
AND b.job_id = #{jobId}
</if>
<if test="payMonth != null and payMonth != ''">
AND a.pay_month = #{payMonth}
</if>
<where>
a.staff_id = b.id
AND a.state = #{state}
<if test="sqlExtract != '' and sqlExtract != null">
${sqlExtract}
</if>
<if test="jobNumber != null and jobNumber != ''">
AND b.job_number LIKE '%${jobNumber}%'
</if>
<if test="userName != null and userName != ''">
AND b.user_name LIKE '%${userName}%'
</if>
<if test="companyId != null and companyId != ''">
AND b.company_id = #{companyId}
</if>
<if test="departmentId != null and departmentId != ''">
AND b.department_id = #{departmentId}
</if>
<if test="jobId != null and jobId != ''">
AND b.job_id = #{jobId}
</if>
<if test="payMonth != null and payMonth != ''">
AND a.pay_month = #{payMonth}
</if>
</where>
ORDER BY a.create_time DESC
</select>

View file

@ -216,31 +216,11 @@
<!-- 薪资模板结束 -->
<!-- 薪资发放历史开始 -->
<url id="wagespaymenthistory001" path="/post/WagesPaymentHistoryController/queryAllGrantWagesPaymentHistoryList" val="获取所有已发放薪资发放历史列表" allUse="1" groupName="薪资发放历史">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
<property id="jobNumber" name="jobNumber" ref="" var="工号" />
<property id="userName" name="userName" ref="" var="员工姓名" />
<property id="companyId" name="companyId" ref="" var="企业id"/>
<property id="departmentId" name="departmentId" ref="" var="部门id"/>
<property id="jobId" name="jobId" ref="" var="职位id"/>
<property id="payMonth" name="payMonth" ref="" var="月份"/>
</url>
<url id="wagespaymenthistory002" path="/post/WagesPaymentHistoryController/queryMyWagesPaymentHistoryList" val="获取我的薪资发放历史列表" allUse="1" groupName="薪资发放历史">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
<property id="payMonth" name="payMonth" ref="" var="月份"/>
</url>
<url id="wagespaymenthistory003" path="/post/WagesPaymentHistoryController/queryAllNotGrantWagesPaymentHistoryList" val="获取所有待发放薪资列表" allUse="1" groupName="薪资发放历史">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
<property id="jobNumber" name="jobNumber" ref="" var="工号" />
<property id="userName" name="userName" ref="" var="员工姓名" />
<property id="companyId" name="companyId" ref="" var="企业id"/>
<property id="departmentId" name="departmentId" ref="" var="部门id"/>
<property id="jobId" name="jobId" ref="" var="职位id"/>
<property id="payMonth" name="payMonth" ref="" var="月份"/>
</url>
<!-- 薪资发放历史结束 -->
<!-- 员工薪资设定开始 -->