| | |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | | 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 lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @since 2026-03-06 01:22:05 |
| | | */ |
| | | @Api(tags = "员工工资主表") |
| | | @Tag(name = "员工工资主表") |
| | | @RestController |
| | | @RequestMapping("/staffSalaryMain") |
| | | @AllArgsConstructor |
| | |
| | | private StaffSalaryMainService staffSalaryMainService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("员工工资主表分页查询") |
| | | @Operation(summary = "员工工资主表分页查询") |
| | | public AjaxResult listPage(Page page, StaffSalaryMain staffSalaryMain) { |
| | | return staffSalaryMainService.listPage(page, staffSalaryMain); |
| | | } |
| | | |
| | | @ApiOperation("通过部门ids获取用户信息计算每个员工的工资") |
| | | @Operation(summary = "通过部门ids获取用户信息计算每个员工的工资") |
| | | @PostMapping("/calculateSalary") |
| | | public AjaxResult calculateSalary(@RequestBody CalculateSalaryDto calculateSalaryDto) { |
| | | return staffSalaryMainService.calculateSalary(calculateSalaryDto); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("新建工资表") |
| | | @Operation(summary = "新建工资表") |
| | | @Log(title = "新建工资表", businessType = BusinessType.INSERT) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody StaffSalaryMain staffSalaryMain) { |
| | |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改工资表") |
| | | @Operation(summary = "修改工资表") |
| | | @Log(title = "修改工资表", businessType = BusinessType.UPDATE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateStaffSalaryMain(@RequestBody StaffSalaryMain staffSalaryMain) { |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("删除工资表") |
| | | @Operation(summary = "删除工资表") |
| | | @Log(title = "删除工资表", businessType = BusinessType.DELETE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |