From 0b7d8724a42d03556e6ff10008e82eb0b0c4b256 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Fri, 27 Mar 2020 21:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=9A=E6=81=AF=E5=87=8F?= =?UTF-8?q?=E5=85=8D=E7=94=B3=E8=AF=B7=E9=80=89=E6=8B=A9=E5=90=88=E5=90=8C?= =?UTF-8?q?=E6=85=A2=E3=80=81=E5=AE=9E=E9=99=85=E4=BB=98=E6=AC=BE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=9C=AC=E6=AC=A1=E4=BB=98=E6=AC=BE=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B0=8F=E8=AE=A1=E3=80=81=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E5=95=86=E4=BF=9D=E8=AF=81=E9=87=91=E4=BB=A3=E5=81=BF=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src_sql/投产SQL/V20200404/tft_20200404.sql | 21 +++++++++++++++++++++ 报表/汽车类报表一/渠道商保证金代偿红冲.xml | 17 +++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src_sql/投产SQL/V20200404/tft_20200404.sql b/src_sql/投产SQL/V20200404/tft_20200404.sql index a745d127a..c2a21dec8 100644 --- a/src_sql/投产SQL/V20200404/tft_20200404.sql +++ b/src_sql/投产SQL/V20200404/tft_20200404.sql @@ -164,5 +164,26 @@ INSERT INTO SCENARIO_RELATIVE (scenarioid,groupid,modelid) VALUES (' insert into `class_method` (`classname`, `methodname`, `methodtype`, `methoddescribe`, `returntype`, `methodargs`, `methodcode`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`) values('','Ϣжϴ100Ԫ','Bizlet','Ϣжϴ100Ԫ','String','String ObjectNo','com.tenwa.lease.flow.project.businessapply.JudgmentPenaltyAdjustMoneyGreater','','','','','',''); insert into `class_method` (`classname`, `methodname`, `methodtype`, `methoddescribe`, `returntype`, `methodargs`, `methodcode`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`) values('','ϢжСڵ100Ԫ','Bizlet','ϢжСڵ100Ԫ','String','String ObjectNo','com.tenwa.lease.flow.project.businessapply.JudgmentPenaltyAdjustMoneyLess','','','','','',''); +-- ϢѡͬŻ +DELETE FROM SELECT_CATALOG WHERE selname='SelectPaymentHavePenalty'; +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 ('SelectPaymentHavePenalty','Sql','ѯѲϢͶ','LB_CONTRACT_INFO','ID','Grid','String businessType','id,project_id,product_id,PROJECT_NAME,PAYMENT_NUMBER,itemname','select lci.contract_number,lci.id,lci.project_id,lci.product_id,lci.PROJECT_NAME,lccs.PAYMENT_NUMBER,vlrp.rentover,vlrp.penaltyover,lul.customername,cl.itemname,ui.username,oi.orgname,lcs.STATUS_NAME from lb_contract_info lci left join lc_calc_condition_status lccs on lccs.contract_id = lci.id left join (select payment_number,sum(rent_over) rentover,sum(penalty_over) penaltyover from ( +SELECT lcf.PAYMENT_NUMBER AS payment_number, +(lcf.RENT - (IFNULL(lcfd.rent,0) + IFNULL(lcfi.rent,0))) AS rent_over, + ROUND((getRentPenalty(lcf.PAYMENT_NUMBER,lcf.PLAN_LIST,DATE_FORMAT(NOW(),''%Y/%m/%d'')) - ((IFNULL(lcfd.penalty,0) + IFNULL(lcfi.penalty,0)) + (IFNULL(lcfd.penalty_adjust,0) + IFNULL(lcfi.penalty_adjust,0)))),2) AS penalty_over +FROM lc_rent_plan lcf +LEFT JOIN lb_contract_info lbc ON lcf.CONTRACT_ID = lbc.ID +LEFT JOIN lc_rent_income_transfer lcfd ON lcf.PAYMENT_NUMBER = lcfd.payment_number AND lcf.PLAN_LIST = lcfd.plan_list +LEFT JOIN lc_rent_income_temp_transfer lcfi ON lcf.PAYMENT_NUMBER = lcfi.payment_number AND lcf.PLAN_LIST = lcfi.plan_list +WHERE plan_date0 group by payment_number) vlrp on vlrp.payment_number = lccs.payment_number left join (select lu.contract_id,ci.customerid,ci.customername from LB_UNIon_LESSEE lu,CUSTOMER_INFO ci where lu.CUSTOMER_ID = ci.customerid and is_main = ''y'') as lul on lul.ConTRACT_ID = lci.id left join user_info ui on ui.userid = lci.PROJECT_MANAGE left join org_info oi on oi.orgid = lci.PROJECT_DEPT left join lb_contract_status lcs on lcs.STATUS_CODE = lccs.plan_status left join code_library cl on cl.itemno = lci.PROJECT_INDUSTRY and cl.codeno = ''cust_kind'' where lci.businesstype = ''#businessType'' and lccs.PLAN_STATUS = ''31'' and vlrp.penaltyover > 0 and lccs.PAYMENT_NUMBER not in (select payment_number from lc_occupy_rent_list where flow_name not in(''տ'',''ֿ֤'',''Ϣ''))','ҵͬ,ͬ,Ŀ,Ʒ,Ŀ,Ͷű,,Ϣ,,ڲҵ,SP,,Ͷ״̬','','id@product_id@project_id@PROJECT_NAME@PAYMENT_NUMBER@contract_number','contract_number,orgname,customername','1','Single','rentover@3@penaltyover@3','','penaltyover@2@rentover@2','','contract_number@ @ @Contains@orgname@ @ @Contains@customername@ @ @Contains','SYS_Designer','','2017/06/26 08:37:31','SYS_Designer','2020/03/25 11:49:16',''); +-- ʵʸ̱θϸС +DELETE FROM awe_do_library WHERE dono='ActualPaymentCarTempList' AND colindex='1030'; +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('ActualPaymentCarTempList','1030','1030','1','lcct','CLEAN_LEASE_MONEY','CLEAN_LEASE_MONEY','Number','','ʶ','','2','Text','2','3','','','','22','1','1','0','1','0',0,'','','','SYS_Designer','2018/07/04 21:02:50','SYS_Designer','2020/03/27 09:49:35','0','','1','','','',''); +DELETE FROM awe_do_library WHERE dono='ActualPaymentCarTempList' AND colindex='1033'; +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('ActualPaymentCarTempList','1033','1033','1','lcct','HANDLING_CHARGE_MONEY','HANDLING_CHARGE_MONEY','Number','','','','2','Text','2','3','','','','22','1','1','0','1','0',0,'','','','SYS_Designer','2018/07/12 20:51:58','SYS_Designer','2020/03/27 09:49:00','0','','1','','','',''); +DELETE FROM awe_do_library WHERE dono='ActualPaymentCarTempList' AND colindex='1035'; +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('ActualPaymentCarTempList','1035','1035','1','lcct','CAUTION_MONEY','CAUTION_MONEY','Number','','֤','','2','Text','2','3','','','','20','1','1','0','1','0',1,'','','','','','SYS_Designer','2020/03/27 09:49:00','0','','0','','','',''); +DELETE FROM awe_do_library WHERE dono='ActualPaymentCarTempList' AND colindex='1480'; +INSERT INTO awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) VALUES ('ActualPaymentCarTempList','1480','1037','1','lcct','GPS_FEE','GPS_FEE','Number','','GPSװ','','2','Text','2','3','','','',NULL,'1','1','0','1','0',0,'','','','SYS_Designer','2018/08/15 14:15:59','SYS_Designer','2020/03/27 09:51:21','0','','1','','','',''); diff --git a/报表/汽车类报表一/渠道商保证金代偿红冲.xml b/报表/汽车类报表一/渠道商保证金代偿红冲.xml index 540a74538..13c66da2f 100644 --- a/报表/汽车类报表一/渠道商保证金代偿红冲.xml +++ b/报表/汽车类报表一/渠道商保证金代偿红冲.xml @@ -35,7 +35,20 @@ distributor_repay_back 2c9023815726a036015726a496b00001 SIMPLESQL - SELECT di.distributor_name,lci.contract_no,lul.customer_name,lrp.plan_list,LEFT(O.INPUTTIME,10) AS rinputtime,lrp.rent,ddi.caution_money AS dcaution_money,lrp.PENALTY,O.caution_money,LEFT(lri.hire_date,10) AS + select tt.distributor_name, + tt.contract_no, + tt.customer_name, + tt.plan_list, + tt.rinputtime, + tt.rent, + tt.dcaution_money, + tt.PENALTY, + tt.caution_money, + tt.dinputtime, + tt.income_money, + tt.lripenalty, + tt.back as back from +(SELECT di.distributor_name,lci.contract_no,lul.customer_name,lrp.plan_list,LEFT(O.INPUTTIME,10) AS rinputtime,lrp.rent,ddi.caution_money AS dcaution_money,lrp.PENALTY,O.caution_money,LEFT(lri.hire_date,10) AS dinputtime,lri.income_money,lri.penalty AS lripenalty,IF(ddi.caution_money=O.caution_money,'已红冲','未红冲') AS back FROM D_DEPOSITRETURN_INFO O LEFT JOIN lc_rent_plan lrp ON O.rent_plan_id=lrp.id @@ -44,7 +57,7 @@ LEFT JOIN (SELECT SUM(caution_money) AS caution_money,rent_plan_id,inputtime FRO LEFT JOIN distributor_info di ON di.distributor_no=O.distributor_id LEFT JOIN lb_union_lessee lul ON lul.contract_id=lrp.contract_id LEFT JOIN (SELECT SUM(rent+penalty) AS income_money,plan_id,penalty,MAX(hire_date) AS hire_date FROM lc_rent_income GROUP BY plan_id) lri ON lri.plan_id=lrp.id -WHERE O.money_type='bondRepay' +WHERE O.money_type='bondRepay' ) tt where 1=1