本地 Windows 如何将 Web 工程部署到远程 Windows 主机上

文章目录

  • 第一步:先连接远程 Windows 主机:
  • 第二步:连接远程 Windows 主机后,把发布包复制到远程主机上并确定有关的目录
  • 第三步:删除远程主机的数据库中的旧数据
  • 第四步:创建新的用户和表空间
  • 第五步:导入备份的数据
  • 第六步:创建视图
  • 第七步:创建过程
  • 第八步:部署工程

第一步:先连接远程 Windows 主机:

在这里插入图片描述

在这里插入图片描述

在设置本地文件远程共享,连接远程主机后,在远程主机上才能看到本地电脑的目录,这样才能将本地的发布包COPY到远程主机上:
在这里插入图片描述

在这里插入图片描述
这样连接远程主机成功之后,就可以看到本地计算机的磁盘D的所有文件了!

再回到远程桌面连接对话框,点击“连接”按钮:
在这里插入图片描述
出现如下的对话框,输入远程主机系统的登录用户名和密码:
在这里插入图片描述

第二步:连接远程 Windows 主机后,把发布包复制到远程主机上并确定有关的目录

找到远程主机 Tomcat 安装目录、Oracle 的安装目录、Web 工程的部署目录:
在这里插入图片描述

在这里插入图片描述

发布包的内容:

在这里插入图片描述

脚本文件:

在这里插入图片描述

备份数据文件:

在这里插入图片描述

工程文件:

在这里插入图片描述

第三步:删除远程主机的数据库中的旧数据

以 DBA(Database Administrator,简称DBA) 帐号进入数据库,河北 DBA 帐号 sys,密码 oracle

删除掉数据库中原有的和我们即将要创建的用户和表空间同名的用户和表空间,你可以 COPY 以下的脚本在 PL/SQL 中打开命令窗口来执行:

drop user hyt2prdhn cascade; 
drop tablespace hyt2prdhn including contents and datafiles cascade constraints;
drop user HYT2CREDITHN cascade; 
drop tablespace HYT2CREDITHN including contents and datafiles cascade constraints;
drop user JXPZMISPF cascade; 
drop tablespace JXPZMISPF including contents and datafiles cascade constraints;
drop user hyt2linehn cascade; 
drop tablespace hyt2linehn including contents and datafiles cascade constraints;
drop user hyt2pfhn cascade; 
drop tablespace hyt2pfhn including contents and datafiles cascade constraints;

文件路径:道路运输管理系统发布包v2.2_0613\脚本\1.drop_db.sql

第四步:创建新的用户和表空间

CREATE TABLESPACE "HYT2PFHN"
datafile 'D:/jlyz/HYT2PFHN.DBF' SIZE 200M 
REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 4000M 
DEFAULT STORAGE (INITIAL 2K NEXT 16K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );
commit;CREATE TABLESPACE "HYT2LINEHN"
datafile 'D:/jlyz/HYT2LINEHN.DBF' SIZE 200M 
REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 4000M 
DEFAULT STORAGE (INITIAL 2K NEXT 16K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );
commit;CREATE TABLESPACE "HYT2PRDHN"
datafile 'D:/jlyz/HYT2PRDHN.DBF' SIZE 200M 
REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 4000M 
DEFAULT STORAGE (INITIAL 2K NEXT 16K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );
commit;CREATE TABLESPACE "HYT2CREDITHN"
datafile 'D:/jlyz/HYT2CREDITHN.DBF' SIZE 200M 
REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 4000M 
DEFAULT STORAGE (INITIAL 2K NEXT 16K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );
commit;CREATE TABLESPACE "JXPZMISPF"
datafile 'D:/jlyz/JXPZMISPF.DBF' SIZE 200M 
REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 4000M 
DEFAULT STORAGE (INITIAL 2K NEXT 16K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );
commit;create user HYT2PFHN identified by "HYT2PFHN" default tablespace HYT2PFHN TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT CONNECT TO HYT2PFHN WITH ADMIN OPTION;
GRANT RESOURCE TO HYT2PFHN;
GRANT CREATE ANY TABLE TO HYT2PFHN;
GRANT INSERT ANY TABLE TO HYT2PFHN;
GRANT SELECT ANY TABLE TO HYT2PFHN;
GRANT UPDATE ANY TABLE TO HYT2PFHN;
GRANT DELETE ANY TABLE TO HYT2PFHN;
GRANT ALTER ANY TABLE TO HYT2PFHN;
GRANT DROP ANY TABLE TO HYT2PFHN;
GRANT CREATE ANY INDEX TO HYT2PFHN;
GRANT DROP ANY INDEX TO HYT2PFHN;
GRANT SELECT ANY SEQUENCE TO HYT2PFHN;
GRANT EXECUTE ANY PROCEDURE TO HYT2PFHN;
GRANT CREATE ANY VIEW TO HYT2PFHN;
GRANT DROP ANY VIEW TO HYT2PFHN;
commit;create user HYT2LINEHN identified by "HYT2LINEHN" default tablespace HYT2LINEHN TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT CONNECT TO HYT2LINEHN WITH ADMIN OPTION;
GRANT RESOURCE TO HYT2LINEHN;
GRANT CREATE ANY TABLE TO HYT2LINEHN;
GRANT INSERT ANY TABLE TO HYT2LINEHN;
GRANT SELECT ANY TABLE TO HYT2LINEHN;
GRANT UPDATE ANY TABLE TO HYT2LINEHN;
GRANT DELETE ANY TABLE TO HYT2LINEHN;
GRANT ALTER ANY TABLE TO HYT2LINEHN;
GRANT DROP ANY TABLE TO HYT2LINEHN;
GRANT CREATE ANY INDEX TO HYT2LINEHN;
GRANT DROP ANY INDEX TO HYT2LINEHN;
GRANT SELECT ANY SEQUENCE TO HYT2LINEHN;
GRANT EXECUTE ANY PROCEDURE TO HYT2LINEHN;
GRANT CREATE ANY VIEW TO HYT2LINEHN;
GRANT DROP ANY VIEW TO HYT2LINEHN;
commit;create user HYT2PRDHN identified by "HYT2PRDHN" default tablespace HYT2PRDHN TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT CONNECT TO HYT2PRDHN WITH ADMIN OPTION;
GRANT RESOURCE TO HYT2PRDHN;
GRANT CREATE ANY TABLE TO HYT2PRDHN;
GRANT INSERT ANY TABLE TO HYT2PRDHN;
GRANT SELECT ANY TABLE TO HYT2PRDHN;
GRANT UPDATE ANY TABLE TO HYT2PRDHN;
GRANT DELETE ANY TABLE TO HYT2PRDHN;
GRANT ALTER ANY TABLE TO HYT2PRDHN;
GRANT DROP ANY TABLE TO HYT2PRDHN;
GRANT CREATE ANY INDEX TO HYT2PRDHN;
GRANT DROP ANY INDEX TO HYT2PRDHN;
GRANT SELECT ANY SEQUENCE TO HYT2PRDHN;
GRANT EXECUTE ANY PROCEDURE TO HYT2PRDHN;
GRANT CREATE ANY VIEW TO HYT2PRDHN;
GRANT DROP ANY VIEW TO HYT2PRDHN;
commit;create user HYT2CREDITHN identified by "HYT2CREDITHN" default tablespace HYT2CREDITHN TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT CONNECT TO HYT2CREDITHN WITH ADMIN OPTION;
GRANT RESOURCE TO HYT2CREDITHN;
GRANT CREATE ANY TABLE TO HYT2CREDITHN;
GRANT INSERT ANY TABLE TO HYT2CREDITHN;
GRANT SELECT ANY TABLE TO HYT2CREDITHN;
GRANT UPDATE ANY TABLE TO HYT2CREDITHN;
GRANT DELETE ANY TABLE TO HYT2CREDITHN;
GRANT ALTER ANY TABLE TO HYT2CREDITHN;
GRANT DROP ANY TABLE TO HYT2CREDITHN;
GRANT CREATE ANY INDEX TO HYT2CREDITHN;
GRANT DROP ANY INDEX TO HYT2CREDITHN;
GRANT SELECT ANY SEQUENCE TO HYT2CREDITHN;
GRANT EXECUTE ANY PROCEDURE TO HYT2CREDITHN;
GRANT CREATE ANY VIEW TO HYT2CREDITHN;
GRANT DROP ANY VIEW TO HYT2CREDITHN;
commit;create user JXPZMISPF identified by "JXPZMISPF" default tablespace JXPZMISPF TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
GRANT CONNECT TO JXPZMISPF WITH ADMIN OPTION;
GRANT RESOURCE TO JXPZMISPF;
GRANT CREATE ANY TABLE TO JXPZMISPF;
GRANT INSERT ANY TABLE TO JXPZMISPF;
GRANT SELECT ANY TABLE TO JXPZMISPF;
GRANT UPDATE ANY TABLE TO JXPZMISPF;
GRANT DELETE ANY TABLE TO JXPZMISPF;
GRANT ALTER ANY TABLE TO JXPZMISPF;
GRANT DROP ANY TABLE TO JXPZMISPF;
GRANT CREATE ANY INDEX TO JXPZMISPF;
GRANT DROP ANY INDEX TO JXPZMISPF;
GRANT SELECT ANY SEQUENCE TO JXPZMISPF;
GRANT EXECUTE ANY PROCEDURE TO JXPZMISPF;
GRANT CREATE ANY VIEW TO JXPZMISPF;
GRANT DROP ANY VIEW TO JXPZMISPF;
commit;

注意:datafile 'D:/jlyz/HYT2PFHN.DBF’这是数据文件的保存路径,要改成远程主机的,上述讲到远程主机的数据库目录是
在这里插入图片描述
所以数据文件的路径修改为:E:/oracle/HYT2PFHN.DBF 再执行脚本。

