| | |
| | | package com.ruoyi.compensationperformance.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.PaymentRegistrationDto; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/8/8 9:56 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "薪酬绩效") |
| | | @Tag(name = "薪酬绩效") |
| | | @RequestMapping("/compensationPerformance") |
| | | @AllArgsConstructor |
| | | public class CompensationPerformanceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompensationPerformanceService compensationPerformanceService; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "薪酬绩效-分页查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation("薪酬绩效-分页查询") |
| | | @Operation(summary = "薪酬绩效-分页查询") |
| | | public AjaxResult listPage(Page page, String staffName, String payDateStr) { |
| | | IPage<CompensationPerformance> listPage = compensationPerformanceService.listPage(page, staffName, payDateStr); |
| | | return AjaxResult.success(listPage); |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "薪酬绩效-添加", businessType = BusinessType.INSERT) |
| | | @ApiOperation("薪酬绩效-添加") |
| | | @Operation(summary = "薪酬绩效-添加") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody CompensationPerformance compensationPerformance) { |
| | | boolean save = compensationPerformanceService.save(compensationPerformance); |
| | |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "薪酬绩效-修改", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("薪酬绩效-修改") |
| | | @Operation(summary = "薪酬绩效-修改") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody CompensationPerformance compensationPerformance) { |
| | | boolean update = compensationPerformanceService.updateById(compensationPerformance); |
| | |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "薪酬绩效-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation("薪酬绩效-删除") |
| | | @Operation(summary = "薪酬绩效-删除") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |