优化罚息减免申请选择合同慢、实际付款流程本次付款明细添加小计、渠道商保证金代偿报表条件查询报错

This commit is contained in:
tangfutang 2020-03-27 21:51:28 +08:00
parent e74bbba875
commit 0b7d8724a4
2 changed files with 36 additions and 2 deletions

View File

@ -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_date<DATE_FORMAT(NOW(),''%Y/%m/%d'')
) t where penalty_over>0 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','','','','');

View File

@ -35,7 +35,20 @@
<enname>distributor_repay_back</enname>
<reportDataSource>2c9023815726a036015726a496b00001</reportDataSource>
<queryType>SIMPLESQL</queryType>
<sql>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
<sql>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
</sql>
<sqlParamValue></sqlParamValue>
<columns>