78 lines
2.9 KiB
Java
78 lines
2.9 KiB
Java
|
|
package com.engine.salary.report.web;
|
||
|
|
|
||
|
|
import com.engine.common.util.ServiceUtil;
|
||
|
|
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
|
||
|
|
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
|
||
|
|
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
|
||
|
|
import com.engine.salary.report.wrapper.SalaryStatisticsEmployeeWrapper;
|
||
|
|
import com.engine.salary.util.ResponseResult;
|
||
|
|
import com.engine.salary.util.page.PageInfo;
|
||
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||
|
|
import weaver.hrm.HrmUserVarify;
|
||
|
|
import weaver.hrm.User;
|
||
|
|
|
||
|
|
import javax.servlet.http.HttpServletRequest;
|
||
|
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
import javax.ws.rs.POST;
|
||
|
|
import javax.ws.rs.Path;
|
||
|
|
import javax.ws.rs.Produces;
|
||
|
|
import javax.ws.rs.core.Context;
|
||
|
|
import javax.ws.rs.core.MediaType;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 薪酬统计员工明细
|
||
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
||
|
|
* <p>Company: 泛微软件</p>
|
||
|
|
*
|
||
|
|
* @author qiantao
|
||
|
|
* @version 1.0
|
||
|
|
**/
|
||
|
|
public class SalaryStatisticsEmployeeController {
|
||
|
|
|
||
|
|
private SalaryStatisticsEmployeeWrapper getSalaryStatisticsEmployeeWrapper(User user) {
|
||
|
|
return ServiceUtil.getService(SalaryStatisticsEmployeeWrapper.class, user);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 员工列表
|
||
|
|
*
|
||
|
|
* @param queryParam
|
||
|
|
* @return
|
||
|
|
*/
|
||
|
|
@POST
|
||
|
|
@Path("/list")
|
||
|
|
@Produces(MediaType.APPLICATION_JSON)
|
||
|
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeQueryParam queryParam) {
|
||
|
|
User user = HrmUserVarify.getUser(request, response);
|
||
|
|
return new ResponseResult<SalaryStatisticsEmployeeQueryParam, PageInfo<SalaryStatisticsEmployeeListDTO>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::list, queryParam);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 员工详情列表
|
||
|
|
*
|
||
|
|
* @param queryParam
|
||
|
|
* @return
|
||
|
|
*/
|
||
|
|
@POST
|
||
|
|
@Path("/detailList")
|
||
|
|
@Produces(MediaType.APPLICATION_JSON)
|
||
|
|
public String detailList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||
|
|
User user = HrmUserVarify.getUser(request, response);
|
||
|
|
return new ResponseResult<SalaryStatisticsEmployeeDetailQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::detailList, queryParam);
|
||
|
|
}
|
||
|
|
|
||
|
|
// /**
|
||
|
|
// * 导出员工详情列表
|
||
|
|
// *
|
||
|
|
// * @param queryParam
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// @PostMapping("/exportDetailList")
|
||
|
|
// @ApiOperation("导出员工详情列表")
|
||
|
|
// @WeaPermission(publicPermission = true)
|
||
|
|
// public WeaResult<Map<String, Object>> exportDetailList(@RequestBody SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||
|
|
// return WeaResult.success(getSalaryStatisticsEmployeeWrapper(user).exportDetailList(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||
|
|
// }
|
||
|
|
}
|