2024-08-28 17:42:16 +08:00
|
|
|
|
package com.engine.salary.web;
|
|
|
|
|
|
|
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2024-09-04 16:15:01 +08:00
|
|
|
|
import com.engine.salary.entity.ly.param.*;
|
|
|
|
|
|
import com.engine.salary.entity.ly.po.LyVoucherPO;
|
2024-08-28 17:42:16 +08:00
|
|
|
|
import com.engine.salary.util.ResponseResult;
|
2024-09-04 16:15:01 +08:00
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
2024-08-28 17:42:16 +08:00
|
|
|
|
import com.engine.salary.wrapper.LySalaryWrapper;
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
|
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 javax.ws.rs.core.Response;
|
|
|
|
|
|
import javax.ws.rs.core.StreamingOutput;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
|
* @ClassName LySalaryController
|
|
|
|
|
|
* @date 2024/08/21 16:54
|
|
|
|
|
|
* @description 领悦二开
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
|
public class LySalaryController {
|
|
|
|
|
|
|
|
|
|
|
|
private LySalaryWrapper getLySalaryWrapper(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(LySalaryWrapper.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-30 10:28:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 领悦报表权限
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/lyPermission")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String lyReportPermission(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<User, Boolean>(user).run(getLySalaryWrapper(user)::lyReportPermission, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
//---------------------------------------------------------薪酬汇总报表start------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 生成薪酬汇总报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/generate")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateSalaryReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::generateSalaryReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询薪酬汇总报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listSalaryReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listSalaryReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-13 14:27:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询薪资汇总报表的发放公司下拉框
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/ffgsList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String salaryReportFfgsList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2025-02-21 16:50:16 +08:00
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::salaryReportFfgsList, param);
|
2024-09-13 14:27:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 薪酬统计报表 合计行
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String salaryReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::salaryReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/batchDelete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteSalaryReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<List<Long>, String>(user).run(getLySalaryWrapper(user)::deleteSalaryReport, param.getIds());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-24 13:53:31 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 删除报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/deleteAll")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteAllSalaryReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::deleteAllSalaryReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 导出报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportSalaryReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportSalaryReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = param.getSalaryMonth() +"薪酬统计报表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪酬统计报表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------薪酬汇总报表end--------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-08 11:33:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
2024-10-21 18:02:04 +08:00
|
|
|
|
//---------------------------------------------------------社保汇总报表start-------------------------------------
|
2024-08-28 17:42:16 +08:00
|
|
|
|
/**
|
2024-10-21 18:02:04 +08:00
|
|
|
|
* 生成社保汇总报表
|
2024-08-28 17:42:16 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/generate")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateSIReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::generateSIReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2024-10-21 18:02:04 +08:00
|
|
|
|
* 查询社保汇总报表
|
2024-08-28 17:42:16 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listSIReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listSIReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-13 14:27:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询薪资汇总报表的发放公司下拉框
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/gmgsList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String sIReportGmgsList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2025-02-21 16:50:16 +08:00
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::sIReportGmgsList, param);
|
2024-09-13 14:27:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
/**
|
2024-10-21 18:02:04 +08:00
|
|
|
|
* 社保汇总报表 合计行
|
2024-08-28 17:42:16 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String sIReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::sIReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/batchDelete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteSIReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<List<Long>, String>(user).run(getLySalaryWrapper(user)::deleteSIReport, param.getIds());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-24 13:53:31 +08:00
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/SIReport/deleteAll")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteAllSIReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::deleteAllSIReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 导出报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/socialReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportSIReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportSIReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
2024-10-22 11:33:00 +08:00
|
|
|
|
String fileName = param.getSalaryMonth() +"社保汇总报表" + "-" + time;
|
2024-08-28 17:42:16 +08:00
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
2024-10-22 11:33:00 +08:00
|
|
|
|
log.error("社保汇总报表导出异常", e);
|
2024-08-28 17:42:16 +08:00
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-10-21 18:02:04 +08:00
|
|
|
|
//---------------------------------------------------------社保汇总报表end---------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------公积金汇总报表start-------------------------------------
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 生成公积金汇总报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/generate")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateFundReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::generateFundReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询公积金汇总报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listFundReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listFundReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询公积金汇总报表的发放公司下拉框
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/gmgsList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String fundReportGmgsList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2025-02-21 16:50:16 +08:00
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::fundReportGmgsList, param);
|
2024-10-21 18:02:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 公积金汇总报表 合计行
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String fundReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::fundReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除公积金报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/batchDelete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteFundReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<List<Long>, String>(user).run(getLySalaryWrapper(user)::deleteFundReport, param.getIds());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-24 13:53:31 +08:00
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/FundReport/deleteAll")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteAllFundReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, String>(user).run(getLySalaryWrapper(user)::deleteAllFundReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-10-21 18:02:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 导出公积金报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
2024-10-22 11:33:00 +08:00
|
|
|
|
@Path("/fundReport/export")
|
2024-10-21 18:02:04 +08:00
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportFundReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportFundReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = param.getSalaryMonth() +"公积金汇总报表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("公积金汇总报表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------公积金汇总报表end---------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------领悦生成凭证start------------------------------------------
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/genAndPreveiw")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String genAndPreveiwPZ(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyPZGenParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2024-08-30 17:44:26 +08:00
|
|
|
|
return new ResponseResult<LyPZGenParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::genPZ, param);
|
2024-08-28 17:42:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-21 14:46:40 +08:00
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/getHszb")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getHszb(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyPZGenParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LyPZGenParam, Map<String, String>>(user).run(getLySalaryWrapper(user)::getHszb, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-04 16:15:01 +08:00
|
|
|
|
// 推送UC并本地保存
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/pushUCAndSave")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String pushUCAndSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyVoucherPushParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LyVoucherPushParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::pushUCAndSave, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 辅助核算浏览框
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/fzhsBrowserList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String fzhsBrowserList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyFzhslxParam queryParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LyFzhslxParam, PageInfo<Map<String, Object>>>(user).run(getLySalaryWrapper(user)::fzhsBrowserList, queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 本地历史凭证列表
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/historyVoucherList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String historyVoucherList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyVoucherQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LyVoucherQueryParam, PageInfo<LyVoucherPO>>(user).run(getLySalaryWrapper(user)::historyVoucherList, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 本地历史凭证列表
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/historyVoucherDetailList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String historyVoucherDetailList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyVoucherQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2024-09-05 09:05:57 +08:00
|
|
|
|
return new ResponseResult<Long, Map<String, Object>>(user).run(getLySalaryWrapper(user)::historyVoucherDetailList, param.getId());
|
2024-09-04 16:15:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-06 15:36:20 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 删除历史凭证
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/PZ/deleteHistoryVoucher")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteHistoryVoucher(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LyVoucherQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<Long, Map<String, Object>>(user).run(getLySalaryWrapper(user)::deleteHistoryVoucher, param.getId());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-28 17:42:16 +08:00
|
|
|
|
//---------------------------------------------------------领悦生成凭证end--------------------------------------------
|
2025-04-08 11:33:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------薪酬汇总报(部门)start---------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询薪酬汇总报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryDepartmentReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listSalaryDepartmentReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listSalaryDepartmentReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 薪酬统计报表 合计行
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryDepartmentReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String salaryDepartmentReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::salaryDepartmentReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出报表数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryDepartmentReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportSalaryDepartmentReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportSalaryDepartmentReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = param.getSalaryMonth() +"薪酬统计报表(部门)" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪酬统计报表(部门)导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------薪酬汇总报表(部门)end--------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------领悦发放表start--------------------------------------------
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询领悦发放报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/ffReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listLyFfReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listLyFfReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 薪酬统计报表 合计行
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/ffReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String ffReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::ffReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出领悦发放表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/ffReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportFfReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportFfReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = param.getSalaryMonth() +"薪资发放表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪资发放表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------领悦发放表end----------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------领悦报税表start--------------------------------------------
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询领悦报税报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/bsReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listLyBsReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listLyBsReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 薪酬报税表 合计行
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/bsReport/sum")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String bsReportSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::bsReportSum, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出领悦报税表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/bsReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportBsReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportBsReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = param.getSalaryMonth() +"薪资报税表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪资发放表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------领悦报税表end----------------------------------------------
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询所有的发放公司下拉框
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/salaryReport/ffgsAllList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String salaryReportFfgsList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, List<Map<String, Object>>>(user).run(getLySalaryWrapper(user)::listAllFfgs);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------领悦对比汇总表start-----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 领悦 生成对比汇总社保表数据
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/generate/dbhzSbReport")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateDbhzSbReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, Map<String, Object>>(user).run(getLySalaryWrapper(user)::generateDbhzSbReport, param.getSalaryMonth());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 领悦 生成对比汇总公积金表数据
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/generate/dbhzGjjReport")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateDbhzGjjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, Map<String, Object>>(user).run(getLySalaryWrapper(user)::generateDbhzGjjReport, param.getSalaryMonth());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 领悦 差异明细表社保数据
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/generate/cymxSbReport")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateCymxSbReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, Map<String, Object>>(user).run(getLySalaryWrapper(user)::generateCymxSbReport, param.getSalaryMonth());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 领悦 生成对比汇总公积金表数据
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/generate/cymxGjjReport")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String generateCymxGjjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, Map<String, Object>>(user).run(getLySalaryWrapper(user)::generateCymxGjjReport, param.getSalaryMonth());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------领悦对比汇总表end-------------------------------------------
|
2025-09-16 10:47:15 +08:00
|
|
|
|
//---------------------------------------------------------领悦薪资档案报表start---------------------------------------
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询领悦薪酬档案职级统计报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/xcdazjtjReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listLyXcdazjtjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listLyXcdazjtjReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出领悦薪酬档案职级统计报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/xcdazjtjReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportXcdazjtjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportXcdazjtjReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = "薪酬档案职级统计报表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪酬档案职级统计报表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询领悦薪酬档案职务角色统计报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/xcdazwjstjReport/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listLyXcdazwjstjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<LySalaryReportQueryParam, Map<String, Object>>(user).run(getLySalaryWrapper(user)::listLyXcdazwjstjReport, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出领悦薪酬档案职务角色统计报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/xcdazwjstjReport/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportXcdazwjstjReport(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LySalaryReportQueryParam param) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getLySalaryWrapper(user).exportXcdazwjstjReport(param);
|
|
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
|
|
String fileName = "薪酬档案职务角色统计报表" + "-" + time;
|
|
|
|
|
|
try {
|
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
}
|
|
|
|
|
|
StreamingOutput output = outputStream -> {
|
|
|
|
|
|
workbook.write(outputStream);
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
|
};
|
|
|
|
|
|
response.setContentType("application/octet-stream");
|
|
|
|
|
|
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("薪酬档案职务角色统计报表导出异常", e);
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------领悦薪资档案报表end-----------------------------------------
|
2024-08-28 17:42:16 +08:00
|
|
|
|
}
|