From 91eafeca85f80a6e40bc161c6cc2b45a229e4a0a Mon Sep 17 00:00:00 2001 From: tangfutang Date: Sat, 26 Dec 2020 16:30:58 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E5=AE=A2=E6=88=B7bug?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvoiceTJ/InvoiceLeaseDirectTJList.jsp | 1 + .../Comm/LBDebitCard/DebitCardQueryInfo.jsp | 6 +- .../reckon/copydata/FileCopyToOtherPath.java | 6 +- src_sql/view/vi_splitting_pay.sql | 81 ++++----- src_sql/投产SQL/v20201022/tft_20201022.sql | 4 + 报表/汽车类报表一/客户融资明细表_财务.xml | 33 +++- 报表/资产处置报表/入池资产报表.xml | 155 ++++++++++-------- 7 files changed, 167 insertions(+), 119 deletions(-) diff --git a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeaseDirectTJList.jsp b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeaseDirectTJList.jsp index 90b688723..b8b98f311 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeaseDirectTJList.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeaseDirectTJList.jsp @@ -7,6 +7,7 @@ dwTemp.Style="1"; //--ΪGrid-- dwTemp.ReadOnly = "1"; //ֻģʽ dwTemp.setPageSize(20); + dwTemp.MultiSelect=true; dwTemp.genHTMLObjectWindow(""); //0Ƿչʾ 1 Ȩ޿ 2 չʾ 3ťʾ 4ť 5ť¼ 6 7 8 9ͼ꣬CSSʽ 10 String sButtons[][] = { diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardQueryInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardQueryInfo.jsp index fc8d0f950..8395e9a32 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardQueryInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardQueryInfo.jsp @@ -7,15 +7,17 @@ */ String sPrevUrl = CurPage.getParameter("PrevUrl"); String contractId = CurPage.getParameter("ContractId"); + String projectId = CurPage.getParameter("ProjectId"); if(sPrevUrl == null) sPrevUrl = ""; - String sTempletNo = "DebitCardQueryInfo";//--ģ-- +// String sTempletNo = "DebitCardQueryInfo";//--ģ-- + String sTempletNo = "DebitCardInfoMcontract";//޸ijɲѯʽģ ASObjectModel doTemp = new ASObjectModel(sTempletNo); // doTemp.setColTips("", ""); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform dwTemp.ReadOnly = "-2";//ֻģʽ - dwTemp.genHTMLObjectWindow(contractId); + dwTemp.genHTMLObjectWindow(projectId); String sButtons[][] = { {"false","All","Button","","޸","as_save(0)","","","",""}, diff --git a/calc/com/tenwa/reckon/copydata/FileCopyToOtherPath.java b/calc/com/tenwa/reckon/copydata/FileCopyToOtherPath.java index 6920d7d65..3cdd1f76d 100644 --- a/calc/com/tenwa/reckon/copydata/FileCopyToOtherPath.java +++ b/calc/com/tenwa/reckon/copydata/FileCopyToOtherPath.java @@ -51,7 +51,7 @@ public class FileCopyToOtherPath { +" and LDL.DOC_NAME =''"; }*/ - String sql = "SELECT O.FULLPATH AS FULLPATH, CONCAT(REPLACE(LCI.CONTRACT_NO,'/','-'), '/', REPLACE(LDL.ONE_CLASSIFY,'/','-'), '/' , REPLACE(LDL.DOC_NAME,'/','-'), '/', REPLACE(O.FILENAME,'/','-')) AS TARGET_FILE_PATH FROM LB_DOCATTRIBUTE O" + String sql = "SELECT O.FULLPATH AS FULLPATH, CONCAT(REPLACE(LCI.CONTRACT_NO,'/','-'), '/', REPLACE(LDL.ONE_CLASSIFY,'/','-'), '/' , REPLACE(LDL.DOC_NAME,'/','-'), '/') AS TARGET_FILE_PATH , REPLACE(O.FILENAME,'/','-') as FILENAME FROM LB_DOCATTRIBUTE O" +" LEFT JOIN LB_DOCLIBRARY LDL ON LDL.ID = O.LIBRARY_ID" +" LEFT JOIN LB_DOCRELATIVE LDR ON LDL.RELATIVE_ID = LDR.ID" +" LEFT JOIN LB_PROJECT_INFO LPI ON LDR.PROJ_ID = LPI.ID" @@ -62,9 +62,10 @@ public class FileCopyToOtherPath { Map params=new HashMap(); List> pathList = DataOperatorUtil.getDataBySql(Sqlca,sql,params); if(pathList.size()>0){ + int i = 1; for(Map path:pathList){ srcPath = path.get("FULLPATH"); - destPath =rootPath+"/"+path.get("TARGET_FILE_PATH"); + destPath =rootPath+"/"+path.get("TARGET_FILE_PATH")+i+"_"+path.get("FILENAME"); File srcFile = new File(srcPath); File destFile = new File(destPath); System.out.println("ԭ·"+srcPath); @@ -73,6 +74,7 @@ public class FileCopyToOtherPath { //ļtrueΪ޸ʱ䲻䣬failΪǰʱ. //ʱĿļѴڣ¸ǡ FileUtils.copyFile(srcFile, destFile, true); + i++; } catch (IOException e) { e.printStackTrace(); } diff --git a/src_sql/view/vi_splitting_pay.sql b/src_sql/view/vi_splitting_pay.sql index 617e2ecd7..fff920627 100644 --- a/src_sql/view/vi_splitting_pay.sql +++ b/src_sql/view/vi_splitting_pay.sql @@ -1,41 +1,42 @@ -DELIMITER $$ - -create ALGORITHM=UNDEFINED DEFINER=`apzl`@`%` SQL SECURITY DEFINER VIEW `vi_splitting_pay` AS ( -SELECT - `o`.`distributor_id` AS `distributor_id`, - `o`.`CONTRACT_NO` AS `CONTRACT_NO`, - `o`.`contract_id` AS `contract_id`, - `o`.`lccc_charge` AS `lccc_charge`, - `o`.`lccc_ratio` AS `lccc_ratio`, - `o`.`lccc_list` AS `lccc_list`, - `o`.`plan_list` AS `plan_list`, - `lul`.`CUSTOMER_NAME` AS `customer_name`, - `lrp`.`interest_sp` AS `sum_sp`, - IFNULL(`lsp`.`splitting_money`,0) AS `splitting_money`, - CAST((`lrp`.`interest_sp` * `o`.`lccc_ratio`) / 100 AS DECIMAL(22,2)) AS `should_sp`, - CAST(((`lrp`.`interest_sp` * `o`.`lccc_ratio`) / 100) AS DECIMAL(22,2)) - IFNULL(`lsp`.`splitting_money`,0) AS `cur_sp` -FROM (((`apzl`.`vi_split_config` `o` - LEFT JOIN (SELECT - SUM(`apzl`.`lc_rent_plan`.`INTEREST_sp`) AS `interest_sp`, - `apzl`.`lc_rent_plan`.`CONTRACT_ID` AS `contract_id` - FROM `apzl`.`lc_rent_plan` - WHERE (`apzl`.`lc_rent_plan`.`INTEREST_sp` IS NOT NULL) - GROUP BY `apzl`.`lc_rent_plan`.`CONTRACT_ID`) `lrp` - ON ((`lrp`.`contract_id` = `o`.`contract_id`))) - LEFT JOIN (SELECT - SUM(IFNULL(`apzl`.`lc_splitting_pay`.`splitting_money`,0)) AS `splitting_money`, - `apzl`.`lc_splitting_pay`.`contract_id` AS `contract_id`, - MAX(`apzl`.`lc_splitting_pay`.`pay_list`) AS `pay_list`, - `apzl`.`lc_splitting_pay`.`id` AS `id` - FROM `apzl`.`lc_splitting_pay` - GROUP BY `apzl`.`lc_splitting_pay`.`contract_id`) `lsp` - ON (((`o`.`contract_id` = `lsp`.`contract_id`)))) - LEFT JOIN `apzl`.`lb_union_lessee` `lul` - ON (((`lul`.`CONTRACT_ID` = `o`.`contract_id`) - AND (`lul`.`IS_MAIN` = 'Y')))) -WHERE (IFNULL(lsp.pay_list,0)<>O.lccc_charge - AND (`o`.`lccc_charge` > 0)) - -)$$ - +DELIMITER $$ + +ALTER ALGORITHM=UNDEFINED DEFINER=`apzl`@`%` SQL SECURITY DEFINER VIEW `vi_splitting_pay` AS ( +select + `o`.`distributor_id` AS `distributor_id`, + `o`.`CONTRACT_NO` AS `CONTRACT_NO`, + `o`.`contract_id` AS `contract_id`, + `o`.`lccc_charge` AS `lccc_charge`, + `o`.`lccc_ratio` AS `lccc_ratio`, + `o`.`lccc_list` AS `lccc_list`, + `o`.`plan_list` AS `plan_list`, + `lul`.`CUSTOMER_NAME` AS `customer_name`, + `lrp`.`interest_sp` AS `sum_sp`, + ifnull(`lsp`.`splitting_money`,0) AS `splitting_money`, + cast(((`lrp`.`interest_sp` * `o`.`lccc_ratio`) / 100) as decimal(22,2)) AS `should_sp`, + (cast(((`lrp`.`interest_sp` * `o`.`lccc_ratio`) / 100) as decimal(22,2)) - ifnull(`lsp`.`splitting_money`,0)) AS `cur_sp`, + `di`.`DISTRIBUTOR_NAME` AS `distributor_name` +from ((((`apzl`.`vi_split_config` `o` + left join (select + sum(`apzl`.`lc_rent_plan`.`INTEREST_sp`) AS `interest_sp`, + `apzl`.`lc_rent_plan`.`CONTRACT_ID` AS `contract_id` + from `apzl`.`lc_rent_plan` + where (`apzl`.`lc_rent_plan`.`INTEREST_sp` is not null) + group by `apzl`.`lc_rent_plan`.`CONTRACT_ID`) `lrp` + on ((`lrp`.`contract_id` = `o`.`contract_id`))) + left join (select + sum(ifnull(`apzl`.`lc_splitting_pay`.`splitting_money`,0)) AS `splitting_money`, + `apzl`.`lc_splitting_pay`.`contract_id` AS `contract_id`, + max(`apzl`.`lc_splitting_pay`.`pay_list`) AS `pay_list`, + `apzl`.`lc_splitting_pay`.`id` AS `id` + from `apzl`.`lc_splitting_pay` + group by `apzl`.`lc_splitting_pay`.`contract_id`) `lsp` + on ((`o`.`contract_id` = `lsp`.`contract_id`))) + left join `apzl`.`lb_union_lessee` `lul` + on (((`lul`.`CONTRACT_ID` = `o`.`contract_id`) + and (`lul`.`IS_MAIN` = 'Y')))) + left join `apzl`.`distributor_info` `di` + on ((`di`.`distributor_no` = `o`.`distributor_id`))) +where ((ifnull(`lsp`.`pay_list`,0) <> `o`.`lccc_charge`) + and (`o`.`lccc_charge` > 0)))$$ + DELIMITER ; \ No newline at end of file diff --git a/src_sql/投产SQL/v20201022/tft_20201022.sql b/src_sql/投产SQL/v20201022/tft_20201022.sql index 59e2d0d35..a1ddbbad2 100644 --- a/src_sql/投产SQL/v20201022/tft_20201022.sql +++ b/src_sql/投产SQL/v20201022/tft_20201022.sql @@ -132,6 +132,10 @@ Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualn delete from SCENARIO_MODEL where scenarioid='ſ' and modelid='000040'; Insert Into SCENARIO_MODEL (scenarioid,modelid,sortno,modelname,modeldescribe,modeltype,subtypeno,runcondition,status,nopassdeal,passdeal,passmessage,nopassmessage,executescript,remark,inputuser,inputorg,inputtime,updateuser,updatetime,groupid,modelkind,bizviewer) Values ('ſ','000040','0011','ƺѺǷд','ƺѺǷд','20','0010','','1','10','10','ͨ','дƺѺ','SELECT CASE WHEN ISNULL(plate_number)=0 and LENGTH(TRIM(plate_number))>0 THEN ''true'' ELSE ''false'' END FROM LB_CAR_LICENSE_PLATE_INFO_TEMP WHERE flowunid=''#{ObjectNo}'';','','administrator','8009001','2019/10/15 09:33:05','administrator','2019/09/03 00:10:33',null,null,null); +-- ޸ҳ +delete from AWE_DO_CATALOG where dono='VILCRentPlanList'; +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('VILCRentPlanList','ƻͼ',null,'30120',null,'1','1','default','jbo.loan.VI_RENT_COLLECT_4_EBANK','O left join jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR lec on O.contract_id=lec.contract_id and lec.car_attribute=''head'' left join jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO lcl on lec.contract_id=lcl.contract_id and lec.frame_number=lcl.frame_number','O.businesstype=:businessType and O.subjectid=:subjectId and (O.batch_status<>''process'' or O.batch_status is null) and v.DATE_FORMAT(O.plan_date,''%Y%m'') <= v.DATE_FORMAT(v.SYSDATE(),''%Y%m'') and rent_over>0','','contract_number,plan_list','com.tenwa.flow.rent.rentincome.VILCRentPlanListHandler',null,'SYS_Designer','2017/06/04 20:29:52','SYS_Designer','2020/12/24 11:01:55','','1',''); + -- ---------------ִ--------------------------------------- -- ͨ۶ŷֵ diff --git a/报表/汽车类报表一/客户融资明细表_财务.xml b/报表/汽车类报表一/客户融资明细表_财务.xml index f38617e5d..605fac05e 100644 --- a/报表/汽车类报表一/客户融资明细表_财务.xml +++ b/报表/汽车类报表一/客户融资明细表_财务.xml @@ -47,7 +47,7 @@ CIF.CERTID AS CERTID, CIF.CUSTOMER_NUM AS CUSTOMER_NUM, LCCT.YEAR_RATE AS YEAR_RATE, - DATE_FORMAT(lfif.fact_date_f,'%Y%m') AS up, + DATE_FORMAT(LCCT.START_DATE,'%Y%m') AS up, IFNULL(LFIF.FACT_MONEY_F,0) AS PAY_MONEY, CASE WHEN PSL.operationType = 'DYCD' THEN IFNULL(LFI.FACT_MONEY,0) ELSE '0.00' END AS DYCD_MONEY, IFNULL(LCCT.GPS_FEE,0) AS GPS_MONEY, @@ -63,10 +63,9 @@ IFNULL(LRP.CORPUS,0) AS CORPUS, IFNULL(LRP.INTEREST,0) AS INTEREST, DI.DISTRIBUTOR_NAME AS DISTRIBUTOR_NAME, - CASE WHEN (LCI.CONTRACT_STATUS='105' OR LCI.CONTRACT_STATUS='100') AND LCI.ACTUAL_END_DATE IS NOT NULL THEN LCI.ACTUAL_END_DATE - WHEN (LCI.CONTRACT_STATUS='105' OR LCI.CONTRACT_STATUS='100') AND LCI.ACTUAL_END_DATE IS NULL THEN LCI.END_DATE - ELSE '' END AS END_DATE,ct.typename, - case + CASE WHEN LCI.CONTRACT_STATUS='100' THEN lfra.PAYDAY_ADJUST + ELSE (select PLAN_DATE from lc_rent_plan where contract_id=LCI.id order by PLAN_DATE desc limit 1 ) END AS END_DATE,ct.typename, +case DI.F_I_TYPE when 'f_i_type01' then '集团内' @@ -74,7 +73,7 @@ then '集团外' when 'f_i_type03' then '自营' - end as f_i_type + end as f_i_type,case LCI.car_type when 'new_car' then '新车' when 'used_car' then '二手车' else '' end carTtpe FROM LC_CALC_CONDITION LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID @@ -90,6 +89,7 @@ LEFT JOIN LB_UNION_LESSEE LUL ON LUL.CONTRACT_ID=LCI.ID LEFT JOIN CUSTOMER_INFO CIF ON CIF.CUSTOMERID=LUL.CUSTOMER_ID LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID LEFT JOIN PRD_SPECIFIC_LIBRARY PSL ON PSL.PRODUCTID = LPI.PRODUCT_ID LEFT JOIN BUSINESS_TYPE ct ON ct.typeno=lci.PRODUCT_ID +left join LC_FUND_RENT_ADJUST lfra on lfra.contract_id=LCI.id WHERE LUL.IS_MAIN='Y' AND (LCI.CONTRACT_STATUS BETWEEN 31 AND 100 OR LCI.CONTRACT_STATUS='103' OR LCI.CONTRACT_STATUS='105') AND lci.businesstype='1' @@ -626,7 +626,7 @@ WHERE LUL.IS_MAIN='Y' AND (LCI.CONTRACT_STATUS BETWEEN 31 AND 100 OR LCI.CONTRAC - ff8080817371053c0175aac51c3b0161 + 2c9c81b9752030960175bbe636ad005c f_i_type STRING @@ -644,6 +644,25 @@ WHERE LUL.IS_MAIN='Y' AND (LCI.CONTRACT_STATUS BETWEEN 31 AND 100 OR LCI.CONTRAC + + ff808081761d423e01768847f571000d + carTtpe + STRING + + + carTtpe + 100 + 29 + true + + false + false + false + false + + + + diff --git a/报表/资产处置报表/入池资产报表.xml b/报表/资产处置报表/入池资产报表.xml index a9188797c..28bcc0915 100644 --- a/报表/资产处置报表/入池资产报表.xml +++ b/报表/资产处置报表/入池资产报表.xml @@ -92,9 +92,9 @@ lpi.subjectname, '' AS '是否有保险', '' AS '保险公司名称', '' AS '保险到期日' , - LEC.LICENSE_PLATE_NUMBER AS LICENSE_PLATE_NUMBER,lii.Invoice_number AS Invoice_number,lii.Invoice_money AS Invoice_money,lii.Invoice_date AS Invoice_date ,LCI.ASSETTRANSFERER,LCI.TRANSFERDATE,LCI.TURNOUTREMARKS,case when syc.model_id is not null then '商用车' when cyc.modelid is not null then '乘用车' else '其他' end as cartype + LEC.LICENSE_PLATE_NUMBER AS LICENSE_PLATE_NUMBER,lii.Invoice_number AS Invoice_number,lii.Invoice_money AS Invoice_money,lii.Invoice_date AS Invoice_date ,LCI.ASSETTRANSFERER,LCI.TRANSFERDATE,LCI.TURNOUTREMARKS,case when syc.model_id is not null then '商用车' when cyc.modelid is not null then '乘用车' else '其他' end as cartype,LCC.CLEAN_LEASE_MONEY as CLEAN_LEASE_MONEY FROM - (SELECT ID,DISTRIBUTOR_ID,CONTRACT_NUMBER,ASSETTRANSFERER,TRANSFERDATE,TURNOUTREMARKS FROM LB_CONTRACT_INFO WHERE BUSINESSTYPE='1' AND CONTRACT_STATUS='31')LCI + (SELECT ID,DISTRIBUTOR_ID,CONTRACT_NUMBER,ASSETTRANSFERER,TRANSFERDATE,TURNOUTREMARKS FROM LB_CONTRACT_INFO WHERE BUSINESSTYPE='1' AND (CONTRACT_STATUS='31' or CONTRACT_STATUS='100') )LCI LEFT JOIN (SELECT CONTRACT_ID,SUM(FACT_MONEY) AS FACT_MONEY,MAX(FACT_DATE) AS FACT_DATE FROM LC_FUND_INCOME WHERE FEE_TYPE = 'feetype10' AND EBANK_STATUS = '05' GROUP BY CONTRACT_ID)LFI ON LFI.CONTRACT_ID=LCI.ID LEFT JOIN @@ -137,7 +137,7 @@ LEFT JOIN VI_OVERDUE_CONTRACT2 VVC ON VVC.CONTRACT_ID=LFI.CONTRACT_ID LEFT JOIN LB_CAR_LICENSE_PLATE_INFO LCLPI ON LCLPI.CONTRACT_ID=LCI.ID AND LCLPI.FRAME_NUMBER=LEC.FRAME_NUMBER -LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID +LEFT JOIN lb_invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID and lii.remarks='1' @@ -148,7 +148,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID subjectname 100 - 64 + 0 true false @@ -167,7 +167,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID PROJECT_NO 100 - 65 + 1 true false @@ -186,7 +186,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CONTRACT_NUMBER 100 - 66 + 2 true false @@ -205,7 +205,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID DISTRIBUTOR_NAME 100 - 67 + 3 true false @@ -224,7 +224,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID JXS_PROVINCE 100 - 68 + 4 true false @@ -243,7 +243,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CUSTOMERNAME 100 - 69 + 5 true false @@ -262,7 +262,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID SEX 100 - 70 + 6 true false @@ -281,7 +281,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CERTTYPE 100 - 71 + 7 true false @@ -300,7 +300,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CERTID 100 - 72 + 8 true false @@ -319,7 +319,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID AGE 100 - 73 + 9 true false @@ -338,7 +338,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID MARITAL_STATUS 100 - 74 + 10 true false @@ -357,7 +357,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YEAR_MONEY 100 - 75 + 11 true false @@ -376,7 +376,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID JZ_PROVINCE 100 - 76 + 12 true false @@ -395,7 +395,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID JZ_CITY 100 - 77 + 13 true false @@ -414,7 +414,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID HJ_PROVINCE 100 - 78 + 14 true false @@ -433,7 +433,26 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID HJ_CITY 100 - 79 + 15 + true + + false + false + false + false + + + + + + ff808081761d423e017688613877000e + CLEAN_LEASE_MONEY + NUMBER + + + CLEAN_LEASE_MONEY + 100 + 16 true false @@ -449,10 +468,10 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID FK_MONEY NUMBER - + FK_MONEY 100 - 80 + 17 true false @@ -471,7 +490,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID FK_DATE 100 - 81 + 18 true false @@ -490,7 +509,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID PRODUCT_NAME 100 - 82 + 19 true false @@ -509,7 +528,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YEAR_RATE 100 - 83 + 20 true false @@ -528,7 +547,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID LEASE_TERM 100 - 84 + 21 true false @@ -547,7 +566,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID FIRST_PAYMENT_RATIO 100 - 85 + 22 true false @@ -566,7 +585,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CAUTION_MONEY_RATIO 100 - 86 + 23 true false @@ -585,7 +604,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID REFUND_BANK 100 - 87 + 24 true false @@ -604,7 +623,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID REFUND_ACC_NUMBER 100 - 88 + 25 true false @@ -623,7 +642,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID REFUND_FREQUENCY 100 - 89 + 26 true false @@ -642,7 +661,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID REFUND_WAY 100 - 90 + 27 true false @@ -661,7 +680,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID BRAND 100 - 91 + 28 true false @@ -680,7 +699,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID CAR_TYPE 100 - 92 + 29 true false @@ -699,7 +718,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID cartype 100 - 93 + 30 true false @@ -718,7 +737,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID MODEL 100 - 94 + 31 true false @@ -737,7 +756,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID USED_CAR_DEADLINE 100 - 95 + 32 true false @@ -756,7 +775,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID EXPIRE_DATE 100 - 96 + 33 true false @@ -775,7 +794,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID REFUND_DATE 100 - 97 + 34 true false @@ -794,7 +813,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID SPOUSE_NAME 100 - 98 + 35 true false @@ -813,7 +832,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID IS_NO_ASSURE 100 - 99 + 36 true false @@ -832,7 +851,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID ASSURE_NAME 100 - 100 + 37 true false @@ -851,7 +870,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID USED_ASSESS_MONEY 100 - 101 + 38 true false @@ -870,7 +889,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID WC_CORPUS 100 - 102 + 39 true false @@ -889,7 +908,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID OVERDUE_DAYS 100 - 103 + 40 true false @@ -908,7 +927,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YQ_CORPUS 100 - 104 + 41 true false @@ -927,7 +946,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YQ_INTEREST 100 - 105 + 42 true false @@ -946,7 +965,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YQ_HANDLING_CHARGE 100 - 106 + 43 true false @@ -965,7 +984,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID YQ_PENALTY 100 - 107 + 44 true false @@ -984,7 +1003,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID OVERDUE_CON 100 - 108 + 45 true false @@ -1003,7 +1022,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID MAX_OVERDUE_DAYS 100 - 109 + 46 true false @@ -1022,7 +1041,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID APPLY_MONEY 100 - 110 + 47 true false @@ -1041,7 +1060,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID IS_NO_PLEDGE 100 - 111 + 48 true false @@ -1060,7 +1079,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID RENT 100 - 112 + 49 true false @@ -1079,7 +1098,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID WC_RENT 100 - 113 + 50 true false @@ -1098,7 +1117,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID WC_INTEREST 100 - 114 + 51 true false @@ -1117,7 +1136,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID FRAME_NUMBER 100 - 115 + 52 true false @@ -1136,7 +1155,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID ENGINE_NUMBER 100 - 116 + 53 true false @@ -1155,7 +1174,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID MODEL2 100 - 117 + 54 true false @@ -1174,7 +1193,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID 是否有保险 100 - 118 + 55 true false @@ -1193,7 +1212,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID 保险公司名称 100 - 119 + 56 true false @@ -1212,7 +1231,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID 保险到期日 100 - 120 + 57 true false @@ -1231,7 +1250,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID LICENSE_PLATE_NUMBER 100 - 121 + 58 true false @@ -1250,7 +1269,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID Invoice_number 100 - 122 + 59 true false @@ -1269,7 +1288,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID Invoice_money 100 - 123 + 60 true false @@ -1288,7 +1307,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID Invoice_date 100 - 124 + 61 true false @@ -1307,7 +1326,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID ASSETTRANSFERER 100 - 125 + 62 true false @@ -1326,7 +1345,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID TRANSFERDATE 100 - 126 + 63 true false @@ -1345,7 +1364,7 @@ LEFT JOIN lb_Invoice_info lii ON lii.contract_id=LUL.CONTRACT_ID TURNOUTREMARKS 100 - 127 + 64 true false From 76fa7132e001a80d1bdeb4cd62bd7071770bc3ee Mon Sep 17 00:00:00 2001 From: zhulh Date: Tue, 29 Dec 2020 17:06:31 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=BE=90=E4=BA=91?= =?UTF-8?q?=E9=BE=99=E5=9E=83=E5=9C=BE=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Frame/resources/include/ui/include_list.jspf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/WebContent/Frame/resources/include/ui/include_list.jspf b/WebContent/Frame/resources/include/ui/include_list.jspf index 98228b04a..bcacb9aaf 100644 --- a/WebContent/Frame/resources/include/ui/include_list.jspf +++ b/WebContent/Frame/resources/include/ui/include_list.jspf @@ -2,7 +2,6 @@ String pagesize=CurPage.getParameter("PageSize"); if(pagesize==null){pagesize=dwTemp.getPageSize()+"";} dwTemp.setPageSize(Integer.valueOf(pagesize)); -dwTemp.genHTMLObjectWindow(""); %> <%@ include file="/Frame/page/jspf/ui/widget/ow/list.jspf"%> <%@page import="com.amarsoft.awe.control.model.Parameter" %> @@ -11,12 +10,12 @@ Vector param=CurComp.getParameterList(); String newParam=""; for(int i=0;i0){newParam+="&";} newParam+=param.get(i).paraName+"="+param.get(i).paraValue; } -} +} String sourceUrl=CurComp.getAttribute("ComponentURL"); String newtarget=CurComp.getAttribute("TargetWindow"); %> @@ -29,7 +28,7 @@ function pagereload(pagesize){ parent.AsControl.OpenView(purl,param,starget); } function pageSizeChange(){ - var checkText=$("#mySelectPageSize").find("option:selected").text(); + var checkText=$("#mySelectPageSize").find("option:selected").text(); pagereload(checkText); } $(function(){ @@ -42,4 +41,4 @@ $(function(){ options+=""; } $("#Page_myiframe0").append("
- : - - -   - - + -
-<%@include file="/Frame/resources/include/ui/include_list.jspf"%> +<%@include file="/Frame/resources/include/ui/include_list.jspf" %> -<%@include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file +<%@include file="/Frame/resources/include/include_end.jspf" %> diff --git a/WebContent/ProductManage/ProductConfig/ProductComponentDef.jsp b/WebContent/ProductManage/ProductConfig/ProductComponentDef.jsp index 0d4550368..2ddb6e434 100644 --- a/WebContent/ProductManage/ProductConfig/ProductComponentDef.jsp +++ b/WebContent/ProductManage/ProductConfig/ProductComponentDef.jsp @@ -12,6 +12,7 @@ javax.xml.transform.TransformerFactory, javax.xml.transform.dom.DOMSource, javax.xml.transform.stream.StreamResult,jbo.prd.PRD_SPECIFIC_LIBRARY"%> +<%@ page import="org.apache.commons.lang.StringUtils" %> <%@ include file="/Frame/resources/include/include_begin_info.jspf"%> <% String specificSerialNo = CurPage.getParameter("SpecificSerialNo"); @@ -24,21 +25,23 @@ String xmlTags = "ComponentType||ID like 'PRD' and Status = '1' and length(ID)=7"; //Ʒ͹ؼ String keys = "ID"; - + //Ʒļ String xmlComponentFile = "{$ARE.PRD_HOME}/etc/app/component/component-config.xml"; xmlComponentFile = ARE.replaceARETags(xmlComponentFile); //Ʒɸѡ + ArrayList roleTable = CurUser.getRoleTable(); + System.out.println( roleTable ); String xmlComponentTags = "Component||Status='1' and PRODUCT_TYPE like '" + productType2 + "'"; //Ʒؼ String componentKeys = "ID"; - + BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager(); - + BusinessObject specific = bomanager.keyLoadBusinessObject(PRD_SPECIFIC_LIBRARY.CLASS_NAME, specificSerialNo); //Ʒļ String xmlConfigFile = specific.getString("ConfigFile"); - + if(StringX.isEmpty(xmlConfigFile) || xmlConfigFile.endsWith(".xml")) { xmlConfigFile = UUIDUtil.getUUID(); @@ -47,19 +50,19 @@ bomanager.updateDB(); } /*xmlConfigFile = ARE.replaceARETags(xmlConfigFile); - + File f = new File(xmlConfigFile); if(!f.exists()) { TransformerFactory tFactory=TransformerFactory.newInstance(); Transformer transformer=tFactory.newTransformer(); //encodingΪıgbk - transformer.setOutputProperty("encoding",ARE.getProperty("CharSet","GBK")); + transformer.setOutputProperty("encoding",ARE.getProperty("CharSet","GBK")); org.w3c.dom.Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); org.w3c.dom.Element e = document.createElement("Components"); document.appendChild(e); DOMSource source= new DOMSource(document); - + StreamResult result = new StreamResult(xmlConfigFile); transformer.transform(source,result); } */ @@ -71,9 +74,9 @@ String userID = CurUser.getUserID(); //ǰ¼˲ String orgID = CurUser.getOrgID(); - + %> - + @@ -102,7 +105,7 @@ for(int i = 0; i < boList.size(); i ++){ BusinessObject bo = boList.get(i); - + List boComponentList = BusinessObjectHelper.getBusinessObjectsBySql(componentList, "Type like :Type", "Type",bo.getString("ID")); if(boComponentList == null || boComponentList.isEmpty()) continue; %> @@ -121,24 +124,41 @@ - - + + - - + + <% - + xmlConfigFile = StringHelper.replaceString(xmlConfigFile,bo); configKeys = StringHelper.replaceString(configKeys,bo); List exists = BusinessObjectHelper.getBusinessObjectsBySql(existProducts, "Type like :Type", "Type",bo.getString("ID")); - + int cnt = 0; for(int j=0;j ls = BusinessObjectHelper.getBusinessObjectsBySql(exists, "ID=:ID", "ID",term.getString("ID")); boolean selected = (ls != null && !ls.isEmpty()); @@ -156,14 +176,14 @@ { %> - + <% } } %> - +
@@ -201,13 +221,13 @@ if(document.getElementById(tableid)) document.getElementById(tableid).style.display = ""; } - + } function doSelect(id){ /* KKKеѡ򵥻¼,д־,ѡǷѡ */ var result = RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductManager","judgeAddOrUpdateLog","productID=<%=productID%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>"); - + var isCheck = document.all(id+"_CheckBox").checked; if(isCheck){ document.all(id+"_Link").style.display=''; @@ -223,8 +243,8 @@ RunJavaMethodTrans("com.amarsoft.app.als.prd.manager.ProductSpecificManager", "deleteComponents","SpecificSerialNo=<%=specificSerialNo%>,XMLTags=Component,Keys=ID,ComponentID="+id); } } - - + + function editProductTermPara(id,format,name,type){ if("3" == format){ AsDialog.PopPage("/ProductManage/ComponentConfig/ComponentLibraryList.jsp","XMLFile=<%=xmlConfigFile%>&XMLTags=Component||ID='"+id+"'//ChildrenComponents//ChildrenComponent||1=1&Keys=<%=keys%>&ComponentID="+id+"&Format="+format+"&ComponentRightType=PRightType","dialogWidth:900px;dialogHeight:400px;resizable=no;scrollbars=yes;status:yes;maximize:no;help:no;",function(){},name); @@ -239,4 +259,4 @@ } } -<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index ad6075f30..ac25b21a1 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -1,434 +1,434 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index 864e4b361..f8b2f597c 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -1,199 +1,199 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/componenttype-config.xml b/WebContent/WEB-INF/etc/app/component/componenttype-config.xml index 9eb993026..0f503b6b4 100644 --- a/WebContent/WEB-INF/etc/app/component/componenttype-config.xml +++ b/WebContent/WEB-INF/etc/app/component/componenttype-config.xml @@ -1,61 +1,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/com/amarsoft/app/util/ReloadCacheConfigAction.java b/src/com/amarsoft/app/util/ReloadCacheConfigAction.java index 915e41d53..9ad908e7b 100644 --- a/src/com/amarsoft/app/util/ReloadCacheConfigAction.java +++ b/src/com/amarsoft/app/util/ReloadCacheConfigAction.java @@ -3,14 +3,16 @@ package com.amarsoft.app.util; import com.amarsoft.are.ARE; import com.amarsoft.dict.als.cache.CacheLoaderFactory; +import java.util.Map; + /** * ͬݿ뻺еݣCacheLoaderFactoryӦ * @author xhgao * */ public class ReloadCacheConfigAction { - - private String configName; //ҪreloadĻ漯 + + private String configName; //ҪreloadĻ漯 public String getConfigName() { return configName; @@ -33,7 +35,30 @@ public class ReloadCacheConfigAction { } return sReturn; } - + + /** + * Զ͵Ļ + * @return + * @throws Exception + */ + public String reloadCacheCustom() throws Exception{ + // + String sReturn = "SUCCESS"; + if ( configName != null ) { + String[] keys = configName.split( "@_@" ); + try { + for ( String key : keys ) { + CacheLoaderFactory.reload( key ); + } + } catch ( Exception e ) { + ARE.getLog().error("ͬݿ⻺ʧܣ" + e ); + sReturn = "FAILED"; + } + } + + return sReturn; + } + public String reloadCacheAll() throws Exception{ // String sReturn = "SUCCESS"; From 912135f6d75f9cdedf7495200018fc59a79f0cca Mon Sep 17 00:00:00 2001 From: zhulh Date: Sat, 2 Jan 2021 12:36:45 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=81=B5=E6=B4=BB?= =?UTF-8?q?=E4=BA=A7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 102 +++++++++++++----- .../etc/app/component/component-config.xml | 2 +- .../component/component-parameter-config.xml | 4 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 31 +++++- calc/com/tenwa/reckon/bean/ConditionBean.java | 55 ++++++++++ calc/com/tenwa/reckon/bean/TabCalBean.java | 9 +- .../executor/CreateTransactionExecutor.java | 43 +++++++- .../tenwa/reckon/help/ConditionHelper.java | 51 +++++++++ 8 files changed, 261 insertions(+), 36 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 46faab073..a26082d5f 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -73,18 +73,30 @@ tx.commit(); } /*ݲж Ƿȥݿѯ*/ - - String sTempletNo = "LoanSimulationBasicInfo";//--ģ-- - ASObjectModel doTemp = new ASObjectModel(sTempletNo); - + + // ǷƷ + String flexible = Sqlca.getString( "select attribute5 from business_type where typeno = '" + productId + "'" ); + String templateNo = "LoanSimulationBasicInfo"; + if ( "Y".equals( flexible ) ) { + templateNo = "LoanSimulationBasicFlexibleInfo"; + } + ASObjectModel doTemp = new ASObjectModel(templateNo); + Map> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350"); Map productRate = productRates.get("product_rate"); - String termType = productRate.get("TermType")== null ? "" : productRate.get("TermType"); - String termMin = productRate.get("TermScope-MIN"); - String termMax = productRate.get("TermScope-MAX"); - String isFixedRate = productRate.get("isFixedRate"); - String rateTermMin = productRate.get("RateTermScope-MIN"); - String rateTermMax = productRate.get("RateTermScope-MAX"); + String termType = productRate == null || productRate.get("TermType") == null ? "" : productRate.get("TermType"); + String termMin = ""; + String termMax = ""; + String isFixedRate = ""; + String rateTermMin = ""; + String rateTermMax = ""; + if ( productRate != null ) { + termMin = productRate.get("TermScope-MIN"); + termMax = productRate.get("TermScope-MAX"); + isFixedRate = productRate.get("isFixedRate"); + rateTermMin = productRate.get("RateTermScope-MIN"); + rateTermMax = productRate.get("RateTermScope-MAX"); + } if("02".equals(termType)){ doTemp.setColumnAttribute("INCOME_NUMBER", "coleditstyle", "1"); @@ -95,6 +107,14 @@ }else{ doTemp.setReadOnly("YEAR_RATE", true); } + + if ( "Y".equals( flexible ) ) { + doTemp.setReadOnly( "YEAR_RATE", false ); + doTemp.setHtmlEvent( "YEAR_RATE", "onchange", "changeYearRate" ); // ¼ + doTemp.setHtmlEvent( "RENT_VALUE", "onchange", "changeRentValue" ); // Ԥ¼ + doTemp.setDefaultValue( "GPS_DIFFERENCE", ProductParamUtil.getProductParameterValue( productId, "PRD0390", "GPSDifference", "GPSDifference" ) ); + } + /*ֶ¼*/ doTemp.setHtmlEvent("SETTLE_METHOD", "onchange", "changeSettleMethod");//㷽ʽ doTemp.setHtmlEvent("RENT_OR_RATE", "onchange", "rentOrRateChange");//㷽 @@ -241,7 +261,6 @@ $(function(){ //changeSettleMethod2(); //changeRateType(); //CalcControl.RentOrRateView(); - var inerNumber = $("#INCOME_NUMBER").val(); $("#INCOME_NUMBER").empty(); var inNumber=calcRules['incomeNumber']['INCOME_NUMBER']; @@ -265,6 +284,18 @@ $(function(){ // getRatioByMoney(getObj(0, "EQUIP_AMT")); }); +function changeYearRate() { + if ( getItemValue( 0, 0, 'YEAR_RATE' ) !== '' ) { + setItemValue( 0, 0, 'RENT_VALUE', '0.00' ); + } +} + +function changeRentValue() { + if ( getItemValue( 0, 0, 'RENT_VALUE' ) !== '' ) { + setItemValue( 0, 0, 'YEAR_RATE', '0.000000' ); + } +} + function financingCar(){ var financingCar = getItemValue(0, 0, "EQUIP_AMT")-getItemValue(0, 0, "FIRST_PAYMENT"); setItemValue(0, 0, "financing_car", financingCar); @@ -482,7 +513,7 @@ CalcControl.RateFloatTypeInit=function(){ CalcControl.SettleMethodView=function(){ var method=getItemValue(0,getRow(),"SETTLE_METHOD"); //㷽ʽ ʾť ͷֶβ¼ҳ - document.all("A_Group_even_subsection").style.display="none"; + // document.all("A_Group_even_subsection").style.display="none"; if("true"=="<%=isShowButton%>"){ var button = document.getElementById("InfoButtonArea").getElementsByTagName('a')[0]; if(method == 'irregular_rent'){ @@ -492,7 +523,7 @@ CalcControl.SettleMethodView=function(){ button.title = ''; button.childNodes[2].childNodes[1].innerText = ''; if(method=='even_subsection'){ - document.all("A_Group_even_subsection").style.display="block"; + // document.all("A_Group_even_subsection").style.display="block"; } } } @@ -521,11 +552,11 @@ CalcControl.SettleMethodView=function(){ // //ƻ - var plan; + var plan = ""; if(method=="even_subsection"||method=="irregular_rent"||method==""){ plan=""; }else{ - plan=calcRules['method'][method]["date_proc"].split(","); + // plan=calcRules['method'][method]["date_proc"].split(","); } var planflag={}; for(var i=0;i' ) { + setEnable( 'YEAR_RATE' ); + setEnable( 'RENT_VALUE' ); + } } CalcControl.RentOrRateInit=function(){ var rentOrRate = getItemValue(0,getRow(),"RENT_OR_RATE");//㷽ʽ @@ -1113,12 +1147,26 @@ function saveRecord(sPostEvents){ return; } } + + if ( 'Y' === '<%=flexible%>' ) { + var yearRate = getItemValue( 0, 0, 'YEAR_RATE' ); + var rentValue = getItemValue( 0, 0, 'RENT_VALUE' ); + if ( Number( yearRate ) === 0 && Number( rentValue ) === 0 ) { + alert( 'Ʒ£ڲʻԤֵ' ); + return; + } else if ( Number( yearRate ) === 0 ) { + setItemValue( 0, 0, 'RENT_OR_RATE', 'rent' ); + } else { + setItemValue( 0, 0, 'RENT_OR_RATE', 'rate' ); + } + } + // DzĻô񱨼ۡ var settleMethod = getItemValue(0,getRow(),"SETTLE_METHOD"); if(settleMethod == 'irregular_rent'){ as_save("myiframe0"); }else{ - as_save("myiframe0","run()"); + as_save("myiframe0","run()"); } } @@ -1294,15 +1342,15 @@ function rentOrRateChange(){ function changeSettleMethod3(){ var method="<%=dwTemp.getData().get("SETTLE_METHOD")%>"; //㷽ʽ ʾť ͷֶβ¼ҳ - document.all("A_Group_even_subsection").style.display="none"; + // document.all("A_Group_even_subsection").style.display="none"; if(method=='even_subsection'){ - document.all("A_Group_even_subsection").style.display="block"; + // document.all("A_Group_even_subsection").style.display="block"; } <%-- var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>&method="+method; AsControl.OpenView("/Accounting/LoanSimulation/condition_plan.jsp",param, "frame_list"); --%> var rentOrRate ="<%=dwTemp.getData().get("RENT_OR_RATE")%>";//㷽ʽ - document.all("A_Group_calc_config").style.display="none"; + // document.all("A_Group_calc_config").style.display="none"; if(rentOrRate == 'knowing_rent'){//֪ ̶ֻܹ document.all("A_Group_calc_config").style.display="block"; var param="CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>"; @@ -1322,11 +1370,11 @@ function changeSettleMethod3(){ } // //ƻ - var plan; + var plan = ""; if(method=="even_subsection"||method=="irregular_rent"||method==""){ plan=""; }else{ - plan=calcRules['method'][method]["date_proc"].split(","); + // plan=calcRules['method'][method]["date_proc"].split(","); } var planflag={}; for(var i=0;i - + diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index f8b2f597c..fdd447cdb 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -178,7 +178,7 @@ - + @@ -196,4 +196,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 36106c6e0..f8c0475b7 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -770,6 +770,12 @@ + + + + + + @@ -1064,6 +1070,12 @@ + + + + + + @@ -1398,7 +1410,12 @@ - + + + + + + @@ -2750,6 +2767,12 @@ + + + + + + @@ -3326,6 +3349,12 @@ + + + + + + diff --git a/calc/com/tenwa/reckon/bean/ConditionBean.java b/calc/com/tenwa/reckon/bean/ConditionBean.java index 641d63845..cb0dc16ba 100644 --- a/calc/com/tenwa/reckon/bean/ConditionBean.java +++ b/calc/com/tenwa/reckon/bean/ConditionBean.java @@ -165,6 +165,13 @@ public class ConditionBean implements Cloneable{ private String finalPayment; //β private String finalPaymentMethod; //β÷ʽ private String productType; //һƷֶηж + + private String flexible; // ǷƷ + private String operatingRate; // Ӫ + private String GPSDifference; // GPS + private String riskAccrualRatio; // ռ + private String strategicCoefficient; // սϵ + private String strategyROA; // սϵ //**********************************************************************ʽ /*********************************************************************************** @@ -1757,4 +1764,52 @@ public class ConditionBean implements Cloneable{ public void setProductType(String productType) { this.productType = productType; } + + public String getFlexible() { + return flexible; + } + + public void setFlexible(String flexible) { + this.flexible = flexible; + } + + public String getOperatingRate() { + return operatingRate; + } + + public void setOperatingRate(String operatingRate) { + this.operatingRate = operatingRate; + } + + public String getGPSDifference() { + return GPSDifference; + } + + public void setGPSDifference(String GPSDifference) { + this.GPSDifference = GPSDifference; + } + + public String getRiskAccrualRatio() { + return riskAccrualRatio; + } + + public void setRiskAccrualRatio(String riskAccrualRatio) { + this.riskAccrualRatio = riskAccrualRatio; + } + + public String getStrategicCoefficient() { + return strategicCoefficient; + } + + public void setStrategicCoefficient(String strategicCoefficient) { + this.strategicCoefficient = strategicCoefficient; + } + + public String getStrategyROA() { + return strategyROA; + } + + public void setStrategyROA(String strategyROA) { + this.strategyROA = strategyROA; + } } diff --git a/calc/com/tenwa/reckon/bean/TabCalBean.java b/calc/com/tenwa/reckon/bean/TabCalBean.java index 081e15232..1f8586c15 100644 --- a/calc/com/tenwa/reckon/bean/TabCalBean.java +++ b/calc/com/tenwa/reckon/bean/TabCalBean.java @@ -48,6 +48,7 @@ public class TabCalBean { private String docId; private String productId; private String productType; + private Map> productRevenues; public String getProductType() { return productType; @@ -413,5 +414,11 @@ public class TabCalBean { this.calcFund = calcFund; } - + public Map> getProductRevenues() { + return productRevenues; + } + + public void setProductRevenues(Map> productRevenues) { + this.productRevenues = productRevenues; + } } diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index 781469e86..c4dd44fbd 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -23,6 +23,7 @@ import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.are.util.json.JSONEncoder; import com.amarsoft.are.util.json.JSONObject; +import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.tenwa.comm.exception.BusinessException; import com.tenwa.comm.util.jboutil.DataOperatorUtil; @@ -106,19 +107,26 @@ public class CreateTransactionExecutor implements Transaction { JSONObject jsonObject = JSONObject.createObject(); String irr = ""; JBOTransaction tx=null; + ASResultSet rs = null; try { tx=JBOFactory.createJBOTransaction(); TabCalBean bean = TbBeanTools.getTabInfo(calType, flowunid,plannumber,productId); this.deletePayCondition(this.getFlowunid(),bean.getPlanCName(), bean.getPlanCValue(), tx); DictTools.setYearRate(bean); + //ȡƷ + com.amarsoft.awe.util.Transaction Sqlca = com.amarsoft.awe.util.Transaction.createTransaction(tx); + rs = Sqlca.getASResultSet(new SqlObject("select attribute2, attribute5 from business_type where typeno='"+productId+"'")); + String productType = ""; + if ( rs.next() ) { + productType = rs.getString( "attribute2" ); + bean.getCb().setFlexible( rs.getString( "attribute5" ) ); + } String yearRate = bean.getCb().getYearRate(); this.preHandle(bean.getCb(),bean); + checkYearRate( bean.getCb(), bean, new BigDecimal( bean.getCb().getYearRate() ) ); if(bean.getCb().getRentOrRate().equals("rent")&&new BigDecimal(bean.getCb().getIncomeNumber()).multiply(new BigDecimal(bean.getCb().getRentValue())).compareTo(new BigDecimal(bean.getCb().getCleanLeaseMoney()))<0){ throw new BusinessException("ܺͱʶ"); } - //ȡƷ - com.amarsoft.awe.util.Transaction Sqlca = com.amarsoft.awe.util.Transaction.createTransaction(tx); - String productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'")); bean.setProductType(productType); bean.getCb().setProductType(productType); jsonObject.appendElement("year_rate", yearRate); @@ -137,7 +145,11 @@ public class CreateTransactionExecutor implements Transaction { // TODO Auto-generated catch block e1.printStackTrace(); } - jsonObject.appendElement("message",e.getMessage()); + String message = e.getMessage(); + if ( message == null ) { + message = "ʧ"; + } + jsonObject.appendElement("message", message); return JSONEncoder.encode(jsonObject); }catch (Exception e) { try { @@ -149,6 +161,11 @@ public class CreateTransactionExecutor implements Transaction { e.printStackTrace(); return irr; }finally{ + try { + if ( rs != null ) rs.close(); + } catch ( Exception e ) { + e.printStackTrace(); + } if(tx!=null){ try { tx.commit(); @@ -161,6 +178,24 @@ public class CreateTransactionExecutor implements Transaction { } + public void checkYearRate( ConditionBean cb, TabCalBean tcb, BigDecimal yearRate ) throws BusinessException { + if ( "Y".equals( cb.getFlexible() ) ) { + // Ʒ֤ + try { + Map> productRevenues = ProductParamUtil.getProductComponentType( tcb.getProductId(), "PRD0390" ); + tcb.setProductRevenues( productRevenues ); + String rateMin = productRevenues.get( "CostInterestRate" ).get( "CostInterestRate-MIN" ); + String rateMax = productRevenues.get( "CostInterestRate" ).get( "CostInterestRate-MAX" ); + if ( !( yearRate.compareTo( new BigDecimal( rateMax ) ) <= 0 && yearRate.compareTo( new BigDecimal( rateMin ) ) >= 0 ) ) { + throw new BusinessException( ": " + yearRate.setScale( 6, 4 ).toString() + "ڲƷ䷶Χ" ); + } + } catch ( Exception e ) { + e.printStackTrace(); + throw new BusinessException( e.getMessage() ); + } + } + } + /** * */ diff --git a/calc/com/tenwa/reckon/help/ConditionHelper.java b/calc/com/tenwa/reckon/help/ConditionHelper.java index 5da8a21bb..888572c48 100644 --- a/calc/com/tenwa/reckon/help/ConditionHelper.java +++ b/calc/com/tenwa/reckon/help/ConditionHelper.java @@ -13,6 +13,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.are.util.json.JSONObject; +import com.tenwa.comm.exception.BusinessException; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.reckon.bean.ConditionBean; import com.tenwa.reckon.bean.FundRentPlanBean; @@ -81,6 +82,56 @@ public class ConditionHelper { //±ֿ֤ params.put("CAUTION_DEDUCTION_MONEY",cb.getCautionDeductionMoney()); params.put("CAUTION_MONEY_REMAIN",cb.getCautionMoneyRemain()); + + if ( "Y".equals( cb.getFlexible() ) ) { + // Ʒ + try { + Map> productRevenues = bean.getProductRevenues(); + String roaMin = productRevenues.get( "StrategyROA" ).get( "StrategyROA-MIN" ); + String roaMax = productRevenues.get( "StrategyROA" ).get( "StrategyROA-MAX" ); + // 1 + ˰ + BigDecimal tax = BigDecimal.ONE.add( new BigDecimal( cb.getRate() ) ); + // Ϣ + List interestBusinessList = rentPlan.getInterestBusinessList(); + BigDecimal allInterest = BigDecimal.ZERO; + for ( String interestBusiness : interestBusinessList ) { + allInterest = allInterest.add( new BigDecimal( interestBusiness ) ); + } + // + BigDecimal handlingChargeMoney = new BigDecimal( cb.getHandlingChargeMoney() ); + // GPS + BigDecimal gpsDifference = new BigDecimal( cb.getGPSDifference() ); + // + BigDecimal in = allInterest.divide( tax, 2, 4 ).add( handlingChargeMoney.divide( tax, 2, 4 ) ).add( gpsDifference.divide( tax, 2, 4 ) ); + // + int leaseTerm = cb.getLeaseTerm(); + // ʶ + BigDecimal cleanLeaseMoney = new BigDecimal( cb.getCleanLeaseMoney() ); + // ɱ + BigDecimal cost = cleanLeaseMoney.add( new BigDecimal( cb.getCautionMoney() ).multiply( new BigDecimal( leaseTerm ) ) ).divide( tax, 2, 4 ); + // Ӫ + String operatingRate = productRevenues.get( "OperatingRate" ).get( "OperatingRate" ); + // Ӫ + BigDecimal operatingExpenses = cleanLeaseMoney.multiply( new BigDecimal( operatingRate ) ); + // ռ + String riskAccrualRatio = productRevenues.get( "RiskAccrualRatio" ).get( "RiskAccrualRatio" ); + // ռ + BigDecimal withdrawalRisk = cleanLeaseMoney.multiply( new BigDecimal( riskAccrualRatio ) ); + // ROA + BigDecimal roa = in.subtract( cost ).subtract( operatingExpenses ).subtract( withdrawalRisk ).multiply( new BigDecimal( 0.75 ) ).divide( cleanLeaseMoney, 2, 4 ).multiply( new BigDecimal( 2 ) ); + if ( !( roa.compareTo( new BigDecimal( roaMin ) ) >= 0 && roa.compareTo( new BigDecimal( roaMax ) ) <= 0 ) ) { + throw new BusinessException( "ROA䷶Χ" ); + } + // սϵ + String strategicCoefficient = productRevenues.get( "StrategicCoefficient" ).get( "StrategicCoefficient" ); + params.put( "OPERATING_RATE", operatingRate ); + params.put( "RISK_ACCRUAL_RATIO", riskAccrualRatio ); + params.put( "STRATEGIC_COEFFICIENT", strategicCoefficient ); + params.put( "STRATEGY_ROA", roa.toString() ); + } catch ( Exception e ) { + throw new BusinessException( e.getMessage() ); + } + } this.updateCondition(bean, params); return params; } From f38f65d1a9cf40a16780ceee480535d5ab284cbb Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Mon, 4 Jan 2021 13:35:02 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=82=AE=E5=82=A8?= =?UTF-8?q?=E7=AD=BE=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/allinpay/servlet/AllinpayServlet.java | 494 +++++++++--------- .../lease/app/allinpay/servlet/SignDto.java | 45 ++ .../allinpay/servlet/YCPaySignServlet.java | 205 ++++++++ 3 files changed, 503 insertions(+), 241 deletions(-) create mode 100644 src/com/tenwa/lease/app/allinpay/servlet/SignDto.java create mode 100644 src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java diff --git a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java index a275cff1f..f78a04daa 100644 --- a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java +++ b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java @@ -1,20 +1,10 @@ package com.tenwa.lease.app.allinpay.servlet; -import java.net.MalformedURLException; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.allinpay.xstruct.quickpay.FAGRARET; import com.alibaba.fastjson.JSON; import com.allinpay.xml.XmlParser; import com.allinpay.xstruct.common.AipgRsp; import com.allinpay.xstruct.common.InfoRsp; +import com.allinpay.xstruct.quickpay.FAGRARET; import com.allinpay.xstruct.quickpay.FAGRCRET; import com.amarsoft.app.lc.util.DateAssistant; import com.amarsoft.are.jbo.BizObject; @@ -24,254 +14,276 @@ import com.amarsoft.are.util.DataConvert; import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; -import com.tenwa.lease.app.allinpay.util.AllinpayProperties; import com.tenwa.lease.app.allinpay.service.AllinpayService; import com.tenwa.lease.app.allinpay.service.impl.AllinpayServiceImpl; +import com.tenwa.lease.app.allinpay.util.AllinpayProperties; import com.tenwa.lease.app.allinpay.util.AllinpayUtil; +import org.apache.commons.lang3.StringUtils; -@WebServlet(urlPatterns = { "/allinpay/sign" }) +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.net.MalformedURLException; +import java.util.HashMap; +import java.util.Map; + +@WebServlet(urlPatterns = {"/allinpay/sign"}) public class AllinpayServlet extends BaseServlet { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private AllinpayProperties factory ; + private AllinpayProperties factory; - private AllinpayService allinpayService = new AllinpayServiceImpl(); + private AllinpayService allinpayService = new AllinpayServiceImpl(); - // ͨ۶ŷ - public String allinPaySendMessages(HttpServletRequest request, HttpServletResponse response) - throws MalformedURLException, Exception { - Map msg = new HashMap<>(); - msg.put("message", "error"); + // ͨ۶ŷ + public String allinPaySendMessages(HttpServletRequest request, HttpServletResponse response) + throws MalformedURLException, Exception { + String signType = request.getParameter("signType"); + String projectId = request.getParameter("projectId"); + if (signType.equals("YCcollect")) { + return new YCPaySignServlet().ycDXNotice(request, response, getSignObj(projectId)); + } - String projectId = request.getParameter("projectId"); - Map xmlMap = allinpayService.allinPaySendMessages(projectId); - String phoneNumber = xmlMap.get("phoneNumber"); - String subjectid = xmlMap.get("subjectid"); - factory = new AllinpayProperties(subjectid); + Map msg = new HashMap<>(); + msg.put("message", "error"); + Map xmlMap = allinpayService.allinPaySendMessages(projectId); + String phoneNumber = xmlMap.get("phoneNumber"); + String subjectid = xmlMap.get("subjectid"); + factory = new AllinpayProperties(subjectid); - Map map = factory.allinPaySendMessages(xmlMap); + Map map = factory.allinPaySendMessages(xmlMap); - if (!"success".equals(map.get("message"))) { - logger.info("ϵͳ쳣ͨ쳣:" + map.get("msg")); - throw new Exception(map.get("msg")); - } else { - String requestContent = map.get("request"); - String responseContent = map.get("response"); - String time = DateAssistant.getTodayNow(); - AipgRsp rsp = XmlParser.parseRsp(responseContent); - InfoRsp infoRsp = rsp.getINFO(); - FAGRARET ret = (FAGRARET) rsp.trxObj(); - SqlObject sqlObject = null; - if ("0000".equals(infoRsp.getRET_CODE())) { - String retCode = ret.getRET_CODE(); - if (retCode != null && "0000".equals(retCode)) { - msg.put("message", "success"); - String reqSn = infoRsp.getREQ_SN(); - Cookie[] cookies = request.getCookies(); - Cookie cookie = AllinpayUtil.getCookie(phoneNumber, cookies); - if (cookie == null) { - cookie = new Cookie(phoneNumber, reqSn); - } else { - cookie.setValue(reqSn); - } - cookie.setMaxAge(60 * 10); - response.addCookie(cookie); + if (!"success".equals(map.get("message"))) { + logger.info("ϵͳ쳣ͨ쳣:" + map.get("msg")); + throw new Exception(map.get("msg")); + } else { + String requestContent = map.get("request"); + String responseContent = map.get("response"); + String time = DateAssistant.getTodayNow(); + AipgRsp rsp = XmlParser.parseRsp(responseContent); + InfoRsp infoRsp = rsp.getINFO(); + FAGRARET ret = (FAGRARET) rsp.trxObj(); + SqlObject sqlObject = null; + if ("0000".equals(infoRsp.getRET_CODE())) { + String retCode = ret.getRET_CODE(); + if (retCode != null && "0000".equals(retCode)) { + msg.put("message", "success"); + String reqSn = infoRsp.getREQ_SN(); + Cookie[] cookies = request.getCookies(); + Cookie cookie = AllinpayUtil.getCookie(phoneNumber, cookies); + if (cookie == null) { + cookie = new Cookie(phoneNumber, reqSn); + } else { + cookie.setValue(reqSn); + } + cookie.setMaxAge(60 * 10); + response.addCookie(cookie); - String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("customerLaunchTime", time); - sqlObject.setParameter("projectId", projectId); - } else { - String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("customerLaunchTime", time); - sqlObject.setParameter("requestContent", requestContent); - sqlObject.setParameter("responseContent", responseContent); - sqlObject.setParameter("projectId", projectId); - } - } else { - String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("customerLaunchTime", time); - sqlObject.setParameter("requestContent", requestContent); - sqlObject.setParameter("responseContent", responseContent); - sqlObject.setParameter("projectId", projectId); - } - allinpayService.update(sqlObject); - } - String message = JSON.toJSONString(msg); - response.getWriter().write(message); - return null; - } + String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("customerLaunchTime", time); + sqlObject.setParameter("projectId", projectId); + } else { + String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("customerLaunchTime", time); + sqlObject.setParameter("requestContent", requestContent); + sqlObject.setParameter("responseContent", responseContent); + sqlObject.setParameter("projectId", projectId); + } + } else { + String sql = "UPDATE LC_CARD_TLSIGN SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("customerLaunchTime", time); + sqlObject.setParameter("requestContent", requestContent); + sqlObject.setParameter("responseContent", responseContent); + sqlObject.setParameter("projectId", projectId); + } + allinpayService.update(sqlObject); + } + String message = JSON.toJSONString(msg); + response.getWriter().write(message); + return null; + } - // ͨЭǩԼ - public String allinPaySigning(HttpServletRequest request, HttpServletResponse response) throws Exception { - Map msg = new HashMap<>(); - msg.put("message", "error"); + // ͨЭǩԼ + public String allinPaySigning(HttpServletRequest request, HttpServletResponse response) throws Exception { + String signType = request.getParameter("signType"); + String projectId = request.getParameter("projectId"); + if (signType.equals("YCcollect")) { + return new YCPaySignServlet().ycDXSign(request, response, getSignObj(projectId)); + } - String verCode = request.getParameter("verCode"); - String projectId = request.getParameter("projectId"); - Map messageMap = allinpayService.allinPaySigning(projectId); - String phoneNumber = messageMap.get("phoneNumber"); - String subjectid = messageMap.get("subjectid"); - factory = new AllinpayProperties(subjectid); - String time = DateAssistant.getTodayNow(); + Map msg = new HashMap<>(); + msg.put("message", "error"); - Cookie[] cookies = request.getCookies(); - Cookie cookie = AllinpayUtil.getCookie(phoneNumber, cookies); - if (cookie == null) { - msg.put("msg", "֤ʧЧ»ȡ֤"); - String message = JSON.toJSONString(msg); - response.getWriter().write(message); - return null; - } - String reqSn = cookie.getValue(); - Map mapXml = new HashMap<>(); - mapXml.put("reqSn", reqSn); - mapXml.put("verCode", verCode); - Map map = factory.allinPaySigning(mapXml); + String verCode = request.getParameter("verCode"); + Map messageMap = allinpayService.allinPaySigning(projectId); + String phoneNumber = messageMap.get("phoneNumber"); + String subjectid = messageMap.get("subjectid"); + factory = new AllinpayProperties(subjectid); + String time = DateAssistant.getTodayNow(); - if (!"success".equals(map.get("message"))) { - logger.info("ϵͳ쳣ͨ쳣:" + map.get("msg")); - throw new Exception(map.get("msg")); - } else { - String requestContent = map.get("request"); - String responseContent = map.get("response"); - AipgRsp rsp = XmlParser.parseRsp(responseContent); - InfoRsp infoRsp = rsp.getINFO(); - SqlObject sqlObject = null; - if ("0000".equals(infoRsp.getRET_CODE())) { - FAGRCRET ret = (FAGRCRET) rsp.trxObj(); - String retCode = ret.getRET_CODE(); - if (retCode != null && "0000".equals(retCode)) { - msg.put("message", "success"); - String agrmNo = ret.getAGRMNO(); - String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,AGRMNO=:agrmno,SIGN_STATUS=:signStatus WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("signTime", time); - sqlObject.setParameter("agrmno", agrmNo); - sqlObject.setParameter("signStatus", "sign_status2"); - sqlObject.setParameter("projectId", projectId); - } else { - String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,SIGN_STATUS=:signStatus,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("signTime", time); - sqlObject.setParameter("signStatus", "sign_status3"); - sqlObject.setParameter("requestContent", requestContent); - sqlObject.setParameter("responseContent", responseContent); - sqlObject.setParameter("projectId", projectId); - msg.put("msg", ret.getERR_MSG()); - } - } else { - String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,SIGN_STATUS=:signStatus,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; - sqlObject = new SqlObject(sql); - sqlObject.setParameter("signTime", time); - sqlObject.setParameter("signStatus", "sign_status3"); - sqlObject.setParameter("requestContent", requestContent); - sqlObject.setParameter("responseContent", responseContent); - sqlObject.setParameter("projectId", projectId); - msg.put("msg", infoRsp.getERR_MSG()); - } - allinpayService.update(sqlObject); - } - String message = JSON.toJSONString(msg); - response.getWriter().write(message); - return null; - } + Cookie[] cookies = request.getCookies(); + Cookie cookie = AllinpayUtil.getCookie(phoneNumber, cookies); + if (cookie == null) { + msg.put("msg", "֤ʧЧ»ȡ֤"); + String message = JSON.toJSONString(msg); + response.getWriter().write(message); + return null; + } + String reqSn = cookie.getValue(); + Map mapXml = new HashMap<>(); + mapXml.put("reqSn", reqSn); + mapXml.put("verCode", verCode); + Map map = factory.allinPaySigning(mapXml); - // ͨǩԼҳ - public void allinPaySign(HttpServletRequest request, HttpServletResponse response) throws Exception { - Transaction Sqlca = null; - ASResultSet res = null; - try { - String projectId = DataConvert.toString(request.getParameter("con")); + if (!"success".equals(map.get("message"))) { + logger.info("ϵͳ쳣ͨ쳣:" + map.get("msg")); + throw new Exception(map.get("msg")); + } else { + String requestContent = map.get("request"); + String responseContent = map.get("response"); + AipgRsp rsp = XmlParser.parseRsp(responseContent); + InfoRsp infoRsp = rsp.getINFO(); + SqlObject sqlObject = null; + if ("0000".equals(infoRsp.getRET_CODE())) { + FAGRCRET ret = (FAGRCRET) rsp.trxObj(); + String retCode = ret.getRET_CODE(); + if (retCode != null && "0000".equals(retCode)) { + msg.put("message", "success"); + String agrmNo = ret.getAGRMNO(); + String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,AGRMNO=:agrmno,SIGN_STATUS=:signStatus WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("signTime", time); + sqlObject.setParameter("agrmno", agrmNo); + sqlObject.setParameter("signStatus", "sign_status2"); + sqlObject.setParameter("projectId", projectId); + } else { + String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,SIGN_STATUS=:signStatus,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("signTime", time); + sqlObject.setParameter("signStatus", "sign_status3"); + sqlObject.setParameter("requestContent", requestContent); + sqlObject.setParameter("responseContent", responseContent); + sqlObject.setParameter("projectId", projectId); + msg.put("msg", ret.getERR_MSG()); + } + } else { + String sql = "UPDATE LC_CARD_TLSIGN SET SIGN_TIME=:signTime,SIGN_STATUS=:signStatus,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent WHERE PROJECT_ID=:projectId"; + sqlObject = new SqlObject(sql); + sqlObject.setParameter("signTime", time); + sqlObject.setParameter("signStatus", "sign_status3"); + sqlObject.setParameter("requestContent", requestContent); + sqlObject.setParameter("responseContent", responseContent); + sqlObject.setParameter("projectId", projectId); + msg.put("msg", infoRsp.getERR_MSG()); + } + allinpayService.update(sqlObject); + } + String message = JSON.toJSONString(msg); + response.getWriter().write(message); + return null; + } - String userName = ""; - String phoneNumber = ""; - String accNumber = ""; - String certId = ""; - String sql ="SELECT ca.account customername,ca.mobile phonenumber,ca.acc_number accNumber,ca.certid certId FROM lb_project_info lpi LEFT JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id"; - Sqlca = Transaction.createTransaction("als"); - SqlObject sqlObject = new SqlObject(sql); - sqlObject.setParameter("Id", projectId); - res = Sqlca.getASResultSet(sqlObject); - while (res.next()) { - userName = res.getString("customername"); - phoneNumber = res.getString("phonenumber"); - accNumber = res.getString("accNumber"); - certId = res.getString("certId"); - } - if (userName==null || "".equals(userName) || phoneNumber==null || "".equals(phoneNumber) || accNumber==null || "".equals(accNumber) || certId==null || "".equals(certId)) { - logger.error(""+projectId+"Ϣ:userName="+userName+",phoneNumber="+phoneNumber+"accNumber="+accNumber+"certId="+certId); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message", "ϢϵҵԱ"); - request.getRequestDispatcher("/error.jsp").forward(request, response); - return; - } + // ǩԼҳ棨ͨ/ʴ + public String allinPaySign(HttpServletRequest request, HttpServletResponse response) { + String errorPage = "/error.jsp"; + try { + String projectId = DataConvert.toString(request.getParameter("con")); + SignDto signObj = getSignObj(projectId); + String userName = "", phoneNumber = "", accNumber = "", certId = "", collectType = ""; + if (signObj != null) { + userName = signObj.getUserName(); + phoneNumber = signObj.getPhoneNumber(); + accNumber = signObj.getAccNumber(); + certId = signObj.getCertId(); + collectType = signObj.getCollectType(); + } + if(StringUtils.isEmpty(collectType) || "YLcollect".equals(collectType)){ + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", "ǩԼǩԼ͡"+collectType+"һ£ϵҵԱ"); + return errorPage; + } + if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(phoneNumber) || StringUtils.isEmpty(accNumber) || StringUtils.isEmpty(certId) || StringUtils.isEmpty(collectType)) { + logger.error("" + projectId + "Ϣ:userName=" + userName + ",phoneNumber=" + phoneNumber + "accNumber=" + accNumber + "certId=" + certId + "collectType=" + collectType); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", "ϢϵҵԱ"); + return errorPage; + } + BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); + BizObject ldc = bomLDC.createQuery("O.PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID", projectId).getSingleResult(true); + if (ldc == null) { + ldc = bomLDC.newObject(); + ldc.setAttributeValue("PROJECT_ID", projectId); + ldc.setAttributeValue("sign_type", collectType); + ldc.setAttributeValue("SIGN_STATUS", "sign_status1"); + bomLDC.saveObject(ldc); + } else if ("sign_status2".equals(ldc.getAttribute("SIGN_STATUS").toString())) { + logger.error("" + projectId + "ǩԼҵ"); + request.setAttribute("state", "404"); + request.setAttribute("title", "UH OH!ҳ涪ʧ"); + request.setAttribute("message", "ǩԼظǩԼ"); + return errorPage; + } + request.setAttribute("userName", userName); + request.setAttribute("phoneNumber", phoneNumber); + request.setAttribute("accNumber", accNumber); + request.setAttribute("certId", certId); + request.setAttribute("projectId", projectId); + request.setAttribute("signType", collectType); - // - BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN", Sqlca); - BizObject ldc = bomLDC.createQuery("O.PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID", projectId).getSingleResult(true); - if(ldc == null){ - ldc = bomLDC.newObject(); - ldc.setAttributeValue("PROJECT_ID", projectId); - ldc.setAttributeValue("sign_type", "TL"); - ldc.setAttributeValue("SIGN_STATUS", "sign_status1"); - bomLDC.saveObject(ldc); - }else if("sign_status2".equals(ldc.getAttribute("SIGN_STATUS").toString())) { - logger.error(""+projectId+"ǩԼҵ"); - request.setAttribute("state", "404"); - request.setAttribute("title", "UH OH!ҳ涪ʧ"); - request.setAttribute("message", "ǩԼظǩԼ"); - request.getRequestDispatcher("/error.jsp").forward(request, response); - return; - } - String userNameShort = "*" + userName.substring(1, userName.length()); - String phoneNumberShort = "*****" + phoneNumber.substring(phoneNumber.length() - 4); - String accNumberShort = "*****" + accNumber.substring(accNumber.length() - 4); - String certIdShort = certId.substring(certId.length() - 6); - request.setAttribute("userName", userName); - //request.setAttribute("contractNumber", contractNumber); - request.setAttribute("phoneNumber", phoneNumber); - request.setAttribute("certId", certId); - request.setAttribute("accNumber", accNumber); - //request.setAttribute("contractNumberShort", contractNumberShort); - request.setAttribute("userNameShort", userNameShort); - request.setAttribute("phoneNumberShort", phoneNumberShort); - request.setAttribute("accNumberShort", accNumberShort); - request.setAttribute("certIdShort", certIdShort); - request.setAttribute("projectId", projectId); - request.getRequestDispatcher("/Sign_index.jsp").forward(request, response); - } catch (Exception e) { - if (Sqlca != null) - try { - Sqlca.rollback(); - } catch (Exception e1) { - e1.printStackTrace(); - } - e.printStackTrace(); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message",e.getMessage()); - request.getRequestDispatcher("/error.jsp").forward(request, response); - } finally { - if (res != null) { - try { - res.close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (Sqlca != null) - try { - Sqlca.commit(); - Sqlca.disConnect(); - Sqlca = null; - } catch (Exception e) { - e.printStackTrace(); - } - } - } + String userNameShort = "*" + userName.substring(1, userName.length()); + String phoneNumberShort = "*****" + phoneNumber.substring(phoneNumber.length() - 4); + String accNumberShort = "*****" + accNumber.substring(accNumber.length() - 4); + String certIdShort = certId.substring(certId.length() - 6); + request.setAttribute("userNameShort", userNameShort); + request.setAttribute("phoneNumberShort", phoneNumberShort); + request.setAttribute("accNumberShort", accNumberShort); + request.setAttribute("certIdShort", certIdShort); + + return "/Sign_index.jsp"; + } catch (Exception e) { + e.printStackTrace(); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", e.getMessage()); + return errorPage; + } + } + + + /** + * ȡǰ̨չʾҵ + * + * @param projectId + * @return + * @throws Exception + */ + private SignDto getSignObj(String projectId) throws Exception { + Transaction Sqlca = null; + SignDto signDto = null; + try { + Sqlca = Transaction.createTransaction(JBOFactory.createJBOTransaction()); + String sql = "SELECT ca.account customername,ca.mobile phonenumber,ca.acc_number accNumber,ca.certid certId,ca.collect_type collectType FROM lb_project_info lpi JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id limit 1"; + ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql)); + if (res.next()) { + String userName = res.getString("customername"); + String phoneNumber = res.getString("phonenumber"); + String accNumber = res.getString("accNumber"); + String certId = res.getString("certId"); + String collectType = res.getString("collectType"); + signDto = new SignDto(userName, phoneNumber, accNumber, certId, collectType); + } + Sqlca.commit(); + } catch (Exception e) { + e.printStackTrace(); + Sqlca.rollback(); + } + return signDto; + } } diff --git a/src/com/tenwa/lease/app/allinpay/servlet/SignDto.java b/src/com/tenwa/lease/app/allinpay/servlet/SignDto.java new file mode 100644 index 000000000..1686d136e --- /dev/null +++ b/src/com/tenwa/lease/app/allinpay/servlet/SignDto.java @@ -0,0 +1,45 @@ +package com.tenwa.lease.app.allinpay.servlet; + +/** + * @program: apzl_leasing + * @author: yjf + * @create: 2020-12-21 16:55 + **/ +public class SignDto { + private String userName; + private String phoneNumber; + private String certId; + private String collectType; + private String accNumber; + + public SignDto() { + } + + public SignDto(String userName, String phoneNumber, String certId, String accNumber, String collectType) { + this.userName = userName; + this.phoneNumber = phoneNumber; + this.certId = certId; + this.accNumber = accNumber; + this.collectType = collectType; + } + + public String getUserName() { + return userName; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public String getCertId() { + return certId; + } + + public String getAccNumber() { + return accNumber; + } + + public String getCollectType() { + return collectType; + } +} diff --git a/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java new file mode 100644 index 000000000..b45169eed --- /dev/null +++ b/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java @@ -0,0 +1,205 @@ +package com.tenwa.lease.app.allinpay.servlet; + +import com.alibaba.fastjson.JSONObject; +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.amarsoft.are.util.DataConvert; +import com.tenwa.collectaudit.yccollect.SocketClientUtil; +import com.tenwa.collectaudit.yccollect.XMLAnalysis; +import com.tenwa.util.SerialNumberUtil; +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @program: apzl_leasing + * @author: yjf + * @create: 2020-11-23 15:39 + **/ +public class YCPaySignServlet { + + public static Logger logger = Logger.getLogger(YCPaySignServlet.class); + + // ʴ֪ͨ + public String ycDXNotice(HttpServletRequest request, HttpServletResponse response, SignDto signObj) throws Exception { + String retPath = null; + try (PrintWriter pw = response.getWriter()) { + logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)ִ--------------------"); + String projectId = request.getParameter("projectId"); + String dxNoticeXml = createDXNoticeXml(signObj); + String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); + logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); + logger.info(retMeg); + logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); + Pattern pattern = Pattern.compile("(\\d{4})(<\\?.*\\?>)(<.*>)(\\s*$)"); + Matcher matcher = pattern.matcher(retMeg); + if (matcher.matches()) { + String analysisXml = "" + matcher.group(3) + ""; + Map respMap = XMLAnalysis.xmlToMap(analysisXml, "GBK"); + BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); + bomLDC.createQuery("update O SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent where project_id = :projectId ") + .setParameter("customerLaunchTime", DateAssistant.getTodayNow()) + .setParameter("requestContent", dxNoticeXml) + .setParameter("responseContent", retMeg) + .setParameter("projectId", projectId).executeUpdate(); + if (respMap.get("respcd").equals("0000")) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("message", "success"); + pw.write(jsonObject.toJSONString()); + } + } + } catch (Exception e) { + logger.error("-------------------- ʴ֪ͨ(YC_DX_NOTICE)쳣--------------------", e); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", e.getMessage()); + retPath = "/error.jsp"; + } + return retPath; + } + + /** + * ɶ֪ͨxml + */ + private String createDXNoticeXml(SignDto signObj) throws Exception { + StringBuilder sb = new StringBuilder("DXTZ"); + sb.append("").append(signObj.getAccNumber()).append("")//п + .append("").append(signObj.getUserName()).append("")// + .append("01")//֤֤ͣ + .append("").append(signObj.getCertId()).append("")//֤ + .append("").append(SerialNumberUtil.getYouChuSerialNumber("DXTZ", 4)).append("")//ˮ + .append("");//ע + String xmlLength = String.format("%04d", sb.length());//ij + return xmlLength + sb.toString(); + } + + + // ʴǩԼ + public String ycDXSign(HttpServletRequest request, HttpServletResponse response, SignDto signObj) throws Exception { + String retPath = null; + try (PrintWriter pw = response.getWriter()) { + Map retMap = new HashMap<>(); + retMap.put("status", "error"); + logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)ִ--------------------"); + String projectId = request.getParameter("projectId"); + String verCode = request.getParameter("verCode"); + String dxNoticeXml = createDXSignXml(signObj, "", verCode); + String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); + logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); + logger.info(retMeg); + logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); + Pattern pattern = Pattern.compile("(\\d{4})(<\\?.*\\?>)(<.*>)(\\s*$)"); + Matcher matcher = pattern.matcher(retMeg); + if (matcher.matches()) { + String analysisXml = "" + matcher.group(3) + ""; + Map respMap = XMLAnalysis.xmlToMap(analysisXml, "GBK"); + BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); + String signTime = DateAssistant.getTodayNow(); + if (respMap.get("respcd").equals("0000")) { + bomLDC.createQuery("update o set o.SIGN_STATUS = 'sign_status2',o.SIGN_TIME = :signTime where o.project_id = :projectId ") + .setParameter("signTime", signTime).setParameter("projectId", projectId).executeUpdate(); + } else { + bomLDC.createQuery("update o set o.SIGN_STATUS = 'sign_status3',o.SIGN_TIME = :signTime where o.project_id = :projectId ") + .setParameter("signTime", signTime).setParameter("projectId", projectId).executeUpdate(); + } + } + pw.write(retMap.toString()); + } catch (Exception e) { + logger.error("-------------------- ʴǩԼ(YC_DX_SIGN)쳣--------------------", e); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", e.getMessage()); + retPath = "/error.jsp"; + } + return retPath; + } + + /** + * ɶǩԼxml + */ + private String createDXSignXml(SignDto signObj, String payId, String verifyCode) throws Exception { + StringBuilder sb = new StringBuilder("DXQY"); + sb.append("").append(signObj.getAccNumber()).append("")//п + .append("").append(signObj.getUserName()).append("")// + .append("01")//֤֤ͣ + .append("").append(signObj.getCertId()).append("")//֤ + .append("").append(payId).append("")//ǩԼû + .append("").append(SerialNumberUtil.getYouChuSerialNumber("DXQY", 4)).append("")//ˮ + .append("").append(verifyCode).append("")//֤ + .append("");//ע + String xmlLength = String.format("%04d", sb.length());//ij + return xmlLength + sb.toString(); + } + + // ʴǩԼ + public String ycSignPage(HttpServletRequest request, HttpServletResponse response, SignDto signObj) { + String retPath = "/error.jsp"; + try { + String projectId = DataConvert.toString(request.getParameter("con")); + String userName = "", phoneNumber = "", accNumber = "", certId = ""; + if (signObj != null) { + userName = signObj.getUserName(); + phoneNumber = signObj.getPhoneNumber(); + accNumber = signObj.getAccNumber(); + certId = signObj.getCertId(); + } + if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(phoneNumber) || StringUtils.isEmpty(accNumber) || StringUtils.isEmpty(certId)) { + logger.error("" + projectId + "Ϣ:userName=" + userName + ",phoneNumber=" + phoneNumber + "accNumber=" + accNumber + "certId=" + certId); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", "ϢϵҵԱ"); + return retPath; + } + BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); + BizObject ldc = bomLDC.createQuery("O.PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID", projectId).getSingleResult(true); + if (ldc == null) { + ldc = bomLDC.newObject(); + ldc.setAttributeValue("PROJECT_ID", projectId); + ldc.setAttributeValue("sign_type", "YC"); + ldc.setAttributeValue("SIGN_STATUS", "sign_status1"); + bomLDC.saveObject(ldc); + } else if ("sign_status2".equals(ldc.getAttribute("SIGN_STATUS").toString())) { + logger.error("" + projectId + "ǩԼҵ"); + request.setAttribute("state", "404"); + request.setAttribute("title", "UH OH!ҳ涪ʧ"); + request.setAttribute("message", "ǩԼظǩԼ"); + return retPath; + } + request.setAttribute("userName", userName); + request.setAttribute("phoneNumber", phoneNumber); + request.setAttribute("certId", certId); + request.setAttribute("accNumber", accNumber); + //ǰ̨չʾϢ + String userNameShort = "*" + userName.substring(1, userName.length()); + String phoneNumberShort = "*****" + phoneNumber.substring(phoneNumber.length() - 4); + String accNumberShort = "*****" + accNumber.substring(accNumber.length() - 4); + String certIdShort = certId.substring(certId.length() - 6); + request.setAttribute("userNameShort", userNameShort); + request.setAttribute("phoneNumberShort", phoneNumberShort); + request.setAttribute("accNumberShort", accNumberShort); + request.setAttribute("certIdShort", certIdShort); + request.setAttribute("projectId", projectId); + request.setAttribute("signType", "YC"); + retPath = "/ycsign_index.jsp"; + } catch (Exception e) { + e.printStackTrace(); + request.setAttribute("state", "500"); + request.setAttribute("title", "ڲ쳣"); + request.setAttribute("message", e.getMessage()); + } + return retPath; + } + + +} + + From 50d740e9a2be4a85fd0462d9d476a0d6926f8b7c Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Mon, 4 Jan 2021 17:59:12 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=9A=82=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java index b45169eed..694e5e7c7 100644 --- a/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java +++ b/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java @@ -6,7 +6,6 @@ import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.util.DataConvert; -import com.tenwa.collectaudit.yccollect.SocketClientUtil; import com.tenwa.collectaudit.yccollect.XMLAnalysis; import com.tenwa.util.SerialNumberUtil; import org.apache.commons.lang3.StringUtils; @@ -36,7 +35,8 @@ public class YCPaySignServlet { logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)ִ--------------------"); String projectId = request.getParameter("projectId"); String dxNoticeXml = createDXNoticeXml(signObj); - String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); +// String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); + String retMeg = ""; logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); logger.info(retMeg); logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); @@ -93,7 +93,8 @@ public class YCPaySignServlet { String projectId = request.getParameter("projectId"); String verCode = request.getParameter("verCode"); String dxNoticeXml = createDXSignXml(signObj, "", verCode); - String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); +// String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); + String retMeg = ""; logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); logger.info(retMeg); logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); From 332457bc0787c8a1eb87ac452938af1840545578 Mon Sep 17 00:00:00 2001 From: gityjf <2211675158@qq.com> Date: Mon, 4 Jan 2021 18:03:31 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=82=AE=E5=82=A8?= =?UTF-8?q?=E7=AD=BE=E7=BA=A6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/allinpay/servlet/AllinpayServlet.java | 6 +- .../allinpay/servlet/YCPaySignServlet.java | 206 ------------------ 2 files changed, 4 insertions(+), 208 deletions(-) delete mode 100644 src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java diff --git a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java index f78a04daa..66739a703 100644 --- a/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java +++ b/src/com/tenwa/lease/app/allinpay/servlet/AllinpayServlet.java @@ -43,7 +43,8 @@ public class AllinpayServlet extends BaseServlet { String signType = request.getParameter("signType"); String projectId = request.getParameter("projectId"); if (signType.equals("YCcollect")) { - return new YCPaySignServlet().ycDXNotice(request, response, getSignObj(projectId)); +// return new YCPaySignServlet().ycDXNotice(request, response, getSignObj(projectId)); + return "/error.jsp"; } Map msg = new HashMap<>(); @@ -113,7 +114,8 @@ public class AllinpayServlet extends BaseServlet { String signType = request.getParameter("signType"); String projectId = request.getParameter("projectId"); if (signType.equals("YCcollect")) { - return new YCPaySignServlet().ycDXSign(request, response, getSignObj(projectId)); +// return new YCPaySignServlet().ycDXSign(request, response, getSignObj(projectId)); + return "/error.jsp"; } Map msg = new HashMap<>(); diff --git a/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java b/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java deleted file mode 100644 index 694e5e7c7..000000000 --- a/src/com/tenwa/lease/app/allinpay/servlet/YCPaySignServlet.java +++ /dev/null @@ -1,206 +0,0 @@ -package com.tenwa.lease.app.allinpay.servlet; - -import com.alibaba.fastjson.JSONObject; -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.amarsoft.are.util.DataConvert; -import com.tenwa.collectaudit.yccollect.XMLAnalysis; -import com.tenwa.util.SerialNumberUtil; -import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @program: apzl_leasing - * @author: yjf - * @create: 2020-11-23 15:39 - **/ -public class YCPaySignServlet { - - public static Logger logger = Logger.getLogger(YCPaySignServlet.class); - - // ʴ֪ͨ - public String ycDXNotice(HttpServletRequest request, HttpServletResponse response, SignDto signObj) throws Exception { - String retPath = null; - try (PrintWriter pw = response.getWriter()) { - logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)ִ--------------------"); - String projectId = request.getParameter("projectId"); - String dxNoticeXml = createDXNoticeXml(signObj); -// String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); - String retMeg = ""; - logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); - logger.info(retMeg); - logger.info("-------------------- ʴ֪ͨ(YC_DX_NOTICE)Ϣ--------------------"); - Pattern pattern = Pattern.compile("(\\d{4})(<\\?.*\\?>)(<.*>)(\\s*$)"); - Matcher matcher = pattern.matcher(retMeg); - if (matcher.matches()) { - String analysisXml = "" + matcher.group(3) + ""; - Map respMap = XMLAnalysis.xmlToMap(analysisXml, "GBK"); - BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); - bomLDC.createQuery("update O SET CUSTOMER_LAUNCH_TIME=:customerLaunchTime,REQUEST_CONTENT=:requestContent,RESPONSE_CONTENT=:responseContent where project_id = :projectId ") - .setParameter("customerLaunchTime", DateAssistant.getTodayNow()) - .setParameter("requestContent", dxNoticeXml) - .setParameter("responseContent", retMeg) - .setParameter("projectId", projectId).executeUpdate(); - if (respMap.get("respcd").equals("0000")) { - JSONObject jsonObject = new JSONObject(); - jsonObject.put("message", "success"); - pw.write(jsonObject.toJSONString()); - } - } - } catch (Exception e) { - logger.error("-------------------- ʴ֪ͨ(YC_DX_NOTICE)쳣--------------------", e); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message", e.getMessage()); - retPath = "/error.jsp"; - } - return retPath; - } - - /** - * ɶ֪ͨxml - */ - private String createDXNoticeXml(SignDto signObj) throws Exception { - StringBuilder sb = new StringBuilder("DXTZ"); - sb.append("").append(signObj.getAccNumber()).append("")//п - .append("").append(signObj.getUserName()).append("")// - .append("01")//֤֤ͣ - .append("").append(signObj.getCertId()).append("")//֤ - .append("").append(SerialNumberUtil.getYouChuSerialNumber("DXTZ", 4)).append("")//ˮ - .append("");//ע - String xmlLength = String.format("%04d", sb.length());//ij - return xmlLength + sb.toString(); - } - - - // ʴǩԼ - public String ycDXSign(HttpServletRequest request, HttpServletResponse response, SignDto signObj) throws Exception { - String retPath = null; - try (PrintWriter pw = response.getWriter()) { - Map retMap = new HashMap<>(); - retMap.put("status", "error"); - logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)ִ--------------------"); - String projectId = request.getParameter("projectId"); - String verCode = request.getParameter("verCode"); - String dxNoticeXml = createDXSignXml(signObj, "", verCode); -// String retMeg = SocketClientUtil.sendTcpNoticeMsg(dxNoticeXml); - String retMeg = ""; - logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); - logger.info(retMeg); - logger.info("-------------------- ʴǩԼ(YC_DX_SIGN)Ϣ--------------------"); - Pattern pattern = Pattern.compile("(\\d{4})(<\\?.*\\?>)(<.*>)(\\s*$)"); - Matcher matcher = pattern.matcher(retMeg); - if (matcher.matches()) { - String analysisXml = "" + matcher.group(3) + ""; - Map respMap = XMLAnalysis.xmlToMap(analysisXml, "GBK"); - BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); - String signTime = DateAssistant.getTodayNow(); - if (respMap.get("respcd").equals("0000")) { - bomLDC.createQuery("update o set o.SIGN_STATUS = 'sign_status2',o.SIGN_TIME = :signTime where o.project_id = :projectId ") - .setParameter("signTime", signTime).setParameter("projectId", projectId).executeUpdate(); - } else { - bomLDC.createQuery("update o set o.SIGN_STATUS = 'sign_status3',o.SIGN_TIME = :signTime where o.project_id = :projectId ") - .setParameter("signTime", signTime).setParameter("projectId", projectId).executeUpdate(); - } - } - pw.write(retMap.toString()); - } catch (Exception e) { - logger.error("-------------------- ʴǩԼ(YC_DX_SIGN)쳣--------------------", e); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message", e.getMessage()); - retPath = "/error.jsp"; - } - return retPath; - } - - /** - * ɶǩԼxml - */ - private String createDXSignXml(SignDto signObj, String payId, String verifyCode) throws Exception { - StringBuilder sb = new StringBuilder("DXQY"); - sb.append("").append(signObj.getAccNumber()).append("")//п - .append("").append(signObj.getUserName()).append("")// - .append("01")//֤֤ͣ - .append("").append(signObj.getCertId()).append("")//֤ - .append("").append(payId).append("")//ǩԼû - .append("").append(SerialNumberUtil.getYouChuSerialNumber("DXQY", 4)).append("")//ˮ - .append("").append(verifyCode).append("")//֤ - .append("");//ע - String xmlLength = String.format("%04d", sb.length());//ij - return xmlLength + sb.toString(); - } - - // ʴǩԼ - public String ycSignPage(HttpServletRequest request, HttpServletResponse response, SignDto signObj) { - String retPath = "/error.jsp"; - try { - String projectId = DataConvert.toString(request.getParameter("con")); - String userName = "", phoneNumber = "", accNumber = "", certId = ""; - if (signObj != null) { - userName = signObj.getUserName(); - phoneNumber = signObj.getPhoneNumber(); - accNumber = signObj.getAccNumber(); - certId = signObj.getCertId(); - } - if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(phoneNumber) || StringUtils.isEmpty(accNumber) || StringUtils.isEmpty(certId)) { - logger.error("" + projectId + "Ϣ:userName=" + userName + ",phoneNumber=" + phoneNumber + "accNumber=" + accNumber + "certId=" + certId); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message", "ϢϵҵԱ"); - return retPath; - } - BizObjectManager bomLDC = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_CARD_TLSIGN"); - BizObject ldc = bomLDC.createQuery("O.PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID", projectId).getSingleResult(true); - if (ldc == null) { - ldc = bomLDC.newObject(); - ldc.setAttributeValue("PROJECT_ID", projectId); - ldc.setAttributeValue("sign_type", "YC"); - ldc.setAttributeValue("SIGN_STATUS", "sign_status1"); - bomLDC.saveObject(ldc); - } else if ("sign_status2".equals(ldc.getAttribute("SIGN_STATUS").toString())) { - logger.error("" + projectId + "ǩԼҵ"); - request.setAttribute("state", "404"); - request.setAttribute("title", "UH OH!ҳ涪ʧ"); - request.setAttribute("message", "ǩԼظǩԼ"); - return retPath; - } - request.setAttribute("userName", userName); - request.setAttribute("phoneNumber", phoneNumber); - request.setAttribute("certId", certId); - request.setAttribute("accNumber", accNumber); - //ǰ̨չʾϢ - String userNameShort = "*" + userName.substring(1, userName.length()); - String phoneNumberShort = "*****" + phoneNumber.substring(phoneNumber.length() - 4); - String accNumberShort = "*****" + accNumber.substring(accNumber.length() - 4); - String certIdShort = certId.substring(certId.length() - 6); - request.setAttribute("userNameShort", userNameShort); - request.setAttribute("phoneNumberShort", phoneNumberShort); - request.setAttribute("accNumberShort", accNumberShort); - request.setAttribute("certIdShort", certIdShort); - request.setAttribute("projectId", projectId); - request.setAttribute("signType", "YC"); - retPath = "/ycsign_index.jsp"; - } catch (Exception e) { - e.printStackTrace(); - request.setAttribute("state", "500"); - request.setAttribute("title", "ڲ쳣"); - request.setAttribute("message", e.getMessage()); - } - return retPath; - } - - -} - - From 84358c2cae0e74bf09a907509c73342467f7bda7 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Mon, 4 Jan 2021 18:54:59 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AD=BE=E7=BA=A6?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvoiceLeasebackTJListHasInvoiced.jsp | 2 +- .../AccountChangeFlowDebitCardInfo.jsp | 45 +++++++- .../Flow/Comm/LBDebitCard/DebitCardInfo.jsp | 30 ++--- WebContent/WEB-INF/etc/jbo/jbo_customer.xml | 4 + .../customerfilterlist/DebitCardAction.java | 108 ++++++++++-------- .../customer/LB_CARD_SIGN_STATUS_HIS.java | 4 + src_sql/投产SQL/v20201022/tft_20201022.sql | 30 +++-- .../contract/check/ContractInfoCheck.java | 11 +- 8 files changed, 149 insertions(+), 85 deletions(-) diff --git a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp index ebf4dc745..73c90c503 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp @@ -3,7 +3,7 @@ CurPage.setAttribute("leaseForm", "02"); ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leaseback"); doTemp.appendJboWhere("li.status='Y'"); - doTemp.setColumnAttribute("plan_list,tax_no,fpdm,fphm,hztzdh,tax_code", "colvisible", "1"); + doTemp.setColumnAttribute("plan_list,fpdm,fphm,hztzdh,tax_code", "colvisible", "1"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--ΪGrid-- dwTemp.ReadOnly = "1"; //ֻģʽ diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp index b672c0674..f3e85536b 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp @@ -7,6 +7,8 @@ Content: ʾҳ History Log: */ + String userId = CurUser.getUserID(); + String orgId = CurUser.getOrgID(); String projectId = CurPage.getParameter("ProjectId"); String RightType=CurPage.getParameter("RightType"); String ishistory=CurPage.getParameter("IsHistory"); @@ -15,7 +17,8 @@ String customerId = CurPage.getParameter("customerId"); String FlowUnid=CurPage.getParameter("FlowUnid"); String contractId = CurPage.getParameter("ContractId"); - + String subjectId=CurPage.getParameter("SubjectId");//ȡϢǷǩԼѯ + String sTempletNo = "DebitCardInfoMcontract";//--ģ-- ASObjectModel doTemp = new ASObjectModel(sTempletNo); doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank"); @@ -101,7 +104,11 @@ } setErrorTips("acc_number",""); setItemValue(0,0,"acc_type","Debit"); - var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>"; + + //ѯŵĿۿǷǩԼǩԼӦݴӦļ¼ + RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid=<%=projectId%>,userId=<%=userId%>,orgId=<%=orgId%>,applyType=<%=ApplyType%>"); + + var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>,subjectId=<%=subjectId%>,collect_type="+getItemValue(0,getRow(),"collect_type"); var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams); if("Y"==meassge){ setItemValue(0,0,"sign_status","Y"); @@ -127,13 +134,45 @@ sflag = i; } } + var bool = true; if (sflag != -1) { var name=bankName[sflag].substring(0,bankName[sflag].indexOf("")); - setItemValue(0,getRow(),"bank_name",name); + if(name.indexOf("ʴ") != -1 || name.indexOf("") != -1){ + name = ""; + } + var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "selectBankName", "bank_name="+name); + if("error"!= res){ + res = res.split("@"); + var bankCode = getItemValue(0, 0, "bank_code"); + setItemValue(0,0,'bank_code',res[0]); + setItemValue(0,0,'bank_type',res[1]); + setItemValue(0,0,"bank_name",res[1]); + setItemValue(0,0,"collect_type",res[2]); + bool = false; + } } + if(bool){ + setItemValue(0,0,'bank_code',''); + setItemValue(0,0,'bank_type',''); + setItemValue(0,0,"bank_name",''); + setItemValue(0,0,"collect_type",''); + } setErrorTips("acc_number",""); return true; } + + function selectBankType(){ + AsDialog.OpenSelector("selectBankType","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + if(!sReturn||sReturn=="_CANCEL_"){ + return; + } + sReturn = sReturn.split("@"); + setItemValue(0,0,'bank_code',sReturn[0]); + setItemValue(0,0,'bank_type',sReturn[1]); + setItemValue(0,0,"bank_name",sReturn[1]); + setItemValue(0,0,"collect_type",sReturn[2]); + },"ѡ"); + } <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp index ab559b529..0396eb093 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp @@ -22,6 +22,7 @@ String CustomerType=CurPage.getParameter("CustomerType"); String ApplyType=CurPage.getParameter("ApplyType"); String PhaseNo=CurPage.getParameter("PhaseNo"); + String subjectId=CurPage.getParameter("SubjectId");//ȡϢǷǩԼѯ BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); BizObject ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", contractId).getSingleResult(false); System.out.print("=========="+ldcls+"=========="); @@ -72,7 +73,7 @@ return; } sReturn = sReturn.split("@"); - var bankCode = getItemValue(0, 0, "bank_code"); + //var bankCode = getItemValue(0, 0, "bank_code"); setItemValue(0,0,'bank_code',sReturn[0]); setItemValue(0,0,'bank_type',sReturn[1]); setItemValue(0,0,"bank_name",sReturn[1]); @@ -181,19 +182,22 @@ } } var project_id = getItemValue(0,0,"project_id"); - //УӦĿۿǷǩԼǩԼ - RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid="+project_id+",userId=<%=userId%>,orgId=<%=orgId%>"); + if("BusinessApplyApply"!="<%=ApplyType%>"){//ҵ벻УǷǩԼΪҵûа취ǩԼǩԼ״̬ҲǴӱıġ + //ѯŵĿۿǷǩԼǩԼӦݴӦļ¼ + RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid="+project_id+",userId=<%=userId%>,orgId=<%=orgId%>,applyType=<%=ApplyType%>"); + } + if("BusinessApplyApply"=="<%=ApplyType%>"||"BusinessChangeApply"=="<%=ApplyType%>"||"BContractApproveApply"=="<%=ApplyType%>"||"BContractChangeApply"=="<%=ApplyType%>"){ - var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>"; - var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams); - if("false"==meassge){ - alert("ͬɣɾͬ޸ĿۿϢ"); - return ; - }else if("Y"==meassge){ - setItemValue(0,0,"sign_status","Y"); - }else if("N"==meassge){ - setItemValue(0,0,"sign_status",""); - } + var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>,subjectId=<%=subjectId%>,collect_type="+getItemValue(0,getRow(),"collect_type"); + var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams); + if("false"==meassge){ + alert("ͬɣɾͬ޸ĿۿϢ"); + return ; + }else if("Y"==meassge){ + setItemValue(0,0,"sign_status","Y"); + }else if("N"==meassge){ + setItemValue(0,0,"sign_status",""); + } } iV_all("0"); diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml index 72c2810eb..120c163c9 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml @@ -14,6 +14,7 @@ + @@ -3019,6 +3020,9 @@ + + + diff --git a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java index 6dafe2f02..8950ea9de 100644 --- a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java +++ b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java @@ -58,6 +58,7 @@ public class DebitCardAction { private String orgId; private String applyType; private String collect_type; + private String subjectId; public String getCustIdByFlowunid(JBOTransaction tx) throws JBOException{ String s=this.getFlowUnid(); @@ -277,41 +278,46 @@ public class DebitCardAction { return "false"; } } - //Уͨ - if("BContractApproveApply".equals(applyType) || "BContractChangeApply".equals(applyType)||"AccountChangeApply".equals(applyType)){ - BizObjectManager lcsshManage = JBOFactory.getFactory().getManager(LB_CARD_SIGN_STATUS_HIS.CLASS_NAME); - BizObject lcss = lcsshManage.createQuery(" tl_status='sign_status2' and account=:account and acc_number=:acc_number and certid=:certid and mobile=:mobile ") - .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).getSingleResult(false); - - BizObjectManager lcthManage = JBOFactory.getFactory().getManager(LC_CARD_TLSIGN.CLASS_NAME,tx); - BizObject lct = lcthManage.createQuery("PROJECT_ID=:project_id ").setParameter("project_id", projectid).getSingleResult(true); - if(lcss!=null){ - if(lct == null){ - lct = lcthManage.newObject(); - lct.setAttributeValue("PROJECT_ID", projectid); - } - lct.setAttributeValue("SIGN_STATUS", "sign_status2"); - lct.setAttributeValue("AGRMNO", lcss.getAttribute("AGRMNO").getString()); + //ѯʷǷǩԼ + BizObjectManager lcsshManage = JBOFactory.getFactory().getManager(LB_CARD_SIGN_STATUS_HIS.CLASS_NAME); + BizObject lcss = lcsshManage.createQuery("select O.AGRMNO from O left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.tl_status='sign_status2' and O.account=:account and O.acc_number=:acc_number and O.certid=:certid and O.mobile=:mobile and O.sign_type=:sign_type and lpi.subjectid=:subjectId ") + .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).setParameter("sign_type", collect_type).setParameter("subjectId", subjectId).getSingleResult(false); + + //ѯǰĿǷжӦǩԼ¼ + BizObjectManager lcthManage = JBOFactory.getFactory().getManager(LC_CARD_TLSIGN.CLASS_NAME,tx); + BizObject lct = lcthManage.createQuery("PROJECT_ID=:project_id ").setParameter("project_id", projectid).getSingleResult(true); + + //鿴пǷǩԼ + BizObject caAgrmno = lcthManage.createQuery("select O.AGRMNO from O left join jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca on ca.project_id=O.project_id left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.sign_status='sign_status2' and lpi.subjectid=:subjectid and O.sign_type=:sign_type and ca.acc_number=:acc_number and ca.certid=:certid and ca.mobile=:mobile ") + .setParameter("subjectId", subjectId).setParameter("sign_type", collect_type).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).getSingleResult(false); + + if(lcss!=null || caAgrmno!= null){ + if(lct == null){ + lct = lcthManage.newObject(); + lct.setAttributeValue("PROJECT_ID", projectid); + } + lct.setAttributeValue("SIGN_STATUS", "sign_status2"); + lct.setAttributeValue("sign_type", collect_type); + lct.setAttributeValue("AGRMNO", lcss!=null ? lcss.getAttribute("agrmno").getString(): caAgrmno.getAttribute("agrmno").getString()); + lcthManage.saveObject(lct); + }else{ + if(lct != null){ + lct.setAttributeValue("SIGN_STATUS", "sign_status4"); lcthManage.saveObject(lct); - }else{ - if(lct != null){ - lct.setAttributeValue("SIGN_STATUS", "sign_status4"); - lcthManage.saveObject(lct); - } } } - - BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME); - List cahs = cahManage.createQuery(" sign_status='Y' and account=:account and acc_number=:acc_number and certid=:certid ") - .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).getResultList(false); - if(cahs != null && cahs.size() > 0){ - return "Y"; - } - BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME); - List cas = caManage.createQuery(" sign_status='Y' and account=:account and acc_number=:acc_number and certid=:certid ") - .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).getResultList(false); - if(cas != null && cas.size() > 0){ - return "Y"; + if("YLcollect".equals(collect_type)){ + BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME); + String sql ="select O.id from O left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.sign_status='Y' and O.account=:account and O.acc_number=:acc_number and O.certid=:certid and O.collect_type='YLcollect' and lpi.subjectid=:subjectid"; + List cahs = cahManage.createQuery(sql).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("subjectid", subjectId).getResultList(false); + if(cahs != null && cahs.size() > 0){ + return "Y"; + } + BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME); + List cas = caManage.createQuery(sql).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("subjectid", subjectId).getResultList(false); + if(cas != null && cas.size() > 0){ + return "Y"; + } } return "N"; } @@ -333,7 +339,7 @@ public class DebitCardAction { String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); try { Sqlca =Transaction.createTransaction(CacheLoaderFactory.getDataSource()); - selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' "; + selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' and bank_name='"+bank_name+"'"; List> dataList = DataOperatorUtil.getDataBySql(Sqlca, selectSql, null); if(dataList ==null || dataList.size()==0){ //ѯмǷ,CUSTOMER_ACCOUNT_MIDDLEûۿϢǩԼŷõ @@ -390,26 +396,20 @@ public class DebitCardAction { String account = cca.getAttribute("account").getString(); String mobile = cca.getAttribute("MOBILE").getString(); String certid = cca.getAttribute("certid").getString(); - BizObject lcssh = lcsshManager.createQuery(" acc_number=:acc_number and account=:account and mobile=:mobile and certid=:certid ") - .setParameter("acc_number", accNumber).setParameter("account", account).setParameter("mobile", mobile).setParameter("certid", certid).getSingleResult(true); - if(lcssh == null){ - lcssh = lcsshManager.newObject(); - lcssh.setAttributeValue("project_id", projectid); - lcssh.setAttributeValue("acc_number", accNumber); - lcssh.setAttributeValue("account", account); - lcssh.setAttributeValue("mobile", mobile); - lcssh.setAttributeValue("certid", certid); - lcssh.setAttributeValue("inputuserid", userId); - lcssh.setAttributeValue("inputorgid", orgId); - lcssh.setAttributeValue("inputtime", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss.SSS ")); - }else{ - lcssh.setAttributeValue("updateuserid", account); - lcssh.setAttributeValue("updateorgid", orgId); - lcssh.setAttributeValue("updatetime", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss.SSS ")); - } + BizObject lcssh = lcsshManager.newObject(); + lcssh.setAttributeValue("project_id", projectid); + lcssh.setAttributeValue("acc_number", accNumber); + lcssh.setAttributeValue("account", account); + lcssh.setAttributeValue("mobile", mobile); + lcssh.setAttributeValue("certid", certid); + lcssh.setAttributeValue("inputuserid", userId); + lcssh.setAttributeValue("inputorgid", orgId); + lcssh.setAttributeValue("inputtime", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss.SSS ")); + lcssh.setAttributeValue("gz_status", gzStatus); if(lct!=null ){ lcssh.setAttributeValue("tl_status", "sign_status2"); + lcssh.setAttributeValue("sign_type", lct.getAttribute("sign_type")); lcssh.setAttributeValue("agrmno", lct.getAttribute("AGRMNO")); } lcsshManager.saveObject(lcssh); @@ -581,5 +581,13 @@ public class DebitCardAction { public void setCollect_type(String collect_type) { this.collect_type = collect_type; } + + public String getSubjectId() { + return subjectId; + } + + public void setSubjectId(String subjectId) { + this.subjectId = subjectId; + } } diff --git a/src_jbo/jbo/app/tenwa/customer/LB_CARD_SIGN_STATUS_HIS.java b/src_jbo/jbo/app/tenwa/customer/LB_CARD_SIGN_STATUS_HIS.java index adf2443c2..1effa77e9 100644 --- a/src_jbo/jbo/app/tenwa/customer/LB_CARD_SIGN_STATUS_HIS.java +++ b/src_jbo/jbo/app/tenwa/customer/LB_CARD_SIGN_STATUS_HIS.java @@ -58,6 +58,10 @@ public interface LB_CARD_SIGN_STATUS_HIS{ */ public static final String agrmno = "agrmno"; /** + * ǩԼʽ STRING(10)
+ */ + public static final String sign_type = "sign_type"; + /** * ¼ STRING(32)
*/ public static final String inputuserid = "inputuserid"; diff --git a/src_sql/投产SQL/v20201022/tft_20201022.sql b/src_sql/投产SQL/v20201022/tft_20201022.sql index b1ef9935f..8765b9ed1 100644 --- a/src_sql/投产SQL/v20201022/tft_20201022.sql +++ b/src_sql/投产SQL/v20201022/tft_20201022.sql @@ -136,6 +136,22 @@ Insert Into SCENARIO_MODEL (scenarioid,modelid,sortno,modelname,modeldescribe,mo delete from AWE_DO_CATALOG where dono='VILCRentPlanList'; Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('VILCRentPlanList','ƻͼ',null,'30120',null,'1','1','default','jbo.loan.VI_RENT_COLLECT_4_EBANK','O left join jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR lec on O.contract_id=lec.contract_id and lec.car_attribute=''head'' left join jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO lcl on lec.contract_id=lcl.contract_id and lec.frame_number=lcl.frame_number','O.businesstype=:businessType and O.subjectid=:subjectId and (O.batch_status<>''process'' or O.batch_status is null) and v.DATE_FORMAT(O.plan_date,''%Y%m'') <= v.DATE_FORMAT(v.SYSDATE(),''%Y%m'') and rent_over>0','','contract_number,plan_list','com.tenwa.flow.rent.rentincome.VILCRentPlanListHandler',null,'SYS_Designer','2017/06/04 20:29:52','SYS_Designer','2020/12/24 11:01:55','','1',''); + +-- ޸ĺͬѡԻ +delete from SELECT_CATALOG where selname='SelectOwnInfo'; +Insert Into SELECT_CATALOG (selname,seltype,seldescribe,seltablename,selprimarykey,selbrowsemode,selargs,selhidefield,selcode,selfieldname,selfielddisp,selreturnvalue,selfilterfield,isinuse,mutilorsingle,attribute1,attribute2,attribute3,attribute4,attribute5,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('SelectOwnInfo','Sql','ѯϢ','','','Grid','','OWN_NUMBER','select OWN_NUMBER,OWN_NAME,LEASE_CONSIGNER,LEASE_REGISTER_ADDR,LEASE_ADDR,LEASE_PERSON,LEASE_POSTCODE,LEASE_LINKMAN,LEASE_TEL,LEASE_FAX,LEASE_EMAIL from own_info oi left join OWN_ACCOUNT oa on oi.own_number=oa.own_id where oa.acc_type=''#acc_type'' and state_=''0010''','ͻ,,ίд,עַ,ͨѶַ,,ʱ,ϵ,绰,,ʼ','','OWN_NUMBER@OWN_NAME@LEASE_CONSIGNER@LEASE_REGISTER_ADDR@LEASE_ADDR@LEASE_PERSON@LEASE_POSTCODE@LEASE_LINKMAN@LEASE_TEL@LEASE_FAX@LEASE_EMAIL','OWN_NAME','1','Single','','','','','','SYS_Designer','','2017/05/11 18:41:49','SYS_Designer','2020/12/30 14:06:44',''); + + +-- ޸ķ˿ͻlistҳ +delete from AWE_DO_CATALOG where dono='CustomerCompanyList'; +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('CustomerCompanyList','˿ͻб',null,'30010',null,'1','1','default','jbo.app.tenwa.customer.CUSTOMER_INFO','O left join jbo.app.tenwa.customer.CUSTOMER_TYPE ct on O.customerid=ct.customerid left join jbo.app.tenwa.customer.CUSTOMER_ATTRIBUTION ca on ca.customerid=O.customerid','O.customertype =:sCustomerType and ct.custtype=''cust_type.cust'' and ct.status=''valid'' and ca.status=''yes''','','inputtime desc','',null,'SYS_Designer','2017/03/15 11:52:03','SYS_Designer','2020/12/30 15:09:56','','1',''); +-- ޸Ŀѡͻݹʾ +delete from SELECT_CATALOG where selname='SelectCustomerForProjectApprove'; +Insert Into SELECT_CATALOG (selname,seltype,seldescribe,seltablename,selprimarykey,selbrowsemode,selargs,selhidefield,selcode,selfieldname,selfielddisp,selreturnvalue,selfilterfield,isinuse,mutilorsingle,attribute1,attribute2,attribute3,attribute4,attribute5,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('SelectCustomerForProjectApprove','Sql','ѯͻĿ','customer_info','customerid','Grid','String userid','','SELECT O.customerid,O.customername,getItemName(''CertType'',O.certtype) AS certtype,O.certid,O.CUSTKIND,getItemName(''CustomerType'',O.customertype) AS customertype,getUserName(O.inputuserid) AS inputusername,getOrgName(O.inputorgid) AS inputorgid ,O.inputtime FROM CUSTOMER_INFO O LEFT JOIN CUSTOMER_TYPE ct ON O.customerid=ct.customerid LEFT JOIN CUSTOMER_COMPANY cc ON cc.customerid=O.customerid LEFT JOIN CUSTOMER_ATTRIBUTION ca ON ca.customerid=O.customerid WHERE O.customertype=''01'' AND ct.custtype=''cust_type.cust'' AND ct.custstatus=''status02'' AND ct.status=''valid'' AND cc.status=''status02'' AND ca.status=''yes'' AND ca.userid=''#userid'' AND NOT EXISTS (SELECT 1 FROM CUSTOMER_BLANK_LIST cbl WHERE cbl.customer_id=O.customerid AND (cbl.blank_level =''stop'' AND cbl.blank_status=''no'')) {O,cust}','ͻ,ͻ,֤,֤,ڲҵ,ͻ,Ǽ,Ǽǻ,Ǽʱ','','customerid@customername','customername,custkind,certid','1','Single','','','','','customername@ @ @EqualsString,Contains@certid@ @ @EqualsString,Contains@custkind@sql@SELECT itemno,itemname FROM code_library WHERE codeno=''cust_kind'' ORDER BY sortno@EqualsString','SYS_Designer','','2017/07/06 15:38:06','SYS_Designer','2020/12/30 15:17:05',''); + + + + -- ---------------ִ--------------------------------------- -- ͨ۶ŷֵ @@ -285,16 +301,6 @@ alter table customer_account_middle add column collect_type varchar(20) null com -- ǩԼʷǩԼ alter table LB_CARD_SIGN_STATUS_HIS add column sign_type varchar(10) null comment 'ǩԼʽ' after agrmno; --- ޸ĺͬѡԻ -delete from SELECT_CATALOG where selname='SelectOwnInfo'; -Insert Into SELECT_CATALOG (selname,seltype,seldescribe,seltablename,selprimarykey,selbrowsemode,selargs,selhidefield,selcode,selfieldname,selfielddisp,selreturnvalue,selfilterfield,isinuse,mutilorsingle,attribute1,attribute2,attribute3,attribute4,attribute5,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('SelectOwnInfo','Sql','ѯϢ','','','Grid','','OWN_NUMBER','select OWN_NUMBER,OWN_NAME,LEASE_CONSIGNER,LEASE_REGISTER_ADDR,LEASE_ADDR,LEASE_PERSON,LEASE_POSTCODE,LEASE_LINKMAN,LEASE_TEL,LEASE_FAX,LEASE_EMAIL from own_info oi left join OWN_ACCOUNT oa on oi.own_number=oa.own_id where oa.acc_type=''#acc_type'' and state_=''0010''','ͻ,,ίд,עַ,ͨѶַ,,ʱ,ϵ,绰,,ʼ','','OWN_NUMBER@OWN_NAME@LEASE_CONSIGNER@LEASE_REGISTER_ADDR@LEASE_ADDR@LEASE_PERSON@LEASE_POSTCODE@LEASE_LINKMAN@LEASE_TEL@LEASE_FAX@LEASE_EMAIL','OWN_NAME','1','Single','','','','','','SYS_Designer','','2017/05/11 18:41:49','SYS_Designer','2020/12/30 14:06:44',''); - - --- ޸ķ˿ͻlistҳ -delete from AWE_DO_CATALOG where dono='CustomerCompanyList'; -Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('CustomerCompanyList','˿ͻб',null,'30010',null,'1','1','default','jbo.app.tenwa.customer.CUSTOMER_INFO','O left join jbo.app.tenwa.customer.CUSTOMER_TYPE ct on O.customerid=ct.customerid left join jbo.app.tenwa.customer.CUSTOMER_ATTRIBUTION ca on ca.customerid=O.customerid','O.customertype =:sCustomerType and ct.custtype=''cust_type.cust'' and ct.status=''valid'' and ca.status=''yes''','','inputtime desc','',null,'SYS_Designer','2017/03/15 11:52:03','SYS_Designer','2020/12/30 15:09:56','','1',''); --- ޸Ŀѡͻݹʾ -delete from SELECT_CATALOG where selname='SelectCustomerForProjectApprove'; -Insert Into SELECT_CATALOG (selname,seltype,seldescribe,seltablename,selprimarykey,selbrowsemode,selargs,selhidefield,selcode,selfieldname,selfielddisp,selreturnvalue,selfilterfield,isinuse,mutilorsingle,attribute1,attribute2,attribute3,attribute4,attribute5,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('SelectCustomerForProjectApprove','Sql','ѯͻĿ','customer_info','customerid','Grid','String userid','','SELECT O.customerid,O.customername,getItemName(''CertType'',O.certtype) AS certtype,O.certid,O.CUSTKIND,getItemName(''CustomerType'',O.customertype) AS customertype,getUserName(O.inputuserid) AS inputusername,getOrgName(O.inputorgid) AS inputorgid ,O.inputtime FROM CUSTOMER_INFO O LEFT JOIN CUSTOMER_TYPE ct ON O.customerid=ct.customerid LEFT JOIN CUSTOMER_COMPANY cc ON cc.customerid=O.customerid LEFT JOIN CUSTOMER_ATTRIBUTION ca ON ca.customerid=O.customerid WHERE O.customertype=''01'' AND ct.custtype=''cust_type.cust'' AND ct.custstatus=''status02'' AND ct.status=''valid'' AND cc.status=''status02'' AND ca.status=''yes'' AND ca.userid=''#userid'' AND NOT EXISTS (SELECT 1 FROM CUSTOMER_BLANK_LIST cbl WHERE cbl.customer_id=O.customerid AND (cbl.blank_level =''stop'' AND cbl.blank_status=''no'')) {O,cust}','ͻ,ͻ,֤,֤,ڲҵ,ͻ,Ǽ,Ǽǻ,Ǽʱ','','customerid@customername','customername,custkind,certid','1','Single','','','','','customername@ @ @EqualsString,Contains@certid@ @ @EqualsString,Contains@custkind@sql@SELECT itemno,itemname FROM code_library WHERE codeno=''cust_kind'' ORDER BY sortno@EqualsString','SYS_Designer','','2017/07/06 15:38:06','SYS_Designer','2020/12/30 15:17:05',''); - +-- ۿʷֶ +alter table customer_account_his add collect_type varchar(10),add bank_type varchar(10),add bank_code varchar(10); diff --git a/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java index 9b2fff0a2..48dda1f0e 100644 --- a/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java @@ -47,21 +47,20 @@ public class ContractInfoCheck { if(ca==null){ return "δѯۿϢϵԱ" ; }else{ + BizObjectManager lctManage = JBOFactory.getBizObjectManager(LC_CARD_TLSIGN.CLASS_NAME, tx); String collect_type = ca.getAttribute("collect_type").getString(); if(collect_type.equals("YLcollect")){// if(!"Y".equals(ca.getAttribute("SIGN_STATUS").getString())){ return "ѿͻ鿴ֻţɹۿǩԼ֤"; } }else if(collect_type.equals("TLcollect")){//ͨ - BizObjectManager lctManage = JBOFactory.getBizObjectManager(LC_CARD_TLSIGN.CLASS_NAME, tx); - BizObject lct = lctManage.createQuery(" project_id=:project_id and sign_type='TL' ").setParameter("project_id", projectid).getSingleResult(false); - if( lct==null || (!"sign_status2".equals(lct.getAttribute("sign_status").getString()))){ + BizObject lct = lctManage.createQuery(" project_id=:project_id and sign_type='TLcollect' and sign_status='sign_status2' ").setParameter("project_id", projectid).getSingleResult(false); + if( lct==null ){ return "ѿͻ鿴ֻţͨۿǩԼ֤"; } }else if(collect_type.equals("YCcollect")){//ʴж - BizObjectManager lctManage = JBOFactory.getBizObjectManager(LC_CARD_TLSIGN.CLASS_NAME, tx); - BizObject lct = lctManage.createQuery(" project_id=:project_id and sign_type='YC' ").setParameter("project_id", projectid).getSingleResult(false); - if( lct==null || (!"sign_status2".equals(lct.getAttribute("sign_status").getString()))){ + BizObject lct = lctManage.createQuery(" project_id=:project_id and sign_type='YCcollect' and sign_status='sign_status2' ").setParameter("project_id", projectid).getSingleResult(false); + if( lct==null ){ return "ѿͻ鿴ֻţʴۿǩԼ֤"; } }else{