package com.engine.salary.web; /** * 薪资项目 *

Copyright: Copyright (c) 2022

*

Company: 泛微软件

* * @author qiantao * @version 1.0 **/ public class SalaryItemController { // @Autowired // private SalaryItemWrapper salaryItemWrapper; // @Autowired // private SysSalaryItemWrapper sysSalaryItemWrapper; // // /**********************************自定义薪资项目 start*********************************/ // // @PostMapping("/list") // @ApiOperation("薪资项目列表") // @WeaPermission // public WeaResult> listSalaryItem(@RequestBody SalaryItemSearchParam searchParam) { // return WeaResult.success(salaryItemWrapper.listPage(searchParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); // } // // @PostMapping("/listCanDelete") // @ApiOperation("可删除的薪资项目列表") // @WeaPermission // public WeaResult> listCanDeleteSalaryItem(@RequestBody SalaryItemSearchParam searchParam) { // return WeaResult.success(salaryItemWrapper.listPage4CanDelete(searchParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); // } // // @PostMapping("/listSalaryItemDetail") // @ApiOperation("获取多个薪资项目的详情") // @WeaPermission // public WeaResult> listSalaryItemDetail(@RequestBody Collection ids) { // if (CollectionUtils.isEmpty(ids)) { // return WeaResult.success(Collections.emptyList()); // } // List salaryItemListDTOS = salaryItemWrapper.listByIds(ids, TenantContext.getCurrentTenantKey()); // return WeaResult.success(salaryItemListDTOS); // } // // @GetMapping("/getSearchCondition") // @ApiOperation("薪资项目列表的高级搜索") // @WeaPermission // public WeaResult getSearchCondition() { // return WeaResult.success(salaryItemWrapper.getSearchCondition()); // } // // @PostMapping("/getSalaryForm") // @ApiOperation("薪资项目的详情") // @WeaPermission // public WeaResult getSalaryItemForm(@RequestParam(value = "id", required = false) Long id) { // return WeaResult.success(salaryItemWrapper.getForm(id, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey())); // } // // @GetMapping("/listSalaryItemTypeOption") // @ApiOperation("获取薪资项目可选的类型(与属性有联动)") // @WeaPermission // public WeaResult>> listSalaryItemTypeOption() { // Map> resultMap = salaryItemWrapper.listSalaryItemTypeOption(UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); // return WeaResult.success(resultMap); // } // // @PostMapping("/delete") // @ApiOperation("批量删除薪资项目") // @WeaPermission // public WeaResult deleteSalaryItem(@RequestBody Collection 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 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 updateSalaryItem(@RequestBody @Validated SalaryItemSaveParam saveParam) { // salaryItemWrapper.update(saveParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()); // return WeaResult.success(null); // } // // /**********************************自定义薪资项目 end*********************************/ // // // /**********************************系统薪资项目 start*********************************/ // // @PostMapping("/sysList") // @ApiOperation("系统薪资项目列表") // @WeaPermission // public WeaResult> listSysSalaryItem(@RequestBody SysSalaryItemSearchParam searchParam) { // return WeaResult.success(sysSalaryItemWrapper.listPage(searchParam, TenantContext.getCurrentTenantKey())); // } // // @GetMapping("/getSysSearchCondition") // @ApiOperation("系统薪资项目的高级搜索") // @WeaPermission // public WeaResult getSysSearchCondition() { // return WeaResult.success(sysSalaryItemWrapper.getSearchCondition()); // } // // @PostMapping("/saveSys") // @ApiOperation("添加系统薪资项目") // @WeaPermission // public WeaResult saveSysSalaryItem(@RequestBody Collection 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*********************************/ }