feat(perf): 添加绩效考核相关服务接口和实体类
- 创建了考核维度评分明细服务接口及实现类 - 添加了月度绩效考核记录服务接口及实现类 - 实现了绩效系数换算、车间考核参数配置等相关服务 - 定义了绩效考核相关的实体类和业务对象 - 创建了绩效考核控制器提供CRUD操作接口 - 配置了数据库映射文件和结果集映射 - 实现了数据校验和分页查询功能
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
package com.klp.perf.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.perf.domain.vo.PerfEmployeeInfoVo;
|
||||
import com.klp.perf.domain.bo.PerfEmployeeInfoBo;
|
||||
import com.klp.perf.service.IPerfEmployeeInfoService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 员工绩效薪资基本信息
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-07-07
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/perf/employeeInfo")
|
||||
public class PerfEmployeeInfoController extends BaseController {
|
||||
|
||||
private final IPerfEmployeeInfoService iPerfEmployeeInfoService;
|
||||
|
||||
/**
|
||||
* 查询员工绩效薪资基本信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PerfEmployeeInfoVo> list(PerfEmployeeInfoBo bo, PageQuery pageQuery) {
|
||||
return iPerfEmployeeInfoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工绩效薪资基本信息列表
|
||||
*/
|
||||
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PerfEmployeeInfoBo bo, HttpServletResponse response) {
|
||||
List<PerfEmployeeInfoVo> list = iPerfEmployeeInfoService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "员工绩效薪资基本信息", PerfEmployeeInfoVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工绩效薪资基本信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R<PerfEmployeeInfoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable String id) {
|
||||
return R.ok(iPerfEmployeeInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工绩效薪资基本信息
|
||||
*/
|
||||
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PerfEmployeeInfoBo bo) {
|
||||
return toAjax(iPerfEmployeeInfoService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工绩效薪资基本信息
|
||||
*/
|
||||
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PerfEmployeeInfoBo bo) {
|
||||
return toAjax(iPerfEmployeeInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工绩效薪资基本信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@Log(title = "员工绩效薪资基本信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable String[] ids) {
|
||||
return toAjax(iPerfEmployeeInfoService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user