From 24e6545e01976a581fcd08dd701c7930ff50b07c Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 2 Mar 2022 16:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/controller/PictureController.java | 2 +- .../java/com/xkrs/controller/SpecController.java | 2 +- src/main/java/com/xkrs/model/entity/DataSource.java | 12 +----------- src/main/java/com/xkrs/util/ExcelUploadUtil.java | 2 ++ 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/xkrs/controller/PictureController.java b/src/main/java/com/xkrs/controller/PictureController.java index 2fce3fd..98302a2 100644 --- a/src/main/java/com/xkrs/controller/PictureController.java +++ b/src/main/java/com/xkrs/controller/PictureController.java @@ -53,7 +53,7 @@ public class PictureController { Locale locale = LocaleContextHolder.getLocale(); List pictureEntities = pictureQuery.selectPicture(lotNo, machineNo, materialNo, modelNo, machineTypeNo,craftItemName); if (pictureEntities.isEmpty()) { - return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的图片!", locale); + return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该图片!", locale); } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, pictureEntities, locale); } diff --git a/src/main/java/com/xkrs/controller/SpecController.java b/src/main/java/com/xkrs/controller/SpecController.java index 37165b2..645eefd 100644 --- a/src/main/java/com/xkrs/controller/SpecController.java +++ b/src/main/java/com/xkrs/controller/SpecController.java @@ -47,7 +47,7 @@ public class SpecController { Locale locale = LocaleContextHolder.getLocale(); List specEntities = specQuery.selectSpec(machineTypeNo, inspectionItemCode, craftItemName); if (specEntities.isEmpty()) { - return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的规格信息!", locale); + return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该规格信息!", locale); } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, specEntities, locale); } diff --git a/src/main/java/com/xkrs/model/entity/DataSource.java b/src/main/java/com/xkrs/model/entity/DataSource.java index 07f6f0f..8b17eb0 100644 --- a/src/main/java/com/xkrs/model/entity/DataSource.java +++ b/src/main/java/com/xkrs/model/entity/DataSource.java @@ -143,16 +143,6 @@ public class DataSource { @Override public String toString() { - return "DataSource{" + - "id=" + id + - ", lotNo='" + lotNo + '\'' + - ", machineNo='" + machineNo + '\'' + - ", materialNo='" + materialNo + '\'' + - ", modelNo='" + modelNo + '\'' + - ", machineTypeNo='" + machineTypeNo + '\'' + - ", inspectionItemCode='" + inspectionItemCode + '\'' + - ", craftItemName='" + craftItemName + '\'' + - ", inspectValue='" + inspectValue + '\'' + - '}'; + return "DataSource{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", machineTypeNo='" + machineTypeNo + '\'' + ", inspectionItemCode='" + inspectionItemCode + '\'' + ", craftItemName='" + craftItemName + '\'' + ", inspectValue='" + inspectValue + '\'' + '}'; } } diff --git a/src/main/java/com/xkrs/util/ExcelUploadUtil.java b/src/main/java/com/xkrs/util/ExcelUploadUtil.java index 8db6ee8..c6f94a2 100644 --- a/src/main/java/com/xkrs/util/ExcelUploadUtil.java +++ b/src/main/java/com/xkrs/util/ExcelUploadUtil.java @@ -39,10 +39,12 @@ public class ExcelUploadUtil { String suffix = originalFilename.substring(index); //uuid生成新的文件名 String newName = UUID.randomUUID().toString() + suffix; +// File file = new File("/Users/liuchengqian/Desktop/DaJiang/" + subDir); File file = new File("/home/sxy/server/industrial_measurement/" + subDir); if (!file.exists()) { file.mkdirs(); } +// String path = "/Users/liuchengqian/Desktop/DaJiang/" + subDir + newName; String path = "/home/sxy/server/industrial_measurement/" + subDir + newName; //实现上传 fileInput.transferTo(new File(path));