第五步:导入备份的数据

接下来开始导入数据,打开 PL/SQL 软件,以对应的账号登录,再导入有关的备份数据,例如:以 hyt2prdhn 帐号登录,则导入hyt2prdhn.dmp 文件,以此类推导入其它备份数据。当所有 dmp 文件导入成功后,执行创建视图和过程的脚本

在这里插入图片描述

第六步:创建视图

CREATE OR REPLACE VIEW HYT2LINEHN.V_BUSLINCARD AS
SELECT T1.BUSLINECARDID,T2.CLITNAME,T1.LIDCARDNO,T1.STADATE,T1.ENDDATE,T3.BUSLINENAME,T3.UPSTATIONCN,T3.DOWNSTATIONCN,T1.BRANUM,T1.LINBUSSTATUSFROM HYT2LINEHN.BUSLINECARD T1LEFT OUTER JOIN HYT2LINEHN.CMCLT T2 ON T1.CMCLTID=T2.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.BUSLINE T3 ON T1.BUSLINEID=T3.BUSLINEIDWHERE T1.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_BUSLINE AS
SELECT T1.BUSLINEID,T1.BUSLINENAME,T1.BUSLINETYPE,T1.STADEPOTCN,T1.ENDDEPOTCN,T1.FIRENDTIME ,T1.DAYTIMES AS DAYSTIMES,T1.UPSTATIONCN,T1.DOWNSTATIONCNFROM HYT2LINEHN.BUSLINE T1WHERE T1.ISEFFECT=0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_CHECKCARDNO AS
SELECT CARDINITID,CARDGUID,CARDNO,CARDBATCH,CREDATE,CRETIME,ISEFFECT,ISUSE,ICCARDUSERTYPE,SYSOPERTIME FROM  HYT2LINEHN.CARDINIT T WHERE T.ISEFFECT='0';
CREATE OR REPLACE VIEW HYT2LINEHN.V_CLTVEC AS
SELECT
'' HZF_CLTVEC,--设置默认查询条件
'' HZS_CLTVEC,--设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
T2.CMVECID,T1.CLITNAME,T1.CLTENTITYTYPE,T1.PERWORD,T1.PERNUM,T1.DEPCODE CLT_DPNM,T1.ADDRESS,T1.ECOTYPE,T1.MAICODING,T1.JURPERSON,T1.CTCNO,T1.PRINCIPAL,T1.PHONE,T1.CLTBUSSTATUS,T1.BUSLICNO,T1.TAXREGNO,T1.GRADEPCODE AS GRACODE_DPNM,T1.RPTCHKRSU,
'' HZT_VECINFO,  --车辆基本信息
T3.CANNAME AS VECADDR,T2.TRAWORD,T2.AREAABBR,T2.TRANO,T2.DEPCODE AS VEC_DPNM,T2.VECENTYPE,T4.DEPNAME AS MANAGER_DPNM,T2.GRADATE,T2.CREDATE,T2.STADATE,T2.ENDDATE,T2.BRACOLOR,T2.BRANUM,T2.FACTYPE,T2.MODEL,T2.VECTYPE,T2.VECBUSSTATUS,
T2.BNSCOPE,T2.ARCNO,T2.CSGUNIT,T2.BUSTYPE,T2.REGYPE,T2.CHENUM,T2.COLNUM,T2.VECLENGTH,T2.VECWIDE,T2.VECHIGH,T2.INSVECCARLONG,T2.INSVECCARWIDE,T2.INSVECCARHIGH,
T2.ENGTYPE,T2.VECCOLOR,T2.SETDATE,T2.BUYPRICE,T2.TRANCHA,T2.ISGOTOSYS,T2.ISINOUT,T2.ISCOMMTOOL,T2.COMMTOOL,T2.LOGAPPSTAT,T2.SELVECSHOP,T2.BUYDATE,
'' HZT_TECHNICINFO, --车辆技术信息
T2.PRDFACTORY,T2.ELDTYPE,T2.ENGNUM,T2.FRANUM,T2.VINNUM,T2.ENGDISMOMENT,T2.ENGPOWER,T2.WHETREAD,T2.BEFWHETREAD,T2.TYRENUM,T2.FULTON,T2.FULEQUIP,T2.SPRNUM,T2.WHEBASE,T2.AXLNUM,
T2.PRODATE,T2.TYRSTANDARD,T2.ISFOREIGN,T2.RATROTSPEED,T2.ENGTORMOMENT,T2.ENGTORMOMROTSPEED,T2.TURFORMAT,T2.CHELODMASS,T2.CHEPSNNUM,T2.TRAMASS,T2.MSTHIGSPEED,T2.HUNMILUSEOIL,
T2.WITTRAANGLE,T2.WOTTRAANGLE,T2.TSMFORMAT,T2.BEFPDTFORMAT,T2.AFTPDTFORMAT,T2.FUESPOUTFORMAT,T2.BEFLAPFORMAT,T2.HYDFORMAT,T2.HAVABS,T2.CHEPOWER,T2.DRITYPE,T2.ARCSPLACE,T2.MILAGE,
'' HZT_OPERATION, --车辆业务信息
T2.YEARS,T2.TECGRD,T2.NEXTECGRDTODATE,T2.COSSTATE,T2.STACOLDATE,T2.COLTODATE,T2.CHETODATE,T2.VINDATNUM,
'' HZT_INSURANCE,  --保险信息
T2.TRAINSNO,T2.TRAINSENDDATE,T2.TRAINSMONEY,T2.THRINSNO,T2.THRINSENDDATE,T2.THRINSMONEY,
'' HZT_PASSCAR,  --客车信息
T2.PASGRADE,
'' HZT_DAGCAR,  --危货车信息
T2.DAGVECCARNO,T2.FRETRATYPE,T2.DANFREGRADE,T2.CONTYPE,
'' HZT_TEACHCAR, --教练车信息
T2.COAVECCARNO,T2.COADATE
FROM HYT2LINEHN.CMVEC T2
LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ON T1.CMCLTID=T2.CMCLTID
LEFT OUTER JOIN HYT2LINEHN.COUCANCODE T3 ON T2.VECADDR=T3.CANCODE
LEFT OUTER JOIN HYT2PRDHN.T_PF_DEP T4 ON T2.MANAGERDEPCODE=T4.DEPCODE
WHERE T2.ISEFFECT=0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_CMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
T1.CMCLTID,T1.CLITNAME,T1.CLTENTITYTYPE,T1.PERWORD,T1.PERNUM,T1.BNSCOPE,T1.DEPCODE CLT_DPNM,T1.GRADATE,T1.STADATE,T1.ENDDATE,T1.ADDRESS,T1.ECOTYPE,T1.MAICODING,T1.JURPERSON,T1.CTCNO,T1.PRINCIPAL,T1.PHONE,T1.CLTBUSSTATUS,T1.BUSLICNO,T1.TAXREGNO,T1.GRADEPCODE AS GRACODE_DPNM,T1.RPTCHKRSU,
'' HZT_PASSCMCLT, --客运业户综合信息
T1.HIGHPASVECSUM,T1.HIGHPASSEATSUM,T1.MIDPASVECSUM,T1.MIDPASSEATSUM,T1.NORPASVECSUM,T1.NORPASSEATSUM,T1.PASVECSUM,T1.PASSEATSUM,T1.DRIPASVECSUM,T1.SERPSNSUM,
'' HZT_FRECMCLT,--货运业户综合信息
T1.BIGVECSUM,T1.EXPVECSUM,T1.NORVECSUM,T1.OTHVECSUM,T1.TRACTORSUM,T1.FREVECSUM,T1.BIGVECTNSUM,T1.EXPVECTNSUM,T1.NORVECTNSUM,T1.OTHVECTNSUM,T1.TRACTORTNSUM,T1.DRIVERSUM,T1.STWDSUM,
'' HZT_DAGCMCLT, --危货业户综合信息
T1.POTVECSUM,T1.BOXVECSUM,T1.DAGVECSUM,T1.DAGVECTNSUM,T1.SPECLEEQ,T1.SLGCBKEQ,T1.SAFEEQUIP,T1.FIREEQUIP,T1.DANFREDRISUM,T1.SUPERCARGOSUM,T1.DANSTWDMANSUM,T1.SPEPRKAREA,T1.PRKLOTAREA,
'' HZT_DRVCMCLT, --驾培业户综合信息
T1.DRVSCHSORT,T1.DRVOPCOAS,T1.THYCOASUM,T1.CLRMAREA,T1.COCHAREA,T1.MESSAREA,T1.DORMAREA,T1.TRACTORS,T1.TRAILERS,T1.SMLFRETRUKS,T1.MIDFRETRUKS,T1.BIGFRETRUKS,T1.SMLPASCARS,T1.MIDPASCARS,T1.BIGPASCARS,T1.SMLMANUALCARS,T1.SMLAUTOCARS,T1.MOTORSUM,T1.OTRVECSUM,
'' HZT_MATACMCLT, --维修业户综合信息
T1.MATAOBJ,T1.MINSORT,T1.SIGN,T1.ISONO,T1.VINBNAREA,T1.VINSPEPRKAREA,T1.VINEQUIDSUM,T1.EQUIDCIRCS,T1.DETEQUCIRCS,T1.MINTECPSN,T1.TECHNIC,T1.IDENTIFIER,T1.CHIEFIDENTIFIER,T1.BALANCE,
'' HZT_PASSTACMCLT, --客运站业户综合信息
T1.PASSTAGRADE,T1.PASSTAAUHFILENO,T1.PASSTAADDRESS,T1.INVSTSCALE,T1.STASCALE,T1.STACHARACT,T1.SERTYPE,T1.DAYCAPACITY,T1.DESIGNNUM,T1.YEARCAPACITY,T1.STAJOBER,T1.PASSTAENDDATE,T1.PASSTACREDATE,T1.PASSTACHKACPDATE,T1.PASSTASERVICDATE,T1.PASSTAAREA,
'' HZT_FRESTACMCLT,--货运站业户综合信息
T1.FRESTAGRADE,T1.HEIGHT,T1.PROFESSIONAL,T1.FRESTAENDDATE,T1.FRESTACREDATE,T1.FRESTACHKACPDATE,T1.FRESTASERVICDATE,
'' HZT_DETCMCLT,--检测站业户综合信息
T1.DETSTAGRADE,T1.AUHFILENO,T1.JPANO,T1.CURRENTDATEJPAFR,T1.CURRENTDATEJPATO,T1.DISONO,T1.BELNGDEP,T1.EQUPANO,T1.CURRENTDATEEQUPADT,T1.BDEPADD,T1.BDEPTEL,T1.APAREA,T1.OCUAREA,T1.BUILDAREA,T1.CKAREA,T1.DPERSUM,T1.TECHSUM,T1.ENGSUM,T1.STAFFSUM,
'' HZT_REGCMCLT,--业户注册信息
T1.BNBANK,T1.CAPITALSUM,T1.FORCAPITAL,T1.FXNOWCAPTL,T1.FXBEGCAPTL,T1.FLOWCAPTL,
'' HZT_APP,   --业户许可信息
T2.APPDATE,T2.PERDECNO,
T3.PASSCHENUM,T3.PASSNUM,T3.FRECHENUM,T3.FRENUM,T3.DANGCHENUM,T3.DANGNUM
FROM HYT2LINEHN.CMCLT T1
LEFT OUTER JOIN HYT2LINEHN.APPCLTPER T2 ON T2.APPLYID=T1.APPLYID
LEFT OUTER JOIN (SELECT CMCLTID,SUM(CASE WHEN VECENTYPE=1 THEN NVL(CHENUM,0) ELSE 0 END) AS PASSCHENUM,SUM(CASE WHEN VECENTYPE=1 THEN 1 ELSE 0 END) AS PASSNUM,SUM(CASE WHEN VECENTYPE=2 THEN NVL(CHENUM,0) ELSE 0 END) AS FRECHENUM,SUM(CASE WHEN VECENTYPE=2 THEN 1 ELSE 0 END) AS FRENUM,SUM(CASE WHEN VECENTYPE IN ('3','23') THEN NVL(CHENUM,0) ELSE 0 END) AS DANGCHENUM,SUM(CASE WHEN VECENTYPE IN ('3','23') THEN 1 ELSE 0 END) AS DANGNUMFROM HYT2LINEHN.CMVEC
WHERE ISEFFECT=0  AND VECBUSSTATUS='10' GROUP BY CMCLTID) T3 ON T1.CMCLTID=T3.CMCLTID
WHERE T1.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_CMPSN AS
SELECT '' HZF_CMPSN,  --设置默认查询条件
'' HZS_CMPSN,  --设置默认查询列
'' HZT_CMCLTINFO,--业户信息
T2.CLITNAME,T2.CLTENTITYTYPE,T2.PERWORD,T2.PERNUM,T2.DEPCODE DEP,T2.ECOTYPE,
'' HZT_CMPSNINFO,--从业人员信息
T1.CMPSNID,T1.NAME,T1.SEX,T1.BIRTHDAY,T1.CARDNO,T1.NATION,T1.NATPLACE,T1.PHONE,T1.MAICODING,T1.ADDRESS,T1.EMAIL,T1.POLITICSFACE,T1.EDUCATION,T1.TECCLASS,T1.HEALTH,T1.WORSTATUS,T1.STUTIMES,
'' HZT_CERTIFICATE, --从业资格证信息
BEWORSCOPE,APPIXSCOPE,
T3.DOCNO,T3.TITNO,T3.STARTDATE FIRSTDATE,T3.GRADATE GRANTDATE,T3.CREDATE,T3.ENDDATE,T3.EXAMINEEAREA,T3.BEWORLEVEL,T3.TRATIMES,T4.depname ORG,T3.LICSTATUS
,T3.WORTYPE
FROM HYT2LINEHN.CMPSN T1
LEFT OUTER JOIN HYT2LINEHN.CMCLT T2 ON T1.CMCLTID=T2.CMCLTID
LEFT OUTER JOIN HYT2LINEHN.ENBEWORRECORD T3 ON T3.CMPSNID=T1.CMPSNID
left join hyt2prdhn.t_pf_dep t4 on t3.org=t4.depcode
WHERE T1.ISEFFECT=0 AND T3.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_DAGCAR AS
SELECT
'' HZF_CLTVEC,--设置默认查询条件
'' HZS_CLTVEC,--设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMVECID,CLITNAME,CLTENTITYTYPE,PERWORD,PERNUM,VEC_DPNM,ADDRESS,ECOTYPE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_VECINFO,  --车辆基本信息
VECADDR,TRAWORD,AREAABBR,TRANO,MANAGER_DPNM,GRADATE,CREDATE,STADATE,ENDDATE,BRACOLOR,BRANUM,FACTYPE,MODEL,VECTYPE,VECBUSSTATUS,
BNSCOPE,ARCNO,CSGUNIT,BUSTYPE,REGYPE,CHENUM,VECLENGTH,VECWIDE,VECHIGH,INSVECCARLONG,INSVECCARWIDE,INSVECCARHIGH,
ENGTYPE,VECCOLOR,SETDATE,BUYPRICE,TRANCHA,ISGOTOSYS,ISINOUT,ISCOMMTOOL,COMMTOOL,LOGAPPSTAT,SELVECSHOP,BUYDATE,
'' HZT_DAGCAR,  --危货车信息
DAGVECCARNO,FRETRATYPE,DANFREGRADE,CONTYPE,
'' HZT_TECHNICINFO, --车辆技术信息
PRDFACTORY,ELDTYPE,ENGNUM,FRANUM,VINNUM,ENGDISMOMENT,ENGPOWER,WHETREAD,BEFWHETREAD,TYRENUM,FULTON,FULEQUIP,SPRNUM,WHEBASE,AXLNUM,
PRODATE,TYRSTANDARD,ISFOREIGN,RATROTSPEED,ENGTORMOMENT,ENGTORMOMROTSPEED,TURFORMAT,CHELODMASS,CHEPSNNUM,TRAMASS,MSTHIGSPEED,HUNMILUSEOIL,
WITTRAANGLE,WOTTRAANGLE,TSMFORMAT,BEFPDTFORMAT,AFTPDTFORMAT,FUESPOUTFORMAT,BEFLAPFORMAT,HYDFORMAT,HAVABS,CHEPOWER,DRITYPE,ARCSPLACE,MILAGE,
'' HZT_OPERATION, --车辆业务信息
YEARS,TECGRD,NEXTECGRDTODATE,COSSTATE,CHETODATE,VINDATNUM,
'' HZT_INSURANCE,  --保险信息
TRAINSNO,TRAINSENDDATE,TRAINSMONEY,THRINSNO,THRINSENDDATE,THRINSMONEY
FROM HYT2LINEHN.V_CLTVEC
WHERE INSTR(VECENTYPE,'3')>0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_DAGCMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_DAGCMCLT, --危货业户综合信息
POTVECSUM,BOXVECSUM,DAGVECSUM,DAGVECTNSUM,SPECLEEQ,SLGCBKEQ,SAFEEQUIP,FIREEQUIP,DANFREDRISUM,SUPERCARGOSUM,DANSTWDMANSUM,SPEPRKAREA,PRKLOTAREA,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO,DANGCHENUM,DANGNUM
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'4')=4;
CREATE OR REPLACE VIEW HYT2LINEHN.V_DETCMCLT AS
SELECT
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_DETCMCLT,--检测站业户综合信息
DETSTAGRADE,AUHFILENO,JPANO,CURRENTDATEJPAFR,CURRENTDATEJPATO,DISONO,BELNGDEP,EQUPANO,CURRENTDATEEQUPADT,BDEPADD,BDEPTEL,APAREA,OCUAREA,BUILDAREA,CKAREA,DPERSUM,TECHSUM,ENGSUM,STAFFSUM,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'128')=128;
CREATE OR REPLACE VIEW HYT2LINEHN.V_DRILLMASTER AS
SELECT T1.COACHID,
CASE WHEN T1.CLITNAME IS NOT NULL THEN  T1.CLITNAMEELSE  (SELECT  CLITNAME FROM  HYT2LINEHN.CMCLT  WHERE CMCLTID=T1.CMCLTID)END  AS CLITNAME,
T1.DOCNO,T1.NAME,T1.CARDNO,T1.YEARS,T1.CARDTYPE,T1.PERIOD,
T1.SEX,T1.BIRTHDAY,T1.TITNO,T1.BEWORSCOPE,T1.LICSTATUS,T1.GRADATE,T1.STARTDATE,T1.ENDDATE,T1.ORG AS DEPCODE,T1.TECCLASS,T1.EDUCATION,T3.CANNAME AS EXAM,T1.EXAMINEEAREA
FROM HYT2LINEHN.COACH T1
LEFT OUTER JOIN HYT2LINEHN.COUCANCODE T3 ON T1.EXAMINEEAREA=T3.CANCODE WHERE T1.ISEFFECT=0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_DRVCMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_DRVCMCLT, --驾培业户综合信息
DRVSCHSORT,DRVOPCOAS,THYCOASUM,CLRMAREA,COCHAREA,MESSAREA,DORMAREA,TRACTORS,TRAILERS,SMLFRETRUKS,MIDFRETRUKS,BIGFRETRUKS,SMLPASCARS,MIDPASCARS,BIGPASCARS,SMLMANUALCARS,SMLAUTOCARS,MOTORSUM,OTRVECSUM,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'16')=16;
CREATE OR REPLACE VIEW HYT2LINEHN.V_FRECAR AS
SELECT
'' HZF_CLTVEC,--设置默认查询条件
'' HZS_CLTVEC,--设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMVECID,CLITNAME,CLTENTITYTYPE,PERWORD,PERNUM,CLT_DPNM,ADDRESS,ECOTYPE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_VECINFO,  --车辆基本信息
VECADDR,TRAWORD,AREAABBR,TRANO,VEC_DPNM,MANAGER_DPNM,GRADATE,CREDATE,STADATE,ENDDATE,BRACOLOR,BRANUM,FACTYPE,MODEL,VECTYPE,VECBUSSTATUS,
BNSCOPE,ARCNO,CSGUNIT,BUSTYPE,REGYPE,CHENUM,VECLENGTH,VECWIDE,VECHIGH,INSVECCARLONG,INSVECCARWIDE,INSVECCARHIGH,
ENGTYPE,VECCOLOR,SETDATE,BUYPRICE,TRANCHA,ISGOTOSYS,ISINOUT,ISCOMMTOOL,COMMTOOL,LOGAPPSTAT,SELVECSHOP,BUYDATE,
'' HZT_TECHNICINFO, --车辆技术信息
PRDFACTORY,ELDTYPE,ENGNUM,FRANUM,VINNUM,ENGDISMOMENT,ENGPOWER,WHETREAD,BEFWHETREAD,TYRENUM,FULTON,FULEQUIP,SPRNUM,WHEBASE,AXLNUM,
PRODATE,TYRSTANDARD,ISFOREIGN,RATROTSPEED,ENGTORMOMENT,ENGTORMOMROTSPEED,TURFORMAT,CHELODMASS,CHEPSNNUM,TRAMASS,MSTHIGSPEED,HUNMILUSEOIL,
WITTRAANGLE,WOTTRAANGLE,TSMFORMAT,BEFPDTFORMAT,AFTPDTFORMAT,FUESPOUTFORMAT,BEFLAPFORMAT,HYDFORMAT,HAVABS,CHEPOWER,DRITYPE,ARCSPLACE,MILAGE,
'' HZT_OPERATION, --车辆业务信息
YEARS,TECGRD,NEXTECGRDTODATE,COSSTATE,CHETODATE,VINDATNUM,
'' HZT_INSURANCE,  --保险信息
TRAINSNO,TRAINSENDDATE,TRAINSMONEY,THRINSNO,THRINSENDDATE,THRINSMONEY
FROM HYT2LINEHN.V_CLTVEC
WHERE INSTR(VECENTYPE,'2')>0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_FRECMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_FRECMCLT,--货运业户综合信息
BIGVECSUM,EXPVECSUM,NORVECSUM,OTHVECSUM,TRACTORSUM,FREVECSUM,BIGVECTNSUM,EXPVECTNSUM,NORVECTNSUM,OTHVECTNSUM,TRACTORTNSUM,DRIVERSUM,STWDSUM,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO,FRECHENUM,FRENUM
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'2')=2;
CREATE OR REPLACE VIEW HYT2LINEHN.V_FRESTACMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_FRESTACMCLT,--货运站业户综合信息
FRESTAGRADE,HEIGHT,PROFESSIONAL,FRESTAENDDATE,FRESTACREDATE,FRESTACHKACPDATE,FRESTASERVICDATE,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'64')=64;
CREATE OR REPLACE VIEW HYT2LINEHN.V_LINCARD AS
SELECT T.LINCARID,T2.CLITNAME,T.GRADEPCODE,T.LIDCARDNO,T1.LINNAME,T1.LINCODE,T.LINCARTYPE,T.LINBUSSTATUS,T1.BUSAREA,T1.LINTYPE,T1.BYWAYOF,T1.SUMMIL,(CASE WHEN LENGTH(RTRIM(T1.STADEPOT, '0')) <= 6 THEN (SELECT CANNAME FROM COUCANCODE WHERE CANCODE=SUBSTR(T1.STADEPOT,0,6))WHEN LENGTH(RTRIM(T1.STADEPOT, '0')) <= 9 THEN (SELECT CANNAME FROM VILTOWCANCODE WHERE CANCODE=SUBSTR(T1.STADEPOT,0,9))ELSE (SELECT CANNAME FROM VILTOWCANCODE WHERE CANCODE=RTRIM(T1.STADEPOT, '0'))  END) AS STADEPOT,(CASE WHEN LENGTH(RTRIM(T1.ENDDEPOT, '0')) <= 6 THEN (SELECT CANNAME FROM COUCANCODE WHERE CANCODE=SUBSTR(T1.ENDDEPOT,0,6))WHEN LENGTH(RTRIM(T1.STADEPOT, '0')) <= 9 THEN (SELECT CANNAME FROM VILTOWCANCODE WHERE CANCODE=SUBSTR(T1.ENDDEPOT,0,9))ELSE (SELECT CANNAME FROM VILTOWCANCODE WHERE CANCODE=RTRIM(T1.ENDDEPOT, '0'))   END) AS ENDDEPOT,(SELECT CANNAME FROM COUCANCODE WHERE CANCODE=T1.STALINDEPCODE)AS STALINDEPCODE,(SELECT CANNAME FROM COUCANCODE WHERE CANCODE=T1.ENDLINDEPCODE)AS ENDLINDEPCODE,T4.REGCTCTYPE,T4.DAYS||'天'||T4.TIMES||'班次' AS DAYSTIMES,T4.PERVECNUM,T4.PASSEANUM,T4.STADATE AS APPSTADATE,T4.ENDDATE AS APPENDDATE,T2.PERWORD,T2.PERNUM,T3.BRANUM,T3.BRACOLOR,T3.TRAWORD,T3.TRANO,T3.STADATE AS VECSTADATE,T3.ENDDATE AS VECENDDATE,T3.VECTYPE, T3.PASGRADE,T.BERTHFROM HYT2LINEHN.LINCARD TLEFT JOIN HYT2LINEHN.LINE T1 ON T1.LINID=T.LINIDLEFT JOIN HYT2LINEHN.CMCLT T2 ON T2.CMCLTID=T.CMCLTIDLEFT JOIN HYT2LINEHN.CMVEC T3 ON T3.CMVECID=T.CMVECIDLEFT OUTER JOIN HYT2LINEHN.LINPERREG T4 ON T4.LINPERREGID=T.LINPERREGIDWHERE T.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_LINEPARAM AS
SELECT CASE WHEN A2.PARAMVALUE IS NOT NULL THEN A2.PARAMVALUEELSE A1.DFTVALUE END DFTVALUE,A1.PARAMCODE
FROM T_PARAMCODE A1
LEFT JOIN HYT2LINEHN.T_CUSTPARAM A2
ON A1.PARAMCODE=A2.PARAMCODE;
CREATE OR REPLACE VIEW HYT2LINEHN.V_LINPERREG AS
SELECT T.LINPERREGID, T1.CLITNAME, T1.PERNUM, T2.LINNAME,T2.LINCODE,T3.STADEPOTNAME AS STADEPOT,T4.ENDDEPOTNAME AS ENDDEPOT,T.STADATE,T.ENDDATE,T2.BUSAREA,T2.SUMMIL,T.PERDECNO,T.LINTYPE,T.REGCTCTYPE, T.PERVECNUM,T2.BYWAYOF,T5.BERTHFROM HYT2LINEHN.LINPERREG TLEFT JOIN HYT2LINEHN.CMCLT T1 ON T.CMCLTID=T1.CMCLTIDLEFT JOIN HYT2LINEHN.LINE T2 ON T.LINID=T2.LINIDLEFT OUTER JOIN (SELECT CANNAME AS STADEPOTNAME, RPAD(CANCODE, 11, '0') CANCODE FROM HYT2LINEHN.COUCANCODE UNIONSELECT CANNAME , RPAD(CANCODE, 11, '0') CANCODE FROM HYT2LINEHN.VILTOWCANCODE) T3 ON T2.STADEPOT=T3.CANCODELEFT OUTER JOIN (SELECT CANNAME AS ENDDEPOTNAME, RPAD(CANCODE, 11, '0') CANCODE FROM HYT2LINEHN.COUCANCODE UNIONSELECT CANNAME , RPAD(CANCODE, 11, '0') CANCODE FROM HYT2LINEHN.VILTOWCANCODE) T4 ON T2.ENDDEPOT=T4.CANCODELEFT JOIN HYT2LINEHN.LINCARD T5 ON T5.LINPERREGID=T.LINPERREGIDWHERE T.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_MATACMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_MATACMCLT, --维修业户综合信息
MATAOBJ,MINSORT,SIGN,ISONO,VINBNAREA,VINSPEPRKAREA,VINEQUIDSUM,MINTECPSN,TECHNIC,IDENTIFIER,CHIEFIDENTIFIER,BALANCE,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO
FROM HYT2LINEHN.V_CMCLT A
WHERE bitand(A.CLTENTITYTYPE,'8')=8;
CREATE OR REPLACE VIEW HYT2LINEHN.V_PASSCAR AS
SELECT
'' HZF_CLTVEC,--设置默认查询条件
'' HZS_CLTVEC,--设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMVECID,CLITNAME,CLTENTITYTYPE,PERWORD,PERNUM,CLT_DPNM,ADDRESS,ECOTYPE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_VECINFO,  --车辆基本信息
VECADDR,TRAWORD,AREAABBR,TRANO,VEC_DPNM,MANAGER_DPNM,GRADATE,CREDATE,STADATE,ENDDATE,BRACOLOR,BRANUM,FACTYPE,MODEL,VECTYPE,VECBUSSTATUS,
BNSCOPE,ARCNO,CSGUNIT,BUSTYPE,REGYPE,CHENUM,VECLENGTH,VECWIDE,VECHIGH,INSVECCARLONG,INSVECCARWIDE,INSVECCARHIGH,
ENGTYPE,VECCOLOR,SETDATE,BUYPRICE,TRANCHA,ISGOTOSYS,ISINOUT,ISCOMMTOOL,COMMTOOL,LOGAPPSTAT,SELVECSHOP,BUYDATE,
'' HZT_PASSCAR,  --客车信息
PASGRADE,
'' HZT_TECHNICINFO, --车辆技术信息
PRDFACTORY,ELDTYPE,ENGNUM,FRANUM,VINNUM,ENGDISMOMENT,ENGPOWER,WHETREAD,BEFWHETREAD,TYRENUM,FULTON,FULEQUIP,SPRNUM,WHEBASE,AXLNUM,
PRODATE,TYRSTANDARD,ISFOREIGN,RATROTSPEED,ENGTORMOMENT,ENGTORMOMROTSPEED,TURFORMAT,CHELODMASS,CHEPSNNUM,TRAMASS,MSTHIGSPEED,HUNMILUSEOIL,
WITTRAANGLE,WOTTRAANGLE,TSMFORMAT,BEFPDTFORMAT,AFTPDTFORMAT,FUESPOUTFORMAT,BEFLAPFORMAT,HYDFORMAT,HAVABS,CHEPOWER,DRITYPE,ARCSPLACE,MILAGE,
'' HZT_OPERATION, --车辆业务信息
YEARS,TECGRD,NEXTECGRDTODATE,COSSTATE,CHETODATE,VINDATNUM,
'' HZT_INSURANCE,  --保险信息
TRAINSNO,TRAINSENDDATE,TRAINSMONEY,THRINSNO,THRINSENDDATE,THRINSMONEY
FROM HYT2LINEHN.V_CLTVEC
WHERE VECENTYPE=1;
CREATE OR REPLACE VIEW HYT2LINEHN.V_PASSCMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_PASSCMCLT, --客运业户综合信息
HIGHPASVECSUM,HIGHPASSEATSUM,MIDPASVECSUM,MIDPASSEATSUM,NORPASVECSUM,NORPASSEATSUM,PASVECSUM,PASSEATSUM,DRIPASVECSUM,SERPSNSUM,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO,PASSCHENUM,PASSNUM
FROM HYT2LINEHN.V_CMCLT A
WHERE BITAND(A.CLTENTITYTYPE,'1')=1 OR BITAND(A.CLTENTITYTYPE,'32')=32;
CREATE OR REPLACE VIEW HYT2LINEHN.V_SINGLECMPSN AS
SELECT
'' HZF_SINGLECMPSN,  --设置默认查询条件
'' HZS_CMPSN,  --设置默认查询列
'' HZT_CMCLTINFO,--业户信息
CLITNAME,
'' HZT_CMPSNINFO,--从业人员信息
NAME,SEX,BIRTHDAY,CARDNO,WORSTATUS,
'' HZT_CERTIFICATE, --从业资格证信息
CMPSNID,BEWORSCOPE,DOCNO,TITNO,FIRSTDATE,GRANTDATE,CREDATE,ENDDATE,EXAMINEEAREA,BEWORLEVEL,TRATIMES,LICSTATUS
FROM HYT2LINEHN.V_CMPSN;
CREATE OR REPLACE VIEW HYT2LINEHN.V_STUDENT AS
SELECT
'' HZF_STUDENT,--设置默认查询条件
'' HZS_STUDENT,--设置默认查询列
'' HZT_STUDENTINFO,--学员基本信息
T1.STUID,T1.NAME,T1.SEX,T1.BIRTHDAY,T1.CARDNO,T1.NATION,T1.NATPLACE,T1.PHONE,T1.ADDRESS,T1.MAICODING,T1.EMAIL,T1.EDUCATION,T1.TECCLASS,T1.HEALTH
FROM HYT2LINEHN.STUDENT T1
WHERE T1.ISEFFECT=0;
CREATE OR REPLACE VIEW HYT2LINEHN.V_STUTIMESTATUS AS
SELECT M.STUAPPLICATIONID,M.STUHOURSRECORDID,M.CHEAKAPPROVALID,M.SUBJECT,CASE WHEN INSTR(M.OUTRIDETIMECOLOR||'###'||M.ONTIMECOLOR||'###'||M.ISEFFECTCOUNT||'###'||M.EFFECTTIMECOLOR,'1')>0 THEN '1'WHEN INSTR(M.OUTRIDETIMECOLOR||'###'||M.ONTIMECOLOR||'###'||M.ISEFFECTCOUNT||'###'||M.EFFECTTIMECOLOR,'2')>0 THEN '2'WHEN INSTR(M.OUTRIDETIMECOLOR||'###'||M.ONTIMECOLOR||'###'||M.ISEFFECTCOUNT||'###'||M.EFFECTTIMECOLOR,'4')>0 THEN '4'WHEN INSTR(M.OUTRIDETIMECOLOR||'###'||M.ONTIMECOLOR||'###'||M.ISEFFECTCOUNT||'###'||M.EFFECTTIMECOLOR,'3')>0 THEN '3'ELSE '0' END SHOWTIMECOLORFROM (SELECT H.STUAPPLICATIONID,H.STUHOURSRECORDID,H.CHEAKAPPROVALID,H.SUBJECT,CASE WHEN H.OUTRIDETIMESTATUS='1' THEN H.OUTRIDETIMECOLOR ELSE '0' END OUTRIDETIMECOLOR,CASE WHEN H.ONTIMESTATUS='1' THEN H.ONTIMECOLOR ELSE '0' END ONTIMECOLOR,CASE WHEN H.EFFECTTIMESTATUS='1' THEN H.EFFECTTIMECOLOR ELSE '0' END EFFECTTIMECOLOR,CASE WHEN H.COUNTSTATUS='1' THEN H.ISEFFECTCOUNT ELSE '0' END ISEFFECTCOUNTFROM (SELECT T2.STUAPPLICATIONID,T2.STUHOURSRECORDID,T2.CHEAKAPPROVALID,T2.SUBJECT,CASE WHEN T2.RECORDTIMESTART<T3.DFTVALUE OR T2.RECORDTIMEEND>T4.DFTVALUE THEN '1' ELSE '0' END OUTRIDETIMESTATUS,CASE WHEN DECODE(T2.EFFECTTIME/60,0,0,ROUND(T2.EFFECTTIME/60,1))>T5.DFTVALUE THEN '1' ELSE '0' END EFFECTTIMESTATUS,CASE WHEN ( SELECT COUNT(A.RECORDTIMESTART) FROM TSSTUHOURSRECORD A  WHERE A.ISEFFECT='0' AND A.STUAPPLICATIONID=t2.STUAPPLICATIONIDAND A.CHEAKAPPROVALID=T2.CHEAKAPPROVALID AND A.RECORDTIMESTART=T2.RECORDTIMESTART GROUP BY A.RECORDTIMESTART )> = T8.DFTVALUEor ( SELECT COUNT(A.RECORDTIMEEND) FROM TSSTUHOURSRECORD A  WHERE A.ISEFFECT='0' AND A.STUAPPLICATIONID=t2.STUAPPLICATIONIDAND A.RECORDTIMEEND=T2.RECORDTIMEEND  AND A.CHEAKAPPROVALID=T2.CHEAKAPPROVALID GROUP BY A.RECORDTIMEEND )> = T8.DFTVALUETHEN '1' ELSE '0' END COUNTSTATUS,CASE WHEN SUBSTR(T2.RECORDTIMESTART,4,5)='00:00' OR SUBSTR(T2.RECORDTIMEEND,4,5)='00:00' THEN '1' ELSE '0' END ONTIMESTATUS,T6.DFTVALUE OUTRIDETIMECOLOR,T7.DFTVALUE ONTIMECOLOR,T8.DFTVALUE AS EFFECTTIMECOLOR,T10.DFTVALUE AS ISEFFECTCOUNTFROM TSSTUHOURSRECORD T2LEFT JOIN V_LINEPARAM T3ON T3.PARAMCODE='OUTRIDSTARTTIME'LEFT JOIN V_LINEPARAM T4ON T4.PARAMCODE='OUTRIDENDTIME'LEFT JOIN V_LINEPARAM T5ON T5.PARAMCODE='EFFECTTIME'LEFT JOIN V_LINEPARAM T6ON T6.PARAMCODE='OUTRIDETIMESTATUS'LEFT JOIN V_LINEPARAM T7ON T7.PARAMCODE='ONTIMESTATUS'LEFT JOIN V_LINEPARAM T8ON T8.PARAMCODE='EFFECTTIMESTATUS'LEFT JOIN V_LINEPARAM T9ON T9.PARAMCODE='COUNTSTATUS'LEFT JOIN V_LINEPARAM T10ON T10.PARAMCODE='ISEFFECTCOUNT'WHERE T2.ISEFFECT='0')H)M;CREATE OR REPLACE VIEW HYT2LINEHN.V_STUTIMESTATUS2 AS
SELECT T2.STUAPPLICATIONID,T2.STUHOURSRECORDID,T2.CHEAKAPPROVALID,T2.SUBJECT,TT1.CREDATE,CASE WHEN T2.RECORDTIMESTART<T3.DFTVALUE OR T2.RECORDTIMEEND>T4.DFTVALUE THEN '1'WHEN DECODE(T2.EFFECTTIME/60,0,0,ROUND(T2.EFFECTTIME/60,1))>T5.DFTVALUE THEN '1'WHEN ( SELECT COUNT(A.RECORDTIMESTART) FROM TSSTUHOURSRECORD A  WHERE A.ISEFFECT='0' AND A.STUAPPLICATIONID=T2.STUAPPLICATIONIDAND A.CHEAKAPPROVALID=T2.CHEAKAPPROVALID AND A.RECORDTIMESTART=T2.RECORDTIMESTART GROUP BY A.RECORDTIMESTART )> = T6.DFTVALUEOR ( SELECT COUNT(A.RECORDTIMEEND) FROM TSSTUHOURSRECORD A  WHERE A.ISEFFECT='0' AND A.STUAPPLICATIONID=T2.STUAPPLICATIONIDAND A.RECORDTIMEEND=T2.RECORDTIMEEND  AND A.CHEAKAPPROVALID=T2.CHEAKAPPROVALID GROUP BY A.RECORDTIMEEND )> = T6.DFTVALUETHEN '1' ELSE '0' END SHOWTIMECOLORFROM TSSTUHOURSRECORD T2INNER JOIN TSCHEAKAPPROVALDETAIL TT1ON T2.STUAPPLICATIONID = TT1.STUAPPLICATIONID AND T2.CHEAKAPPROVALID=TT1.CHEAKAPPROVALIDAND (TT1.GOVCHEAKAPPROVALSTATUS ='01' OR TT1.GOVCHEAKAPPROVALSTATUS IS NULL)AND TT1.CREDATE >'2011-10-21'AND TT1.ISEFFECT='0'LEFT JOIN V_LINEPARAM T3ON T3.PARAMCODE='OUTRIDSTARTTIME'LEFT JOIN V_LINEPARAM T4ON T4.PARAMCODE='OUTRIDENDTIME'LEFT JOIN V_LINEPARAM T5ON T5.PARAMCODE='EFFECTTIME'LEFT JOIN V_LINEPARAM T6ON T6.PARAMCODE='EFFECTTIMESTATUS'WHERE T2.ISEFFECT='0';CREATE OR REPLACE VIEW HYT2LINEHN.V_TEACHCAR AS
SELECT
'' HZF_CLTVEC,--设置默认查询条件
'' HZS_CLTVEC,--设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CLITNAME,CLTENTITYTYPE,PERWORD,PERNUM,CLT_DPNM,ADDRESS,ECOTYPE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_VECINFO,  --车辆基本信息
CMVECID,VECADDR,TRAWORD,AREAABBR,TRANO,VEC_DPNM,MANAGER_DPNM,GRADATE,STADATE,ENDDATE,BRACOLOR,BRANUM,FACTYPE,MODEL,VECTYPE,VECBUSSTATUS,
BNSCOPE,ARCNO,CSGUNIT,BUSTYPE,REGYPE,CHENUM,COLNUM,VECLENGTH,VECWIDE,VECHIGH,INSVECCARLONG,INSVECCARWIDE,INSVECCARHIGH,
ENGTYPE,VECCOLOR,SETDATE,BUYPRICE,TRANCHA,ISGOTOSYS,ISINOUT,ISCOMMTOOL,COMMTOOL,LOGAPPSTAT,SELVECSHOP,BUYDATE,
'' HZT_TEACHCAR, --教练车信息
COAVECCARNO,COADATE,
'' HZT_TECHNICINFO, --车辆技术信息
PRDFACTORY,ELDTYPE,ENGNUM,FRANUM,VINNUM,ENGDISMOMENT,ENGPOWER,WHETREAD,BEFWHETREAD,TYRENUM,FULTON,FULEQUIP,SPRNUM,WHEBASE,AXLNUM,
PRODATE,TYRSTANDARD,ISFOREIGN,RATROTSPEED,ENGTORMOMENT,ENGTORMOMROTSPEED,TURFORMAT,CHELODMASS,CHEPSNNUM,TRAMASS,MSTHIGSPEED,HUNMILUSEOIL,
WITTRAANGLE,WOTTRAANGLE,TSMFORMAT,BEFPDTFORMAT,AFTPDTFORMAT,FUESPOUTFORMAT,BEFLAPFORMAT,HYDFORMAT,HAVABS,CHEPOWER,DRITYPE,ARCSPLACE,MILAGE,
'' HZT_OPERATION, --车辆业务信息
YEARS,TECGRD,NEXTECGRDTODATE,COSSTATE,STACOLDATE,COLTODATE,CHETODATE,VINDATNUM,
'' HZT_INSURANCE,  --保险信息
TRAINSNO,TRAINSENDDATE,TRAINSMONEY,THRINSNO,THRINSENDDATE,THRINSMONEY
FROM HYT2LINEHN.V_CLTVEC
WHERE VECENTYPE=4;
CREATE OR REPLACE VIEW HYT2LINEHN.V_TOTALCAR AS
SELECT T2.CMVECID,T4.CANNAME,T1.CLITNAME,T1.PERNUM,T2.BRACOLOR,T2.BRANUM,T2.CHENUM,T2.VECTYPE,T2.VECBUSSTATUS,T2.TRANO,T2.CHETODATE,T2.ENGNUM,T2.FRANUMFROM HYT2LINEHN.CMVEC T2LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ON T2.CMCLTID=T1.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.COUCANCODE T4 ON T2.VECADDR=T4.CANCODEWHERE T2.ISEFFECT=0 AND(INSTR(T2.VECENTYPE,'5')>=1 OR INSTR(T2.VECENTYPE,'6')>=1 OR INSTR(T2.VECENTYPE,'7')>=1);CREATE OR REPLACE VIEW HYT2LINEHN.V_TOTALCMCLT AS
SELECT   T.CMCLTID, T.CLITNAME, T.DEPCODE,PERWORD || PERNUM AS PERNUM,T.ECOTYPE,T.BNSCOPE,T.CLTBUSSTATUS,TO_CHAR(T.CLTENTITYTYPE) AS CLTENTITYTYPE,
T.BNBGNDATE,T.GRADATE,T.STADATE,T.ENDDATE,T.PRINCIPAL,T.ZYMJ,T.CTCNO,T.STAFFSUM,T.SPERSUM,T.JOBERSUM
FROM HYT2LINEHN.CMCLT T WHERE T.ISEFFECT=0
AND (bitand(T.CLTENTITYTYPE,512)=512 OR bitand(T.CLTENTITYTYPE,1024)=1024 OR bitand(T.CLTENTITYTYPE,2048)=2048 );
CREATE OR REPLACE VIEW HYT2LINEHN.V_VECTECH AS
SELECT T1.CMVECID,T1.BRACOLOR,T1.BRANUM,T1.TRAWORD||T1.TRANO AS TRANO,T1.ENDDATE,T2.OPERATEID,T1.DEPCODE,T2.VINDDATE,T2.VINDNEXTDATE,T2.CLITNAME,T2.VINDCONNO,T2.VINDGRDNO,T2.GRDTODATE,T2.VINDREPNO,T2.TECID  AS TECGRD,T2.GRADE AS PASGRADE,T2.QUALITYNAME,T2.DETRESULT,T3.USERNAME,T2.REMARKC
FROM HYT2LINEHN.CMVEC T1
INNER JOIN HYT2LINEHN.VECTECH T2 ON T1.CMVECID=T2.CMVECID
LEFT OUTER JOIN HYT2PRDHN.T_PF_USER T3 ON T3.USERCODE=T2.CREUSRCODE
WHERE T1.ISEFFECT=0;CREATE OR REPLACE VIEW HYT2LINEHN.V_BUSSTACMCLT AS
SELECT
'' HZF_CMCLT,  --设置默认查询条件
'' HZS_CMCLT,  --设置默认查询列
'' HZT_CMCLTINFO,--业户基本信息
CMCLTID,CLITNAME,PERWORD,PERNUM,BNSCOPE,CLT_DPNM,ADDRESS,ECOTYPE,GRADATE,STADATE,ENDDATE,MAICODING,JURPERSON,CTCNO,PRINCIPAL,PHONE,CLTBUSSTATUS,BUSLICNO,TAXREGNO,GRACODE_DPNM,RPTCHKRSU,
'' HZT_BUSSTACMCLT,--客运站业户综合信息
PASSTAGRADE,PASSTAADDRESS,INVSTSCALE,STASCALE,STACHARACT,SERTYPE,DAYCAPACITY,DESIGNNUM,YEARCAPACITY,STAJOBER,PASSTAENDDATE,PASSTACREDATE,PASSTACHKACPDATE,PASSTASERVICDATE,PASSTAAREA,
'' HZT_REGCMCLT,--业户注册信息
BNBANK,CAPITALSUM,FORCAPITAL,FXNOWCAPTL,FXBEGCAPTL,FLOWCAPTL,
'' HZT_APP,   --业户许可信息
APPDATE,PERDECNO
FROM HYT2LINEHN.V_CMCLT A
WHERE  BITAND(A.CLTENTITYTYPE,'32')=32;CREATE OR REPLACE VIEW HYT2LINEHN.V_TAXICMCLT AS
SELECT CMCLTID, CLITNAME, DEPCODE, BNSCOPE, BNSCOPE AS S_1BNSCOPE,CLTBUSSTATUS, FILNO,PERWORD || PERNUM AS PERNUM,ECOTYPE,JURPERSON, PHONE,(CASE WHEN (FILNO = '' OR FILNO IS NULL) THEN  '否'  ELSE '是' END) AS IFBRANCHFROM HYT2LINEHN.CMCLT TWHERE ISEFFECT = '0' AND bitand(T.CLTENTITYTYPE,1024)=1024ORDER BY  T.CREDATE DESC;CREATE OR REPLACE VIEW HYT2LINEHN.V_KYCMCLT AS
SELECT T.CMCLTID, CLITNAME, DEPCODE, BNSCOPE,CLTBUSSTATUS,PERWORD || PERNUM AS PERNUM,ECOTYPE,JURPERSON, PHONE,T.ADDRESS,T1.SUMVEC AS 车辆数FROM HYT2LINEHN.CMCLT TLEFT OUTER JOIN (SELECT CMCLTID,SUM(NVL(CHENUM,0)) AS CHENUM,COUNT(1) AS SUMVEC FROM HYT2LINEHN.CMVEC WHERE ISEFFECT=0 AND VECENTYPE='1' AND VECBUSSTATUS='10' GROUP BY CMCLTID) T1 ON T.CMCLTID=T1.CMCLTIDWHERE ISEFFECT = '0'AND BITAND(T.CLTENTITYTYPE,1)=1ORDER BY  T.CREDATE,T.CRETIME;CREATE OR REPLACE VIEW HYT2LINEHN.V_KYVEC AS
SELECT T2.CMVECID,T4.CANNAME AS车籍地,T1.CLITNAME,T1.PERNUM,T2.BRACOLOR,T2.BRANUM,T2.CHENUM,T2.VINNEXTDATE,T2.VECTYPE,T2.VECBUSSTATUS,T2.TRANO,T2.CHETODATE,T2.FACTYPE,T2.SETDATE,T2.TECGRD,T2.NEXTECGRDTODATEFROM HYT2LINEHN.CMVEC T2LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ONT2.CMCLTID=T1.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.COUCANCODE T4 ONT2.VECADDR=T4.CANCODEWHERE T2.ISEFFECT=0 AND T2.VECENTYPE=1 ORDER BY T2.CREDATE DESC,T2.CRETIME DESC;CREATE OR REPLACE VIEW HYT2LINEHN.V_QCZLCAR AS
SELECT T2.CMVECID,T4.CANNAME,T1.CLITNAME,T1.PERNUM,T2.BRACOLOR,T2.BRANUM,T2.CHENUM,T2.VECTYPE,T2.VECBUSSTATUS,T2.TRANO,T2.CHETODATE,T2.ENGNUM,T2.FRANUMFROM HYT2LINEHN.CMVEC T2LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ON T2.CMCLTID=T1.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.COUCANCODE T4 ON T2.VECADDR=T4.CANCODEWHERE T2.ISEFFECT=0 ANDINSTR(T2.VECENTYPE,'7')>=1;CREATE OR REPLACE VIEW HYT2LINEHN.V_QCZLCMCLT AS
SELECT   T.CMCLTID, T.CLITNAME, T.DEPCODE,PERWORD || PERNUM AS PERNUM,T.ECOTYPE,T.BNSCOPE,T.CLTBUSSTATUS,TO_CHAR(T.CLTENTITYTYPE) AS CLTENTITYTYPE,
T.BNBGNDATE,T.GRADATE,T.STADATE,T.ENDDATE,T.PRINCIPAL,T.ZYMJ,T.CTCNO,T.STAFFSUM,T.SPERSUM,T.JOBERSUM
FROM HYT2LINEHN.CMCLT T WHERE T.ISEFFECT=0
AND bitand(T.CLTENTITYTYPE,2048)=2048 ;CREATE OR REPLACE VIEW HYT2LINEHN.V_CSGJCAR AS
SELECT T2.CMVECID,T4.CANNAME,T1.CLITNAME,T1.PERNUM,T2.BRACOLOR,T2.BRANUM,T2.CHENUM,T2.VECTYPE,T2.VECBUSSTATUS,T2.TRANO,T2.CHETODATE,T2.ENGNUM,T2.FRANUMFROM HYT2LINEHN.CMVEC T2LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ON T2.CMCLTID=T1.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.COUCANCODE T4 ON T2.VECADDR=T4.CANCODEWHERE T2.ISEFFECT=0 AND( INSTR(T2.VECENTYPE,'6')>=1 );CREATE OR REPLACE VIEW HYT2LINEHN.V_CSGJCMCLT AS
SELECT   T.CMCLTID, T.CLITNAME, T.DEPCODE,PERWORD || PERNUM AS PERNUM,T.ECOTYPE,T.BNSCOPE,T.CLTBUSSTATUS,TO_CHAR(T.CLTENTITYTYPE) AS CLTENTITYTYPE,
T.BNBGNDATE,T.GRADATE,T.STADATE,T.ENDDATE,T.PRINCIPAL,T.ZYMJ,T.CTCNO,T.STAFFSUM,T.SPERSUM,T.JOBERSUM
FROM HYT2LINEHN.CMCLT T WHERE T.ISEFFECT=0
AND (bitand(T.CLTENTITYTYPE,512)=512 );CREATE OR REPLACE VIEW HYT2LINEHN.V_TOTALTAX AS
SELECT T2.CMVECID,T4.CANNAME,T1.CLITNAME,T1.PERNUM,T2.BRACOLOR,T2.BRANUM,T2.CHENUM,T2.VECTYPE,T2.VECBUSSTATUS,T2.TRANO,T2.CHETODATE,T2.ENGNUM,T2.FRANUMFROM HYT2LINEHN.CMVEC T2LEFT OUTER JOIN HYT2LINEHN.CMCLT T1 ON T2.CMCLTID=T1.CMCLTIDLEFT OUTER JOIN HYT2LINEHN.COUCANCODE T4 ON T2.VECADDR=T4.CANCODEWHERE T2.ISEFFECT=0 AND(INSTR(T2.VECENTYPE,'5')>=1);

