薪资列表
This commit is contained in:
parent
41203342d0
commit
816885609d
|
|
@ -77,20 +77,19 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 待定薪列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/pendingList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String pendingList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Long>>(user).run(getSalaryArchiveWrapper(user)::pendingList, queryParam);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 待定薪列表
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/pendingList")
|
||||
// @ApiOperation("待定薪列表")
|
||||
// @WeaPermission
|
||||
// public WeaResult<WeaTable<LinkedHashMap>> pendingList(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.pendingList(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 设为定薪员工
|
||||
|
|
@ -130,33 +129,36 @@ public class SalaryArchiveController {
|
|||
// public WeaResult<String> deletePendingTodo(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.deletePendingTodo(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 定薪列表
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/fixedList")
|
||||
// @ApiOperation("定薪列表")
|
||||
// @WeaPermission
|
||||
// public WeaResult<WeaTable<LinkedHashMap>> fixedList(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.fixedList(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 待停薪列表
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/suspendList")
|
||||
// @ApiOperation("待停薪列表")
|
||||
// @WeaPermission
|
||||
// public WeaResult<WeaTable<LinkedHashMap>> suspendList(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.suspendList(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
|
||||
/**
|
||||
* 定薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/fixedList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String fixedList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Long>>(user).run(getSalaryArchiveWrapper(user)::fixedList, queryParam);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 待停薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/suspendList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String suspendList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Long>>(user).run(getSalaryArchiveWrapper(user)::suspendList, queryParam);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 停薪
|
||||
// *
|
||||
|
|
@ -195,20 +197,22 @@ public class SalaryArchiveController {
|
|||
// public WeaResult<String> deleteSuspendTodo(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.deleteSuspendTodo(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 停薪列表
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/stopList")
|
||||
// @ApiOperation("停薪列表")
|
||||
// @WeaPermission
|
||||
// public WeaResult<WeaTable<LinkedHashMap>> stopList(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.stopList(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
|
||||
/**
|
||||
* 停薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/stopList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String stopList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Long>>(user).run(getSalaryArchiveWrapper(user)::stopList, queryParam);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 取消停薪
|
||||
// *
|
||||
|
|
|
|||
|
|
@ -110,6 +110,51 @@ public class SalaryArchiveWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 薪资档案列表(分页)
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> list(SalaryArchiveQueryParam queryParam, SalaryArchiveListTypeEnum listTypeEnum) {
|
||||
//薪资档案列表
|
||||
PageInfo<SalaryArchiveListDTO> pageInfo = getSalaryArchiveService(user).listPage(queryParam);
|
||||
Collection<SalaryArchiveListDTO> salaryArchives = pageInfo.getList();
|
||||
|
||||
//所有个税扣缴义务人
|
||||
Collection<TaxAgentPO> taxAgentLists = getTaxAgentService(user).listAll();
|
||||
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<SalaryItemPO> salaryItems = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
|
||||
|
||||
//整合所有的显示列(固定列+薪资项目动态列)
|
||||
List<Map<String, Object>> listMaps = getSalaryArchiveService(user).buildSalaryArchiveData(salaryArchives, taxAgentLists, salaryItems, Boolean.TRUE);
|
||||
|
||||
PageInfo<Map<String, Object>> pageInfos = new PageInfo<Map<String, Object>>(listMaps);
|
||||
pageInfos.setTotal(pageInfo.getTotal());
|
||||
pageInfos.setPageNum(pageInfo.getPageNum());
|
||||
pageInfos.setPageSize(pageInfo.getPageSize());
|
||||
|
||||
|
||||
//动态列组装
|
||||
List<WeaTableColumn> columns = SalaryArchiveBO.buildSalaryArchiveTable(salaryItems);
|
||||
|
||||
SalaryWeaTable<SalaryArchiveListDTO> table = new SalaryWeaTable<SalaryArchiveListDTO>(user, SalaryArchiveListDTO.class);
|
||||
table.setColumns(columns);
|
||||
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("pageInfo", pageInfos);
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
datas.put("salaryArchives", salaryArchives);
|
||||
return datas;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取各tab总人数
|
||||
|
|
@ -133,6 +178,136 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 待定薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> pendingList(SalaryArchiveQueryParam queryParam) {
|
||||
queryParam.setRunStatusList(Arrays.asList(SalaryArchiveStatusEnum.PENDING.getValue()));
|
||||
return list(queryParam, SalaryArchiveListTypeEnum.PENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> fixedList(SalaryArchiveQueryParam queryParam) {
|
||||
queryParam.setRunStatusList(Arrays.asList(SalaryArchiveStatusEnum.FIXED.getValue(), SalaryArchiveStatusEnum.SUSPEND.getValue()));
|
||||
return list(queryParam, SalaryArchiveListTypeEnum.FIXED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 待停薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> suspendList(SalaryArchiveQueryParam queryParam) {
|
||||
queryParam.setRunStatusList(Arrays.asList(SalaryArchiveStatusEnum.SUSPEND.getValue()));
|
||||
return list(queryParam, SalaryArchiveListTypeEnum.SUSPEND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停薪列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> stopList(SalaryArchiveQueryParam queryParam) {
|
||||
queryParam.setRunStatusList(Arrays.asList(SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()));
|
||||
return list(queryParam, SalaryArchiveListTypeEnum.STOP);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 设为定薪员工
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> gotoFixed(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).gotoFixed(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 一键全部定薪
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> allGotoFixed(SalaryArchiveQueryParam queryParam, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).allGotoFixed(queryParam, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除待定薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deletePendingTodo(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).deletePendingTodo(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> gotoStop(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).gotoStop(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 一键全部停薪
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> allGotoStop(SalaryArchiveQueryParam queryParam, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).allGotoStop(queryParam, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deleteSuspendTodo(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).deleteSuspendTodo(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 取消停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String cancelStop(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).cancelStop(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 获取薪资档案详情表单
|
||||
*
|
||||
|
|
@ -379,5 +554,4 @@ public class SalaryArchiveWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue