From d0d0052496f9d8cfbf4d14b1f6251e0be9476a92 Mon Sep 17 00:00:00 2001 From: liuliang <401809302@qq.com> Date: Tue, 27 May 2025 10:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/controller/JclUpLoadFileController.java | 4 ++-- .../seconddev/jcl/organization/service/UploadService.java | 4 ++-- .../jcl/organization/service/impl/UploadServiceImpl.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/JclUpLoadFileController.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/JclUpLoadFileController.java index 6fc6b93..09f1655 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/JclUpLoadFileController.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/controller/JclUpLoadFileController.java @@ -58,12 +58,12 @@ public class JclUpLoadFileController extends BaseCommonController { @WeaPermission(publicPermission = true) @GetMapping("/jcluploadFile") @ResponseBody - public WeaResult> uploadTest(@RequestParam("fileId") String fileId,@RequestParam("tableName") String tableName){ + public WeaResult> uploadTest(@RequestParam("fileId") String fileId,@RequestParam("tableName") String tableName,@RequestParam("folderId") String folderId){ Map returnMap = Maps.newHashMap(); try { String sql = "select * from fileobj where id in ("+fileId+")"; List> list = databaseUtils.getSqlList(sql); - returnMap = uploadService.jcluploadFile(list,tableName,getCurrentUser()); + returnMap = uploadService.jcluploadFile(list,tableName,folderId,getCurrentUser()); }catch (Exception e){ log.error("error msg :[{}]",e); diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/UploadService.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/UploadService.java index 722a584..8c50843 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/UploadService.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/UploadService.java @@ -8,10 +8,10 @@ import java.util.Map; public interface UploadService { - Map uploadFile(Map fileMap, ModuleSource module, Long refId, SimpleEmployee employee, String chunks); + Map uploadFile(Map fileMap,String folderId, ModuleSource module, Long refId, SimpleEmployee employee, String chunks); Map importData(List> dataList,String tableName,SimpleEmployee employee); - Map jcluploadFile(List> list,String tableName,SimpleEmployee employee) throws Exception; + Map jcluploadFile(List> list,String tableName,String folderId,SimpleEmployee employee) throws Exception; } diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/UploadServiceImpl.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/UploadServiceImpl.java index cb70913..1bd6bc3 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/UploadServiceImpl.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/UploadServiceImpl.java @@ -63,7 +63,7 @@ public class UploadServiceImpl implements UploadService { @Override - public Map jcluploadFile(List> list,String tableName,SimpleEmployee employee) throws Exception { + public Map jcluploadFile(List> list,String tableName,String folderId,SimpleEmployee employee) throws Exception { Map returnMap = Maps.newHashMap(); List> importList = Lists.newArrayList(); for (Map resultMap:list){ @@ -110,7 +110,7 @@ public class UploadServiceImpl implements UploadService { String fileName = dataList.get(rowNum-1).get(titles.get(colNum)); fileMap.put("filename",fileName); - Map fileUploadMap = uploadFile(fileMap,ModuleSource.ebuildercard,0L,employee,null); + Map fileUploadMap = uploadFile(fileMap,folderId,ModuleSource.ebuildercard,0L,employee,null); long docId = ((FileObj)fileUploadMap.get("fileObj")).getDocId(); dataList.get(rowNum-1).put(titles.get(colNum),String.valueOf(docId)); Map updataMap = Maps.newHashMap(); @@ -127,7 +127,7 @@ public class UploadServiceImpl implements UploadService { return returnMap; } - public Map uploadFile(Map fileMap, ModuleSource module, Long refId, SimpleEmployee employee, String chunks) { + public Map uploadFile(Map fileMap,String folderId, ModuleSource module, Long refId, SimpleEmployee employee, String chunks) { File data = null; try{ data = File.createTempFile(UUID.randomUUID().toString(),null); @@ -200,7 +200,7 @@ public class UploadServiceImpl implements UploadService { try{ fileObj = remoteUploadService.saveFile(employee.getTenantKey(), fileObj, Files.readAllBytes(data.toPath())); //生成附件文档 - fileObj.setDocId(docClientService.fileCreateDoc(fileObj.getFileid(),8444718832337138266L,employee.getId(),EntityType.valueOf(module.toString()),employee.getTenantKey())); + fileObj.setDocId(docClientService.fileCreateDoc(fileObj.getFileid(),Long.valueOf(folderId),employee.getId(),EntityType.valueOf(module.toString()),employee.getTenantKey())); //fileObj.setDocId(docClientService.postFileUploadReId(fileObj, employee, new Date(), EntityType.valueOf(module.toString()))); fileClientService.update(fileObj); } catch (Exception e) {