自发起调薪流程

This commit is contained in:
钱涛 2023-02-13 14:53:35 +08:00
parent 78cb59f07f
commit 8b594c1882
5 changed files with 27 additions and 16 deletions

View File

@ -30,10 +30,11 @@ public class SalaryArchiveQueryParam extends BaseQueryParam {
//姓名
private String username;
private Long userId;
private Long employeeId;
//个税扣缴义务人id
private Long taxAgentId;
private String taxAgentName;
//分部id
private List<Long> subcompanyIds;

View File

@ -464,6 +464,9 @@
FROM
hrsa_salary_archive t
WHERE t.delete_type = 0
<if test="param.employeeId != null ">
AND t.employee_id = #{param.employeeId}
</if>
<if test="param.employeeIds != null and param.employeeIds.size()>0">
AND t.employee_id IN
<foreach collection="param.employeeIds" open="(" item="employeeId" separator="," close=")">

View File

@ -2,6 +2,8 @@ package com.engine.salary.process.salaryArchive;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveImportActionParam;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveQueryParam;
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
import com.engine.salary.util.ResponseResult;
import com.engine.salary.wrapper.SalaryArchiveWrapper;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
@ -84,17 +86,13 @@ public class SalaryArchiveActionAPI {
return new ResponseResult<SalaryArchiveImportActionParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::adjustmentSalaryArchive, importData);
}
// /**
// * 导入薪资档案附件上传前置校验
// * @param importParam
// * @return
// */
// @POST
// @Path("/checkImportSalaryArchiveUpload")
// @Produces(MediaType.APPLICATION_JSON)
// public String checkParam(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveImportHandleParam importParam) {
// User user = HrmUserVarify.getUser(request, response);
// return new ResponseResult<SalaryArchiveImportHandleParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::checkImportSalaryArchive, importParam);
// }
@POST
@Path("/salaryArchiveId")
@Produces(MediaType.APPLICATION_JSON)
public String adjustmentSalaryArchive(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<SalaryArchiveQueryParam, SalaryArchivePO>(user).run(getSalaryArchiveWrapper(user)::getSalaryArchiveInfo, param);
}
}

View File

@ -626,8 +626,6 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
}
@Override
public List<TaxAgentManageRangeEmployeeDTO> listTaxAgentAndEmployeeTree() {
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeList = Lists.newArrayList();

View File

@ -350,7 +350,7 @@ public class SalaryArchiveWrapper extends Service {
// 获取所有可被引用的薪资项目
List<SalaryItemPO> salaryItemList = getSalaryArchiveItemService(user).getCanAdjustSalaryItems()
.stream().filter(item->getSalaryItemService(user).filterInRange(Collections.singleton(taxAgentId), item))
.stream().filter(item -> getSalaryItemService(user).filterInRange(Collections.singleton(taxAgentId), item))
.collect(Collectors.toList());
Collection<Long> salaryItemIds = salaryItemList.stream().map(SalaryItemPO::getId).collect(Collectors.toList());
List<SalaryArchiveItemPO> salaryArchiveItemList = getSalaryArchiveService(user).getCurrentEffectiveItemList(Collections.singletonList(salaryArchiveId), salaryItemIds);
@ -548,4 +548,15 @@ public class SalaryArchiveWrapper extends Service {
public Map<String, Object> handleRepeatData() {
return getSalaryArchiveService(user).handleRepeatData();
}
public SalaryArchivePO getSalaryArchiveInfo(SalaryArchiveQueryParam param) {
List<SalaryArchivePO> list = getSalaryArchiveService(user).listSome(SalaryArchivePO.builder().employeeId(param.getEmployeeId()).taxAgentId(param.getTaxAgentId()).build());
if (CollectionUtils.isEmpty(list)) {
throw new SalaryRunTimeException("薪资档案不存在!");
}
if (list.size() > 1) {
throw new SalaryRunTimeException("存在多个薪资档案!");
}
return list.get(0);
}
}