61 lines
12 KiB
SQL
61 lines
12 KiB
SQL
CREATE TABLE lc_card_tlsign_his (
|
|
ID varchar(100) NOT NULL COMMENT 'id',
|
|
PROJECT_ID varchar(100) DEFAULT NULL COMMENT '项目id',
|
|
SIGN_STATUS varchar(100) DEFAULT NULL COMMENT '签约状态',
|
|
SIGN_TIME varchar(100) DEFAULT NULL COMMENT '签约时间',
|
|
CUSTOMER_LAUNCH_TIME varchar(100) DEFAULT NULL COMMENT '客户发起时间',
|
|
AGRMNO varchar(100) DEFAULT NULL COMMENT '协议号',
|
|
REQUEST_CONTENT text COMMENT '请求内容',
|
|
RESPONSE_CONTENT text COMMENT '响应内容',
|
|
sign_type varchar(10) DEFAULT NULL COMMENT '签约类型',
|
|
flow_unid varchar(32) DEFAULT NULL COMMENT '流程编号',
|
|
PRIMARY KEY (ID)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=gbk;
|
|
-- 添加通联签约验证从正式到历史表的方法
|
|
Insert Into Class_Method (classname,methodname,methodtype,methoddescribe,returntype,methodargs,methodcode,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('审批流程','通联签约状态从正式到历史','Bizlet','通联签约状态从正式到历史','String','String ObjectNo','com.tenwa.lease.flow.project.commbusiness.LcCardTlSignFormalToHisBusiness','','','','','','');
|
|
|
|
-- 添加保证金代偿红冲反冲方法
|
|
insert into `class_method` (`classname`, `methodname`, `methodtype`, `methoddescribe`, `returntype`, `methodargs`, `methodcode`, `inputuser`, `inputorg`, `inputtime`, `updateuser`, `updatetime`, `remark`) values('审批流程','保证金代偿红冲反冲','Bizlet','保证金代偿红冲反冲','String','String ObjectNo','com.tenwa.lease.flow.rent.rentreback.DepositRedOffset','','','','','','');
|
|
|
|
-- 将保证金代偿红冲反冲方法添加到租金红冲结束脚本
|
|
delete from FLOW_MODEL where FlowNo='RentRebackFlow' and PhaseNo='1000';
|
|
insert into `FLOW_MODEL` (`flowno`, `phaseno`, `phasetype`, `phasename`, `phasedescribe`, `phaseattribute`, `prescript`, `initscript`, `choicedescribe`, `choicescript`, `actiondescribe`, `actionscript`, `postscript`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `attribute6`, `attribute7`, `attribute8`, `attribute9`, `attribute10`, `aaenabled`, `aapointinitscript`, `aapointcomp`, `aapointcompurl`, `standardtime1`, `standardtime2`, `costlob`, `strips`, `checklist`, `decisionscript`, `riskscanrule`, `buttonset2`, `inputuser`, `inputtime`, `updateuser`, `updatetime`, `distributerule`, `id`, `type`, `name`, `xcoordinate`, `ycoordinate`, `width`, `height`, `version`, `swimlane`, `nodetype`, `flowphasecontext`, `OPINIONSREQUIRED`, `isreadonly`, `flowpageconfig`, `flowprocessclass`, `flowpagecheck`, `backstepnexttype`, `backsteps`, `backscript`, `deletescript`, `phasescript`, `loadproductcheck`, `nextsteps`, `flowtiptype`, `remindnoticttype`, `flowoverdate`, `overnoticetype`, `overnoticeUser`) values('RentRebackFlow','1000','1040','通过',NULL,NULL,'!基础操作.租金红冲临时表到正式表(#ObjectNo)+!基础操作.租金红冲后更新网银正式表(#ObjectNo)+!审批流程.凭证输出--回款红冲(#ObjectNo)+!审批流程.保证金代偿红冲反冲(#ObjectNo)','{\"system\"}',NULL,'commroute',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'586','550','50','50','1',NULL,'END',NULL,NULL,'Y','RentRebackFlow0010',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
|
|
-- 直接扣款委托书中的银行信息修改成取临时表数据
|
|
delete from BF_LABLECONFIG where id='1dd3c73ca74f4c45ab5a1304787d0db9';
|
|
insert into `BF_LABLECONFIG` (`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) values('1dd3c73ca74f4c45ab5a1304787d0db9','30020','changeCarinfo','扣款卡变更卡信息','tag_type2','value_type3','account,acc_number,bank_name,CERTID','SELECT cat.account,cat.acc_number,cat.bank_name,cat.CERTID FROM CUSTOMER_ACCOUNT_TEMP cat LEFT JOIN CUSTOMER_ACCOUNT ca ON ca.contract_id=cat.contract_id WHERE cat.flowunid=:{FLOW_UNID}',NULL,'N',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
|
|
-- 扣款卡变更流程结束脚本中添加从临时表到正式表的方法
|
|
delete from FLOW_MODEL where FlowNo='AccountChangeFlow' and PhaseNo='1000';
|
|
insert into `FLOW_MODEL` (`flowno`, `phaseno`, `phasetype`, `phasename`, `phasedescribe`, `phaseattribute`, `prescript`, `initscript`, `choicedescribe`, `choicescript`, `actiondescribe`, `actionscript`, `postscript`, `attribute1`, `attribute2`, `attribute3`, `attribute4`, `attribute5`, `attribute6`, `attribute7`, `attribute8`, `attribute9`, `attribute10`, `aaenabled`, `aapointinitscript`, `aapointcomp`, `aapointcompurl`, `standardtime1`, `standardtime2`, `costlob`, `strips`, `checklist`, `decisionscript`, `riskscanrule`, `buttonset2`, `inputuser`, `inputtime`, `updateuser`, `updatetime`, `distributerule`, `id`, `type`, `name`, `xcoordinate`, `ycoordinate`, `width`, `height`, `version`, `swimlane`, `nodetype`, `flowphasecontext`, `OPINIONSREQUIRED`, `isreadonly`, `flowpageconfig`, `flowprocessclass`, `flowpagecheck`, `backstepnexttype`, `backsteps`, `backscript`, `deletescript`, `phasescript`, `loadproductcheck`, `nextsteps`, `flowtiptype`, `remindnoticttype`, `flowoverdate`, `overnoticetype`, `overnoticeUser`) values('AccountChangeFlow','1000','1040','结束',NULL,NULL,'!基础操作.新增业务消息提醒(#ObjectNo)+!审批流程.微信提交信息变更发起流程通过(#ObjectNo)+!基础操作.扣款卡信息变更到正式(#ObjectNo)','{\"system\"}',NULL,'commroute',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01',NULL,NULL,'[{usertype:\"指定角色\",userinfo:\"800R00000016,业务二部运营专员初审\"}]',NULL,NULL,NULL,NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'153','267','50','50','1',NULL,'END',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
|
|
-- 同步放款后督根据部门选择合同和根据人员选择不一致
|
|
delete from SELECT_CATALOG where selname='SelectLbContractInfoQC_KE';
|
|
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 ('SelectLbContractInfoQC_KE','Sql','查询合同信息-抵押档案归档(kaer)','lb_contract_info','ID','Grid','String orgid','ID,PROJECT_ID,PRODUCT_ID,PROJECT_NAME','select lci.id as ID,lci.project_id as PROJECT_ID,lci.product_id as PRODUCT_ID,lci.contract_number as CONTRACT_NUMBER,lci.project_name as PROJECT_NAME,lpi.project_no as project_no,lul.customer_name as customer_name from lb_contract_info lci left join lb_project_info lpi on lci.project_id=lpi.id left join lb_union_lessee lul on lci.id=lul.contract_id AND lul.IS_MAIN=''Y'' WHERE (lci.contract_status>=31 and lci.contract_status<>104) AND lci.BUSINESSTYPE=''1'' AND lci.id NOT IN (SELECT contract_id FROM LB_FILE_ARCHIVING_INFO) AND lci.inputorgid=''#orgid''','合同ID,项目ID,产品ID,合同号,项目名称,申请编号,客户名称','CONTRACT_NUMBER@style={width:200px;}@PROJECT_NAME@style={width:450px;}','ID@PROJECT_ID@PRODUCT_ID@CONTRACT_NUMBER@PROJECT_NAME','CONTRACT_NUMBER,project_no,customer_name','1','Single','','','','','','SYS_Designer','','2019/05/31 17:45:11','SYS_Designer','2021/03/02 11:30:39','');
|
|
|
|
-- 修改租金红冲新增sql
|
|
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,
|
|
case when lcf.rent>IFNULL(lcfd.rent,0) then 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) else 0 end 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 = ''1'' 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','2021/03/03 16:27:33','');
|
|
|
|
|
|
-- 生产环境已执行 ----------------------------------------------------------------
|
|
|
|
-- 添加分润产品配置中条件查询
|
|
delete from awe_do_library where dono='SplittingRatioList' and colindex='0020';
|
|
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 ('SplittingRatioList','0020','0020','1','O','distributor_name','distributor_name','String','','经销商名称','','1','Text','1','1','','','',null,'1','1','0','1','1',0,'','','','SYS_Designer','2019/08/24 10:01:21','SYS_Designer','2021/03/15 15:31:13','0','','1','','','','Like');
|
|
delete from awe_do_library where dono='SplittingRatioList' and colindex='0030';
|
|
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 ('SplittingRatioList','0030','0030','1','O','product_name','product_name','String','','产品名称','','1','Text','1','1','','','',null,'1','1','0','1','1',0,'','','','SYS_Designer','2019/08/24 10:01:21','SYS_Designer','2021/03/15 15:31:14','0','','1','','','','Like');
|
|
-- 修改分润产品配置中,选择产品的选择对话框
|
|
delete from SELECT_CATALOG where selname='selectProductList';
|
|
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 ('selectProductList','Sql','选择产品','business_type','typeno','Grid','','typeno','select typeno,typename from business_type where attribute2=''car_product''','产品编号,产品名称','typename@style={width:300px;}','typeno@typename','typename','1','Single','','','','','','SYS_Designer','','2019/08/24 10:35:24','SYS_Designer','2021/03/15 15:54:55','');
|
|
|