From 580aab8d7f186d83409d177f4aed2fe60e01b67f Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 14 二月 2025 11:33:05 +0800
Subject: [PATCH] 赋码定时任务查询正在运行的任务

---
 business/src/main/java/com/ycl/controller/ProjectInfoController.java |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/business/src/main/java/com/ycl/controller/ProjectInfoController.java b/business/src/main/java/com/ycl/controller/ProjectInfoController.java
index 963dfee..ee060f8 100644
--- a/business/src/main/java/com/ycl/controller/ProjectInfoController.java
+++ b/business/src/main/java/com/ycl/controller/ProjectInfoController.java
@@ -1,12 +1,14 @@
 package com.ycl.controller;
 
 import com.ycl.common.base.Result;
+import com.ycl.common.exception.base.BaseException;
 import com.ycl.common.group.Add;
 import com.ycl.common.group.Update;
 import com.ycl.common.utils.ProjectCodeGenerator;
 import com.ycl.common.utils.excel.OutputExcelUtils;
 import com.ycl.domain.excel.ProjectExcelTemplate;
 import com.ycl.domain.form.DocumentInfoForm;
+import com.ycl.domain.form.ProjectForm;
 import com.ycl.domain.form.ProjectInfoForm;
 import com.ycl.domain.query.ProjectExportQuery;
 import com.ycl.domain.query.ProjectInfoQuery;
@@ -16,6 +18,7 @@
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotEmpty;
@@ -111,7 +114,10 @@
         return Result.ok().data(ProjectCodeGenerator.generateProjectCode());
     }
 
-    ;
+    @GetMapping("/searchByKey")
+    public Result searchByKey(@RequestParam(required = false) String wordKey) {
+        return projectInfoService.searchByKey(wordKey);
+    }
 
     @GetMapping("/getManagerFlag/{recordId}")
     public Result getManagerFlag(@PathVariable("recordId") Integer recordId) {
@@ -147,4 +153,26 @@
     public Result updateUsedStatus(@PathVariable Integer id, @PathVariable Integer usedStatus) {
         return projectInfoService.updateUsedStatus(id, usedStatus);
     }
+
+    /**
+     * 椤圭洰瀵煎叆
+     * @param file
+     * @return
+     */
+    @PostMapping("/import")
+    public Result importProject(MultipartFile file) {
+        if (file.getSize() > 100 * 1024 * 1024) {
+            throw new BaseException("鏂囦欢杩囧ぇ锛屾枃浠朵笉寰楄秴杩�100MB");
+        }
+        projectInfoService.importProject(file);
+        return Result.ok();
+    }
+
+    @PostMapping("/editProject")
+    public Result editProject(@RequestBody ProjectForm form) {
+        return projectInfoService.editProject(form);
+    }
+
+
+
 }

--
Gitblit v1.8.0