apzl_leasing/src_tenwa/com/tenwa/controller/LAElementConfigController.java
2018-06-03 22:26:41 +08:00

44 lines
1.3 KiB
Java

package com.tenwa.controller;
import jbo.com.tenwa.limit.LA_LIMIT_ELEMENT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class LAElementConfigController {
private String ElementId;
public String getElementId() {
return ElementId;
}
public void setElementId(String elementId) {
ElementId = elementId;
}
/**
* 根据要素id查询取值相关属性
* @param tx
* @return
* @throws Exception
*/
public String queryProductElement(JBOTransaction tx)throws Exception {
BizObjectManager lleManager = JBOFactory.getBizObjectManager(LA_LIMIT_ELEMENT.CLASS_NAME,tx);
BizObject lle = lleManager.createQuery("ID=:id ").setParameter("id",ElementId).getSingleResult(false);
if(lle!=null){
String valueType= lle.getAttribute("VALUE_TYPE").toString();
String valueSource= lle.getAttribute("VALUE_SOURCE").toString();
if(valueSource==null || valueSource.equalsIgnoreCase("null")){
valueSource="";
}
String valueDefine= lle.getAttribute("VALUE_DEFINE").toString();
if(valueDefine==null || valueDefine.equalsIgnoreCase("null")){
valueDefine="";
}
return valueType+"@"+valueSource+"@"+valueDefine;
}
return "";
}
}