diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp index f645e42be..6b5f7a0f1 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentCarTempList.jsp @@ -220,7 +220,7 @@ contractIds = contractIds.substring(1); var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","delTemp","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,status=cancel"); if("SUCCESS" == result){ - as_delete(0); + as_delete(0,'updateTemp()'); AsDebug.showMessage("提示","操作成功!","","",true); reloadSelf(); }else{ @@ -229,7 +229,15 @@ } } - + function updateTemp(){ + var rows = getCheckedRows(0); + var contractIds = ""; + for(var i in rows){ + contractIds += "@"+getItemValue(0,i,"ID"); + } + contractIds = contractIds.substring(1); + RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","updateTemp","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,status=cancel"); + } function setColRequired(){ if("<%=rightType%>" != "ReadOnly"){ for(var i=0;i'apply_return' group by flowunid")); + if(rs.next()){ + BigDecimal totalMoney = new BigDecimal(rs.getString("total_money")); + int contractCount = Integer.parseInt(rs.getString("contract_count")); + SqlObject so = new SqlObject("update lb_actual_payment_info_temp set contract_count='"+contractCount+"',total_money='"+totalMoney+"',updateuserid='"+userId+"',updateorgid='"+orgId+"',updatetime='"+StringFunction.getTodayNow().replaceAll(":", "@")+"' where flowunid='"+flowunid+"'"); + so.setDebugSql(so.getDebugSql().replaceAll("@", ":")); + so.setOriginalSql(so.getOriginalSql().replaceAll("@", ":")); + so.setRunSql(so.getRunSql().replaceAll("@", ":")); + sqlTran.executeSQL(so); + so = new SqlObject("update flow_bussiness_object set proj_name=CONCAT(substr(proj_name,1,instr(proj_name,'实际付款')-1),'实际付款,金额为:"+totalMoney+"') where flow_unid='"+flowunid+"'"); + sqlTran.executeSQL(so); + } + }catch(Exception e){ + e.printStackTrace(); + tx.rollback(); + return "ERROR"; + } + return "SUCCESS"; + } } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountTempToFormalBusiness.java index 80b2b4690..1a9237373 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountTempToFormalBusiness.java @@ -39,6 +39,9 @@ public class LBCustomerAccountTempToFormalBusiness extends BaseBussiness{ fromCondtion.clear(); fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); fromCondtion.put("Partner_", "Y"); + toCondtion.clear(); + toCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString()); + toCondtion.put("Partner_", "Y"); DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_FAMILY.CLASS_NAME, toCondtion, otherProperty,null, Sqlca); /* String contract_id=""; Map fromCondtion = new HashMap();