40 lines
13 KiB
SQL

-- 在租赁物表中添加车架号字段
ALTER TABLE lb_equipment_car ADD COLUMN FRAME_NUMBER2 VARCHAR(100) NULL COMMENT '车架号2' AFTER FRAME_NUMBER, ADD COLUMN FRAME_NUMBER3 VARCHAR(100) NULL COMMENT '车架号3' AFTER FRAME_NUMBER2, ADD COLUMN FRAME_NUMBER4 VARCHAR(100) NULL COMMENT '车架号4' AFTER FRAME_NUMBER3;
ALTER TABLE lb_equipment_car_temp ADD COLUMN FRAME_NUMBER2 VARCHAR(100) NULL COMMENT '车架号2' AFTER FRAME_NUMBER, ADD COLUMN FRAME_NUMBER3 VARCHAR(100) NULL COMMENT '车架号3' AFTER FRAME_NUMBER2, ADD COLUMN FRAME_NUMBER4 VARCHAR(100) NULL COMMENT '车架号4' AFTER FRAME_NUMBER3;
ALTER TABLE lb_equipment_car_his ADD COLUMN FRAME_NUMBER2 VARCHAR(100) NULL COMMENT '车架号2' AFTER FRAME_NUMBER, ADD COLUMN FRAME_NUMBER3 VARCHAR(100) NULL COMMENT '车架号3' AFTER FRAME_NUMBER2, ADD COLUMN FRAME_NUMBER4 VARCHAR(100) NULL COMMENT '车架号4' AFTER FRAME_NUMBER3;
-- 创建业务申请初审记录表
CREATE TABLE Business_Apply_userinfo (
id VARCHAR(32) NOT NULL COMMENT '唯一标识',
userid VARCHAR(32) DEFAULT NULL COMMENT '用户id',
username VARCHAR(50) DEFAULT NULL COMMENT '用户名称',
lb_project_id VARCHAR(32) DEFAULT NULL COMMENT '项目id',
flow_unid VARCHAR(32) DEFAULT NULL COMMENT '流程id',
flow_name VARCHAR(100) DEFAULT NULL COMMENT '流程名称',
flow_phase_no VARCHAR(20) DEFAULT NULL COMMENT '流程节点',
remarks VARCHAR(100) DEFAULT NULL COMMENT '备注',
standby VARCHAR(100) DEFAULT NULL COMMENT '备用',
inputtime VARCHAR(100) DEFAULT NULL COMMENT '登记时间',
updateuserid VARCHAR(100) DEFAULT NULL COMMENT '更新人',
updateorgid VARCHAR(100) DEFAULT NULL COMMENT '更新部门',
updatetime VARCHAR(100) 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.flow.BusinessApplyUserinfo','','','','','','');
-- 在业务申请添加处理人信息
delete from FLOW_MODEL where FlowNo='BusinessApplyFlow' AND PhaseNo='0040';
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('BusinessApplyFlow','0040','1020','信审复审',NULL,NULL,'!审批流程.记录业务申请初审信息(#ObjectNo)','toStringArray(\"#PhaseAction\",\",\",\" \",1)',NULL,'selectroute',NULL,'[{usertype:\"根据SQL语句\",userinfo:\"SELECT O.userid, O.username FROM USER_INFO O WHERE O.UserID IN (SELECT CASE WHEN ft.userid = \'8009011U00000003\' OR ft.userid = \'8009011U00000004\' OR ft.userid = \'800901U00000003\' THEN \'800U00090004\' WHEN ft.userid = \'8009011U00000005\' OR ft.userid = \'8009011U00000006\' OR ft.userid = \'8009011U00000007\' THEN \'8009011U00000002\' ELSE \'800U00090004\' END FROM flow_task ft WHERE ft.phaseno = \'0030\' AND ft.taskstate=0 AND ft.OBJECTNO =:{ObjectNo})\"}]','#PhaseOpinion1','closePage,doSubmit,backStep,signOpinion,circulate',NULL,'all_except','BusinessApplyFlow',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,'262','556','100','50','1',NULL,'TASK',NULL,'Y','N',NULL,'TreeView.moveTreeItem(\"租赁车辆基本信息\", \"商务条件\");\r\nTreeView.moveTreeItemToLast(\"资料清单\");\r\nTreeView.addFirstNodeByCode(\"11541\");\r\nMap<String,String> paramMap=new HashMap<String, String>();\r\nparamMap.put(\"calType\", \"proj_process\");\r\nTreeView.AddNodeUrlParamByNode(\"11060\", paramMap);\r\nTreeView.addBeforeNodeByCode(\"租赁车辆基本信息\", \"11042\");\r\nif(!\"401\".equals(fixedParam.get(\"RoleId\"))){\r\nif(\"used_car\".equals(fixedParam.get(\"carAttributes\"))){\r\nTreeView.addLastNodeByCode(\"11620\");\r\n}\r\nTreeView.addLastNodeByCode(\"11640\");\r\nTreeView.addLastNodeByCode(\"900001\");\r\nTreeView.addLastNodeByCode(\"900002\");\r\nTreeView.addLastNodeByCode(\"11630\");\r\nTreeView.addLastNodeByCode(\"11645\");\r\nTreeView.addLastNodeByCode(\"01301\");\r\n}\r\nTreeView.updateNodeSetReadOnly(\"商务条件\", \"ReadOnly\");\r\nTreeView.updateNodeSetReadOnly(\"租赁车辆基本信息\", \"ReadOnly\");\r\nif(\"BAIC_MOTOR\".equals(fixedParam.get(\"operationType\"))){\r\nTreeView.addFirstNodeByCode(\"21000\");\r\nTreeView.addChildrenNodeByCode(\"北汽财务意见\", \"21100\");\r\n}\r\nTreeView.updateNodeSetReadOnly(\"北汽财务意见\", \"ReadOnly\");\r\nTreeView.addBeforeNodeByCode(\"经销商信息\", \"00160\");','TreeView.deleteCheckItemByCode(\"0039\");\r\nTreeView.deleteCheckItemByCode(\"0034\");\r\nTreeView.deleteCheckItemByCode(\"0031\");\r\nTreeView.deleteCheckItemByCode(\"0032\");\rTreeView.deleteCheckItemByCode(\"0283\");','backnextstep',NULL,NULL,NULL,NULL,'Y','[{stepno:\"否决(8000)\",stepcondition:\"提交给否决\"},{stepno:\"结束(1000)\",stepcondition:\"提交给结束\"}]',NULL,NULL,NULL,NULL,NULL);
delete from FLOW_MODEL where FlowNo='BusinessApplyFlow' AND PhaseNo='0050';
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('BusinessApplyFlow','0050','1020','信审复审',NULL,NULL,'!审批流程.记录业务申请初审信息(#ObjectNo)','toStringArray(\"#PhaseAction\",\",\",\" \",1)',NULL,'commroute',NULL,'[{usertype:\"根据SQL语句\",userinfo:\"SELECT O.userid, O.username FROM USER_INFO O WHERE O.UserID IN (SELECT CASE WHEN ft.userid = \'8009011U00000003\' OR ft.userid = \'8009011U00000004\' OR ft.userid = \'800901U00000003\' THEN \'800U00090004\' WHEN ft.userid = \'8009011U00000005\' OR ft.userid = \'8009011U00000006\' OR ft.userid = \'8009011U00000007\' THEN \'8009011U00000002\' ELSE \'800U00090004\' END FROM flow_task ft WHERE ft.phaseno = \'0030\' AND ft.taskstate=0 AND ft.OBJECTNO =:{ObjectNo})\"}]','#PhaseOpinion1','closePage,doSubmit,backStep,signOpinion',NULL,'all_except','BusinessApplyFlow',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,'597','550','100','50','1',NULL,'TASK',NULL,'Y','N',NULL,'TreeView.moveTreeItem(\"租赁车辆基本信息\", \"商务条件\");\r\nTreeView.moveTreeItemToLast(\"资料清单\");\r\nTreeView.addFirstNodeByCode(\"11541\");\r\nMap<String,String> paramMap=new HashMap<String, String>();\r\nparamMap.put(\"calType\", \"proj_process\");\r\nTreeView.AddNodeUrlParamByNode(\"11060\", paramMap);\r\nTreeView.addBeforeNodeByCode(\"租赁车辆基本信息\", \"11042\");\r\nif(!\"401\".equals(fixedParam.get(\"RoleId\"))){\r\nif(\"used_car\".equals(fixedParam.get(\"carAttributes\"))){\r\nTreeView.addLastNodeByCode(\"11620\");\r\n}\r\nTreeView.addLastNodeByCode(\"11640\");\r\nTreeView.addLastNodeByCode(\"900001\");\r\nTreeView.addLastNodeByCode(\"900002\");\r\nTreeView.addLastNodeByCode(\"11630\");\r\nTreeView.addLastNodeByCode(\"11645\");\r\nTreeView.addLastNodeByCode(\"01301\");\r\n}\r\nTreeView.updateNodeSetReadOnly(\"商务条件\", \"ReadOnly\");\r\nTreeView.updateNodeSetReadOnly(\"租赁车辆基本信息\", \"ReadOnly\");\r\nif(\"BAIC_MOTOR\".equals(fixedParam.get(\"operationType\"))){\r\nTreeView.addFirstNodeByCode(\"21000\");\r\nTreeView.addChildrenNodeByCode(\"北汽财务意见\", \"21100\");\r\n}\r\nTreeView.updateNodeSetReadOnly(\"北汽财务意见\", \"ReadOnly\");\r\nTreeView.addBeforeNodeByCode(\"经销商信息\", \"00160\");','TreeView.deleteCheckItemByCode(\"0039\");\r\nTreeView.deleteCheckItemByCode(\"0034\");\r\nTreeView.deleteCheckItemByCode(\"0031\");\r\nTreeView.deleteCheckItemByCode(\"0032\");\rTreeView.deleteCheckItemByCode(\"0283\");','backnextstep',NULL,NULL,NULL,NULL,'Y','信审负责人(0060)',NULL,NULL,NULL,NULL,NULL);
-- 修改业务变更处理人
delete from FLOW_MODEL where FlowNo='BusinessChangeFlow' AND PhaseNo='0030';
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('BusinessChangeFlow','0030','1020','信审专员初审',NULL,NULL,'!基础操作.接口平台业务变更流程租金测算(#ObjectNo)','toStringArray(\"#PhaseAction\",\",\",\" \",1)',NULL,'conditionroute',NULL,'[{usertype:\"根据SQL语句\",userinfo:\"SELECT userid,username FROM business_apply_userinfo O WHERE O.lb_project_id =(SELECT fbo.proj_id FROM flow_bussiness_object fbo WHERE fbo.flow_unid=:{ObjectNo}) \"}]','#PhaseOpinion1','closePage,doSubmit,backStep,signOpinion',NULL,'all_except','BusinessChangeFlow',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,'406','402','100','50','1',NULL,'TASK',NULL,'Y','N',NULL,'TreeView.addFirstNodeByCode(\"11080\");\r\nTreeView.moveTreeItem(\"租赁车辆基本信息\", \"商务条件\");\r\nTreeView.moveTreeItemToLast(\"资料清单\");\r\nMap<String,String> paramMap=new HashMap<String, String>();\r\nparamMap.put(\"calType\", \"proj_process\");\r\nTreeView.AddNodeUrlParamByNode(\"11060\", paramMap);\r\nTreeView.addBeforeNodeByCode(\"租赁车辆基本信息\", \"11042\");\r\nif(!\"401\".equals(fixedParam.get(\"RoleId\"))){\r\nif(\"used_car\".equals(fixedParam.get(\"carAttributes\"))){\r\nTreeView.addLastNodeByCode(\"11620\");\r\n}\r\nTreeView.addFirstNodeByCode(\"11541\");\r\nTreeView.addLastNodeByCode(\"900001\");\r\nTreeView.addLastNodeByCode(\"900002\");\r\nTreeView.addLastNodeByCode(\"11640\");\r\nTreeView.addLastNodeByCode(\"11630\");\r\nTreeView.addLastNodeByCode(\"11645\");\r\nTreeView.addLastNodeByCode(\"01301\");\r\nTreeView.addLastNodeByCode(\"11800\");\r\n};\r\nif(\"BAIC_MOTOR\".equals(fixedParam.get(\"operationType\"))){\r\nTreeView.addFirstNodeByCode(\"21000\");\r\nTreeView.addChildrenNodeByCode(\"北汽财务意见\", \"21100\");\r\n}\r\nTreeView.updateNodeSetReadOnly(\"北汽财务意见\", \"ReadOnly\");\r\nTreeView.addBeforeNodeByCode(\"经销商信息\", \"00160\");','TreeView.deleteCheckItemByCode(\"0015\");\r\nTreeView.deleteCheckItemByCode(\"0034\");\r\nTreeView.deleteCheckItemByCode(\"0283\");','backnextstep',NULL,'!基础操作.接口平台业务退回审批意见推送入表(#ObjectNo)',NULL,NULL,'Y','[{stepno:\"信审经理终审(0040)\",stepcondition:\"!基础操作.判断业务申请融资额小于20万(#ObjectNo)\"},{stepno:\"信审经理终审(0050)\",stepcondition:\"!基础操作.判断业务申请融资额大于20万(#ObjectNo)\"}]',NULL,NULL,NULL,NULL,NULL);