134 lines
5.9 KiB
Java
134 lines
5.9 KiB
Java
package com.engine.salary.web;
|
|
|
|
/**
|
|
* 薪资项目
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
|
* <p>Company: 泛微软件</p>
|
|
*
|
|
* @author qiantao
|
|
* @version 1.0
|
|
**/
|
|
public class SalaryItemController {
|
|
|
|
// @Autowired
|
|
// private SalaryItemWrapper salaryItemWrapper;
|
|
// @Autowired
|
|
// private SysSalaryItemWrapper sysSalaryItemWrapper;
|
|
//
|
|
// /**********************************自定义薪资项目 start*********************************/
|
|
//
|
|
// @PostMapping("/list")
|
|
// @ApiOperation("薪资项目列表")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaTable<SalaryItemListDTO>> listSalaryItem(@RequestBody SalaryItemSearchParam searchParam) {
|
|
// return WeaResult.success(salaryItemWrapper.listPage(searchParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
|
// }
|
|
//
|
|
// @PostMapping("/listCanDelete")
|
|
// @ApiOperation("可删除的薪资项目列表")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaTable<SalaryItemListDTO>> listCanDeleteSalaryItem(@RequestBody SalaryItemSearchParam searchParam) {
|
|
// return WeaResult.success(salaryItemWrapper.listPage4CanDelete(searchParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
|
// }
|
|
//
|
|
// @PostMapping("/listSalaryItemDetail")
|
|
// @ApiOperation("获取多个薪资项目的详情")
|
|
// @WeaPermission
|
|
// public WeaResult<List<SalaryItemListDTO>> listSalaryItemDetail(@RequestBody Collection<Long> ids) {
|
|
// if (CollectionUtils.isEmpty(ids)) {
|
|
// return WeaResult.success(Collections.emptyList());
|
|
// }
|
|
// List<SalaryItemListDTO> salaryItemListDTOS = salaryItemWrapper.listByIds(ids, TenantContext.getCurrentTenantKey());
|
|
// return WeaResult.success(salaryItemListDTOS);
|
|
// }
|
|
//
|
|
// @GetMapping("/getSearchCondition")
|
|
// @ApiOperation("薪资项目列表的高级搜索")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaSearchCondition> getSearchCondition() {
|
|
// return WeaResult.success(salaryItemWrapper.getSearchCondition());
|
|
// }
|
|
//
|
|
// @PostMapping("/getSalaryForm")
|
|
// @ApiOperation("薪资项目的详情")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaForm> getSalaryItemForm(@RequestParam(value = "id", required = false) Long id) {
|
|
// return WeaResult.success(salaryItemWrapper.getForm(id, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
|
// }
|
|
//
|
|
// @GetMapping("/listSalaryItemTypeOption")
|
|
// @ApiOperation("获取薪资项目可选的类型(与属性有联动)")
|
|
// @WeaPermission
|
|
// public WeaResult<Map<String, List<WeaFormOption>>> listSalaryItemTypeOption() {
|
|
// Map<String, List<WeaFormOption>> resultMap = salaryItemWrapper.listSalaryItemTypeOption(UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey());
|
|
// return WeaResult.success(resultMap);
|
|
// }
|
|
//
|
|
// @PostMapping("/delete")
|
|
// @ApiOperation("批量删除薪资项目")
|
|
// @WeaPermission
|
|
// public WeaResult<Object> deleteSalaryItem(@RequestBody Collection<Long> ids) {
|
|
// Long employeeId = UserContext.getCurrentEmployeeId();
|
|
// String tenantKey = TenantContext.getCurrentTenantKey();
|
|
// if (CollectionUtils.isEmpty(ids)) {
|
|
// return WeaResult.fail(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 84026, "参数错误"));
|
|
// }
|
|
// salaryItemWrapper.delete(ids, tenantKey);
|
|
// return WeaResult.success(null);
|
|
// }
|
|
//
|
|
// @PostMapping("/save")
|
|
// @ApiOperation("保存薪资项目")
|
|
// @WeaPermission
|
|
// public WeaResult<Object> saveSalaryItem(@RequestBody @Validated SalaryItemSaveParam saveParam) {
|
|
// if (saveParam.getId() == null || saveParam.getId() <= 0) {
|
|
// salaryItemWrapper.save(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey());
|
|
// } else {
|
|
// salaryItemWrapper.update(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey());
|
|
// }
|
|
// return WeaResult.success(null);
|
|
// }
|
|
//
|
|
// @PostMapping("/update")
|
|
// @ApiOperation("更新薪资项目")
|
|
// @WeaPermission
|
|
// public WeaResult<Object> updateSalaryItem(@RequestBody @Validated SalaryItemSaveParam saveParam) {
|
|
// salaryItemWrapper.update(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey());
|
|
// return WeaResult.success(null);
|
|
// }
|
|
//
|
|
// /**********************************自定义薪资项目 end*********************************/
|
|
//
|
|
//
|
|
// /**********************************系统薪资项目 start*********************************/
|
|
//
|
|
// @PostMapping("/sysList")
|
|
// @ApiOperation("系统薪资项目列表")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaTable<SysSalaryItemListDTO>> listSysSalaryItem(@RequestBody SysSalaryItemSearchParam searchParam) {
|
|
// return WeaResult.success(sysSalaryItemWrapper.listPage(searchParam, TenantContext.getCurrentTenantKey()));
|
|
// }
|
|
//
|
|
// @GetMapping("/getSysSearchCondition")
|
|
// @ApiOperation("系统薪资项目的高级搜索")
|
|
// @WeaPermission
|
|
// public WeaResult<WeaSearchCondition> getSysSearchCondition() {
|
|
// return WeaResult.success(sysSalaryItemWrapper.getSearchCondition());
|
|
// }
|
|
//
|
|
// @PostMapping("/saveSys")
|
|
// @ApiOperation("添加系统薪资项目")
|
|
// @WeaPermission
|
|
// public WeaResult<Object> saveSysSalaryItem(@RequestBody Collection<Long> sysSalaryItemIds) {
|
|
// Long employeeId = UserContext.getCurrentEmployeeId();
|
|
// String tenantKey = TenantContext.getCurrentTenantKey();
|
|
// if (CollectionUtils.isEmpty(sysSalaryItemIds)) {
|
|
// return WeaResult.fail(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 84026, "参数错误"));
|
|
// }
|
|
// sysSalaryItemWrapper.add2SalaryItem(sysSalaryItemIds, employeeId, tenantKey);
|
|
// return WeaResult.success(null);
|
|
// }
|
|
//
|
|
// /**********************************系统薪资项目 end*********************************/
|
|
}
|