| | |
| | | return this.error(DocumentCode.DOCUMENT_OPERATE_FAIL.getValue(), DocumentCode.DOCUMENT_OPERATE_FAIL.getText() + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 文档历史版本 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/document-history/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String findDocumentHistory(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_DOCUMENT_COLLECTION); |
| | | return OK_List(documentService.findDocumentHistory(fse.getUUID())); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(DocumentCode.DOCUMENT_OPERATE_FAIL.getValue(), DocumentCode.DOCUMENT_OPERATE_FAIL.getText() + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 文档最新版本保存 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/document-save-new-version/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String documentSaveNewVersion(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_DOCUMENT_COLLECTION); |
| | | if (documentService.documentSaveNewVersion(fse)) { |
| | | return OK(); |
| | | } |
| | | return error(DocumentCode.DOCUMENT_SAVE_NEW_VERION_FAIL.getValue(), DocumentCode.DOCUMENT_SAVE_NEW_VERION_FAIL.getText()); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(DocumentCode.DOCUMENT_OPERATE_FAIL.getValue(), DocumentCode.DOCUMENT_OPERATE_FAIL.getText() + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/getApplyDocument/{version}", method = RequestMethod.POST) |