2022-04-11 19:07:35 +08:00
|
|
|
|
package com.engine.salary.web;
|
|
|
|
|
|
|
2022-04-12 19:29:19 +08:00
|
|
|
|
import com.engine.common.util.ParamUtil;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2022-11-21 15:27:15 +08:00
|
|
|
|
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
|
|
|
|
|
|
import com.engine.salary.entity.hrm.param.HrmQueryParam;
|
2022-04-15 19:01:09 +08:00
|
|
|
|
import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO;
|
2022-04-18 20:24:43 +08:00
|
|
|
|
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
|
2022-09-06 17:13:33 +08:00
|
|
|
|
import com.engine.salary.entity.siaccount.dto.InsuranceAcctDetailImportFieldDTO;
|
2022-04-15 13:17:25 +08:00
|
|
|
|
import com.engine.salary.entity.siaccount.param.*;
|
2022-07-20 15:40:51 +08:00
|
|
|
|
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
2022-06-08 17:52:10 +08:00
|
|
|
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
|
|
|
|
|
import com.engine.salary.util.ResponseResult;
|
2022-04-18 20:24:43 +08:00
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
2022-09-29 11:13:49 +08:00
|
|
|
|
import com.engine.salary.wrapper.SIAComparisonResultWrapper;
|
2022-04-18 20:24:43 +08:00
|
|
|
|
import com.engine.salary.wrapper.SIAccountWrapper;
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import com.engine.salary.wrapper.SalaryFormulaWrapper;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
2022-04-15 13:17:25 +08:00
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
import weaver.hrm.HrmUserVarify;
|
|
|
|
|
|
import weaver.hrm.User;
|
2022-04-14 11:54:16 +08:00
|
|
|
|
import com.engine.salary.service.SIAccountService;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import javax.ws.rs.*;
|
|
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
|
|
import javax.ws.rs.core.StreamingOutput;
|
2022-04-18 20:24:43 +08:00
|
|
|
|
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
import java.util.Arrays;
|
2022-04-15 13:17:25 +08:00
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
import java.util.List;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
import java.util.Map;
|
2022-09-02 11:53:38 +08:00
|
|
|
|
import java.util.stream.Collectors;
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
2022-07-06 16:42:13 +08:00
|
|
|
|
* 福利核算控制器
|
|
|
|
|
|
*/
|
2022-09-02 11:53:38 +08:00
|
|
|
|
@Slf4j
|
2022-04-11 19:07:35 +08:00
|
|
|
|
public class SIAccountController {
|
|
|
|
|
|
|
|
|
|
|
|
public SIAccountService getService(User user) {
|
2022-04-15 13:17:25 +08:00
|
|
|
|
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
|
2022-04-11 19:07:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-18 20:24:43 +08:00
|
|
|
|
public SIAccountWrapper getSIAccountWrapper(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SIAccountWrapper.class,user);
|
|
|
|
|
|
}
|
2022-09-02 11:53:38 +08:00
|
|
|
|
|
|
|
|
|
|
private SalaryFormulaWrapper getSalaryFormulaWrapper(User user) {
|
|
|
|
|
|
return (SalaryFormulaWrapper) ServiceUtil.getService(SalaryFormulaWrapper.class, user);
|
|
|
|
|
|
}
|
2022-09-29 11:13:49 +08:00
|
|
|
|
|
|
|
|
|
|
private SIAComparisonResultWrapper getSIAComparisonResultWrapper(User user) {
|
|
|
|
|
|
return (SIAComparisonResultWrapper) ServiceUtil.getService(SIAComparisonResultWrapper.class, user);
|
|
|
|
|
|
}
|
2022-09-29 17:32:04 +08:00
|
|
|
|
|
2022-04-11 19:07:35 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取台账列表页
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-11 19:07:35 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-11 19:07:35 +08:00
|
|
|
|
@Path("/batch/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
2022-04-15 13:17:25 +08:00
|
|
|
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAccountBatchParam insuranceAccountBatchParam) {
|
2022-04-11 19:07:35 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountBatchParam, Map<String, Object>>(user).run(getService(user)::listPage, insuranceAccountBatchParam);
|
2022-04-11 19:07:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-12 19:29:19 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取正常缴纳列表
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-12 19:29:19 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-11 19:07:35 +08:00
|
|
|
|
@Path("/detail/common/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String commonList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
2022-04-12 10:24:21 +08:00
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
2022-04-11 19:07:35 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listCommonPage, insuranceAccountDetailParam);
|
2022-04-11 19:07:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-12 19:29:19 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 根据姓名获取正常缴纳列表
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-12 19:29:19 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-12 19:29:19 +08:00
|
|
|
|
@Path("/detail/common/search")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String commonByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
2022-04-15 13:17:25 +08:00
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
2022-04-12 19:29:19 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listCommonPageByName, insuranceAccountDetailParam);
|
2022-04-12 19:29:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取补缴缴纳列表
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-12 19:29:19 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-12 19:29:19 +08:00
|
|
|
|
@Path("/detail/supplementary/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listSupplementaryPage(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
2022-04-15 13:17:25 +08:00
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
2022-04-12 19:29:19 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listSupplementaryPage, insuranceAccountDetailParam);
|
2022-04-12 19:29:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据姓名获取补缴缴纳列表
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-12 19:29:19 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-12 19:29:19 +08:00
|
|
|
|
@Path("/detail/supplementary/search")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String supplementaryByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
2022-04-15 13:17:25 +08:00
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
2022-04-12 19:29:19 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::supplementaryByNameList, insuranceAccountDetailParam);
|
2022-04-12 19:29:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取核算月份备注填写表单
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-12 19:29:19 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/accountForm")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getBaseForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-05 10:35:58 +08:00
|
|
|
|
return new ResponseResult< Map<String, Object>, Map<String, Object>>(user).run(getService(user)::getForm, ParamUtil.request2Map(request));
|
2022-04-12 19:29:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-14 11:54:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 保存并进入核算
|
2022-04-15 13:17:25 +08:00
|
|
|
|
*
|
2022-04-14 11:54:16 +08:00
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/save")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String save(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody AccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
2022-04-14 11:54:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-15 13:17:25 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 正常缴纳页核算
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/commonAccount")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String commonAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody SaveCommonAccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(param.getIncludes())) {
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<SaveCommonAccountParam, String>(user).run(getService(user)::commonAccount, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
AccountParam reqParam = new AccountParam();
|
|
|
|
|
|
reqParam.setBillMonth(param.getBillMonth());
|
2022-05-26 11:00:38 +08:00
|
|
|
|
reqParam.setFlag(false);
|
2022-07-19 11:36:19 +08:00
|
|
|
|
reqParam.setPaymentOrganization(param.getPaymentOrganization());
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, reqParam);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-04-12 19:29:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
2022-04-15 13:17:25 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 删除月份表单
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/delete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String delete(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody AccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::delete, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
2022-04-18 20:24:43 +08:00
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/commonForm")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String queryCommonForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-05 10:35:58 +08:00
|
|
|
|
return new ResponseResult< Map<String, Object>, Map<String, Object>>(user).run(getService(user)::getCommonForm, ParamUtil.request2Map(request));
|
2022-04-18 20:24:43 +08:00
|
|
|
|
}
|
2022-04-15 13:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/common/save")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String save(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody SaveCommonAccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<SaveCommonAccountParam, String>(user).run(getService(user)::saveCommonAccount, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
2022-04-18 20:24:43 +08:00
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/querySupplementaryForm")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String querySupplementaryForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-05-05 10:35:58 +08:00
|
|
|
|
return new ResponseResult< Map<String, Object>, Map<String, Object>>(user).run(getService(user)::getSupplementaryForm, ParamUtil.request2Map(request));
|
2022-04-18 20:24:43 +08:00
|
|
|
|
}
|
2022-04-15 13:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/supplementary/save")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String saveSummplementaryAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody SaveSupplementaryAccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<SaveSupplementaryAccountParam, String>(user).run(getService(user)::saveSupplementaryAccount, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/common/delete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteCommon(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody SaveCommonAccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<SaveCommonAccountParam, String>(user).run(getService(user)::deleteCommonAccount, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/supplementary/delete")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String deleteSummplementaryAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody List<SupplementAccountBaseParam> param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<List<SupplementAccountBaseParam>, String>(user).run(getService(user)::deleteSummplementaryAccount, param);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/file")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String file(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody AccountParam accountParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::file, accountParam);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
2022-04-16 16:43:33 +08:00
|
|
|
|
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-16 16:43:33 +08:00
|
|
|
|
@Path("/changeList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String changeList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::changeList, insuranceAccountDetailParam);
|
2022-04-16 16:43:33 +08:00
|
|
|
|
}
|
2022-04-15 13:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
2022-04-18 20:24:43 +08:00
|
|
|
|
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-18 20:24:43 +08:00
|
|
|
|
@Path("/overView")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String overView(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, PageInfo<InsuranceAccountViewListDTO>>(user).run(getService(user)::overView, insuranceAccountDetailParam);
|
2022-04-18 20:24:43 +08:00
|
|
|
|
}
|
2022-04-15 19:01:09 +08:00
|
|
|
|
|
2022-04-16 16:43:33 +08:00
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/tabList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String tabList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
2022-06-06 19:08:39 +08:00
|
|
|
|
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") Long paymentOrganization) {
|
2022-04-16 16:43:33 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-06-06 19:08:39 +08:00
|
|
|
|
AccountParam build = AccountParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).build();
|
|
|
|
|
|
return new ResponseResult<AccountParam, InsuranceAccountTabDTO>(user).run(getService(user)::tabList, build);
|
2022-04-16 16:43:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-19 12:19:06 +08:00
|
|
|
|
@POST
|
2022-04-16 16:43:33 +08:00
|
|
|
|
@Path("/inspectList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getInspectTable(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::getInspectTable, insuranceAccountDetailParam);
|
2022-04-16 16:43:33 +08:00
|
|
|
|
}
|
2022-04-15 19:01:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-16 16:43:33 +08:00
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/inspectAccount")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String accountInspect(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody InspectAccountParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<InspectAccountParam, String>(user).run(getService(user)::accountInspect, param);
|
2022-04-16 16:43:33 +08:00
|
|
|
|
}
|
2022-04-15 19:01:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/ignore")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String ignore(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody Collection<Long> ids) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<Collection<Long>, String>(user).run(getService(user)::ignore, ids);
|
2022-04-15 19:01:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-15 13:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/unconfirmed")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String unconfirmed(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody Collection<Long> ids) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<Collection<Long>, String>(user).run(getService(user)::unconfirmed, ids);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/getDisplayFlag")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String buttonCheck(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@QueryParam("billMonth") String billMonth) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-04-25 18:06:09 +08:00
|
|
|
|
return new ResponseResult<String, Map<String, Boolean>>(user).run(getService(user)::buttonCheck, billMonth);
|
2022-04-15 13:17:25 +08:00
|
|
|
|
}
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
2022-06-08 17:52:10 +08:00
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/getAdminTaxAgentList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getAdminTaxAgentList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<String, Collection<TaxAgentPO>>(user).run(getService(user)::getAdminTaxAgentList);
|
|
|
|
|
|
}
|
2022-04-18 20:24:43 +08:00
|
|
|
|
|
2022-07-20 15:40:51 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 社保福利台账重新核算
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam 台账id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/socialSecurityBenefitsRecalculate")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String socialSecurityBenefitsRecalculate(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody InsuranceAccountBatchPO insuranceAccountDetailParam ){
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<InsuranceAccountBatchPO, String>(user).run(getService(user)::socialSecurityBenefitsRecalculate,insuranceAccountDetailParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-02 11:53:38 +08:00
|
|
|
|
/**
|
2022-09-06 17:13:33 +08:00
|
|
|
|
* 社保福利(核算)项列表
|
2022-09-02 11:53:38 +08:00
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/getWelfareList")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getWelfareList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-09-06 17:13:33 +08:00
|
|
|
|
return new ResponseResult<String,List<InsuranceAcctDetailImportFieldDTO>>(user).run(getSalaryFormulaWrapper(user)::welfareList);
|
2022-09-02 11:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出“福利核算导入”模板
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/welfare/importtemplate/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportImportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
InsuranceAcctDetailImportTemplateParam param = new InsuranceAcctDetailImportTemplateParam();
|
|
|
|
|
|
|
2022-09-30 15:40:15 +08:00
|
|
|
|
param.setPaymentOrganization(Long.valueOf(request.getParameter("paymentOrganization")));
|
|
|
|
|
|
param.setBillMonth(request.getParameter("billMonth"));
|
2022-09-06 17:13:33 +08:00
|
|
|
|
String welfareNames = request.getParameter("welfareNames");
|
|
|
|
|
|
if (StringUtils.isNotBlank(welfareNames)) {
|
|
|
|
|
|
param.setWelfareNames(Arrays.stream(welfareNames.split(",")).map(String::valueOf).collect(Collectors.toList()));
|
2022-09-02 11:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getService(user).exportImportTemplate(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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-06 17:13:33 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 将通过“福利核算导入”模板导入的数据更新到hrsa_bill_detail表中
|
|
|
|
|
|
*/
|
2022-09-02 11:53:38 +08:00
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/welfare/importInsuranceAcctDetail")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
2022-09-06 17:13:33 +08:00
|
|
|
|
public String importInsuranceAcctDetail(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAcctImportParam insuranceAcctImportParam) {
|
2022-09-02 11:53:38 +08:00
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2022-09-06 17:13:33 +08:00
|
|
|
|
return new ResponseResult<InsuranceAcctImportParam, Map<String, Object>>(user).run(getService(user)::importInsuranceAcctDetail, insuranceAcctImportParam);
|
2022-09-02 11:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-07 14:57:07 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 预览“福利核算导入”模板导入的数据
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/welfare/preview")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String preview(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAcctImportParam insuranceAcctImportParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<InsuranceAcctImportParam, Map<String, Object>>(user).run(getService(user)::preview, insuranceAcctImportParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-19 15:13:30 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 导出“福利核算-补缴导入”模板
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/welfare/supplyimporttemplate/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportSupplyImportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
InsuranceAcctDetailImportTemplateParam param = new InsuranceAcctDetailImportTemplateParam();
|
|
|
|
|
|
|
|
|
|
|
|
String welfareNames = request.getParameter("welfareNames");
|
2022-09-19 17:59:12 +08:00
|
|
|
|
String billMonth = request.getParameter("billMonth");
|
|
|
|
|
|
Long paymentOrganization = Long.valueOf(request.getParameter("paymentOrganization"));
|
2022-09-19 15:13:30 +08:00
|
|
|
|
if (StringUtils.isNotBlank(welfareNames)) {
|
|
|
|
|
|
param.setWelfareNames(Arrays.stream(welfareNames.split(",")).map(String::valueOf).collect(Collectors.toList()));
|
|
|
|
|
|
}
|
2022-09-19 17:59:12 +08:00
|
|
|
|
if (StringUtils.isNotBlank(billMonth)) {
|
|
|
|
|
|
param.setBillMonth(billMonth);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (paymentOrganization > 0) {
|
|
|
|
|
|
param.setPaymentOrganization(paymentOrganization);
|
|
|
|
|
|
}
|
2022-09-19 15:13:30 +08:00
|
|
|
|
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getService(user).exportSupplyImportTemplate(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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-27 10:55:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// **********************************线下对比 start*********************************/
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出“福利核算导入”模板
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/comparisonwelfare/importtemplate/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportComparisonWelfareTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
InsuranceAcctDetailImportTemplateParam param = new InsuranceAcctDetailImportTemplateParam();
|
|
|
|
|
|
|
|
|
|
|
|
// String welfareNames = request.getParameter("welfareNames");
|
|
|
|
|
|
// if (StringUtils.isNotBlank(welfareNames)) {
|
|
|
|
|
|
// param.setWelfareNames(Arrays.stream(welfareNames.split(",")).map(String::valueOf).collect(Collectors.toList()));
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getService(user).exportComparisonWelfareTemplate(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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-19 15:13:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-27 17:36:06 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 将通过“福利核算-线下对比导入”模板导入的数据更新到hrsa_excel_bill_detail表中
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/comparisonwelfare/importExcelInsuranceDetail")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String importExcelInsuranceDetail(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ExcelInsuranceImportParam excelInsuranceImportParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<ExcelInsuranceImportParam, Map<String, Object>>(user).run(getService(user)::importExcelInsuranceDetail, excelInsuranceImportParam);
|
|
|
|
|
|
}
|
2022-09-19 15:13:30 +08:00
|
|
|
|
|
2022-09-29 11:13:49 +08:00
|
|
|
|
|
|
|
|
|
|
//福利核算-线上线下对比结果列表
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/comparisonwelfare/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listComparisonResult(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceComparisonResultQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<InsuranceComparisonResultQueryParam, PageInfo<Map<String, Object>>>(user).run(getSIAComparisonResultWrapper(user)::listPage, param);
|
|
|
|
|
|
}
|
2022-09-29 15:11:13 +08:00
|
|
|
|
|
2022-09-29 17:32:04 +08:00
|
|
|
|
//导出福利核算-线上线下对比结果
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/comparisonresult/export")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
|
|
public Response exportComparisonResult(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
InsuranceComparisonResultQueryParam param = new InsuranceComparisonResultQueryParam();
|
|
|
|
|
|
|
|
|
|
|
|
param.setPaymentStatus(Integer.valueOf(request.getParameter("paymentStatus")));
|
|
|
|
|
|
param.setBillMonth(request.getParameter("billMonth"));
|
|
|
|
|
|
param.setPaymentOrganization(request.getParameter("paymentOrganization"));
|
|
|
|
|
|
String onlyDiffEmployee = request.getParameter("onlyDiffEmployee");
|
|
|
|
|
|
if (StringUtils.isNotBlank(onlyDiffEmployee)) {
|
|
|
|
|
|
param.setOnlyDiffEmployee(Boolean.parseBoolean(onlyDiffEmployee));
|
|
|
|
|
|
}
|
|
|
|
|
|
String userName = request.getParameter("userName");
|
|
|
|
|
|
if (StringUtils.isNotBlank(userName)) {
|
|
|
|
|
|
param.setUserName(userName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
XSSFWorkbook workbook = getSIAComparisonResultWrapper(user).exportComparisonResult(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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-09-29 15:11:13 +08:00
|
|
|
|
|
|
|
|
|
|
// **********************************线下对比 end*********************************/
|
2022-11-16 10:15:05 +08:00
|
|
|
|
|
|
|
|
|
|
// **********************************退差 start*********************************/
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 保存退差(新增)
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/saveRecession")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String saveRecession(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody RecessionParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<RecessionParam, String>(user).run(getSIAccountWrapper(user)::saveRecession, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除退差
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/delRecession")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String delRecession(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody Collection<Long> ids) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<Collection<Long>, String>(user).run(getSIAccountWrapper(user)::delRecession, ids);
|
|
|
|
|
|
}
|
2022-11-16 16:14:21 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取退差列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/detail/recession/list")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String listRecessionPage(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listRecessionPage, insuranceAccountDetailParam);
|
|
|
|
|
|
}
|
2022-11-18 16:07:20 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通过id获取InsuranceAccountDetailPO中的社保、公积金、其他福利个人和公司缴纳数据
|
|
|
|
|
|
* @param request
|
|
|
|
|
|
* @param response
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@GET
|
|
|
|
|
|
@Path("/getPaymentById")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getPaymentById(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@QueryParam("id") Long id) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<Long, Map<String, Object>>(user).run(getService(user)::getPaymentById, id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-18 17:56:21 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编辑InsuranceAccountDetailPO中的社保、公积金、其他福利个人和公司缴纳数据
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/editAccount")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String editAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody EditAccountDetailParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<EditAccountDetailParam, String>(user).run(getService(user)::editAccount, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-21 15:27:15 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取当前登录人所控制的人员范围
|
|
|
|
|
|
*/
|
|
|
|
|
|
@POST
|
|
|
|
|
|
@Path("/getEmployeeListByTaxAgent")
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
|
public String getEmployeeListByTaxAgent(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
|
@RequestBody HrmQueryParam param) {
|
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
|
return new ResponseResult<HrmQueryParam, PageInfo<HrmInfoDTO>>(user).run(getSIAccountWrapper(user)::getEmployeeListByTaxAgent, param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-16 10:15:05 +08:00
|
|
|
|
// **********************************退差 end*********************************/
|
2022-04-11 19:07:35 +08:00
|
|
|
|
}
|