调薪流程按钮
This commit is contained in:
parent
7a052e5ce0
commit
a4e6042adf
|
|
@ -0,0 +1,8 @@
|
|||
package com.api.salary.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
@Path("/bs/hrmsalary/process")
|
||||
public class ProcessController extends com.engine.salary.web.ProcessController{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.engine.salary.entity.process.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryAdjustmentDTO {
|
||||
|
||||
private String isShow;
|
||||
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.sys.service;
|
||||
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.enums.TaxDeclarationFunctionEnum;
|
||||
|
||||
/**
|
||||
|
|
@ -20,4 +21,6 @@ public interface SalarySysConfService {
|
|||
* @return 执行结果
|
||||
*/
|
||||
boolean operateTaxDeclarationFunction(TaxDeclarationFunctionEnum flag);
|
||||
|
||||
SalarySysConfPO getOneByCode(String code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalarySysConfPO getOneByCode(String code) {
|
||||
return getSalarySysConfMapper().getOneByCode(code);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.process.dto.SalaryAdjustmentDTO;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.wrapper.ProcessWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class ProcessController {
|
||||
|
||||
private ProcessWrapper getProcessWrapper(User user) {
|
||||
return ServiceUtil.getService(ProcessWrapper.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起调薪流程信息
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/salaryAdjustmentInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Map<String, Object>, SalaryAdjustmentDTO>(user).run(getProcessWrapper(user)::salaryAdjustment);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.process.dto.SalaryAdjustmentDTO;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
/**
|
||||
* 流程
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public class ProcessWrapper extends Service {
|
||||
|
||||
private SalarySysConfService getSalarySysConfService(User user) {
|
||||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public SalaryAdjustmentDTO salaryAdjustment() {
|
||||
|
||||
SalaryAdjustmentDTO build = SalaryAdjustmentDTO.builder().isShow("false").build();
|
||||
SalarySysConfPO needSalaryAdjustmentProcess = getSalarySysConfService(user).getOneByCode("needSalaryAdjustmentProcess");
|
||||
if (needSalaryAdjustmentProcess != null) {
|
||||
build.setIsShow(needSalaryAdjustmentProcess.getConfValue());
|
||||
SalarySysConfPO salaryAdjustmentProcessUrl = getSalarySysConfService(user).getOneByCode("salaryAdjustmentProcessUrl");
|
||||
if (salaryAdjustmentProcessUrl != null) {
|
||||
build.setUrl(salaryAdjustmentProcessUrl.getConfValue());
|
||||
}
|
||||
return build;
|
||||
}
|
||||
return build;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue