From f42c8472c87de27d63039cea8fca0c50e8f34bd8 Mon Sep 17 00:00:00 2001 From: zhangbeibei Date: Fri, 9 Apr 2021 17:57:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=B6=A6=E8=A1=A5=E6=BC=8F=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=A1=E6=95=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBAssetTransferRegistration/splittingRatioInfo.jsp | 7 ++----- .../tenwa/reckon/executor/CreateTransactionExecutor.java | 9 +++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/splittingRatioInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/splittingRatioInfo.jsp index 6b649ca2d..920e5ff98 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/splittingRatioInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/splittingRatioInfo.jsp @@ -58,11 +58,8 @@ include var distributorId = getItemValue(0,0,'distributor_id'); var productId = getItemValue(0,0,'product_id'); var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","getSplitByProductId","productId="+productId+",distributorId="+distributorId); - if(message=="success"){ - alert("操作成功"); - }else{ - alert(message); - } + alert(message); + } <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index b5c93bd7e..3996ce5cf 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -397,6 +397,7 @@ public class CreateTransactionExecutor implements Transaction { List boLCIs = bmLCI.createQuery("product_id=:productId and distributor_id=:distributorId").setParameter("productId",productId).setParameter("distributorId",distributorId).getResultList(false); if(boLCIs.size()>0){ + int i=0; for(BizObject boLCI : boLCIs){ String contractId = boLCI.getAttribute("ID").toString(); BizObject boLRP = bmLRP.createQuery("contract_id=:contractId and corpus_sp is null").setParameter("contractId",contractId).getSingleResult(false); @@ -404,13 +405,17 @@ public class CreateTransactionExecutor implements Transaction { setPlannumber(boLRP.getAttribute("PAYMENT_NUMBER").toString()); insertRentPlan_SP(splitRatio,Sqlca,splitType); }else{ - return "当前产品和经销商下的起租合同均已经有分润"; + i++; } } + if(i==0){ + return "当前产品和经销商下的起租合同均已经有分润"; + }else{ + return "共有"+i+"条合同执行成功"; + } }else{ return "未找到对应的起租合同"; } - return "success"; }catch (Exception e){ return "操作失败"; }