From f4b8687566a3adc0c7127bc5dede60c5a00e8203 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Tue, 20 Oct 2020 14:15:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=80=9A=E8=81=94=E5=8D=A1=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_lease.xml | 11770 ++++++++-------- WebContent/WEB-INF/etc/jbo/jbo_loan.xml | 1207 +- config/allinPay.properties | 4 +- .../service/impl/AllinpayPaymentDo.java | 112 + .../service/impl/AllinpayPaymentQueryRun.java | 622 +- .../service/impl/AllinpayPaymentRun.java | 462 +- .../lease/comm/VI_LC_AUDIT_RENT_PLAN.java | 8 + src_jbo/jbo/loan/VI_RENT_COLLECT.java | 108 + .../cache/CollectAuditInfoCache.java | 21 +- .../rent/rentincome/RentIncomeMethod.java | 1 + .../lease/app/quartzmession/AutoBuckle.java | 100 +- .../lease/app/quartzmession/AutoRefresh.java | 7 +- .../rentreback/VILCRentCollectHandler.java | 24 + 13 files changed, 7450 insertions(+), 6996 deletions(-) create mode 100644 src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java create mode 100644 src_jbo/jbo/loan/VI_RENT_COLLECT.java create mode 100644 src_tenwa/com/tenwa/lease/flow/rent/rentreback/VILCRentCollectHandler.java diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index c5f8e4a9e..e7caeeec1 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -1,5884 +1,5886 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_loan.xml b/WebContent/WEB-INF/etc/jbo/jbo_loan.xml index 8be78ac4c..c6a85a9be 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_loan.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_loan.xml @@ -1,571 +1,636 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/allinPay.properties b/config/allinPay.properties index d65daff48..1675029a1 100644 --- a/config/allinPay.properties +++ b/config/allinPay.properties @@ -1,9 +1,9 @@ #ޣڣ޹˾SZ #̻ͨ () (ʽ) -SZ_allinPayMerchantId=200604000011645 +SZ_allinPayMerchantId= 200604000011814 #ͨû() (ʽ) -SZ_allinPayUsername=20060400001164504 +SZ_allinPayUsername= 20060400001181404 #ͨû () (ʽ) SZ_allinPayUserpass=111111 diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java new file mode 100644 index 000000000..470122a0e --- /dev/null +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentDo.java @@ -0,0 +1,112 @@ +package com.tenwa.lease.app.allinpay.service.impl; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; +import jbo.sys.CODE_LIBRARY; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; + + +public class AllinpayPaymentDo { + private String id; + + /** + * - + * @param tx + * @return + * @throws Exception + */ + public String batchCollectManage(JBOTransaction tx) throws Exception{ + + String[] ids = id.split("@"); + StringBuffer parms = new StringBuffer(); + for (String str : ids) { + if (parms.length()==0) { + parms.append("'"+str+"'"); + }else{ + parms.append(",'"+str+"'"); + } + } + BizObjectManager bm = JBOFactory.getFactory().getManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME); + List bolist = bm.createQuery("select distinct O.contract_id,O.project_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and O.id in ("+parms.toString()+")").getResultList(false); + if (bolist.size() != 0) { + BatchCollectMoeny(tx, bolist); + } + return "ϵͳڴУԺ"; + } + + public void BatchCollectMoeny(JBOTransaction tx,List bolist) throws JBOException{ + ArrayList> list = new ArrayList>(); + for(BizObject bo : bolist){ + String projectId = bo.getAttribute("project_id").toString(); + String accountName = bo.getAttribute("account").toString(); + String bankName = bo.getAttribute("BANK_NAME").toString(); + String rent = bo.getAttribute("rent").toString(); + String uuid = bo.getAttribute("id").toString(); + BigDecimal rentTotal = new BigDecimal(rent); + List codelist = JBOFactory.getFactory().getBizObjectManager(CODE_LIBRARY.CLASS_NAME).createQuery("O.codeno = 'collect_limit'").getResultList(false); + BigDecimal limitMoney = new BigDecimal("0"); + boolean flag = false; + for(BizObject bocl : codelist){ + String limitBankName = bocl.getAttribute("itemname").getString(); + if(bankName.indexOf(limitBankName)!=-1){ + limitMoney = new BigDecimal(bocl.getAttribute("attribute1").getString()); + flag = true; + break; + } + } + if(flag&&rentTotal.compareTo(limitMoney)==1){ + int rent_int = rentTotal.multiply(new BigDecimal("100")).intValue(); + int limit_int = limitMoney.multiply(new BigDecimal("100")).intValue(); + int rent_count = rent_int/limit_int; + int i=1; + for(;i<=rent_count;i++){ + uuid=String.format(uuid+"-"+"%03d",i); + Map boMap = new HashMap(); + boMap.put("PROJECT_ID", projectId); + boMap.put("ACCOUNT_NAME", accountName); + boMap.put("AMOUNT", limitMoney.toString()); + boMap.put("UUID", uuid); + list.add(boMap); + } + int rent_end = rent_int%limit_int; + if(rent_end!=0){ + i++; + uuid=String.format(uuid+"-"+"%03d",i); + Map boMap = new HashMap(); + boMap.put("PROJECT_ID", projectId); + boMap.put("ACCOUNT_NAME", accountName); + boMap.put("AMOUNT", new BigDecimal(rent_end).divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); + boMap.put("UUID", uuid); + list.add(boMap); + } + }else{ + Map boMap = new HashMap(); + boMap.put("PROJECT_ID", projectId); + boMap.put("ACCOUNT_NAME", accountName); + boMap.put("AMOUNT", rent); + boMap.put("UUID", uuid); + list.add(boMap); + } + } + AllinpayPaymentRun run = new AllinpayPaymentRun(list); + new Thread(run).start(); + } + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } +} diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java index 1cd326b79..778851761 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentQueryRun.java @@ -1,254 +1,368 @@ -package com.tenwa.lease.app.allinpay.service.impl; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.text.SimpleDateFormat; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.log4j.Logger; - -import com.allinpay.xml.XmlParser; -import com.allinpay.xstruct.common.AipgRsp; -import com.allinpay.xstruct.common.InfoRsp; -import com.allinpay.xstruct.trans.qry.QTDetail; -import com.allinpay.xstruct.trans.qry.QTransRsp; - -import com.amarsoft.app.lc.util.DateAssistant; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.tenwa.lease.app.allinpay.util.AllinpayProperties; -import com.tenwa.lease.app.allinpay.util.ConfigConstant; -import com.tenwa.reckon.util.UUIDUtil; - - - -public class AllinpayPaymentQueryRun implements Runnable{ - - @Override - public void run() { - this.allinpayPaymentQuerySt(); - } - - private AllinpayProperties allinpay; - - private String localFilePath; - - private Logger logger = Logger.getLogger(this.getClass()); - - public AllinpayPaymentQueryRun() { - } - - /** - * ҳҪвѯĿۿ - * @param - * @return - */ - @SuppressWarnings({ "unchecked"}) - public void allinpayPaymentQuerySt() { - logger.info(">>>>>>>>>>>ʼ֧ͨѯ>>>>>>>>"); - Map sqlMap = new HashMap(0); - Map mapXml = new HashMap(); - try { - BizObjectManager bomLCP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); - int start = 0; - int maxCount = 100; - List boLOEDs=null; - int size = bomLCP.createQuery("O.STATUS='ڴ' ").getTotalCount(); - if (size == 0) { - logger.info("ûҪѯ֧ͨϢ"); - return; - } - while (size > start) { - logger.info("ʼ" + start + "" + (start + maxCount) + "ѭ"); - boLOEDs = bomLCP.createQuery("O.STATUS='ڴ' ").setFirstResult(start).setMaxResults(maxCount).getResultList(true); - - if (boLOEDs == null || boLOEDs.size() == 0) { - logger.error("ûҪѯ֧ͨϢ>>>>>>>>>>:"); - break; - } - for (BizObject boLCP : boLOEDs) { - try { - BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", boLCP.getAttribute("PROJECT_ID").toString()).getSingleResult(false); - - allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); - String quertSn= boLCP.getAttribute("REQ_SN").toString(); - String num = boLCP.getAttribute("NUM").toString(); - localFilePath = boLCP.getAttribute("FULLPATH").toString(); - String time = DateAssistant.getTodayNow(); - sqlMap.put("QUERYTIME", time); - sqlMap.put("NUM", Integer.parseInt(num) + ""); - mapXml.put("quertSn", quertSn); - sqlMap = sendMessageByProxy(mapXml, sqlMap); - - if (localFilePath == null) { - LocalDateTime ldt = LocalDateTime.now(); - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); - localFilePath = ConfigConstant.filePath.replaceAll("\\{uuid\\}",UUIDUtil.getUUID()).replaceAll("\\{YYYYMMDD\\}", dtf.format(ldt)); - sqlMap.put("FULLPATH", localFilePath); - } - saveRequestTxt(sqlMap); - updateMessage(bomLCP, boLCP, sqlMap); - localFilePath = null; - } catch (Exception e) { - logger.error(">>>>>>>>>>>֧ͨѯʧ>>>>>>>>id:" +boLCP.getAttribute("id").toString()); - e.printStackTrace(); - }finally { - sqlMap.clear(); - mapXml.clear(); - } - } - boLOEDs=null; - start +=100; - } - } catch (Exception e) { - logger.error(">>>>>>>>>>>֧ͨѯʧ>>>>>>>>:"); - e.printStackTrace(); - } - logger.info(">>>>>>>>>>>֧ͨѯ>>>>>>>>"); - } - - /** - * ͨؽTXTĵ - * @param sqlMap - * @return - */ - private void saveRequestTxt(Map sqlMap) { - BufferedWriter bw = null; - try { - String fileStr = "֧ͨѯ:" + sqlMap.get("QUERYTIME") + System.getProperty("line.separator"); - fileStr += sqlMap.get("REQUEST_CONTENT") + System.getProperty("line.separator"); - fileStr += "֧ͨѯӦ:" + sqlMap.get("QUERYTIME") + System.getProperty("line.separator"); - fileStr += sqlMap.get("RESPONSE_CONTENT") + System.getProperty("line.separator"); - File file = new File(localFilePath); - if (!file.getParentFile().exists()) { - file.getParentFile().mkdirs(); - } - bw = new BufferedWriter(new FileWriter(localFilePath, true)); - bw.write(fileStr); - bw.newLine(); - bw.flush(); - } catch (Exception e) { - logger.error("ļ" + localFilePath); - e.printStackTrace(); - } finally { - try { - if (bw != null) { - bw.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - /** - * ͨͨҪѯĿۿ - * @param mapXmlsqlMap - * @return - */ - @SuppressWarnings("unchecked") - private Map sendMessageByProxy(Map mapXml, Map sqlMap) - throws Exception { - logger.info(">>>>>>>>>>>ʼô>>>>>>>>"); - Map map = new HashMap(0); - try { - map = allinpay.allinPaymentQuery(mapXml); - } catch (Exception e) { - logger.error(">>>>>>>>>>>ôʧ>>>>>>>>>"); - e.printStackTrace(); - } - logger.info(">>>>>>>>>>>ô>>>>>>>>"); - - String requestContent = map.get("request"); - sqlMap.put("REQUEST_CONTENT", requestContent); - - if (map.size() < 1 || !"success".equals(map.get("message"))) { - logger.error("ϵͳ쳣ͨ쳣:" + map.get("msg")); - logger.error(":" + requestContent); - } else { - String responseContent = map.get("response"); - sqlMap.put("RESPONSE_CONTENT", responseContent); - AipgRsp rsp = XmlParser.parseRsp(responseContent); - InfoRsp infoRsp = rsp.getINFO(); - if ("|0000|4000|".indexOf(infoRsp.getRET_CODE()) > 0) { - QTransRsp ret = (QTransRsp) rsp.trxObj(); - List list = ret.getDetails(); - for (QTDetail qtDetail : list) { - if (qtDetail != null && "|0000|4000|".indexOf(qtDetail.getRET_CODE()) > 0) { - logger.info(">>>>>>>>>>>ɹ>>>>>>>>"); - logger.info(":" + requestContent); - logger.info("Ӧ:" + responseContent); - sqlMap.put("FINISH_AMOUNT", new BigDecimal(qtDetail.getAMOUNT()).divide(new BigDecimal(100)) - .setScale(2).toPlainString()); - String fintime = qtDetail.getFINTIME().trim(); - Date date = new SimpleDateFormat("yyyyMMddHHmmss").parse(fintime); - fintime = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date); - sqlMap.put("FINTIME", fintime); - sqlMap.put("STATUS", "ɹ"); - sqlMap.put("SN", qtDetail.getSN()); - sqlMap.put("TRXDIR", qtDetail.getTRXDIR()); - sqlMap.put("RET_CODE", qtDetail.getRET_CODE()); - sqlMap.put("IS_ACCOUNTCHECK", ""); - } else { - String errMsg = qtDetail.getERR_MSG(); - logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); - logger.error(":" + requestContent); - logger.error("Ӧ:" + responseContent); - sqlMap.put("STATUS", errMsg); - } - } - } else if ("|1000|1002|2000|2001|2003|2005|2007|2008|".indexOf(infoRsp.getRET_CODE()) > 0) { - logger.info(">>>>>>>>>>>м״̬²ѯ>>>>>>>>" + infoRsp.getRET_CODE()); - logger.info(":" + requestContent); - logger.info("Ӧ:" + responseContent); - int num = Integer.parseInt(sqlMap.get("NUM")); - if ("1002".equals(infoRsp.getRET_CODE())) { - //һֱ1002״̬6˱ʿۿʧ - if (num > 6) { - sqlMap.put("STATUS", infoRsp.getERR_MSG()); - } - sqlMap.put("RET_CODE", infoRsp.getRET_CODE()); - sqlMap.put("NUM", num + 1 + ""); - } else { - sqlMap.put("RET_CODE", infoRsp.getRET_CODE()); - } - } else { - String errMsg = infoRsp.getERR_MSG(); - logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); - logger.error(":" + requestContent); - logger.error("Ӧ:" + responseContent); - sqlMap.put("STATUS", errMsg); - } - - } - return sqlMap; - } - - /** - * ޸ͨۿݻܱ - * @param map - * @return Exception - */ - private void updateMessage(BizObjectManager bomLCP, BizObject boLCP, Map sqlMap) throws Exception { - Set keySet = sqlMap.keySet(); - for (String key : keySet) { - if ("|REQUEST_CONTENT|RESPONSE_CONTENT|".indexOf(key) > 0) { - continue; - } - boLCP.setAttributeValue(key, sqlMap.get(key)); - } - bomLCP.saveObject(boLCP); - } - - -} +package com.tenwa.lease.app.allinpay.service.impl; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; + +import org.apache.log4j.Logger; + +import com.allinpay.xml.XmlParser; +import com.allinpay.xstruct.common.AipgRsp; +import com.allinpay.xstruct.common.InfoRsp; +import com.allinpay.xstruct.trans.qry.QTDetail; +import com.allinpay.xstruct.trans.qry.QTransRsp; +import com.amarsoft.app.lc.util.DateAssistant; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.collectaudit.cache.CollectAuditInfoCache; +import com.tenwa.lease.app.allinpay.util.AllinpayProperties; +import com.tenwa.lease.app.allinpay.util.ConfigConstant; +import com.tenwa.reckon.util.UUIDUtil; + + + +public class AllinpayPaymentQueryRun implements Runnable{ + + @Override + public void run() { + this.allinpayPaymentQuerySt(); + } + + private AllinpayProperties allinpay; + + private String localFilePath; + + private Logger logger = Logger.getLogger(this.getClass()); + + public AllinpayPaymentQueryRun() { + } + + /** + * ҳҪвѯĿۿ + * @param + * @return + */ + @SuppressWarnings({ "unchecked"}) + public void allinpayPaymentQuerySt() { + logger.info(">>>>>>>>>>>ʼ֧ͨѯ>>>>>>>>"); + Map sqlMap = new HashMap(0); + Map mapXml = new HashMap(); + try { + BizObjectManager bomLCP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); + int start = 0; + int maxCount = 100; + List boLOEDs=null; + int size = bomLCP.createQuery("O.STATUS='ڴ' ").getTotalCount(); + if (size == 0) { + logger.info("ûҪѯ֧ͨϢ"); + return; + } + while (size > start) { + logger.info("ʼ" + start + "" + (start + maxCount) + "ѭ"); + boLOEDs = bomLCP.createQuery("O.STATUS='ڴ' ").setFirstResult(start).setMaxResults(maxCount).getResultList(true); + + if (boLOEDs == null || boLOEDs.size() == 0) { + logger.error("ûҪѯ֧ͨϢ>>>>>>>>>>:"); + break; + } + for (BizObject boLCP : boLOEDs) { + try { + + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", boLCP.getAttribute("PROJECT_ID").toString()).getSingleResult(false); + + allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); + String quertSn= boLCP.getAttribute("REQ_SN").toString(); + String num = boLCP.getAttribute("NUM").toString(); + localFilePath = boLCP.getAttribute("FULLPATH").toString(); + String time = DateAssistant.getTodayNow(); + sqlMap.put("QUERYTIME", time); + sqlMap.put("NUM", Integer.parseInt(num) + ""); + mapXml.put("quertSn", quertSn); + sqlMap = sendMessageByProxy(mapXml, sqlMap); + + Transaction Sqlca =null; + ASResultSet rs = null; + Sqlca = Transaction.createTransaction("als"); + JBOTransaction tx = Sqlca.getTransaction(); + BizObjectManager bomLRP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_RENT_PLAN",tx); + boolean partFlag = false; + String plan_id = boLCP.getAttribute("UUID").toString(); + String sn = ""; + String finishAmount= "0.00"; + if(plan_id.indexOf("-")!=-1){ + plan_id = plan_id.substring(0, plan_id.indexOf("-")); + sn = plan_id.substring(plan_id.length()-3); + partFlag = true; + } + BizObject boLRP = bomLRP.createQuery("id=:id").setParameter("id", plan_id).getSingleResult(true); + String batchStatus = boLRP.getAttribute("batch_status")==null?"":boLRP.getAttribute("batch_status").toString(); + String collectStatus = boLRP.getAttribute("batch_status")==null?"":boLRP.getAttribute("collect_status").toString(); + String collectMsg = boLRP.getAttribute("batch_status")==null?"":boLRP.getAttribute("collect_msg").toString(); + boolean status = false; + + if("ɹ".equals(sqlMap.get("STATUS"))){ + //ʵձIJ + finishAmount = sqlMap.get("FINISH_AMOUNT"); + try { + String ln_contract_id = boLRP.getAttribute("contract_id").toString(); + String ln_plan_date = boLRP.getAttribute("plan_date").toString(); + String in_rent = sqlMap.get("FINISH_AMOUNT"); + String in_hire_list = boLRP.getAttribute("plan_list").toString(); + String in_type = "2"; + String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')}"; + SqlObject asql = new SqlObject(SQL); + rs = Sqlca.getASResultSet(asql); + } catch (Exception e) { + e.printStackTrace(); + }finally{ + if(rs != null) rs.close(); + if(Sqlca!=null)Sqlca.commit(); + } + // 崦 + CollectAuditInfoCache caic = new CollectAuditInfoCache(); + caic.writeBackDistributor(plan_id, finishAmount, Sqlca); + //ƻ״̬ + if(partFlag){ + BizObjectManager bomVRC = JBOFactory.getBizObjectManager("jbo.loan.VI_RENT_COLLECT",tx); + BizObject vrc = bomVRC.createQuery("id=:id").setParameter("id", plan_id).getSingleResult(false); + double rentOver = vrc.getAttribute("rent_over").getDouble(); + double penaltyOver = vrc.getAttribute("penalty_over").getDouble(); + if(rentOver>0 || penaltyOver>0){ + batchStatus = "complete"; + collectStatus = "տ"; + collectMsg = "ͨտ"; + } + }else{ + batchStatus = "complete"; + collectStatus = "տ"; + collectMsg = "տͨտ"; + } + }else{ + String retStatus = sqlMap.get("RET_STATUS"); + //ۿʧ + if("5000".equals(retStatus)){ + batchStatus = "complete"; + collectMsg = sqlMap.get("STATUS"); + //ڴ + }else if("1000".equals(retStatus)){ + status = true; + } + + } + + //״̬־ + if(!status){ + boLRP.setAttributeValue("batch_status", batchStatus); + boLRP.setAttributeValue("collect_status", collectStatus); + boLRP.setAttributeValue("collect_msg", collectMsg); + bomLRP.saveObject(boLRP); + saveBuckle(boLRP,tx,sn,finishAmount); + } + + + + if (localFilePath == null) { + LocalDateTime ldt = LocalDateTime.now(); + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); + localFilePath = ConfigConstant.filePath.replaceAll("\\{uuid\\}",UUIDUtil.getUUID()).replaceAll("\\{YYYYMMDD\\}", dtf.format(ldt)); + sqlMap.put("FULLPATH", localFilePath); + } + saveRequestTxt(sqlMap); + updateMessage(bomLCP, boLCP, sqlMap); + localFilePath = null; + } catch (Exception e) { + logger.error(">>>>>>>>>>>֧ͨѯʧ>>>>>>>>id:" +boLCP.getAttribute("id").toString()); + e.printStackTrace(); + }finally { + sqlMap.clear(); + mapXml.clear(); + } + } + boLOEDs=null; + start +=100; + } + } catch (Exception e) { + logger.error(">>>>>>>>>>>֧ͨѯʧ>>>>>>>>:"); + e.printStackTrace(); + } + logger.info(">>>>>>>>>>>֧ͨѯ>>>>>>>>"); + } + + /** + * ͨؽTXTĵ + * @param sqlMap + * @return + */ + private void saveRequestTxt(Map sqlMap) { + BufferedWriter bw = null; + try { + String fileStr = "֧ͨѯ:" + sqlMap.get("QUERYTIME") + System.getProperty("line.separator"); + fileStr += sqlMap.get("REQUEST_CONTENT") + System.getProperty("line.separator"); + fileStr += "֧ͨѯӦ:" + sqlMap.get("QUERYTIME") + System.getProperty("line.separator"); + fileStr += sqlMap.get("RESPONSE_CONTENT") + System.getProperty("line.separator"); + File file = new File(localFilePath); + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + bw = new BufferedWriter(new FileWriter(localFilePath, true)); + bw.write(fileStr); + bw.newLine(); + bw.flush(); + } catch (Exception e) { + logger.error("ļ" + localFilePath); + e.printStackTrace(); + } finally { + try { + if (bw != null) { + bw.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * ͨͨҪѯĿۿ + * @param mapXmlsqlMap + * @return + */ + @SuppressWarnings("unchecked") + private Map sendMessageByProxy(Map mapXml, Map sqlMap) + throws Exception { + logger.info(">>>>>>>>>>>ʼô>>>>>>>>"); + Map map = new HashMap(0); + try { + map = allinpay.allinPaymentQuery(mapXml); + } catch (Exception e) { + logger.error(">>>>>>>>>>>ôʧ>>>>>>>>>"); + e.printStackTrace(); + } + logger.info(">>>>>>>>>>>ô>>>>>>>>"); + + String requestContent = map.get("request"); + sqlMap.put("REQUEST_CONTENT", requestContent); + + if (map.size() < 1 || !"success".equals(map.get("message"))) { + logger.error("ϵͳ쳣ͨ쳣:" + map.get("msg")); + logger.error(":" + requestContent); + } else { + String responseContent = map.get("response"); + sqlMap.put("RESPONSE_CONTENT", responseContent); + AipgRsp rsp = XmlParser.parseRsp(responseContent); + InfoRsp infoRsp = rsp.getINFO(); + if ("|0000|4000|".indexOf(infoRsp.getRET_CODE()) > 0) { + sqlMap.put("RET_STATUS", "0000"); + QTransRsp ret = (QTransRsp) rsp.trxObj(); + List list = ret.getDetails(); + for (QTDetail qtDetail : list) { + if (qtDetail != null && "|0000|4000|".indexOf(qtDetail.getRET_CODE()) > 0) { + logger.info(">>>>>>>>>>>ɹ>>>>>>>>"); + logger.info(":" + requestContent); + logger.info("Ӧ:" + responseContent); + sqlMap.put("FINISH_AMOUNT", new BigDecimal(qtDetail.getAMOUNT()).divide(new BigDecimal(100)) + .setScale(2).toPlainString()); + String fintime = qtDetail.getFINTIME().trim(); + Date date = new SimpleDateFormat("yyyyMMddHHmmss").parse(fintime); + fintime = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date); + sqlMap.put("FINTIME", fintime); + sqlMap.put("STATUS", "ɹ"); + sqlMap.put("SN", qtDetail.getSN()); + sqlMap.put("TRXDIR", qtDetail.getTRXDIR()); + sqlMap.put("RET_CODE", qtDetail.getRET_CODE()); + sqlMap.put("IS_ACCOUNTCHECK", ""); + } else { + String errMsg = qtDetail.getERR_MSG(); + logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); + logger.error(":" + requestContent); + logger.error("Ӧ:" + responseContent); + sqlMap.put("STATUS", errMsg); + } + } + } else if ("|1000|1002|2000|2001|2003|2005|2007|2008|".indexOf(infoRsp.getRET_CODE()) > 0) { + sqlMap.put("RET_STATUS", "1000"); + logger.info(">>>>>>>>>>>м״̬²ѯ>>>>>>>>" + infoRsp.getRET_CODE()); + logger.info(":" + requestContent); + logger.info("Ӧ:" + responseContent); + int num = Integer.parseInt(sqlMap.get("NUM")); + if ("1002".equals(infoRsp.getRET_CODE())) { + //һֱ1002״̬6˱ʿۿʧ + if (num > 6) { + sqlMap.put("STATUS", infoRsp.getERR_MSG()); + } + sqlMap.put("RET_CODE", infoRsp.getRET_CODE()); + sqlMap.put("NUM", num + 1 + ""); + } else { + sqlMap.put("RET_CODE", infoRsp.getRET_CODE()); + } + } else { + sqlMap.put("RET_STATUS", "5000"); + String errMsg = infoRsp.getERR_MSG(); + logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); + logger.error(":" + requestContent); + logger.error("Ӧ:" + responseContent); + sqlMap.put("STATUS", errMsg); + } + + } + return sqlMap; + } + + /** + * ޸ͨۿݻܱ + * @param map + * @return Exception + */ + private void updateMessage(BizObjectManager bomLCP, BizObject boLCP, Map sqlMap) throws Exception { + Set keySet = sqlMap.keySet(); + for (String key : keySet) { + if ("|REQUEST_CONTENT|RESPONSE_CONTENT|".indexOf(key) > 0) { + continue; + } + boLCP.setAttributeValue(key, sqlMap.get(key)); + } + bomLCP.saveObject(boLCP); + } + public void saveBuckle(BizObject bo,JBOTransaction tx,String sn,String rent) throws JBOException{ + BizObjectManager blog = JBOFactory.getBizObjectManager(LB_BUCKLE_LOG.CLASS_NAME, tx); + BizObject blbo = blog.newObject(); + String collect = bo.getAttribute("COLLECT_STATUS").getString(); + if(collect!=""){ + blbo.setAttributeValue("COLLECT_STATUS", bo.getAttribute("COLLECT_STATUS").getString()); + blbo.setAttributeValue("COLLECT_MSG", bo.getAttribute("COLLECT_MSG").getString()); + blbo.setAttributeValue("BATCH_STATUS", bo.getAttribute("BATCH_STATUS").getString()); + } + DecimalFormat format = new DecimalFormat("0.00"); + rent = format.format(new BigDecimal(rent )); + blbo.setAttributeValue(LB_BUCKLE_LOG.BATCH_SN, "TL"); + blbo.setAttributeValue(LB_BUCKLE_LOG.BATCH_NO, sn); + blbo.setAttributeValue(LB_BUCKLE_LOG.RENT_ID, bo.getAttribute("ID").getString()); + blbo.setAttributeValue(LB_BUCKLE_LOG.cut_money,rent); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputuserid, "syetem"); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputorgid, "system"); + blbo.setAttributeValue(LB_BUCKLE_LOG.inputtime, StringFunction.getTodayNow()); + blbo.setAttributeValue(LB_BUCKLE_LOG.updatetime, System.currentTimeMillis()); + blog.saveObject(blbo); + } + +} diff --git a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java index 9fa70a23b..92b580a3f 100644 --- a/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java +++ b/src/com/tenwa/lease/app/allinpay/service/impl/AllinpayPaymentRun.java @@ -1,228 +1,234 @@ -package com.tenwa.lease.app.allinpay.service.impl; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.log4j.Logger; - -import com.allinpay.xml.XmlParser; -import com.allinpay.xstruct.common.AipgRsp; -import com.allinpay.xstruct.common.InfoRsp; -import com.allinpay.xstruct.quickpay.FASTTRXRET; -import com.amarsoft.app.lc.util.DateAssistant; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.tenwa.lease.app.allinpay.util.AllinpayProperties; -import com.tenwa.lease.app.allinpay.util.ConfigConstant; -import com.tenwa.reckon.util.UUIDUtil; - -public class AllinpayPaymentRun implements Runnable { - - private List> list; - - private String localFilePath; - - private AllinpayProperties allinpay; - - private Logger logger = Logger.getLogger(this.getClass()); - - public AllinpayPaymentRun(List> list) { - this.list=list; - } - - @Override - public void run() { - if(list==null||list.size()==0) { - logger.info(">>>>>>>>>>>ûҪۿͨϢ>>>>>>>>"); - return; - } - allinpayPayment(); - } - - private void allinpayPayment() { - logger.info(">>>>>>>>>>>ͨЭ֧ʼִ>>>>>>>>"); - Map sqlMap = new HashMap(0); - Map mapXml = new HashMap<>(); - - try { - String time = DateAssistant.getTodayNow(); - for (Map map : list) { - try { - - BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", map.get("PROJECT_ID")).getSingleResult(false); - allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); - - BizObject result = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN").createQuery("O.PROJECT_ID=:projectId and SIGN_STATUS='sign_status2'").setParameter("projectId", map.get("PROJECT_ID")).getSingleResult(false); - - logger.info(">>>>>>>>>>>ͨЭ֧>>>>>>>>PROJECT_ID=" + map.get("PROJECT_ID")); - - sqlMap.put("SUBMITTIME", time); - sqlMap.put("AGRMNO", result.getAttribute("AGRMNO").toString()); - sqlMap.put("START_AMOUNT", map.get("AMOUNT")); - sqlMap.put("ACCOUNT_NAME", map.get("ACCOUNT_NAME")); - sqlMap.put("PROJECT_ID", map.get("PROJECT_ID")); - sqlMap.put("UUID", map.get("UUID")); - - mapXml.put("AGRMNO", result.getAttribute("AGRMNO").toString()); - mapXml.put("ACCOUNT_NAME", map.get("ACCOUNT_NAME")); - mapXml.put("AMOUNT", new BigDecimal(map.get("AMOUNT")).multiply(new BigDecimal("100")) - .stripTrailingZeros().toPlainString()); - mapXml.put("PROJECT_ID", sqlMap.get("PROJECT_ID")); - mapXml.put("CUST_USERID", sqlMap.get("PROJECT_ID")); - sqlMap = sendMessageByProxy(mapXml, sqlMap); - saveRequestTxt(sqlMap); - sqlMap.put("FULLPATH", localFilePath); - saveMessage(sqlMap); - - } catch (Exception e) { - logger.error(">>>>>>>>>>>ͨЭ֧ʧ>>>>>>>>"); - e.printStackTrace(); - }finally { - sqlMap.clear(); - mapXml.clear(); - } - } - } catch (Exception e) { - logger.error(">>>>>>>>>>>ͨЭ֧ʧ>>>>>>>>"); - e.printStackTrace(); - } - logger.info(">>>>>>>>>>>ͨЭִ֧н>>>>>>>>"); - } - - - /** - * ͨͨҪۿ - * @param - * @return - */ - private Map sendMessageByProxy(Map mapXml, Map sqlMap) - throws Exception { - logger.info(">>>>>>>>>>>ʼô>>>>>>>>"); - Map map = new HashMap(0); - try { - map = allinpay.allinPayment(mapXml); - } catch (Exception e) { - logger.error(">>>>>>>>>>>ôʧ>>>>>>>>>"); - e.printStackTrace(); - } - logger.info(">>>>>>>>>>>ô>>>>>>>>"); - String requestContent = map.get("request"); - - if (map.size() < 1 || !"success".equals(map.get("message"))) { - logger.error("ϵͳ쳣ͨ쳣:" + map.get("msg")); - logger.error(":" + requestContent); - sqlMap.put("REQUEST_CONTENT", requestContent); - String reqSn = map.get("reqSn"); - if (reqSn == null) { - sqlMap.put("STATUS", "ϵͳ쳣ͨ쳣"); - } else { - //ûзͨۿϢڴ - sqlMap.put("REQ_SN", reqSn); - sqlMap.put("STATUS", "ڴ"); - } - } else { - String responseContent = map.get("response"); - sqlMap.put("REQUEST_CONTENT", requestContent); - sqlMap.put("RESPONSE_CONTENT", responseContent); - AipgRsp rsp = XmlParser.parseRsp(responseContent); - InfoRsp infoRsp = rsp.getINFO(); - if ("|0000|2000|2001|2003|2005|2007|2008|1108|1000|".indexOf(infoRsp.getRET_CODE()) > 0) { - FASTTRXRET ret = (FASTTRXRET) rsp.trxObj(); - if (ret == null || "|0000|2000|2007|2008|".indexOf(ret.getRET_CODE()) > 0) { - logger.info(">>>>>>>>>>>ɹ>>>>>>>>"); - logger.info(":" + requestContent); - logger.info("Ӧ:" + responseContent); - String reqSn = infoRsp.getREQ_SN(); - sqlMap.put("REQ_SN", reqSn); - sqlMap.put("STATUS", "ڴ"); - } else { - String errMsg = ret.getERR_MSG(); - String reqSn = infoRsp.getREQ_SN(); - logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); - logger.error(":" + requestContent); - logger.error("Ӧ:" + responseContent); - sqlMap.put("REQ_SN", reqSn); - sqlMap.put("STATUS", errMsg); - } - } else { - String errMsg = infoRsp.getERR_MSG(); - logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); - logger.error(":" + requestContent); - logger.error("Ӧ:" + responseContent); - sqlMap.put("STATUS", errMsg); - } - } - return sqlMap; - } - - /** - * ͨؽTXTĵ - * @param map - * @return - */ - private void saveRequestTxt(Map sqlMap) { - BufferedWriter bw = null; - LocalDateTime ldt = LocalDateTime.now(); - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); - try { - if (localFilePath == null) { - localFilePath = ConfigConstant.filePath.replaceAll("\\{uuid\\}",UUIDUtil.getUUID()).replaceAll("\\{YYYYMMDD\\}", dtf.format(ldt)); - } - String fileStr = "֧ͨ:" + sqlMap.get("SUBMITTIME") + System.getProperty("line.separator"); - fileStr += sqlMap.get("REQUEST_CONTENT") + System.getProperty("line.separator"); - fileStr += "֧ͨӦ:" + sqlMap.get("SUBMITTIME") + System.getProperty("line.separator"); - fileStr += sqlMap.get("RESPONSE_CONTENT") + System.getProperty("line.separator"); - File file = new File(localFilePath); - if (!file.getParentFile().exists()) { - file.getParentFile().mkdirs(); - } - bw = new BufferedWriter(new FileWriter(file, true)); - bw.write(fileStr); - bw.newLine(); - bw.flush(); - } catch (Exception e) { - logger.error("ļ" + localFilePath); - e.printStackTrace(); - } finally { - try { - if (bw != null) { - bw.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - /** - * ʼͨۿݻܱ - * @param map - * @return Exception - */ - private void saveMessage(Map map) throws Exception { - try { - BizObjectManager bomLCP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); - BizObject boLCP = bomLCP.newObject(); - Set keySet = map.keySet(); - for (String key : keySet) { - if ("|REQUEST_CONTENT|RESPONSE_CONTENT|".indexOf(key) > 0) { - continue; - } - boLCP.setAttributeValue(key, map.get(key)); - } - boLCP.setAttributeValue("NUM", "0"); - bomLCP.saveObject(boLCP); - } catch (Exception e) { - e.printStackTrace(); - } - } -} +package com.tenwa.lease.app.allinpay.service.impl; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.apache.log4j.Logger; + +import com.allinpay.xml.XmlParser; +import com.allinpay.xstruct.common.AipgRsp; +import com.allinpay.xstruct.common.InfoRsp; +import com.allinpay.xstruct.quickpay.FASTTRXRET; +import com.amarsoft.app.lc.util.DateAssistant; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.tenwa.lease.app.allinpay.util.AllinpayProperties; +import com.tenwa.lease.app.allinpay.util.ConfigConstant; +import com.tenwa.reckon.util.UUIDUtil; + +public class AllinpayPaymentRun implements Runnable { + + private List> list; + + private String localFilePath; + + private AllinpayProperties allinpay; + + private Logger logger = Logger.getLogger(this.getClass()); + + public AllinpayPaymentRun(List> list) { + this.list=list; + } + + @Override + public void run() { + if(list==null||list.size()==0) { + logger.info(">>>>>>>>>>>ûҪۿͨϢ>>>>>>>>"); + return; + } + allinpayPayment(); + } + + private void allinpayPayment() { + logger.info(">>>>>>>>>>>ͨЭ֧ʼִ>>>>>>>>"); + Map sqlMap = new HashMap(0); + Map mapXml = new HashMap<>(); + + try { + String time = DateAssistant.getTodayNow(); + for (Map map : list) { + try { + + BizObject object = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO").createQuery("O.id=:id").setParameter("id", map.get("PROJECT_ID")).getSingleResult(false); + allinpay = new AllinpayProperties(object.getAttribute("subjectid").toString()); + + BizObject result = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN").createQuery("O.PROJECT_ID=:projectId and SIGN_STATUS='sign_status2'").setParameter("projectId", map.get("PROJECT_ID")).getSingleResult(false); + + logger.info(">>>>>>>>>>>ͨЭ֧>>>>>>>>PROJECT_ID=" + map.get("PROJECT_ID")); + + sqlMap.put("SUBMITTIME", time); + sqlMap.put("AGRMNO", result.getAttribute("AGRMNO").toString()); + sqlMap.put("START_AMOUNT", map.get("AMOUNT")); + sqlMap.put("ACCOUNT_NAME", map.get("ACCOUNT_NAME")); + sqlMap.put("PROJECT_ID", map.get("PROJECT_ID")); + sqlMap.put("UUID", map.get("UUID")); + + mapXml.put("AGRMNO", result.getAttribute("AGRMNO").toString()); + mapXml.put("ACCOUNT_NAME", map.get("ACCOUNT_NAME")); + mapXml.put("AMOUNT", new BigDecimal(map.get("AMOUNT")).multiply(new BigDecimal("100")) + .stripTrailingZeros().toPlainString()); + mapXml.put("PROJECT_ID", sqlMap.get("PROJECT_ID")); + mapXml.put("CUST_USERID", sqlMap.get("PROJECT_ID")); + sqlMap = sendMessageByProxy(mapXml, sqlMap); + if("ڴ".equals(sqlMap.get("STATUS"))){ + BizObjectManager bomLRP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_RENT_PLAN"); + BizObject boLRP = bomLRP.createQuery("id=:id").setParameter("id", map.get("UUID")).getSingleResult(true); + boLRP.setAttributeValue("batch_status", "process"); + bomLRP.saveObject(boLRP); + } + saveRequestTxt(sqlMap); + sqlMap.put("FULLPATH", localFilePath); + saveMessage(sqlMap); + + } catch (Exception e) { + logger.error(">>>>>>>>>>>ͨЭ֧ʧ>>>>>>>>"); + e.printStackTrace(); + }finally { + sqlMap.clear(); + mapXml.clear(); + } + } + } catch (Exception e) { + logger.error(">>>>>>>>>>>ͨЭ֧ʧ>>>>>>>>"); + e.printStackTrace(); + } + logger.info(">>>>>>>>>>>ͨЭִ֧н>>>>>>>>"); + } + + + /** + * ͨͨҪۿ + * @param + * @return + */ + private Map sendMessageByProxy(Map mapXml, Map sqlMap) + throws Exception { + logger.info(">>>>>>>>>>>ʼô>>>>>>>>"); + Map map = new HashMap(0); + try { + map = allinpay.allinPayment(mapXml); + } catch (Exception e) { + logger.error(">>>>>>>>>>>ôʧ>>>>>>>>>"); + e.printStackTrace(); + } + logger.info(">>>>>>>>>>>ô>>>>>>>>"); + String requestContent = map.get("request"); + + if (map.size() < 1 || !"success".equals(map.get("message"))) { + logger.error("ϵͳ쳣ͨ쳣:" + map.get("msg")); + logger.error(":" + requestContent); + sqlMap.put("REQUEST_CONTENT", requestContent); + String reqSn = map.get("reqSn"); + if (reqSn == null) { + sqlMap.put("STATUS", "ϵͳ쳣ͨ쳣"); + } else { + //ûзͨۿϢڴ + sqlMap.put("REQ_SN", reqSn); + sqlMap.put("STATUS", "ڴ"); + } + } else { + String responseContent = map.get("response"); + sqlMap.put("REQUEST_CONTENT", requestContent); + sqlMap.put("RESPONSE_CONTENT", responseContent); + AipgRsp rsp = XmlParser.parseRsp(responseContent); + InfoRsp infoRsp = rsp.getINFO(); + if ("|0000|2000|2001|2003|2005|2007|2008|1108|1000|".indexOf(infoRsp.getRET_CODE()) > 0) { + FASTTRXRET ret = (FASTTRXRET) rsp.trxObj(); + if (ret == null || "|0000|2000|2007|2008|".indexOf(ret.getRET_CODE()) > 0) { + logger.info(">>>>>>>>>>>ɹ>>>>>>>>"); + logger.info(":" + requestContent); + logger.info("Ӧ:" + responseContent); + String reqSn = infoRsp.getREQ_SN(); + sqlMap.put("REQ_SN", reqSn); + sqlMap.put("STATUS", "ڴ"); + } else { + String errMsg = ret.getERR_MSG(); + String reqSn = infoRsp.getREQ_SN(); + logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); + logger.error(":" + requestContent); + logger.error("Ӧ:" + responseContent); + sqlMap.put("REQ_SN", reqSn); + sqlMap.put("STATUS", errMsg); + } + } else { + String errMsg = infoRsp.getERR_MSG(); + logger.error(">>>>>>>>>>>ʧ>>>>>>>>errMsg:" + errMsg); + logger.error(":" + requestContent); + logger.error("Ӧ:" + responseContent); + sqlMap.put("STATUS", errMsg); + } + } + return sqlMap; + } + + /** + * ͨؽTXTĵ + * @param map + * @return + */ + private void saveRequestTxt(Map sqlMap) { + BufferedWriter bw = null; + LocalDateTime ldt = LocalDateTime.now(); + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); + try { + if (localFilePath == null) { + localFilePath = ConfigConstant.filePath.replaceAll("\\{uuid\\}",UUIDUtil.getUUID()).replaceAll("\\{YYYYMMDD\\}", dtf.format(ldt)); + } + String fileStr = "֧ͨ:" + sqlMap.get("SUBMITTIME") + System.getProperty("line.separator"); + fileStr += sqlMap.get("REQUEST_CONTENT") + System.getProperty("line.separator"); + fileStr += "֧ͨӦ:" + sqlMap.get("SUBMITTIME") + System.getProperty("line.separator"); + fileStr += sqlMap.get("RESPONSE_CONTENT") + System.getProperty("line.separator"); + File file = new File(localFilePath); + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + bw = new BufferedWriter(new FileWriter(file, true)); + bw.write(fileStr); + bw.newLine(); + bw.flush(); + } catch (Exception e) { + logger.error("ļ" + localFilePath); + e.printStackTrace(); + } finally { + try { + if (bw != null) { + bw.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * ʼͨۿݻܱ + * @param map + * @return Exception + */ + private void saveMessage(Map map) throws Exception { + try { + BizObjectManager bomLCP = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_PAYMENT"); + BizObject boLCP = bomLCP.newObject(); + Set keySet = map.keySet(); + for (String key : keySet) { + if ("|REQUEST_CONTENT|RESPONSE_CONTENT|".indexOf(key) > 0) { + continue; + } + boLCP.setAttributeValue(key, map.get(key)); + } + boLCP.setAttributeValue("NUM", "0"); + bomLCP.saveObject(boLCP); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src_jbo/jbo/com/tenwa/lease/comm/VI_LC_AUDIT_RENT_PLAN.java b/src_jbo/jbo/com/tenwa/lease/comm/VI_LC_AUDIT_RENT_PLAN.java index 9e187881b..b4316ae7b 100644 --- a/src_jbo/jbo/com/tenwa/lease/comm/VI_LC_AUDIT_RENT_PLAN.java +++ b/src_jbo/jbo/com/tenwa/lease/comm/VI_LC_AUDIT_RENT_PLAN.java @@ -18,6 +18,10 @@ public interface VI_LC_AUDIT_RENT_PLAN{ */ public static final String id = "id"; /** + * Ŀid STRING(20)
+ */ + public static final String project_id = "project_id"; + /** * ͬ STRING(20)
*/ public static final String contract_id = "contract_id"; @@ -141,4 +145,8 @@ public interface VI_LC_AUDIT_RENT_PLAN{ * Ͷű STRING(20)
*/ public static final String payment_number = "payment_number"; + /** + * ǩԼ STRING(20)
+ */ + public static final String collect_type = "collect_type"; } \ No newline at end of file diff --git a/src_jbo/jbo/loan/VI_RENT_COLLECT.java b/src_jbo/jbo/loan/VI_RENT_COLLECT.java new file mode 100644 index 000000000..4dc9fde9b --- /dev/null +++ b/src_jbo/jbo/loan/VI_RENT_COLLECT.java @@ -0,0 +1,108 @@ +package jbo.loan; + +import java.lang.String; + +/** +* ۿϢ - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface VI_RENT_COLLECT{ + /** + * ۿϢ

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.loan.VI_RENT_COLLECT"; + /** + * ʶ STRING(32)
+ */ + public static final String ID = "ID"; + /** + * ͬid STRING(32)
+ */ + public static final String contract_id = "contract_id"; + /** + * ҵ STRING(32)
+ */ + public static final String businesstype = "businesstype"; + /** + * id STRING(32)
+ */ + public static final String subjectid = "subjectid"; + /** + * STRING(32)
+ */ + public static final String subjectname = "subjectname"; + /** + * id STRING(32)
+ */ + public static final String distributor_id = "distributor_id"; + /** + * ͬ STRING(32)
+ */ + public static final String contract_number = "contract_number"; + /** + * payment_number STRING(32)
+ */ + public static final String payment_number = "payment_number"; + /** + * ͻ STRING(32)
+ */ + public static final String customername = "customername"; + /** + * ͻ˺ STRING(32)
+ */ + public static final String acc_number = "acc_number"; + /** + * ڴ STRING(32)
+ */ + public static final String plan_list = "plan_list"; + /** + * ƻ STRING(32)
+ */ + public static final String plan_date = "plan_date"; + /** + * ۿ״̬ STRING(32)
+ */ + public static final String collect_status = "collect_status"; + /** + * ۿ״̬Ϣ STRING(32)
+ */ + public static final String collect_msg = "collect_msg"; + /** + * ״̬Ϣ STRING(32)
+ */ + public static final String batch_status = "batch_status"; + /** + * DOUBLE(32)
+ */ + public static final String rent = "rent"; + /** + * DOUBLE(32)
+ */ + public static final String corpus = "corpus"; + /** + * Ϣ DOUBLE(32)
+ */ + public static final String interest = "interest"; + /** + * Ϣ DOUBLE(32)
+ */ + public static final String penalty = "penalty"; + /** + * DOUBLE(32)
+ */ + public static final String rent_over = "rent_over"; + /** + * DOUBLE(32)
+ */ + public static final String corpus_over = "corpus_over"; + /** + * Ϣ DOUBLE(32)
+ */ + public static final String interest_over = "interest_over"; + /** + * Ϣ DOUBLE(32)
+ */ + public static final String penalty_over = "penalty_over"; +} \ No newline at end of file diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index 81787f368..4f706312b 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -32,6 +32,7 @@ import com.gnete.security.crypt.Crypt; import com.gnete.security.crypt.CryptException; import com.tenwa.comm.util.date.DateAssistant; import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; import com.tenwa.quartz.DateUtil; import jbo.app.tenwa.calc.LC_COLLECT_MANUAL_INFO; @@ -45,6 +46,7 @@ import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG; import jbo.com.tenwa.lease.comm.LB_CLEAR_FILE_RECORD; import jbo.com.tenwa.lease.comm.LB_INTFACE_FILE_RECORD; import jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN; +import jbo.loan.VI_RENT_COLLECT; import jbo.sys.CODE_LIBRARY; public class CollectAuditInfoCache { @@ -851,15 +853,24 @@ public class CollectAuditInfoCache { } } BizObjectManager bm = JBOFactory.getFactory().getManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME); - - List bolist = bm.createQuery("select distinct O.contract_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and ca.acc_type = 'Debit' and O.id in ("+parms.toString()+")").getResultList(false); - if (bolist.size() != 0) { - for(BizObject bo:bolist){ + List bolistTL = bm.createQuery("select distinct O.contract_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and collect_type='TLcollect' and O.id in ("+parms.toString()+")").getResultList(false); + List bolistYL = bm.createQuery("select distinct O.contract_id,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,ca.BANK_NAME,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and collect_type='YLcollect' and O.id in ("+parms.toString()+")").getResultList(false); + if (bolistTL.size() != 0) { + AllinpayPaymentDo apd = new AllinpayPaymentDo(); + for(BizObject bo:bolistTL){ String plan_id = bo.getAttribute("id").toString(); bo.setAttributeValue("rent", object.get(plan_id)); } - singleBatchCollectMoeny(tx, bolist); + apd.BatchCollectMoeny(tx, bolistTL); } + if (bolistYL.size() != 0) { + for(BizObject bo:bolistYL){ + String plan_id = bo.getAttribute("id").toString(); + bo.setAttributeValue("rent", object.get(plan_id)); + } + singleBatchCollectMoeny(tx, bolistYL); + } + return "ۿɹ"; } /** diff --git a/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java b/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java index 90b205b56..04c44431e 100644 --- a/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java +++ b/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java @@ -253,6 +253,7 @@ public class RentIncomeMethod { boLORL.setAttributeValue("ID", UUIDUtil.getUUID()); boLORL.setAttributeValue("PAYMENT_NUMBER", boVLRP.getAttribute("PAYMENT_NUMBER").getString()); boLORL.setAttributeValue("PLAN_LIST", boVLRP.getAttribute("PLAN_LIST").getString()); + boLORL.setAttributeValue("PLAN_ID", boVLRP.getAttribute("ID").getString()); boLORL.setAttributeValue("FLOW_NAME", "տ"); boLORL.setAttributeValue("FLOWUNID", flowunid); bomLORL.saveObject(boLORL); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java index 5b6ae323f..569b95ac8 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java @@ -20,6 +20,7 @@ import com.base.util.QuartzUtil; import com.tenwa.collectaudit.cache.CollectAuditInfoCache; import com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj; import com.tenwa.comm.util.date.DateAssistant; +import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentDo; public class AutoBuckle implements Job { private JobInitUserName jboName; @@ -30,54 +31,19 @@ public class AutoBuckle implements Job { String plan_date = DateAssistant.getToday(); Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); String curUserId = userId == null? "system" : userId.toString(); + String sql = "O.plan_list=(select min(t.plan_list) from jbo.loan.VI_RENT_COLLECT t where t.contract_id=O.contract_id and t.COLLECT_STATUS IN ('δտ', 'տ','') and t.SUBJECTID=:subjectId and t.collect_type=:collectType and t.PLAN_DATE <= '" + plan_date + "' and ( t.BATCH_STATUS<>'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id"; - //ȡռñЩտռõ - List planIDs = new ArrayList(); // ȡݹIJ try { tx = JBOFactory.createJBOTransaction(); - List bosSz = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery("O.plan_list=(select min(t.plan_list) from jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN t where t.contract_id=O.contract_id and t.COLLECT_STATUS IN ('δտ', 'տ','') and t.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and t.PLAN_DATE <= '" + plan_date + "' and ( t.BATCH_STATUS<>'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id").getResultList(true); - List bol = JBOFactory.createBizObjectQuery(LC_OCCUPY_RENT_LIST.CLASS_NAME,"FLOW_NAME in ('տ','΢տ','΢֧տ','ͬ;ֹ')").getResultList(false); - if(bol.size()>0){ - for(int i=0;i bof = JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME,"FLOWUNID=:flowunid").setParameter("flowunid", flowunid).getResultList(false); - if(bof.size()>0){ - for(int j=0;j bop = JBOFactory.createBizObjectQuery(LC_RENT_PLAN.CLASS_NAME,"PAYMENT_NUMBER=:PAYMENT_NUMBER").setParameter("PAYMENT_NUMBER", PAYMENT_NUMBER).getResultList(false); - if(bop.size()>0){ - for(int k=0;k bosSz = JBOFactory.getBizObjectManager("jbo.loan.VI_RENT_COLLECT", tx).createQuery(sql).setParameter("subjectId", subjectId).setParameter("collectType", collectType).getResultList(false); StringBuffer ids = new StringBuffer(); if(bosSz!=null&&bosSz.size()>0){ - a:for(BizObject bo : bosSz){ + for(BizObject bo : bosSz){ String pid = bo.getAttribute("id").getString(); - if(planIDs.size()>0){ - for(int i=0;i bosTj = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", txTj).createQuery(" O.plan_list=(select min(t.plan_list) from jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN t where t.contract_id=O.contract_id and t.COLLECT_STATUS IN ('δտ', 'տ','') and t.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and t.PLAN_DATE <= '" + plan_date + "' and ( t.BATCH_STATUS<>'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id").getResultList(true); + String subjectId = "d989246c11c111eaaa0000163e0e11e6"; + String collectType = "YLcollect"; + List bosTj = JBOFactory.getBizObjectManager("jbo.loan.VI_RENT_COLLECT", txTj).createQuery(sql).setParameter("subjectId", subjectId).setParameter("collectType", collectType).getResultList(false); StringBuffer idsTj = new StringBuffer(); if(bosTj!=null && bosTj.size()>0){ - a:for(BizObject bo : bosTj){ + for(BizObject bo : bosTj){ String pid = bo.getAttribute("id").getString(); - if(planIDs.size()>0){ - for(int i=0;i'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id"; + List bos = JBOFactory.getBizObjectManager("jbo.loan.VI_RENT_COLLECT", txTL).createQuery(TLsql).setParameter("collectType", collectType).getResultList(false); + StringBuffer ids = new StringBuffer(); + if(bos!=null && bos.size()>0){ + for(BizObject bo : bos){ + String pid = bo.getAttribute("id").getString(); + ids.append(pid+"@"); + } + AllinpayPaymentDo apd = new AllinpayPaymentDo(); + apd.setId(ids.toString()); + apd.batchCollectManage(txTL); + + } + QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "ͨɹ", curUserId); + } catch (Exception e) { + e.printStackTrace(); + QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "ͨʧ", curUserId); + if (txTL != null) { + try { + txTL.rollback(); + txTL=null; + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + } finally{ + try { + if(txTL !=null){ + txTL.commit(); + } + } catch (JBOException e) { + e.printStackTrace(); + } + } + } } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java index 4ca8b9115..0051347ff 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java @@ -17,6 +17,7 @@ import com.base.util.QuartzUtil; import com.tenwa.collectaudit.cache.CollectAuditInfoCache; import com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj; import com.tenwa.comm.util.date.DateAssistant; +import com.tenwa.lease.app.allinpay.service.impl.AllinpayPaymentQueryRun; public class AutoRefresh implements Job{ @@ -29,7 +30,7 @@ public class AutoRefresh implements Job{ String curUserId = userId == null? "system" : userId.toString(); try { tx = JBOFactory.createJBOTransaction(); - List bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); + List bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); StringBuffer ids = new StringBuffer(); if(bos!=null && bos.size()>0){ for (BizObject bo : bos) { @@ -44,7 +45,7 @@ public class AutoRefresh implements Job{ } //Զ CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj(); - List bosTj = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); + List bosTj = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δտ', 'տ','') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and collect_type='YLcollect' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true); StringBuffer idsTj = new StringBuffer(); if(bosTj!=null && bosTj.size()>0){ for (BizObject bo : bosTj) { @@ -68,5 +69,7 @@ public class AutoRefresh implements Job{ e.printStackTrace(); } } + AllinpayPaymentQueryRun run = new AllinpayPaymentQueryRun(); + new Thread(run).start(); } } diff --git a/src_tenwa/com/tenwa/lease/flow/rent/rentreback/VILCRentCollectHandler.java b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/VILCRentCollectHandler.java new file mode 100644 index 000000000..36c4a5eeb --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/rent/rentreback/VILCRentCollectHandler.java @@ -0,0 +1,24 @@ +package com.tenwa.lease.flow.rent.rentreback; + +import java.math.BigDecimal; + +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.app.tenwa.calc.VI_LC_RENT_PLAN; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.dw.handler.impl.CommonHandler; + +public class VILCRentCollectHandler extends CommonHandler{ + + @Override + protected void initDisplayForEdit(BizObject bo) throws Exception { + double rent_over = bo.getAttribute("rent_over").getDouble(); + double penalty_over = bo.getAttribute("penalty_over").getDouble(); + double back_rent = rent_over+penalty_over; + back_rent = new BigDecimal(String.valueOf(back_rent)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); + bo.setAttributeValue("back_rent", back_rent); + + } +}