diff --git a/src/com/tenwa/channelportal/action/ContractSignAction.java b/src/com/tenwa/channelportal/action/ContractSignAction.java index 69cc2a0ce..5d9cdd23f 100644 --- a/src/com/tenwa/channelportal/action/ContractSignAction.java +++ b/src/com/tenwa/channelportal/action/ContractSignAction.java @@ -1384,9 +1384,15 @@ public void wordToPdfJar(JBOTransaction tx){ BizObjectManager customer = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME); BizObject lults = lult.createQuery("flowunid=:flowUnid").setParameter("flowUnid", FlowUnid).getSingleResult(false); BizObject cust = customer.createQuery("flowunid=:flowUnid and customerid=:customerid").setParameter("flowUnid", FlowUnid).setParameter("customerid", lults.getAttribute("customer_id").toString()).getSingleResult(false); - String customername = cust.getAttribute("FULLNAME").toString(); - String telephone = cust.getAttribute("mobile").toString(); - String ids = cust.getAttribute("CUSTOMERID").toString(); + String customername = null; + String telephone = null; + String ids =null; + + if(cust!=null){ + customername = cust.getAttribute("FULLNAME").toString(); + telephone = cust.getAttribute("mobile").toString(); + ids = cust.getAttribute("CUSTOMERID").toString(); + } BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); BizObjectManager attrBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx);