From c1219232f7d94282e3809291ac3eb3c51aa7931f Mon Sep 17 00:00:00 2001
From: 20918 <2091823062@qq.com>
Date: Wed, 15 May 2024 10:01:39 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E6=96=87=E4=BB=B6=E6=8E=A5?=
=?UTF-8?q?=E6=94=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../filemanager/TdFileProvideController.java | 12 +-
.../templates/system/filereceive/add.html | 191 +++++++++-------
.../templates/system/filereceive/edit.html | 193 ++++++++--------
.../system/filereceive/filereceive.html | 208 +++++++-----------
.../ruoyi/system/domain/TdFileReceive.java | 44 ++++
.../mapper/system/TdFileReceiveMapper.xml | 17 +-
6 files changed, 362 insertions(+), 303 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/filemanager/TdFileProvideController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/filemanager/TdFileProvideController.java
index 7c42917..fb8cf64 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/filemanager/TdFileProvideController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/filemanager/TdFileProvideController.java
@@ -8,6 +8,7 @@ import com.ruoyi.common.utils.sql.SqlUtil;
import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.framework.web.domain.server.Sys;
import com.ruoyi.system.domain.SysPost;
+import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ITdFileReceiveService;
@@ -103,8 +104,17 @@ public class TdFileProvideController extends BaseController
public AjaxResult addSave(TdFileProvide tdFileProvide)
{
tdFileProvide.setFileId("File_"+Seq.getId(Seq.commSeqType));
+ String[] tar = tdFileProvide.getTargetDepart().split(",");
+ for (String depart : tar) {
+ TdFileReceive tdFileReceive = new TdFileReceive();
+ tdFileReceive.setFileId(tdFileProvide.getFileId());
+ tdFileReceive.setFileName(tdFileProvide.getFileName());
+ tdFileReceive.setProvideDepart(tdFileProvide.getProvideDepart());
+ tdFileReceive.setProvideDate(tdFileProvide.getProvideDate());
+ tdFileReceive.setReceiveDepartid(depart);
+ tdFileReceiveService.insertTdFileReceive(tdFileReceive);
+ }
- System.out.println(tdFileProvide.getTargetDepart());
return toAjax(tdFileProvideService.insertTdFileProvide(tdFileProvide));
}
diff --git a/ruoyi-admin/src/main/resources/templates/system/filereceive/add.html b/ruoyi-admin/src/main/resources/templates/system/filereceive/add.html
index 19dd3f1..9418472 100644
--- a/ruoyi-admin/src/main/resources/templates/system/filereceive/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/filereceive/add.html
@@ -5,107 +5,128 @@