第七步:创建过程

CREATE OR REPLACE FUNCTION HYT2LINEHN.GETBNSCOPE(BNSCOPES IN VARCHAR2) RETURN VARCHAR2
ISSTRRESULT VARCHAR2(4000);IDX NUMBER(5):=1;NEXT_IDX NUMBER(5):=1;IN_STR VARCHAR2(4000);BNAME VARCHAR2(500);BCODE VARCHAR2(4000);
BEGININ_STR:=BNSCOPES;IF INSTR(IN_STR,',',IDX)<>0 THENloopNEXT_IDX:=INSTR(IN_STR,',',IDX);IF NEXT_IDX<>0 THENBCODE := SUBSTR(IN_STR,IDX,NEXT_IDX-IDX);SELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BCODE;ELSESELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=IN_STR;END IF;STRRESULT := STRRESULT || BNAME || ',';IN_STR:=SUBSTR(IN_STR,NEXT_IDX+1);IF  NEXT_IDX=0 THEN  IDX:=NEXT_IDX; END IF;exit when (IDX=0 OR LENGTH(IN_STR)=0);end loop;ELSESELECT NAME  INTO BNAME FROM HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BNSCOPES;STRRESULT :=BNAME;END IF;IF LENGTH(STRRESULT)>0 THENSTRRESULT := SUBSTR(STRRESULT,1,LENGTH(STRRESULT)-1);END IF;RETURN STRRESULT;END GETBNSCOPE;
/
CREATE OR REPLACE FUNCTION HYT2LINEHN.REPORTMAJORBRAND(CMCLTID IN VARCHAR2) RETURN VARCHAR2
ISCURSOR CS_FORMINPUT isSELECT  F1 FROM  HYT2LINEHN.FORMINPUT where DATUMID='MAINREPAIR' AND ENTITYID = CMCLTID ;STRRESULT VARCHAR2(4000);  
BEGIN  for VAR_TYPE in CS_FORMINPUT loopSTRRESULT := STRRESULT || VAR_TYPE.F1 ||',' ;end loop;IF LENGTH(STRRESULT)>0 THENSTRRESULT := SUBSTR(STRRESULT,1,LENGTH(STRRESULT)-1);END IF;RETURN STRRESULT;END REPORTMAJORBRAND;
/
create or replace function HYT2LINEHN.getBinObj(v_refobjid in varchar2, v_datumid in varchar2) return varchar2 isresult varchar2(2000);cursor c_binobj is select objsrc||'|'||filename||'.'||extname as info from binobjwhere iseffect=0 and refobjid=v_refobjid and datumid=v_datumid;
beginresult:=null;for v_binobj in c_binobj loopif result is null thenresult:=v_binobj.info;   elseresult:=result||':'||v_binobj.info;   end if;end loop;  return(result);
end getBinObj;
/
CREATE OR REPLACE FUNCTION HYT2LINEHN.GETBNSCOPE(BNSCOPES IN VARCHAR2) RETURN VARCHAR2
ISSTRRESULT VARCHAR2(4000);IDX NUMBER(5):=1;NEXT_IDX NUMBER(5):=1;IN_STR VARCHAR2(4000);BNAME VARCHAR2(500);BCODE VARCHAR2(4000);
BEGININ_STR:=BNSCOPES;IF INSTR(IN_STR,',',IDX)<>0 THENloopNEXT_IDX:=INSTR(IN_STR,',',IDX);IF NEXT_IDX<>0 THENBCODE := SUBSTR(IN_STR,IDX,NEXT_IDX-IDX);SELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BCODE;ELSESELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=IN_STR;END IF;STRRESULT := STRRESULT || BNAME || ',';IN_STR:=SUBSTR(IN_STR,NEXT_IDX+1);IF  NEXT_IDX=0 THEN  IDX:=NEXT_IDX; END IF;exit when (IDX=0 OR LENGTH(IN_STR)=0);end loop;ELSESELECT NAME  INTO BNAME FROM HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BNSCOPES;STRRESULT :=BNAME;END IF;IF LENGTH(STRRESULT)>0 THENSTRRESULT := SUBSTR(STRRESULT,1,LENGTH(STRRESULT)-1);END IF;RETURN STRRESULT;END GETBNSCOPE;
/
CREATE OR REPLACE FUNCTION HYT2PFHN.GETBNSCOPE(BNSCOPES IN VARCHAR2) RETURN VARCHAR2
ISSTRRESULT VARCHAR2(4000);IDX NUMBER(5):=1;NEXT_IDX NUMBER(5):=1;IN_STR VARCHAR2(4000);BNAME VARCHAR2(500);BCODE VARCHAR2(4000);
BEGININ_STR:=BNSCOPES;IF INSTR(IN_STR,',',IDX)<>0 THENloopNEXT_IDX:=INSTR(IN_STR,',',IDX);IF NEXT_IDX<>0 THENBCODE := SUBSTR(IN_STR,IDX,NEXT_IDX-IDX);SELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BCODE;ELSESELECT NAME  INTO BNAME FROM  HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=IN_STR;END IF;STRRESULT := STRRESULT || BNAME || ',';IN_STR:=SUBSTR(IN_STR,NEXT_IDX+1);IF  NEXT_IDX=0 THEN  IDX:=NEXT_IDX; END IF;exit when (IDX=0 OR LENGTH(IN_STR)=0);end loop;ELSESELECT NAME  INTO BNAME FROM HYT2PFHN.T_PF_DATADICT  WHERE   DDFLD='BNSCOPE'AND CODE=BNSCOPES;STRRESULT :=BNAME;END IF;IF LENGTH(STRRESULT)>0 THENSTRRESULT := SUBSTR(STRRESULT,1,LENGTH(STRRESULT)-1);END IF;RETURN STRRESULT;END GETBNSCOPE;
/

