diff --git a/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp b/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp index e1fb3b0a0..b412ca1ad 100644 --- a/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp +++ b/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp @@ -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)","","","",""}, diff --git a/calc/com/tenwa/flow/CopyDReturnTempToFormal.java b/calc/com/tenwa/flow/CopyDReturnTempToFormal.java index 9f6fb8c9b..558df7447 100644 --- a/calc/com/tenwa/flow/CopyDReturnTempToFormal.java +++ b/calc/com/tenwa/flow/CopyDReturnTempToFormal.java @@ -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 fromCondtion = new HashMap(); fromCondtion.put("FLOWUNID", flowunid); - Map otherProperty = new HashMap(); - 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"; } }