From 38456a4f9b61a02bdee83bd5d3bc498a49e365c5 Mon Sep 17 00:00:00 2001 From: zzk Date: Thu, 5 May 2022 09:41:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=8F=90=E8=AF=B7=E7=BB=93?= =?UTF-8?q?=E6=B8=85=E5=90=88=E5=90=8C=E6=98=AF=E5=90=A6=E4=B8=BA=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=BB=93=E6=B8=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherProcess/EarlyContract.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java index ce71056ea..3ec356de3 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java @@ -349,6 +349,25 @@ public class EarlyContract { return ""+YesNo+""; } + // 判断合同是否为部分结清 + public String Countnum(JBOTransaction tx) { + String Countnum = ""; + Transaction Sqlca = null; + try { + Sqlca = Transaction.createTransaction(tx); + Countnum = Sqlca.getString("select count(*) from (select lrp.CONTRACT_ID,lrp.PLAN_LIST,lrp.RENT - ifnull(lri.RENT,0) as RENT,lrp.CORPUS - ifnull(lri.CORPUS,0) as CORPUS,lrp.INTEREST - ifnull(lri.INTEREST,0) as INTEREST from lc_rent_plan lrp left join (select CONTRACT_ID,PLAN_LIST,sum(RENT) as RENT,sum(CORPUS) as CORPUS,sum(INTEREST) as INTEREST from lc_rent_income group by CONTRACT_ID,PLAN_LIST ) lri on lrp.CONTRACT_ID = lri.CONTRACT_ID and lrp.PLAN_LIST = lri.PLAN_LIST where lri.CORPUS <> 0) t where t.CORPUS >0 and t.CONTRACT_ID = '"+contractId+"'"); + }catch(Exception e) { + try { + Sqlca.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + e.printStackTrace(); + } + + return ""+Countnum+""; + } + //全部结清更新租赁物临时表 @@ -558,7 +577,6 @@ public class EarlyContract { String last_plan_date = ""; for(int i=0; i