第八步:部署工程

把发布包里的工程 copy 到 E:\hbyz\v22 下,然后找到 Tomcat 的 server.xml 进行配置:

在这里插入图片描述
再启动 Tomcat 就 OK 了

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/335305.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

r语言三维柱状图_R语言三维图的绘制

R语言在可视化方面的地位是毋庸置疑的&#xff0c;但是呢相对于MatalabR语言在三维图形的展示上存在一定的劣势。当然&#xff0c;作为大众的免费软件&#xff0c;指定不服&#xff0c;很多人为此也基于R语言开发了一些相应的三维图的绘制包&#xff0c;像rgl&#xff0c;gg3D&…

从事仪表专业学c语言有用吗,测控专业就业方向有哪些 就业前景比你想象中的好...

测控专业就业方向有哪些?这个专业的就业前景好不好?这些问题都是小伙伴们比较关心的问题&#xff0c;下面随小编一起来了解一下吧。主要就业方向1.智能仪器仪表方向&#xff0c;我觉得这个方向主要是从事仪器仪表&#xff0c;电子产品的软件&#xff0c;硬件研发&#xff0c;…

c语言 将url图片存到本地_python爬虫:爬取男生喜欢的图片

任务目标&#xff1a;1.抓取不同类型的图片2.编写一个GUI界面爬虫程序&#xff0c;打包成exe重新文件3.遇到的难点1.分析如何抓取不同类型的图片首先打开网站&#xff0c;可以看到有如下6个类型的菜单在这里插入图片描述点击不同菜单&#xff0c;发现URL显示如下大胸妹&#xf…

