当前位置: 首页>>代码示例>>Java>>正文


Java DocumentService.saveDocumentNotes方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.service.DocumentService.saveDocumentNotes方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentService.saveDocumentNotes方法的具体用法?Java DocumentService.saveDocumentNotes怎么用?Java DocumentService.saveDocumentNotes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.service.DocumentService的用法示例。


在下文中一共展示了DocumentService.saveDocumentNotes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addPurchaseOrderNote

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
public void addPurchaseOrderNote(DocumentRouteLevelChange levelChangeEvent) {

        String newNodeName = levelChangeEvent.getNewNodeName();
        if (newNodeName != null
                && (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE) || newNodeName
                .equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET))) {
            String note = "";
            if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)){
                note = OLEConstants.SufficientFundCheck.PO_NOTE;
            }
            if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)){
                note = OLEConstants.SufficientFundCheck.FYI_NOTE;
            }
            DocumentService documentService = SpringContext.getBean(DocumentService.class);
            Note apoNote = documentService.createNoteFromDocument(this, note);
            this.addNote(apoNote);
            documentService.saveDocumentNotes(this);
        }

    }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:21,代码来源:OlePurchaseOrderDocument.java

示例2: doRouteLevelChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.kns.document.DocumentBase#handleRouteLevelChange(org.kuali.rice.kew.clientapp.vo.DocumentRouteLevelChangeDTO)
 */
@Override
public void doRouteLevelChange(DocumentRouteLevelChange change) {
    LOG.debug("handleRouteLevelChange() started");
    super.doRouteLevelChange(change);
    try {
        String newNodeName = change.getNewNodeName();
        if (StringUtils.isNotBlank(newNodeName)) {
            RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
                    .createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
            List<String> desiredActions = new ArrayList<String>(2);
            desiredActions.add(ActionRequestType.APPROVE.getCode());
            desiredActions.add(ActionRequestType.COMPLETE.getCode());
            String note = "";
            if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
                    || newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
                if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)) {
                    note = OLEConstants.SufficientFundCheck.REQ_NOTE;
                }
                if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
                    note = OLEConstants.SufficientFundCheck.FYI_NOTE;
                }
                DocumentService documentService = SpringContext.getBean(DocumentService.class);
                Note apoNote = documentService.createNoteFromDocument(this, note);
                this.addNote(apoNote);
                documentService.saveDocumentNotes(this);

            }
        }
    } catch (Exception e) {
        String errorMsg = "Workflow Error found checking actions requests on document with id "
                + getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
        LOG.error(errorMsg, e);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:38,代码来源:OleRequisitionDocument.java

示例3: doRouteLevelChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.document.DocumentBase#doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)
 */
@Override
public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) {

    super.doRouteLevelChange(levelChangeEvent);
    try {
        String newNodeName = levelChangeEvent.getNewNodeName();
        List<String> desiredActions = new ArrayList<String>(2);
        RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
                .createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
        desiredActions.add(ActionRequestType.APPROVE.getCode());
        desiredActions.add(ActionRequestType.COMPLETE.getCode());
        if (KewApiServiceLocator.getWorkflowDocumentActionsService().documentWillHaveAtLeastOneActionRequest(
                reportCriteria.build(), desiredActions, false)) {
            if (StringUtils.isNotBlank(newNodeName)) {
                if (StringUtils.isNotBlank(newNodeName)) {
                    if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
                            || newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
                        String note = OLEConstants.SufficientFundCheck.PREQ_NOTE;
                        DocumentService documentService = SpringContext.getBean(DocumentService.class);
                        Note apoNote = documentService.createNoteFromDocument(this, note);
                        this.addNote(apoNote);
                        documentService.saveDocumentNotes(this);
                    }
                }
            }
        }
    } catch (Exception e) {
        String errorMsg = "Workflow Error found checking actions requests on document with id "
                + getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
        LOG.error(errorMsg, e);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:36,代码来源:OlePaymentRequestDocument.java

示例4: addPurchaseOrderNote

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
public void addPurchaseOrderNote(DocumentRouteLevelChange levelChangeEvent) {

        String newNodeName = levelChangeEvent.getNewNodeName();
        RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
                .createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
        if (newNodeName != null
                && (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE) || newNodeName
                .equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET))) {
            String note = "";
            if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)){
                 note = OLEConstants.SufficientFundCheck.POA_NOTE;
            }
            if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)){
                note = OLEConstants.SufficientFundCheck.FYI_NOTE;
            }
            DocumentService documentService = SpringContext.getBean(DocumentService.class);
            Note apoNote = documentService.createNoteFromDocument(this, note);
            this.addNote(apoNote);
            String documentTypeName = this.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
            if (documentTypeName != null
                    && documentTypeName.equals(OLEConstants.FinancialDocumentTypeCodes.PURCHASE_ORDER_AMENDMENT)) {
                documentService.saveDocumentNotes(this);
            }

        }

    }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:28,代码来源:OlePurchaseOrderAmendmentDocument.java

示例5: doRouteLevelChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.document.DocumentBase#doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)
 */
@Override
public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) {

    super.doRouteLevelChange(levelChangeEvent);
    try {
        String newNodeName = levelChangeEvent.getNewNodeName();
        List<String> desiredActions = new ArrayList<String>(2);
        RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
                .createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
        desiredActions.add(ActionRequestType.APPROVE.getCode());
        desiredActions.add(ActionRequestType.FYI.getCode());
        desiredActions.add(ActionRequestType.COMPLETE.getCode());
        if (KewApiServiceLocator.getWorkflowDocumentActionsService().documentWillHaveAtLeastOneActionRequest(
                reportCriteria.build(), desiredActions, false)) {
            if (StringUtils.isNotBlank(newNodeName)) {
                if (StringUtils.isNotBlank(newNodeName)) {
                    if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
                            || newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
                        String note = "";
                        if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)) {
                            note = OLEConstants.SufficientFundCheck.INV_NOTE;
                        }
                        if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
                            note = OLEConstants.SufficientFundCheck.FYI_NOTE;
                        }
                        DocumentService documentService = SpringContext.getBean(DocumentService.class);
                        Note apoNote = documentService.createNoteFromDocument(this, note);
                        this.addNote(apoNote);
                        documentService.saveDocumentNotes(this);
                    }
                }
            }
        }
    } catch (Exception e) {
        String errorMsg = "Workflow Error found checking actions requests on document with id "
                + getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
        LOG.error(errorMsg, e);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:43,代码来源:OleInvoiceDocument.java


注:本文中的org.kuali.rice.krad.service.DocumentService.saveDocumentNotes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。