经销商保证金退回脚本bug处理,及收取列表改详情显示
This commit is contained in:
parent
630d01a5ee
commit
019475e559
@ -8,7 +8,7 @@
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");
|
||||
String sPrevUrl = CurPage.getParameter("id");
|
||||
|
||||
String rightType = CurPage.getParameter("rightType");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
|
||||
String rightTypeS = CurPage.getParameter("distributor_id");
|
||||
String DistributorNo = CurPage.getParameter("DistributorNo");
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
|
||||
String acco = Sqlca.getString("select account from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
dwTemp.genHTMLObjectWindow(sFlowUnid);
|
||||
dwTemp.getDataObject().setVisible("CAUTION_MONEY", true);
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æËùÓÐÐÞ¸Ä","save(0)","","","",""},
|
||||
|
||||
@ -21,26 +21,22 @@ public class CopyDReturnTempToFormal extends BaseBussiness {
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String DistributorNo = this.getAttribute("DistributorNo").toString();
|
||||
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_DEPOSITRETURN_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);
|
||||
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(false);
|
||||
|
||||
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, null, Sqlca);
|
||||
//Ð޸ľÏúÉÌ×ܶî
|
||||
BigDecimal sums = new BigDecimal(dst.getAttribute(DISTRIBUTOR_INFO_TEMP.SUMS).getString());
|
||||
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
|
||||
double num = sums.subtract(cautionMoney).doubleValue();
|
||||
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+disStatus+"'").executeUpdate();
|
||||
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user