From d2038a623e02c2d7bb6b95a908832c0432adf2f0 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 21 五月 2026 13:46:21 +0800
Subject: [PATCH] 增加日志
---
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java b/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
index e7c4c40..83f665f 100644
--- a/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
+++ b/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -1,13 +1,22 @@
package com.ruoyi.staff.controller;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.compensationperformance.pojo.CompensationPerformance;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.staff.dto.SaveStaffSchedulingDto;
+import com.ruoyi.staff.dto.StaffSchedulingDto;
import com.ruoyi.staff.service.StaffSchedulingService;
import com.ruoyi.staff.vo.SearchSchedulingVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -19,31 +28,62 @@
@RestController
@RequestMapping("/staff/staffScheduling")
@RequiredArgsConstructor
+@Api(tags = "鎺掔彮")
public class StaffSchedulingController {
private final StaffSchedulingService staffSchedulingService;
@PostMapping("/listPage")
+ @ApiOperation("鎺掔彮鍒嗛〉鏌ヨ")
+ @Log(title = "鎺掔彮鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){
return AjaxResult.success(staffSchedulingService.listPage(vo));
}
@PostMapping("/save")
+ @ApiOperation("淇濆瓨鎺掔彮")
+ @Log(title = "淇濆瓨鎺掔彮", businessType = BusinessType.UPDATE)
public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){
staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto);
return AjaxResult.success();
}
@DeleteMapping("/delByIds")
+ @ApiOperation("鎵归噺鍒犻櫎鎺掔彮")
+ @Log(title = "鎵归噺鍒犻櫎鎺掔彮", businessType = BusinessType.DELETE)
public AjaxResult delByIds(@RequestBody List<Integer> ids){
staffSchedulingService.removeByIds(ids);
return AjaxResult.success();
}
@DeleteMapping("/del/{id}")
+ @ApiOperation("鍒犻櫎鎺掔彮")
+ @Log(title = "鍒犻櫎鎺掔彮", businessType = BusinessType.DELETE)
public AjaxResult del(@PathVariable("id") Integer id){
staffSchedulingService.removeById(id);
return AjaxResult.success();
}
+ /**
+ * 鑾峰彇褰撳墠鐢ㄦ埛鏈�鏂版帓鐝褰�
+ */
+ @GetMapping("/getCurrentUserLatestScheduling")
+ @ApiOperation("鑾峰彇褰撳墠鐢ㄦ埛鏈�鏂版帓鐝褰�")
+ @Log(title = "鑾峰彇褰撳墠鐢ㄦ埛鏈�鏂版帓鐝褰�", businessType = BusinessType.OTHER)
+ public AjaxResult getCurrentUserLatestScheduling(){
+ return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling());
+ }
+
+ @Log(title = "瀵煎嚭浜哄憳鎺掔彮鍒楄〃", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ApiOperation("瀵煎嚭浜哄憳鎺掔彮鍒楄〃")
+ public void export(HttpServletResponse response ) {
+ SearchSchedulingVo vo = new SearchSchedulingVo();
+ vo.setCurrent(-1);
+ vo.setSize(-1);
+ IPage<StaffSchedulingDto> list = staffSchedulingService.listPage(vo);
+ ExcelUtil<StaffSchedulingDto> util = new ExcelUtil<StaffSchedulingDto>(StaffSchedulingDto.class);
+ util.exportExcel(response, list.getRecords(), "瀵煎嚭浜哄憳鎺掔彮鍒楄〃");
+ }
+
}
--
Gitblit v1.9.3