修改图片路径

This commit is contained in:
liuchengqian 2022-03-02 16:36:33 +08:00
parent 641cfceb9f
commit 24e6545e01
4 changed files with 5 additions and 13 deletions

View File

@ -53,7 +53,7 @@ public class PictureController {
Locale locale = LocaleContextHolder.getLocale(); Locale locale = LocaleContextHolder.getLocale();
List<PictureEntity> pictureEntities = pictureQuery.selectPicture(lotNo, machineNo, materialNo, modelNo, machineTypeNo,craftItemName); List<PictureEntity> pictureEntities = pictureQuery.selectPicture(lotNo, machineNo, materialNo, modelNo, machineTypeNo,craftItemName);
if (pictureEntities.isEmpty()) { if (pictureEntities.isEmpty()) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的图片!", locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该图片!", locale);
} }
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, pictureEntities, locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, pictureEntities, locale);
} }

View File

@ -47,7 +47,7 @@ public class SpecController {
Locale locale = LocaleContextHolder.getLocale(); Locale locale = LocaleContextHolder.getLocale();
List<SpecEntity> specEntities = specQuery.selectSpec(machineTypeNo, inspectionItemCode, craftItemName); List<SpecEntity> specEntities = specQuery.selectSpec(machineTypeNo, inspectionItemCode, craftItemName);
if (specEntities.isEmpty()) { if (specEntities.isEmpty()) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的规格信息!", locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该规格信息!", locale);
} }
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, specEntities, locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, specEntities, locale);
} }

View File

@ -143,16 +143,6 @@ public class DataSource {
@Override @Override
public String toString() { public String toString() {
return "DataSource{" + return "DataSource{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", machineTypeNo='" + machineTypeNo + '\'' + ", inspectionItemCode='" + inspectionItemCode + '\'' + ", craftItemName='" + craftItemName + '\'' + ", inspectValue='" + inspectValue + '\'' + '}';
"id=" + id +
", lotNo='" + lotNo + '\'' +
", machineNo='" + machineNo + '\'' +
", materialNo='" + materialNo + '\'' +
", modelNo='" + modelNo + '\'' +
", machineTypeNo='" + machineTypeNo + '\'' +
", inspectionItemCode='" + inspectionItemCode + '\'' +
", craftItemName='" + craftItemName + '\'' +
", inspectValue='" + inspectValue + '\'' +
'}';
} }
} }

View File

@ -39,10 +39,12 @@ public class ExcelUploadUtil {
String suffix = originalFilename.substring(index); String suffix = originalFilename.substring(index);
//uuid生成新的文件名 //uuid生成新的文件名
String newName = UUID.randomUUID().toString() + suffix; 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); File file = new File("/home/sxy/server/industrial_measurement/" + subDir);
if (!file.exists()) { if (!file.exists()) {
file.mkdirs(); file.mkdirs();
} }
// String path = "/Users/liuchengqian/Desktop/DaJiang/" + subDir + newName;
String path = "/home/sxy/server/industrial_measurement/" + subDir + newName; String path = "/home/sxy/server/industrial_measurement/" + subDir + newName;
//实现上传 //实现上传
fileInput.transferTo(new File(path)); fileInput.transferTo(new File(path));