修改图片路径
This commit is contained in:
parent
641cfceb9f
commit
24e6545e01
@ -53,7 +53,7 @@ public class PictureController {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<PictureEntity> 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);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class SpecController {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<SpecEntity> 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);
|
||||
}
|
||||
|
@ -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 + '\'' + '}';
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user