2022-03-02 11:09:23 +08:00
|
|
|
package com.engine.salary.web;
|
|
|
|
|
|
2022-03-03 13:50:03 +08:00
|
|
|
import com.engine.common.util.ParamUtil;
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
|
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
|
|
|
|
import com.engine.salary.service.AddUpDeductionService;
|
|
|
|
|
import com.engine.salary.service.impl.AddUpDeductionServiceImpl;
|
|
|
|
|
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.POST;
|
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
2022-03-02 11:09:23 +08:00
|
|
|
public class AddUpDeductionController {
|
2022-03-03 13:50:03 +08:00
|
|
|
|
|
|
|
|
private AddUpDeductionService getService(User user) {
|
|
|
|
|
return (AddUpDeductionService) ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/list")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionQueryParam queryParam) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
|
|
|
|
map.put("queryParam", queryParam);
|
|
|
|
|
return ResponseResult.run(getService(user)::list, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
// * 下载导入模板
|
|
|
|
|
// * @return
|
|
|
|
|
// */
|
|
|
|
|
// @POST()
|
|
|
|
|
// @Path("/downloadTemplate")
|
|
|
|
|
// @ApiOperation("下载导入模板")
|
|
|
|
|
// @WeaPermission
|
|
|
|
|
// public WeaResult<Map<String, Object>> downloadTemplate(@RequestBody AddUpDeductionQueryParam queryParam) {
|
|
|
|
|
// return WeaResult.success(service.downloadTemplate(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出
|
|
|
|
|
* @param queryParam
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
// @POST
|
|
|
|
|
// @Path("/export")
|
|
|
|
|
// @Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
// public WeaResult<Map<String, Object>> export(@RequestBody AddUpDeductionQueryParam queryParam) {
|
|
|
|
|
// return WeaResult.success(service.export(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
|
|
|
|
// }
|
|
|
|
|
|
2022-03-02 11:09:23 +08:00
|
|
|
}
|