修改保证 金收取时提交结束处理脚本bug

This commit is contained in:
jianghongdong 2018-07-25 15:41:47 +08:00
parent c12ebf6a58
commit ce076c3df1
2 changed files with 15 additions and 37 deletions

View File

@ -28,6 +28,7 @@
if("ReadOnly".equals(rightType)){
dwTemp.ReadOnly = "1";//Ö»¶Áģʽ
doTemp.setColInnerBtEvent("LOCAL_ACCOUNT,ACCOUNT_INFO", "");
}
String acc_number = Sqlca.getString("select acc_number from OWN_ACCOUNT limit 0,1");
String acc_bank = Sqlca.getString("select acc_bank from OWN_ACCOUNT limit 0,1");
@ -43,10 +44,13 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload=function(){
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
setItemValue(0,0,"ACCOUNT_INFO",'<%=acc%>');
setItemValue(0,0,"ACCOUNT",'<%=acco%>');
var laccount = getItemValue(0,0,'LOCAL_ACCOUNT');
if(!laccount){
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
setItemValue(0,0,"ACCOUNT_INFO",'<%=acc%>');
setItemValue(0,0,"ACCOUNT",'<%=acco%>');
}
}
@ -65,7 +69,7 @@
as_save("myiframe0","returnList()");
}
function returnList(){
AsControl.OpenView("/DealerDeposit/DMarginChargeInfo_TempList.jsp", "FlowUnid="+sFlowUnid+"&ProjectName=<%=CurPage.getParameter("ProjectName")%>","_self","");
parent.selectItem(1);
}
function selectaccount(){
var disno = getItemValue(0, 0, "disno");

View File

@ -4,8 +4,6 @@ import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT;
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO;
@ -13,7 +11,6 @@ import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
@ -30,38 +27,15 @@ public class CopyDChargeTempToFormal extends BaseBussiness{
Map<String,String> fromCondtion = new HashMap<String,String>();
fromCondtion.put("FLOWUNID",flowunid);
Map<String,String> otherProperty = new HashMap<String,String>();
//otherProperty.put("ID",id);
DataOperatorUtil.copySingleJBO(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITCHARGE_INFO.CLASS_NAME, null, otherProperty, Sqlca);
BizObject dibo = JBOFactory.createBizObjectQuery(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
BigDecimal total = new BigDecimal(dibo.getAttribute(DISTRIBUTOR_INFO_TEMP.TOTAL).getString());
BizObject dibo = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, Sqlca).createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
String num = dibo.getAttribute("TOTAL")==null?"0":dibo.getAttribute("TOTAL").getString();//.getString();
BigDecimal total = new BigDecimal(num==""?"0":num);
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
double num = total.add(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
double num1 = total.add(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num1+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
return "true";
}
/*@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String id = this.getAttribute("ProjectId").toString();
Map<String,String> fromCondtion = new HashMap<String,String>();
fromCondtion.put("FLOWUNID",flowunid);
Map<String,String> otherProperty = new HashMap<String,String>();
otherProperty.put("ID",id);
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
String disStatus = dst.getAttribute("id").toString();
BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME,Sqlca);
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
deit.setAttributeValue("DISTRIBUTOR_ID", disStatus);
dit.saveObject(deit);
DataOperatorUtil.copySingleJBO(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITCHARGE_INFO.CLASS_NAME, null, otherProperty, Sqlca);
return "true";
}*/
}