2022-04-29 17:15:22 +08:00
|
|
|
package com.engine.salary.web;
|
|
|
|
|
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2023-06-06 10:30:49 +08:00
|
|
|
import com.engine.salary.entity.progress.ProgressDTO;
|
|
|
|
|
import com.engine.salary.service.ProgressService;
|
|
|
|
|
import com.engine.salary.service.impl.ProgressServiceImpl;
|
2022-04-29 17:15:22 +08:00
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 进度条
|
|
|
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
|
|
|
|
* <p>Company: 泛微软件</p>
|
|
|
|
|
*
|
|
|
|
|
* @author qiantao
|
|
|
|
|
* @version 1.0
|
|
|
|
|
**/
|
|
|
|
|
public class SalaryProgressController {
|
|
|
|
|
|
2023-06-06 10:30:49 +08:00
|
|
|
private ProgressService getSalaryAcctProgressService(User user) {
|
|
|
|
|
return (ProgressService) ServiceUtil.getService(ProgressServiceImpl.class, user);
|
2022-04-29 17:15:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取进度条
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/getRate")
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
|
public String getRate(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "cacheKey") String cacheKey) {
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
2023-06-06 10:30:49 +08:00
|
|
|
return new ResponseResult<String, ProgressDTO>(user).run(getSalaryAcctProgressService(user)::getProgress, cacheKey);
|
2022-04-29 17:15:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @ApiOperation("获取进度条")
|
|
|
|
|
// @GetMapping("/getWelfareAccountRate")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<SalaryAcctProgressDTO> getWelfareAccountRate(@RequestParam String billMonth) {
|
|
|
|
|
// Long employeeId = UserContext.getCurrentEmployeeId();
|
|
|
|
|
// String tenantKey = TenantContext.getCurrentTenantKey();
|
|
|
|
|
// SalaryAcctProgressDTO salaryAcctProgressDTO = salaryAcctProgressService.getProgress(tenantKey + billMonth, employeeId, tenantKey);
|
|
|
|
|
// return WeaResult.success(salaryAcctProgressDTO);
|
|
|
|
|
// }
|
|
|
|
|
}
|