51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
|
|
package com.engine.salary.web;
|
||
|
|
|
||
|
|
import com.engine.common.util.ParamUtil;
|
||
|
|
import com.engine.common.util.ServiceUtil;
|
||
|
|
import com.engine.salary.service.SICategoryService;
|
||
|
|
import com.engine.salary.service.impl.SICategoryServiceImpl;
|
||
|
|
import com.engine.salary.util.ResponseResult;
|
||
|
|
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.Path;
|
||
|
|
import javax.ws.rs.Produces;
|
||
|
|
import javax.ws.rs.QueryParam;
|
||
|
|
import javax.ws.rs.core.Context;
|
||
|
|
import javax.ws.rs.core.MediaType;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @Author weaver_cl
|
||
|
|
* @Description: TODO 社保自定义福利控制器
|
||
|
|
* @Date 2022/3/9
|
||
|
|
* @Version V1.0
|
||
|
|
**/
|
||
|
|
public class SICategoryController {
|
||
|
|
|
||
|
|
private SICategoryService getService (User user) {
|
||
|
|
return ServiceUtil.getService(SICategoryServiceImpl.class,user);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 福利表单
|
||
|
|
* @param request
|
||
|
|
* @param response
|
||
|
|
* @return
|
||
|
|
*/
|
||
|
|
@GET
|
||
|
|
@Path("/getForm")
|
||
|
|
@Produces(MediaType.APPLICATION_JSON)
|
||
|
|
public String getForm(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||
|
|
@QueryParam(value = "id") Long id) {
|
||
|
|
User user = HrmUserVarify.getUser(request, response);
|
||
|
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
||
|
|
map.put("id",id);
|
||
|
|
return ResponseResult.run(getService(user)::getForm, map);
|
||
|
|
}
|
||
|
|
}
|