我的薪资福利显示页签支持配置
This commit is contained in:
parent
2aa4ed05d8
commit
a39806bb92
|
|
@ -0,0 +1,13 @@
|
|||
package com.api.salary.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021-12-08 14:44
|
||||
*/
|
||||
@Path("/bs/hrmsalary/mySalaryShowSet")
|
||||
public class MySalaryShowSetController extends com.engine.salary.web.MySalaryShowSetController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/8/7 13:05
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel("工资单确认和反馈")
|
||||
public class MySalaryShowSetDTO {
|
||||
|
||||
/**
|
||||
* 是否显示工资单列表
|
||||
*/
|
||||
private Boolean salaryShowStatus;
|
||||
|
||||
/**
|
||||
* 是否显示社保福利列表
|
||||
*/
|
||||
// private Boolean welfareShowStatus;
|
||||
|
||||
/**
|
||||
* 是否显示调薪记录列表
|
||||
*/
|
||||
private Boolean adjustShowStatus;
|
||||
|
||||
/**
|
||||
* 是否显示个税扣缴义务人列
|
||||
*/
|
||||
private Boolean taxAgentShowStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
|
||||
import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/8/7 11:15
|
||||
*/
|
||||
public interface MySalaryShowSetService {
|
||||
|
||||
/**
|
||||
* 获取显示设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MySalaryShowSetDTO get();
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO;
|
||||
import com.engine.salary.service.MySalaryShowSetService;
|
||||
import com.engine.salary.sys.constant.SalarySysConstant;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/8/7 11:16
|
||||
*/
|
||||
@Slf4j
|
||||
public class MySalaryShowSetServiceImpl extends Service implements MySalaryShowSetService {
|
||||
|
||||
private SalarySysConfService getSalarySysConfService(User user) {
|
||||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取显示设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public MySalaryShowSetDTO get() {
|
||||
SalarySysConfPO salaryShowStatus = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_SHOW_STATUS);
|
||||
SalarySysConfPO adjustShowStatus = getSalarySysConfService(user).getOneByCode(SalarySysConstant.ADJUST_SHOW_STATUS);
|
||||
|
||||
return MySalaryShowSetDTO.builder()
|
||||
.salaryShowStatus(salaryShowStatus == null ? true : NumberUtils.INTEGER_ONE.equals(salaryShowStatus.getConfValue()))
|
||||
.adjustShowStatus(adjustShowStatus == null ? true : NumberUtils.INTEGER_ONE.equals(adjustShowStatus.getConfValue()))
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -115,4 +115,19 @@ public class SalarySysConstant {
|
|||
* 应用设置是否福利档案导入时,不符合上下限的基数调整为上限 /下限
|
||||
*/
|
||||
public static final String WEL_BASE_AUTO_ADJUST = "welBaseAutoAdjust";
|
||||
|
||||
/**
|
||||
* 我的薪资福利工资单显示状态
|
||||
*/
|
||||
public static final String SALARY_SHOW_STATUS = "salaryShowStatus";
|
||||
|
||||
/**
|
||||
* 我的薪资福利调薪记录显示状态
|
||||
*/
|
||||
public static final String ADJUST_SHOW_STATUS = "adjustShowStatus";
|
||||
|
||||
/**
|
||||
* 我的薪资福利工资单个税扣缴义务人显示状态
|
||||
*/
|
||||
public static final String TAX_AGENT_SHOW_STATUS = "taxAgentShowStatus";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.wrapper.MySalaryShowSetWrapper;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021-12-08 14:44
|
||||
*/
|
||||
@Slf4j
|
||||
public class MySalaryShowSetController {
|
||||
|
||||
private MySalaryShowSetWrapper getMySalaryShowSetWrapper(User user) {
|
||||
return ServiceUtil.getService(MySalaryShowSetWrapper.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的薪资福利页签显隐控制
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/get")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String mySalaryShowSet(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Void, MySalaryShowSetDTO>(user).run(getMySalaryShowSetWrapper(user)::mySalaryShowSet);
|
||||
}
|
||||
|
||||
/******** 工资单 end ***********************************************************************************************/
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO;
|
||||
import com.engine.salary.service.MySalaryShowSetService;
|
||||
import com.engine.salary.service.impl.MySalaryShowSetServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import weaver.hrm.User;
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* @Description: 我的薪资福利显示设置
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2023/8/7 11:24
|
||||
*/
|
||||
@Component
|
||||
public class MySalaryShowSetWrapper extends Service {
|
||||
private MySalaryShowSetService getMySalaryShowSetService(User user) {
|
||||
return ServiceUtil.getService(MySalaryShowSetServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我的薪资福利显示设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public MySalaryShowSetDTO mySalaryShowSet() {
|
||||
return getMySalaryShowSetService(user).get();
|
||||
}
|
||||
}
|
||||
|
|
@ -620,11 +620,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
}
|
||||
|
||||
private List<WeaTableColumn> buildMySalaryBillListColumns() {
|
||||
SalarySysConfPO taxAgentShowStatusPO = getSalarySysConfService(user).getOneByCode(SalarySysConstant.TAX_AGENT_SHOW_STATUS);
|
||||
List<WeaTableColumn> list = new ArrayList<>();
|
||||
WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id");
|
||||
idColumn.setDisplay(WeaBoolAttr.TRUE);
|
||||
list.add(new WeaTableColumn("20%", "薪资所属月", "salaryYearMonth"));
|
||||
list.add(new WeaTableColumn("40%", "个税扣缴义务人", "taxAgent"));
|
||||
if (taxAgentShowStatusPO == null || taxAgentShowStatusPO.getConfValue().equals("1")) {
|
||||
list.add(new WeaTableColumn("40%", "个税扣缴义务人", "taxAgent"));
|
||||
}
|
||||
list.add(new WeaTableColumn("40%", "发放时间", "sendTime"));
|
||||
return list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue