Showing
3 changed files
with
7 additions
and
7 deletions
| ... | @@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer | ... | @@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer |
| 78 | ++i; | 78 | ++i; |
| 79 | } | 79 | } |
| 80 | }catch(Exception ex){ | 80 | }catch(Exception ex){ |
| 81 | - //如果上传过程中存在失败,则所有已上传的文件进行删除 | 81 | + //如果上传过程中存在失败,则所有已上传的文件进行删除,已上传文件不进行删除 |
| 82 | - attachmentUtil.deleteAttachments(attachmentList); | 82 | +// attachmentUtil.deleteAttachments(attachmentList); |
| 83 | throw ex; | 83 | throw ex; |
| 84 | } | 84 | } |
| 85 | return attachmentList; | 85 | return attachmentList; | ... | ... |
| ... | @@ -132,15 +132,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS | ... | @@ -132,15 +132,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS |
| 132 | consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user); | 132 | consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user); |
| 133 | }catch(OpErrorException ex){ | 133 | }catch(OpErrorException ex){ |
| 134 | /** | 134 | /** |
| 135 | - * 提交异常,需要删除对应已上传附件 | 135 | + * 提交异常,需要删除对应已上传附件,已上传文件不进行删除 |
| 136 | */ | 136 | */ |
| 137 | - attachmentService.deleteAttachments(attachmentList); | 137 | +// attachmentService.deleteAttachments(attachmentList); |
| 138 | throw ex; | 138 | throw ex; |
| 139 | }catch(Exception ex){ | 139 | }catch(Exception ex){ |
| 140 | /** | 140 | /** |
| 141 | - * 提交异常,需要删除对应已上传附件 | 141 | + * 提交异常,需要删除对应已上传附件,已上传文件不进行删除 |
| 142 | */ | 142 | */ |
| 143 | - attachmentService.deleteAttachments(attachmentList); | 143 | +// attachmentService.deleteAttachments(attachmentList); |
| 144 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30016,ex); | 144 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30016,ex); |
| 145 | } | 145 | } |
| 146 | return responseUtils.success(ResponseCode.MESSAGE_CODE_30015); | 146 | return responseUtils.success(ResponseCode.MESSAGE_CODE_30015); | ... | ... |
| ... | @@ -35,7 +35,7 @@ public class AttachmentValidate { | ... | @@ -35,7 +35,7 @@ public class AttachmentValidate { |
| 35 | public void validateFile(MultipartFile[] files, ConsignmentBo consignmentBo){ | 35 | public void validateFile(MultipartFile[] files, ConsignmentBo consignmentBo){ |
| 36 | //文件为空 | 36 | //文件为空 |
| 37 | if(Objects.isNull(files) | 37 | if(Objects.isNull(files) |
| 38 | - || files.length == DigitConstants.DIGIT_MINUS_ONE | 38 | + || files.length == DigitConstants.DIGIT_ZERO |
| 39 | || Objects.isNull(consignmentBo) | 39 | || Objects.isNull(consignmentBo) |
| 40 | || Objects.isNull(consignmentBo.getAttachmentBizTypeList())){ | 40 | || Objects.isNull(consignmentBo.getAttachmentBizTypeList())){ |
| 41 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30006); | 41 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30006); | ... | ... |
-
Please register or login to post a comment