From 019475e55903244d6afcc2a85054947b9f042153 Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Fri, 3 Aug 2018 19:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8F=E9=94=80=E5=95=86=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E9=87=91=E9=80=80=E5=9B=9E=E8=84=9A=E6=9C=ACbug=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=8F=8A=E6=94=B6=E5=8F=96=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=94=B9=E8=AF=A6=E6=83=85=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp | 4 ++-- calc/com/tenwa/flow/CopyDReturnTempToFormal.java | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) 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"; } }