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;
|
|
|
|
|
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
|
2022-04-12 10:24:21 +08:00
|
|
|
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
|
2022-04-11 19:07:35 +08:00
|
|
|
import com.engine.salary.service.SIAccountService;
|
|
|
|
|
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
|
|
|
|
import com.engine.salary.util.ResponseResult;
|
|
|
|
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
|
|
|
|
import weaver.hrm.HrmUserVarify;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.ws.rs.*;
|
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Author weaver_cl
|
|
|
|
|
* @Description: TODO 福利核算控制器
|
|
|
|
|
* @Date 2022/4/11
|
|
|
|
|
* @Version V1.0
|
|
|
|
|
**/
|
|
|
|
|
public class SIAccountController {
|
|
|
|
|
|
|
|
|
|
public SIAccountService getService(User user) {
|
|
|
|
|
return ServiceUtil.getService(SIAccountServiceImpl.class,user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取台账列表页
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/batch/list")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody InsuranceAccountBatchParam insuranceAccountBatchParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<InsuranceAccountBatchParam, Map<String, Object>>().run(getService(user)::listPage, insuranceAccountBatchParam);
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-12 19:29:19 +08:00
|
|
|
/**
|
|
|
|
|
* 获取正常缴纳列表
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2022-04-11 19:07:35 +08:00
|
|
|
@GET
|
|
|
|
|
@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-12 10:24:21 +08:00
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::listCommonPage, insuranceAccountDetailParam);
|
2022-04-11 19:07:35 +08:00
|
|
|
}
|
|
|
|
|
|
2022-04-12 19:29:19 +08:00
|
|
|
/**
|
|
|
|
|
* 根据姓名获取正常缴纳列表
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/detail/common/search")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String commonByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::listCommonPageByName, insuranceAccountDetailParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取补缴缴纳列表
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/detail/supplementary/list")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String listSupplementaryPage(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::listSupplementaryPage, insuranceAccountDetailParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据姓名获取补缴缴纳列表
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param insuranceAccountDetailParam
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/detail/supplementary/search")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String supplementaryByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
|
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>().run(getService(user)::supplementaryByNameList, insuranceAccountDetailParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取核算月份备注填写表单
|
|
|
|
|
* @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);
|
|
|
|
|
return ResponseResult.run(getService(user)::getForm, ParamUtil.request2Map(request));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-11 19:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|