| | |
| | | String fileType = json.getString("fileType"); |
| | | String description = json.getString("description"); |
| | | String type = json.getString("type"); |
| | | // 文件变更 |
| | | // 文件变更 |
| | | if (isFileChange) { |
| | | if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // 情形一、从文件管理中选择 |
| | |
| | | specialtyInspectionPlanDetailService.save(specialtyInspectionPlanDetail); |
| | | } |
| | | |
| | | boolean isFileChange = json.getBoolean("isFileChange"); |
| | | String uploadId = json.getString("uploadId"); |
| | | String fileType = json.getString("fileType"); |
| | | String description = json.getString("description"); |
| | | String type = json.getString("type"); |
| | | // 文件变更 |
| | | if (isFileChange) { |
| | | if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // 情形一、从文件管理中选择 |
| | | // uploadRelaService.saveOrUpdateUploadRale(partRouteFile.getId(), partRouteFile.getType(), uploadId); |
| | | } else { |
| | | // 情形二、重新上传 |
| | | // 1、持久upload |
| | | MultipartFile multipartFile = request.getFile("file"); |
| | | List<MultipartFile> multipartFileList = new ArrayList<>(); |
| | | multipartFileList.add(multipartFile); |
| | | // List<SysUpload> sysUploads = uploadService.batchUploadFile(fileType, multipartFileList, description); |
| | | List<SysUpload> sysUploads = sysBaseApi.batchUploadFile(fileType, multipartFileList, description); |
| | | // 2、创建/修改 uploadRela |
| | | // 注:当前视为单文件上传控制,后续可能会有单个产品工艺文件对应多个上传文件的升级调整,修改后注意更细此段注释 |
| | | // uploadRelaService.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | sysBaseApi.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | } |
| | | } |
| | | // boolean isFileChange = json.getBoolean("isFileChange"); |
| | | // String uploadId = json.getString("uploadId"); |
| | | // String fileType = json.getString("fileType"); |
| | | // String description = json.getString("description"); |
| | | // String type = json.getString("type"); |
| | | // // 文件变更 |
| | | // if (isFileChange) { |
| | | // if (StrUtils.isNotBlankOrNull(uploadId)) { |
| | | // // 情形一、从文件管理中选择 |
| | | //// uploadRelaService.saveOrUpdateUploadRale(partRouteFile.getId(), partRouteFile.getType(), uploadId); |
| | | // } else { |
| | | // // 情形二、重新上传 |
| | | // // 1、持久upload |
| | | // MultipartFile multipartFile = request.getFile("file"); |
| | | // List<MultipartFile> multipartFileList = new ArrayList<>(); |
| | | // multipartFileList.add(multipartFile); |
| | | //// List<SysUpload> sysUploads = uploadService.batchUploadFile(fileType, multipartFileList, description); |
| | | // List<SysUpload> sysUploads = sysBaseApi.batchUploadFile(fileType, multipartFileList, description); |
| | | // // 2、创建/修改 uploadRela |
| | | // // 注:当前视为单文件上传控制,后续可能会有单个产品工艺文件对应多个上传文件的升级调整,修改后注意更细此段注释 |
| | | //// uploadRelaService.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | // sysBaseApi.saveOrUpdateUploadRale(specialtyInspectionPlan.getId(), type, sysUploads.get(0).getId()); |
| | | // } |
| | | // } |
| | | |
| | | return Result.ok("上传成功!"); |
| | | } |