c语言编译后找不到exe,在VS 2015命令提示符中找不到c – rc.exe

我刚刚安装了Windows 10 Creators Update(版本10.0.15063).我安装了多个版本的Visual Studio(2012年,2013年,2015年和2017年).我几周前才安装了VS 2017.问题在“VS2015 x64本机命令提示符”中运行时,CMake(版本3.8.1)不再找到C/C编译器(在VS 2017命令提示符下运行时它可以正常工…

tomcat如何通过配置的方式部署web工程

Workspaces 下有很多工程文件&#xff0c;这个 Workspaces 是 Myeclipse 自动生成的&#xff0c;我们通过 Myeclipse 写的工程都在这个 Workspaces 文件夹下。 我们部署工程到服务器上&#xff0c;就是要每个 WEB 工程里面的 context 文件夹&#xff0c;这个文件夹可以放在 t…

python爬虫源码_Python—爬虫:王者荣耀全套皮肤【附源码】

怎么获取全套皮肤&#xff1f;用钱买&#xff0c;或者用爬虫爬取下来~虽然后者不能穿。这个案例稍微复杂一点&#xff0c;但是一个非常值得学习的项目。具体实现思路&#xff1a;分析网页源代码结构找到合适的入口穷举访问并解析爬取所有英雄所有皮肤图片代码思路/程序流程&…

警惕成教自考_不,保持警惕不会伤害Java。 关于Java许可的评论。

警惕成教自考所以。 Oracle希望通过Java赚钱。 然后&#xff0c;The Register发表了一篇非常对立的文章&#xff0c;上面有一个超级吸引人的标题。 根据他们的消息来源&#xff0c;“ Oracle正在大力加强对声称违反其许可证的Java客户的审计”。 当Twitter诗句对人们批评Oracle…

android colorstatelist_Android 样式系统 | 主题背景属性

在 Android 样式系统系列的前几篇文章中&#xff0c;我们介绍了主题背景与样式的区别&#xff0c;以及为什么说通过主题背景和公共主题背景属性来分解您要实现的内容是一个不错的主意&#xff0c;请点击链接回顾:Android 样式系统 | 主题背景和样式Android 样式系统 | 常见的主…

python二级考试可以用pycharm吗_学Python,Pycharm不能不知道怎么用

栏目介绍必会的Pycharm。我决定把去年写的Python文章整理一个专栏&#xff0c;垃圾的就直接删除&#xff0c;将多篇博文整理成一篇。 工欲善其事必先利其器&#xff0c;Pycharm 是最受欢迎的Python开发工具&#xff0c;它提供的功能非常强大&#xff0c;我尽量把自己用的都写写…

apache camel_Apache Camel Intellij IDEA插件的工作已开始

apache camel仅仅因为圣诞节并不意味着骆驼静止不动。 在23日晚上&#xff0c;我花了一些时间进行研究&#xff0c;并开始研究IDEA的Apache Camel插件的小原型。 它已经存在了我很长时间。 原因是Apache Camel为目录提供了有关工具的大量有用信息。 该目录包含有关每个Camel组…

Final Cut Pro X剪辑影片基本步骤

文章目录一、资源库、事件、项目之间的区别二、制作一个视频的步骤&#xff08;一&#xff09;创建资源库&#xff08;二&#xff09;创建事件(非必需)&#xff08;三&#xff09;导入资源&#xff08;四&#xff09;创建项目&#xff08;五&#xff09;进行剪辑&#xff08;六…

单例模式引发的内存泄漏:_资源泄漏:救援的命令模式

单例模式引发的内存泄漏:多年来&#xff0c; 使用Plumbr进行性能监控时&#xff0c;我遇到了数百个资源泄漏引起的性能问题。 在这篇文章中&#xff0c;我想描述一种最简单的方法来清理资源并避免该问题。 首先&#xff0c;我以电影播放器​​应用程序为例来描述问题。 这种应…

ant构建项目迁移到gradle_Gradle这么弱还跑来面腾讯?

点击上方“刘望舒”&#xff0c;选择“星标”多点在看&#xff0c;就是真爱作者: 厘米姑娘(腾讯开发妹子)| 来源 &#xff1a;公号 码个蛋https://www.jianshu.com/p/1274c1f1b6a4前言在使用Android Studio过程中没少被Gradle坑过&#xff0c;虽然网上有很多简单粗暴的解决方案…

java heroku_使用Spring Boot和Heroku在20分钟内完成Java的单点登录

java heroku建筑物身份管理&#xff0c;包括身份验证和授权&#xff1f; 尝试Stormpath&#xff01; 我们的REST API和强大的Java SDK支持可以消除您的安全风险&#xff0c;并且可以在几分钟内实现。 注册 &#xff0c;再也不会建立auth了&#xff01; 大规模更新 我最初为本文…

如何使用SSH客户端远程操作linux系统,并启动、关闭tomcat和查看后台日志

cd … 表示回退到上一级目录 ls 表示查看当前目录下的所有文件 我们的tomcat安装路径在usr\local\yzmis\下面找 例如你要关闭信誉质量考核系统所在的tomcat&#xff0c;你要进入test下去找到apache-tomcat-6.0.14 再进入bin目录下&#xff0c;然后执行[trserver100 bin]$ ./sh…

模块pdf2image.dll加载失败_Webpack 原理从前端模块化开始

当前主流 JS 模块化方案无模块化CommonJS 规范&#xff0c;nodejs 实现的规范AMD 规范&#xff0c;requirejs 实现的规范CMD 规范&#xff0c;seajs 实现的规范&#xff0c; seajs 与 requirejs 实现原理有很多相似的地方 u ES Modules&#xff0c;当前 js 标准模块化方案注意:…

ios html正则表达式,ios 正则表达式去html标签

ios 正则表达式去html标签[2021-01-27 12:53:55] 简介:php正则表达式去掉html的方法&#xff1a;首先使用“htmlspecialchars_decode” 将特殊的HTML实体转换回普通字符&#xff1b;然后通过正则表达式“preg_replace(/]>/,,$_st系统运维正则表达式概述基础正则表达式扩展正…

java开发五年面试经验_只有经验丰富的开发人员才能教您有关Java的5件事

java开发五年面试经验深入研究Java之前需要了解的所有内容的概述 有许多工具&#xff0c;方法&#xff0c;环境和功能会改变您处理代码的方式&#xff0c;而这些通常是在学年期间不会遇到的。 虽然它在Java开发世界中迈出了第一步&#xff0c;但大多数实际学习都是在工作中进行…

c++调用cplex求解例子_视频教程 | 用Python玩转运筹优化求解器IBM CPLEX(二)

编者按优化求解器对于做运筹学应用的学生来说&#xff0c;意义重大。然而直到今天&#xff0c;放眼望去&#xff0c;全网&#xff08;包括墙外&#xff09;几乎没有一个系统的Cplex中文求解器教程。作为华人运筹学的最大的社区&#xff0c;『运筹OR帷幄』 责无旁贷&#xff0c;…

markdown 行内公式_如何轻松将笔记转为思维导图(Word、Markdown)

目录简介Markdown -> XMindWord -> XMind简介思维导图是一种一种图像式思维的工具&#xff0c;便于我们理解知识之间的逻辑关系。在我们的学习、生活中&#xff0c;我们习惯于使用word、markdown等笔记软件&#xff0c;而较少的使用思维导图。其实&#xff0c;有些时候我…