From 10fb5830513c4cbf09663176008305848709fa63 Mon Sep 17 00:00:00 2001 From: chengli <783535094@qq.com> Date: Thu, 7 Jul 2022 22:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=BA=A6=E5=92=8C=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=89=B9=E9=87=8F~~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataMigrationController.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java index 37d2569c..75f063ab 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java @@ -57,7 +57,18 @@ public class DataMigrationController { */ @Mapping("com.actionsoft.apps.coe.pal.systemImport_process_attribute_import") public String processattributeimport(UserContext me,String wsId,String groupValue,String fileValue,String fileName){ - new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,fileName); + //new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,fileName); + Thread thread =new Thread(new Runnable() { + @Override + public void run() { + String[] fileNameArr = fileName.split(","); + for(String name : fileNameArr){ + new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,name); + } + } + }); + thread.setPriority(8); + thread.start(); ResponseObject ro = ResponseObject.newOkResponse(); return ro.toString(); } @@ -73,8 +84,18 @@ public class DataMigrationController { */ @Mapping("com.actionsoft.apps.coe.pal.formImport_process_attribute_import") public String formattributeimport(UserContext me,String wsId,String groupValue,String fileValue,String fileName){ - new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName); - //new DataMigrationWeb().translateDocToTable(me,wsId,groupValue,fileValue,fileName); + //new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName); + Thread thread =new Thread(new Runnable() { + @Override + public void run() { + String[] fileNameArr = fileName.split(","); + for(String name : fileNameArr){ + new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName); + } + } + }); + thread.setPriority(8); + thread.start(); ResponseObject ro = ResponseObject.newOkResponse(); return ro.toString(); }