修改图片路径
This commit is contained in:
parent
641cfceb9f
commit
24e6545e01
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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 + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user