54 lines
1.6 KiB
Java
54 lines
1.6 KiB
Java
package com.tenwa.flow.action.comm;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO;
|
|
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO;
|
|
|
|
import com.amarsoft.are.jbo.BizObject;
|
|
import com.amarsoft.are.jbo.BizObjectManager;
|
|
import com.amarsoft.are.jbo.JBOException;
|
|
import com.amarsoft.are.jbo.JBOFactory;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
import com.amarsoft.awe.util.Transaction;
|
|
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
|
|
|
public class SelectBalance {
|
|
private String distributor_no;
|
|
private String caution_money;
|
|
public String getDistributor_no() {
|
|
return distributor_no;
|
|
}
|
|
public void setDistributor_no(String distributor_no) {
|
|
this.distributor_no = distributor_no;
|
|
}
|
|
|
|
public String getCaution_money() {
|
|
return caution_money;
|
|
}
|
|
public void setCaution_money(String caution_money) {
|
|
this.caution_money = caution_money;
|
|
}
|
|
|
|
|
|
public String runs(JBOTransaction tx) throws Exception{
|
|
Transaction scql=Transaction.createTransaction(tx);
|
|
String money="";
|
|
Map<String,String> params= new HashMap<String,String>();
|
|
params.put("distributor_id", distributor_no);
|
|
//params.put("caution_money", caution_money);
|
|
String sql="SELECT O.distributor_id,O.caution_money AS money "
|
|
+ "FROM D_DEPOSITCHARGE_INFO O WHERE "
|
|
+ "O.distributor_id=:distributor_id GROUP BY O.distributor_id";
|
|
List<Map<String,String>> getSql = DataOperatorUtil.getDataBySql(scql, sql, params);
|
|
//if(aaa.size()>0){
|
|
money=getSql.get(0).get("money");
|
|
//}
|
|
return money;
|
|
}
|
|
}
|
|
|