2022-03-07 19:27:32 +08:00
|
|
|
package com.engine.salary.web;
|
|
|
|
|
|
|
|
|
|
import com.engine.common.util.ParamUtil;
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2022-05-27 14:46:01 +08:00
|
|
|
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
|
|
|
|
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
2022-10-31 16:04:06 +08:00
|
|
|
import com.engine.salary.entity.datacollection.param.*;
|
2022-03-07 19:27:32 +08:00
|
|
|
import com.engine.salary.util.ResponseResult;
|
2022-09-26 18:51:17 +08:00
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
2022-05-27 14:46:01 +08:00
|
|
|
import com.engine.salary.util.page.PageInfo;
|
|
|
|
|
import com.engine.salary.wrapper.AddUpSituationWrapper;
|
2022-03-07 19:27:32 +08:00
|
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
2022-04-28 17:44:26 +08:00
|
|
|
import lombok.extern.slf4j.Slf4j;
|
2022-03-08 13:17:54 +08:00
|
|
|
import org.apache.commons.lang3.StringUtils;
|
2022-03-10 11:09:08 +08:00
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2022-03-08 13:17:54 +08:00
|
|
|
import org.jetbrains.annotations.Nullable;
|
2022-03-07 19:27:32 +08:00
|
|
|
import weaver.hrm.HrmUserVarify;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
|
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;
|
2022-03-08 13:17:54 +08:00
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
2022-04-28 17:44:26 +08:00
|
|
|
import java.time.LocalDate;
|
2022-03-08 13:17:54 +08:00
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
2022-03-07 19:27:32 +08:00
|
|
|
import java.util.Map;
|
2022-03-08 13:17:54 +08:00
|
|
|
import java.util.stream.Collectors;
|
2022-03-07 19:27:32 +08:00
|
|
|
|
2023-03-15 11:04:54 +08:00
|
|
|
/**
|
|
|
|
|
* 往期累计
|
|
|
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
|
|
|
|
* <p>Company: 泛微软件</p>
|
|
|
|
|
*
|
|
|
|
|
* @author qiantao
|
|
|
|
|
* @version 1.0
|
|
|
|
|
**/
|
2022-04-28 17:44:26 +08:00
|
|
|
@Slf4j
|
2022-03-07 19:27:32 +08:00
|
|
|
public class AddUpSituationController {
|
2022-05-27 14:46:01 +08:00
|
|
|
private AddUpSituationWrapper getAddUpSituationWrapper(User user) {
|
|
|
|
|
return ServiceUtil.getService(AddUpSituationWrapper.class, user);
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/getSearchCondition")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-27 14:46:01 +08:00
|
|
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::getSearchCondition);
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/list")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
2022-03-08 18:10:03 +08:00
|
|
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationQueryParam queryParam) {
|
2022-03-07 19:27:32 +08:00
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-27 14:46:01 +08:00
|
|
|
return new ResponseResult<AddUpSituationQueryParam, PageInfo<AddUpSituationDTO>>(user).run(getAddUpSituationWrapper(user)::list, queryParam);
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
2022-03-11 13:44:47 +08:00
|
|
|
@POST
|
|
|
|
|
@Path("/getDetailList")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String getDetailList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationQueryParam queryParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-27 14:46:01 +08:00
|
|
|
return new ResponseResult<AddUpSituationQueryParam, PageInfo<AddUpSituationRecordDTO>>(user).run(getAddUpSituationWrapper(user)::getDetailList, queryParam);
|
2022-03-11 13:44:47 +08:00
|
|
|
}
|
|
|
|
|
|
2022-03-07 19:27:32 +08:00
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/downloadTemplate")
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
public Response getAll(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
try {
|
2022-05-09 10:32:14 +08:00
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
|
|
|
|
AddUpSituationQueryParam queryParam = buildParam(request);
|
2022-04-28 17:44:26 +08:00
|
|
|
|
2022-05-27 14:46:01 +08:00
|
|
|
XSSFWorkbook workbook = getAddUpSituationWrapper(user).downloadTemplate(queryParam);
|
2022-04-28 17:44:26 +08:00
|
|
|
|
2022-05-09 10:32:14 +08:00
|
|
|
String fileName = "往期累计情况导入模板" + LocalDate.now();
|
2022-04-28 17:44:26 +08:00
|
|
|
|
2022-05-09 10:32:14 +08:00
|
|
|
try {
|
|
|
|
|
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
}
|
2022-04-28 17:44:26 +08:00
|
|
|
|
2022-05-09 10:32:14 +08:00
|
|
|
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();
|
2022-04-28 17:44:26 +08:00
|
|
|
|
2022-05-09 10:32:14 +08:00
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("往期累计情况导入模板导出异常", e);
|
|
|
|
|
throw e;
|
|
|
|
|
}
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/export")
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
public Response export(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
try {
|
2022-05-09 10:32:14 +08:00
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
|
|
|
|
AddUpSituationQueryParam queryParam = buildParam(request);
|
|
|
|
|
|
2022-05-27 14:46:01 +08:00
|
|
|
XSSFWorkbook workbook = getAddUpSituationWrapper(user).export(queryParam);
|
2022-05-09 10:32:14 +08:00
|
|
|
|
2022-06-27 14:45:23 +08:00
|
|
|
String fileName = "往期累计情况" + LocalDate.now();
|
2022-05-09 10:32:14 +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) {
|
2022-06-27 14:45:23 +08:00
|
|
|
log.error("往期累计情况导出异常", e);
|
2022-05-09 10:32:14 +08:00
|
|
|
throw e;
|
2022-03-10 11:09:08 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出明细
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/exportDetail")
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
public Response exportDetail(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
try {
|
2022-05-09 10:32:14 +08:00
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
|
|
|
|
AddUpSituationQueryParam queryParam = buildParam(request);
|
|
|
|
|
|
2022-05-27 14:46:01 +08:00
|
|
|
XSSFWorkbook workbook = getAddUpSituationWrapper(user).exportDetail(queryParam);
|
2022-05-09 10:32:14 +08:00
|
|
|
|
|
|
|
|
String fileName = "累计情况明细" + LocalDate.now();
|
|
|
|
|
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;
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-08 13:17:54 +08:00
|
|
|
@Nullable
|
|
|
|
|
private AddUpSituationQueryParam buildParam(HttpServletRequest request) {
|
|
|
|
|
AddUpSituationQueryParam param = new AddUpSituationQueryParam();
|
|
|
|
|
String ids = request.getParameter("ids");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(ids)) {
|
|
|
|
|
param.setIds(Arrays.stream(ids.split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
2022-03-08 13:17:54 +08:00
|
|
|
}
|
|
|
|
|
String keyword = request.getParameter("keyword");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(keyword)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setKeyword(keyword);
|
|
|
|
|
}
|
|
|
|
|
String id = request.getParameter("id");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(id)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setId(Long.valueOf(id));
|
|
|
|
|
}
|
|
|
|
|
String year = request.getParameter("year");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(year)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setYear(Integer.valueOf(year));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String taxYearMonth = request.getParameter("taxYearMonth");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(taxYearMonth)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setTaxYearMonth(Arrays.asList(taxYearMonth.split(",")));
|
2022-09-26 18:51:17 +08:00
|
|
|
param.setTaxYearMonthDate(Arrays.stream(taxYearMonth.split(",")).map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList()));
|
2022-03-08 13:17:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String username = request.getParameter("username");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(username)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setUsername(username);
|
|
|
|
|
}
|
|
|
|
|
String employeeId = request.getParameter("employeeId");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(employeeId)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setEmployeeId(Long.valueOf(employeeId));
|
|
|
|
|
}
|
|
|
|
|
String taxAgentId = request.getParameter("taxAgentId");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(taxAgentId)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setTaxAgentId(Long.valueOf(taxAgentId));
|
|
|
|
|
}
|
|
|
|
|
String departmentIds = request.getParameter("departmentIds");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(departmentIds)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setDepartmentIds(Arrays.stream(departmentIds.split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
|
|
|
|
}
|
|
|
|
|
String jobNum = request.getParameter("jobNum");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(jobNum)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setJobNum(jobNum);
|
|
|
|
|
}
|
|
|
|
|
String idNo = request.getParameter("idNo");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(idNo)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setIdNo(idNo);
|
|
|
|
|
}
|
|
|
|
|
String hiredate = request.getParameter("hiredate");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(hiredate)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
List<Date> dates = Arrays.stream(hiredate.split(",")).map(d -> {
|
|
|
|
|
try {
|
|
|
|
|
return format.parse(d);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
param.setHiredate(dates);
|
|
|
|
|
}
|
|
|
|
|
String mobile = request.getParameter("mobile");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(mobile)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setMobile(mobile);
|
|
|
|
|
}
|
|
|
|
|
String accumulatedSituationId = request.getParameter("accumulatedSituationId");
|
2022-03-08 18:10:03 +08:00
|
|
|
if (StringUtils.isNotBlank(accumulatedSituationId)) {
|
2022-03-08 13:17:54 +08:00
|
|
|
param.setAccumulatedSituationId(Long.valueOf(accumulatedSituationId));
|
|
|
|
|
}
|
2024-03-14 15:28:14 +08:00
|
|
|
String hasData = request.getParameter("hasData");
|
|
|
|
|
if (StringUtils.isNotBlank(hasData)) {
|
|
|
|
|
param.setHasData("true".equals(hasData));
|
|
|
|
|
}
|
2022-03-08 13:17:54 +08:00
|
|
|
return param;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-09 16:40:14 +08:00
|
|
|
//导入
|
2022-03-07 19:27:32 +08:00
|
|
|
@POST
|
2022-03-08 13:17:54 +08:00
|
|
|
@Path("/importAddUpSituation")
|
2022-03-07 19:27:32 +08:00
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
2022-03-09 16:40:14 +08:00
|
|
|
public String importAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationImportParam importParam) {
|
2022-03-07 19:27:32 +08:00
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-27 14:46:01 +08:00
|
|
|
return new ResponseResult<AddUpSituationImportParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::importAddUpSituation, importParam);
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
2022-10-28 14:08:27 +08:00
|
|
|
/**
|
|
|
|
|
* @description 编辑数据
|
|
|
|
|
* @return String
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
* @date 2022/10/27 21:10
|
|
|
|
|
*/
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/editAddUpSituation")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String editAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<AddUpSituationParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::editAddUpSituation, addUpSituation);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-31 14:50:54 +08:00
|
|
|
/**
|
|
|
|
|
* @description 获取往期累计情况
|
|
|
|
|
* @return String
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
* @date 2022/10/31 13:59
|
|
|
|
|
*/
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/getAddUpSituation")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String getAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<AddUpSituationParam,AddUpSituationRecordDTO>(user).run(getAddUpSituationWrapper(user)::getAddUpSituation, addUpSituation);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-28 14:08:27 +08:00
|
|
|
/**
|
|
|
|
|
* @description 新建数据
|
|
|
|
|
* @return String
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
* @date 2022/10/27 21:10
|
|
|
|
|
*/
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/createAddUpSituation")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String createAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<AddUpSituationParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::createAddUpSituation, addUpSituation);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2022-10-31 16:04:06 +08:00
|
|
|
* @description 删除所选数据
|
2022-10-28 14:08:27 +08:00
|
|
|
* @return String
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
* @date 2022/10/27 21:10
|
|
|
|
|
*/
|
2022-10-31 16:04:06 +08:00
|
|
|
@POST
|
|
|
|
|
@Path("/deleteSelectAddUpSituation")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String deleteSelectAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationDeleteParam addUpSituationDeleteParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<AddUpSituationDeleteParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::deleteSelectAddUpSituation, addUpSituationDeleteParam);
|
|
|
|
|
}
|
2022-10-28 14:08:27 +08:00
|
|
|
|
|
|
|
|
/**
|
2022-10-31 19:21:13 +08:00
|
|
|
* @description 一键清空
|
2022-10-28 14:08:27 +08:00
|
|
|
* @return String
|
|
|
|
|
* @author Harryxzy
|
|
|
|
|
* @date 2022/10/27 21:10
|
|
|
|
|
*/
|
2022-10-31 19:21:13 +08:00
|
|
|
@POST
|
|
|
|
|
@Path("/deleteAllAddUpSituation")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String deleteAllAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationDeleteParam addUpSituationDeleteParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<AddUpSituationDeleteParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::deleteAllAddUpSituation, addUpSituationDeleteParam);
|
|
|
|
|
}
|
2022-10-28 14:08:27 +08:00
|
|
|
|
2022-03-11 17:27:15 +08:00
|
|
|
@POST
|
|
|
|
|
@Path("/preview")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String preview(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationImportParam importParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
|
|
|
|
map.put("importParam", importParam);
|
2022-05-27 14:46:01 +08:00
|
|
|
return new ResponseResult<AddUpSituationImportParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::preview, importParam);
|
2022-03-11 17:27:15 +08:00
|
|
|
}
|
|
|
|
|
|
2022-03-11 13:44:47 +08:00
|
|
|
|
2022-03-07 19:27:32 +08:00
|
|
|
}
|