From 60a4d88f5ef855cfbe19cba51113d98ebf9f1c3d Mon Sep 17 00:00:00 2001 From: chuang <994001556@qq.com> Date: Wed, 22 Mar 2023 14:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95-=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BDbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 4 +- .../java/jnpf/mobilePort/utils/FileCopy.java | 5 +- .../impl/PurchaseorderitemServiceImpl.java | 38 +++++---- .../purchaseorder/PurchaseorderMapper.xml | 84 +++---------------- 4 files changed, 38 insertions(+), 93 deletions(-) diff --git a/SC-boot/linkage-admin/src/main/resources/application.yml b/SC-boot/linkage-admin/src/main/resources/application.yml index 3392c6b6..3cde125b 100644 --- a/SC-boot/linkage-admin/src/main/resources/application.yml +++ b/SC-boot/linkage-admin/src/main/resources/application.yml @@ -3,8 +3,8 @@ spring: #环境 dev|test|pro|preview active: dev servlet: multipart: #文件传输配置 - max-file-size: 100MB #单个数据大小限制 - max-request-size: 100MB #请求总数据大小限制 + max-file-size: 1000MB #单个数据大小限制 + max-request-size: 1000MB #请求总数据大小限制 enabled: true #是否启用分段上传支持 mvc: hiddenmethod: #隐式方法过滤器 diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/mobilePort/utils/FileCopy.java b/SC-boot/linkage-scm/src/main/java/jnpf/mobilePort/utils/FileCopy.java index 1843e177..6c991c72 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/mobilePort/utils/FileCopy.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/mobilePort/utils/FileCopy.java @@ -79,6 +79,7 @@ public class FileCopy { MultipartFile multipartFile = new MultipartFileDto(file.getName(), file.getName(), ContentType.JSON.toString(), FileCopyUtils.copyToByteArray(input)); UtilsController utilsController = SpringContext.getBean(UtilsController.class); System.out.println(multipartFile.getName()); + Thread.sleep(1000); ActionResult annex = utilsController.uploader(multipartFile, "annex"); if (annex.getCode() == 200) { list.add(annex.getData()); @@ -261,7 +262,7 @@ public class FileCopy { String type = url.substring(16, i); // System.out.println("type"+type); // System.out.println("type.toLowerCase()"+type.toLowerCase()); - String fileId = map.get("name"); +// String fileId = map.get("name"); // 本地文件路径 String filePath = FilePathUtil.getFilePath(type.toLowerCase()) + fileName; // 获得图片的base64码 @@ -269,7 +270,7 @@ public class FileCopy { int[] imgWidthHeight = FileCopy.getImgWidthHeight(filePath); HashMap map1 = new HashMap<>(); map1.put("imgBase", imageBase); - map1.put("name", fileId); + map1.put("name", fileName); map1.put("filePath", filePath); if (imgWidthHeight != null) { map1.put("width", String.valueOf(imgWidthHeight[0])); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/service/impl/PurchaseorderitemServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/service/impl/PurchaseorderitemServiceImpl.java index dbc633c8..2879f116 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/service/impl/PurchaseorderitemServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/service/impl/PurchaseorderitemServiceImpl.java @@ -502,26 +502,33 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -