|
@@ -103,6 +103,22 @@ public class TFurnancePressureController extends BaseController
|
|
@RequestParam("isInlet") boolean isInlet,
|
|
@RequestParam("isInlet") boolean isInlet,
|
|
@RequestParam("pType") String pType,
|
|
@RequestParam("pType") String pType,
|
|
@RequestParam("pId") String pId) throws IOException {
|
|
@RequestParam("pId") String pId) throws IOException {
|
|
|
|
+ // 上传图片
|
|
|
|
+ if (file.isEmpty())
|
|
|
|
+ {
|
|
|
|
+ return AjaxResult.error("上传失败,文件为空!");
|
|
|
|
+ }
|
|
|
|
+ String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/"+ pType), file);
|
|
|
|
+ long size = file.getSize()/1024;
|
|
|
|
+ TCommonfile tCommonfile = new TCommonfile();
|
|
|
|
+ tCommonfile.setFileUrl(url);
|
|
|
|
+ tCommonfile.setFileName(file.getOriginalFilename());
|
|
|
|
+ tCommonfile.setCreaterCode(String.valueOf(getUserId()));
|
|
|
|
+ tCommonfile.setpId(Long.parseLong(pId));
|
|
|
|
+ tCommonfile.setpType(pType);
|
|
|
|
+ tCommonfile.setFileSize(String.valueOf(size));
|
|
|
|
+ tCommonfileService.insertTCommonfile(tCommonfile);
|
|
|
|
+
|
|
// 判断图片中的压力仪表数量
|
|
// 判断图片中的压力仪表数量
|
|
int num = 0;
|
|
int num = 0;
|
|
switch (furnanceName) {
|
|
switch (furnanceName) {
|
|
@@ -256,22 +272,6 @@ public class TFurnancePressureController extends BaseController
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- // 上传图片
|
|
|
|
- if (file.isEmpty())
|
|
|
|
- {
|
|
|
|
- return AjaxResult.error("上传失败,文件为空!");
|
|
|
|
- }
|
|
|
|
- String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/"+ pType), file);
|
|
|
|
- long size = file.getSize()/1024;
|
|
|
|
- TCommonfile tCommonfile = new TCommonfile();
|
|
|
|
- tCommonfile.setFileUrl(url);
|
|
|
|
- tCommonfile.setFileName(file.getOriginalFilename());
|
|
|
|
- tCommonfile.setCreaterCode(String.valueOf(getUserId()));
|
|
|
|
- tCommonfile.setpId(Long.parseLong(pId));
|
|
|
|
- tCommonfile.setpType(pType);
|
|
|
|
- tCommonfile.setFileSize(String.valueOf(size));
|
|
|
|
- tCommonfileService.insertTCommonfile(tCommonfile);
|
|
|
|
-
|
|
|
|
//组装返回
|
|
//组装返回
|
|
JSONObject returnObj = new JSONObject();
|
|
JSONObject returnObj = new JSONObject();
|
|
returnObj.put("readings", newArray);
|
|
returnObj.put("readings", newArray);
|