diff --git a/src_core/com/tenwa/officetempalte/controller/FindNotifyAction.java b/src_core/com/tenwa/officetempalte/controller/FindNotifyAction.java index 869930732..ddb3f9fc3 100644 --- a/src_core/com/tenwa/officetempalte/controller/FindNotifyAction.java +++ b/src_core/com/tenwa/officetempalte/controller/FindNotifyAction.java @@ -118,6 +118,8 @@ public class FindNotifyAction { } return attributeid; } + + //放款通知书 public static String findFileNameLoan(String projectId) throws JBOException{ BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); BizObject DOCRELATIVE=bom.createQuery("PROJ_ID=:porjectId and OBJECTTYPE='LoanNotice'").setParameter("porjectId",projectId).getSingleResult(false); @@ -146,4 +148,19 @@ public class FindNotifyAction { } return creatime; } + public static String findAttributeidLoan(String projectId) throws JBOException{ + String attributeid=""; + + BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); + BizObject DOCRELATIVE=bom.createQuery("PROJ_ID=:porjectId and OBJECTTYPE='LoanNotice'").setParameter("porjectId",projectId).getSingleResult(false); + + if(DOCRELATIVE!=null){ + String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString(); + BizObjectManager bom1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME); + String DOCLIBRARYid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString(); + BizObjectManager bom2=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME); + attributeid=bom2.createQuery("library_id=:library_id").setParameter("library_id", DOCLIBRARYid).getSingleResult(false).getAttribute("id").toString(); + } + return attributeid; + } } \ No newline at end of file