This commit is contained in:
linxiaoping 2018-06-26 20:12:21 +08:00
parent 56f55402f4
commit c463260ef2
2 changed files with 10 additions and 20 deletions

View File

@ -11,6 +11,7 @@
/* if(sPrevUrl == null) sPrevUrl = ""; */
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", sFlowUnid).getSingleResult(false);
String DISTRIBUTOR_NO=flow.getAttribute("Flow_Key").getString();
//String CAUTION_MONEY=flow.getAttribute("Flow_Key").getString();
String sTempletNo = "DDepositReturn_TempInfo";//--Ä£°åºÅ--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
/* doTemp.setColTips("", "²âÊÔ"); */
@ -48,7 +49,8 @@
function selectBalance(){
//var distributor_id = getItemValue(0,getRow(),'distributor_id');
//var CAUTION_MONEY = getItemValue(0,getRow(),'CAUTION_MONEY');
var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DISTRIBUTOR_NO%>");<%-- "distributor_no=<%=DISTRIBUTOR_NO%>" --%>/* +"&CAUTION_MONEY="+CAUTION_MONEY */
//alert(CAUTION_MONEY);
var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DISTRIBUTOR_NO%>");
setItemValue(0,0,"ACCOUNT_BALANCE",sReturn);
}

View File

@ -19,7 +19,7 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil;
public class SelectBalance {
private String distributor_no;
private String CAUTION_MONEY;
private String caution_money;
public String getDistributor_no() {
return distributor_no;
}
@ -27,11 +27,11 @@ public class SelectBalance {
this.distributor_no = distributor_no;
}
public String getCAUTION_MONEY() {
return CAUTION_MONEY;
public String getCaution_money() {
return caution_money;
}
public void setCAUTION_MONEY(String cAUTION_MONEY) {
CAUTION_MONEY = cAUTION_MONEY;
public void setCaution_money(String caution_money) {
this.caution_money = caution_money;
}
@ -40,27 +40,15 @@ public class SelectBalance {
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,SUM(CASE WHEN O.money_type='ÊÕ¿î' THEN O.caution_money ELSE -O.caution_money END) AS money "
+ "FROM D_DEPOSITCHARGE_INFO O WHERE "
+ "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;
/*BizObjectManager ddi = JBOFactory.getBizObjectManager(D_DEPOSITCHARGE_INFO.CLASS_NAME,tx);
BizObject dd = ddi.createQuery("select * from O where distributor_id=:distributorid").setParameter("distributor_id", distributor_no).getSingleResult(false);
String money = dd.getAttribute("caution_money").toString();
Integer mon=new Integer(money);
BizObjectManager ddi2 = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO.CLASS_NAME,tx);
BizObject dd2 = ddi2.createQuery("select caution_money from O where distributor_id=:distributorid").setParameter("distributor_id", distributor_no).getSingleResult(false);
String money2 = dd2.getAttribute("caution_money").toString();
Integer mon2=new Integer(money2);
double m = mon-mon2;
return "m="+m;*/
}
}