From 7a8827c634b53bb1cb861ebc1fd4ac6d1ae6cb5a Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 26 五月 2026 15:22:10 +0800
Subject: [PATCH] 人力资源和协同办公增加操作日志
---
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 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..c6e9140 100644
--- a/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
+++ b/src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -1,13 +1,20 @@
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 lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -24,26 +31,50 @@
private final StaffSchedulingService staffSchedulingService;
@PostMapping("/listPage")
+ @Log(title = "鎺掔彮鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){
return AjaxResult.success(staffSchedulingService.listPage(vo));
}
@PostMapping("/save")
+ @Log(title = "鏂板鎺掔彮", businessType = BusinessType.INSERT)
public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){
staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto);
return AjaxResult.success();
}
@DeleteMapping("/delByIds")
+ @Log(title = "鎵归噺鍒犻櫎鎺掔彮", businessType = BusinessType.DELETE)
public AjaxResult delByIds(@RequestBody List<Integer> ids){
staffSchedulingService.removeByIds(ids);
return AjaxResult.success();
}
@DeleteMapping("/del/{id}")
+ @Log(title = "鍒犻櫎鎺掔彮", businessType = BusinessType.DELETE)
public AjaxResult del(@PathVariable("id") Integer id){
staffSchedulingService.removeById(id);
return AjaxResult.success();
}
+ /**
+ * 鑾峰彇褰撳墠鐢ㄦ埛鏈�鏂版帓鐝褰�
+ */
+ @GetMapping("/getCurrentUserLatestScheduling")
+ @Log(title = "鑾峰彇褰撳墠鐢ㄦ埛鏈�鏂版帓鐝褰�", businessType = BusinessType.OTHER)
+ public AjaxResult getCurrentUserLatestScheduling(){
+ return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling());
+ }
+
+ @Log(title = "瀵煎嚭浜哄憳鎺掔彮鍒楄〃", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ 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