From a0f4d01559785001e7b16b21025cc6a42e65d167 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期五, 05 十二月 2025 17:36:31 +0800
Subject: [PATCH] 添加ai事件管理页面
---
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java | 69 ++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java
new file mode 100644
index 0000000..7678b97
--- /dev/null
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java
@@ -0,0 +1,69 @@
+package com.fzzy.sys.controller.file;
+
+import com.fzzy.igds.data.PageResponse;
+import com.fzzy.sys.manager.file.FileManager;
+import com.ruoyi.common.utils.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.io.*;
+
+/**
+ * @Description 鍑哄叆搴撹澶囩浉鍏冲姛鑳�
+ * @Author CZT
+ * @Date 2025/12/4 9:27
+ */
+@Slf4j
+@Controller
+@RequestMapping("basic/file")
+public class FileController {
+
+ @Resource
+ private FileManager fileManager;
+
+ /**
+ * 楦熺灠鍥鹃瑙堥〉闈�
+ *
+ * @return
+ */
+ @RequestMapping("/dept-img")
+ public String deptImg(@RequestParam(value = "id", required = true) String id,
+ ModelMap view) {
+
+ if(StringUtils.isNotEmpty(id)){
+ String imgPath = fileManager.getDeptFile(id);;
+ view.put("imgPath", imgPath);
+ }
+
+ return "web/common/preview-img";
+ }
+
+
+ /**
+ * 闀夸紶 鍑哄叆搴撳浘鐗�
+ *
+ * @param file
+ * @param request
+ * @return
+ * @throws IOException
+ */
+ @RequestMapping("/update-file")
+ @ResponseBody
+ public PageResponse<String> updateFile(
+ @RequestParam(value = "file", required = true) MultipartFile file,
+ HttpServletRequest request) throws IOException {
+
+ String plateNum = request.getParameter("plateNum");
+
+ return fileManager.upLoadInoutHandleImg(file, plateNum);
+ }
+
+}
--
Gitblit v1.9.3