| | |
| | | ExceptionCast.cast(DocumentCode.DOC_CLASS_ERROR); |
| | | String fileName = FileUtilS.getFilenameNonSuffix(file.getOriginalFilename()); |
| | | String fileNameAll = file.getOriginalFilename(); |
| | | DocInfo en = findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId()); |
| | | List<DocInfo> docInfoList = super.getBaseMapper().findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId()); |
| | | //针对存在的处理 |
| | | if(en != null) |
| | | ExceptionCast.cast(DocumentCode.DOC_IS_EXIST); |
| | | if(docInfoList != null){ |
| | | docInfoList.forEach(item->{ |
| | | if (item.getClassificationId().equals(docClass.getClassificationId())) { |
| | | ExceptionCast.cast(DocumentCode.DOC_IS_EXIST); |
| | | } |
| | | }); |
| | | } |
| | | FileUploadResult fileUploadResult = FileUtilS.uploadFile(file); |
| | | if(fileUploadResult == null) |
| | | ExceptionCast.cast(DocumentCode.DOC_UPLOAD_ERROR); |