public Object run(Transaction Sqlca) throws Exception{
String sObjectNo = (String)this.getAttribute(“ObjectNo”);
if(sObjectNo == null) sObjectNo = “”;
String tt=””;
BizObjectManager m = JBOFactory.getFactory().getManager(“jbo.app.CL_APPLY”);
BizObject jboContract = m.createQuery(“SerialNo = “” + sObjectNo + “””).getSingleResult();
String sOrgID=jboContract.getAttribute(“OPERATEORGID”).getString();
String sBusinessType=jboContract.getAttribute(“BusinessType”).getString();
String sSql = “select AUTHLIMITSUMUP from cl_orglimitauth where ASSETSCUSTOMERID =:OrgID and TYPENO=:BusinessType”;
ASResultSet rs=Sqlca.getASResultSet(new SqlObject(sSql).setParameter(“OrgID”,sOrgID).setParameter(“BusinessType”, sBusinessType));
if(rs.next()){
Double dAuthBusinessSum = rs.getDouble(“AUTHLIMITSUMUP”);
tt= “1”;
}else {
tt= “0”;
}
rs.getStatement().close();
return tt;
}
}
String sObjectNo = (String)this.getAttribute(“ObjectNo”);
if(sObjectNo == null) sObjectNo = “”;
String tt=””;
BizObjectManager m = JBOFactory.getFactory().getManager(“jbo.app.CL_APPLY”);
BizObject jboContract = m.createQuery(“SerialNo = “” + sObjectNo + “””).getSingleResult();
String sOrgID=jboContract.getAttribute(“OPERATEORGID”).getString();
String sBusinessType=jboContract.getAttribute(“BusinessType”).getString();
String sSql = “select AUTHLIMITSUMUP from cl_orglimitauth where ASSETSCUSTOMERID =:OrgID and TYPENO=:BusinessType”;
ASResultSet rs=Sqlca.getASResultSet(new SqlObject(sSql).setParameter(“OrgID”,sOrgID).setParameter(“BusinessType”, sBusinessType));
if(rs.next()){
Double dAuthBusinessSum = rs.getDouble(“AUTHLIMITSUMUP”);
tt= “1”;
}else {
tt= “0”;
}
rs.getStatement().close();
return tt;
}
}
解决方案
40
可以参考一下java.util.Iterator。