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 @@