/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2022/4/14 16:34:37 */ /*==============================================================*/ drop table if exists T_BUILDING; drop table if exists T_DATAEVENT; drop table if exists T_DATAINSPECT; drop table if exists T_DATAMEAS; drop table if exists T_INSPECTITEM; drop table if exists T_MANUFACTURES; drop table if exists T_MEASPOINT; drop table if exists T_PROJINFO; drop table if exists T_SECTION; drop table if exists T_SECTION_CHARACTER; drop table if exists T_SECTION_CONFIG; drop table if exists T_SENSOR; drop table if exists WQ_AAACP_D; drop table if exists WQ_ADLRR_B; drop table if exists WQ_CONFIG_D; drop table if exists WQ_LRSR_B; drop table if exists WQ_MISP_D; drop table if exists WQ_NMISP_D; drop table if exists WQ_PCP_D; drop table if exists WQ_PHNCP_D; drop table if exists WQ_WBHP_D; drop table if exists WQ_WFRINF_B; drop table if exists WQ_WQSINF_B; drop table if exists WQ_WRRINF_B; drop table if exists WQ_WRRLRR_B; drop table if exists WRP_DFR_SRHRDS; drop table if exists WRP_DFR_SRVRDS; drop table if exists WRP_SPG_SPPR; drop table if exists WRP_SPG_SPPW; drop table if exists irrbireach; drop table if exists reservoir_info; drop table if exists reservoir_refdata; drop table if exists st_stbprp_b; drop table if exists st_zvarl_b; drop table if exists wq_lrinf_b; /*==============================================================*/ /* Table: T_BUILDING */ /*==============================================================*/ create table T_BUILDING ( ID bigint(64) not null, STCD varchar(8), IPATH varchar(255), BRIEF varchar(255), ATTACH varchar(255), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); /*==============================================================*/ /* Table: T_DATAEVENT */ /*==============================================================*/ create table T_DATAEVENT ( ID bigint(64) not null, DT datetime, REFTARGET varchar(50) comment 'SYS_LOG 系统日志 SYS_EVENT 整个工程的系统事件记录 T_MEASPOINT与某个测点相关联事件 T_BUILDING与某个建筑物相关联事件 T_DATAMEAS与某条数据记录相关联事件 ', REFID bigint(64), BRIEF varchar(100), XDETAIL text, PERSISTENT tinyint comment '0非1是', CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: T_DATAINSPECT */ /*==============================================================*/ create table T_DATAINSPECT ( ID bigint(64) not null, ITEM_ID bigint(64), DT datetime, JCONCLUSION tinyint(1), NOTE varchar(50), INSPECTMAN varchar(50) comment '可填多人,逗号隔开', DETAILS varchar(250), ATTACH varchar(255), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: T_DATAMEAS */ /*==============================================================*/ create table T_DATAMEAS ( ID bigint(64) not null, POINT_ID bigint(64), DT datetime, V1 float, V2 float, V3 float, MR1 float, MR2 float, MR3 float, R1 float, R2 float, R3 float, EVID1 tinyint comment '0评估测值正常 1评估测值异常 252测值属测量粗差 253未评估 254未获计算成果 255无值(未计算)', EVID2 tinyint comment '0评估测值正常 1评估测值异常 252测值属测量粗差 253未评估 254未获计算成果 255无值(未计算)', EVID3 tinyint comment '0评估测值正常 1评估测值异常 252测值属测量粗差 253未评估 254未获计算成果 255无值(未计算)', VPROP tinyint, primary key (ID) ); /*==============================================================*/ /* Table: T_INSPECTITEM */ /*==============================================================*/ create table T_INSPECTITEM ( ID bigint(64) not null, INAME varchar(50), CRITICALGV tinyint(1), JUDGE_ITEM varchar(50), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: T_MANUFACTURES */ /*==============================================================*/ create table T_MANUFACTURES ( ID bigint(64) not null, INAME varchar(255), ADDRESS varchar(50), CONTACT_PERSON varchar(50), EMAIL varchar(50), TELNO varchar(20), FAXNO varchar(20), WEBSITE varchar(50), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); /*==============================================================*/ /* Table: T_MEASPOINT */ /*==============================================================*/ create table T_MEASPOINT ( ID bigint(64) not null, DCODE varchar(50), SENSORID bigint(64), BUILDINGID bigint(64), MANUFACTUREID bigint(64), SENSORALIAS varchar(50), SDATE datetime comment '年月日时分秒', DATYPE tinyint(1) comment '0自动采集 1人工采集 10其他', RUNSTATE tinyint(1) comment '1运行 0停用', IMPORTANCE tinyint(1) comment '0一般 1重要 2很重要', ATTACH varchar(255), DCODE1 varchar(50), STAKE_SIGN varchar(50), BASE_H numeric(9,3), LGTD numeric(11,9), LTTD numeric(12,9), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); /*==============================================================*/ /* Table: T_PROJINFO */ /*==============================================================*/ create table T_PROJINFO ( ID bigint(64) not null, PROJ_NAME varchar(50), PROJ_CODE varchar(50), STCD varchar(8), START_DATE date, COMPLETE_DATE date, STORE_WATER_DATE date, LOCATION varchar(50), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); alter table T_PROJINFO comment '存储工程信息'; /*==============================================================*/ /* Table: T_SECTION */ /*==============================================================*/ create table T_SECTION ( ID bigint(64) not null, SECTION_NO char(10) comment '一个水库可以拥有多个断面,编号是从 0 开始的十进制整数', SECTION_NAME varchar(50), BUILDING_ID bigint(64), WALL_TYPE char(1) comment '1)防渗心墙;2)防渗斜墙', DAMLEN numeric(7,3), DAMWD numeric(7,3), TEXT varchar(50), ATTACH varchar(255), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); /*==============================================================*/ /* Table: T_SECTION_CHARACTER */ /*==============================================================*/ create table T_SECTION_CHARACTER ( SECTION_NO char(10) not null comment '断面编号', CHARACTER_NO char(10) not null comment '特征点编号', CHARACTER_NM varchar(50) comment '特征点名称', REDI numeric(5,2) comment '起点距', POEL numeric(7,3) comment '高程', UPDATE_TIME datetime comment '更新时间', primary key (SECTION_NO, CHARACTER_NO) ); /*==============================================================*/ /* Table: T_SECTION_CONFIG */ /*==============================================================*/ create table T_SECTION_CONFIG ( ID bigint(64) not null, SECTION_NO varchar(255), OPINION char(1), XZHOU numeric(11,2), YMAX numeric(11,2), YMIN numeric(11,2), WARM numeric(11,2), primary key (ID) ); alter table T_SECTION_CONFIG comment '断面与测点关系表'; /*==============================================================*/ /* Table: T_SENSOR */ /*==============================================================*/ create table T_SENSOR ( ID bigint(64) not null, ICLASS varchar(50), INAME varchar(50), V numeric(9,3), MR numeric(9,3), R numeric(9,3), V_NUM int(7), MR_NUM int(7), R_NUM int(7), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) comment '0未删除 1已删除', primary key (ID) ); /*==============================================================*/ /* Table: WQ_AAACP_D */ /*==============================================================*/ create table WQ_AAACP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, ERLJW numeric(6,4), SLJW numeric(6,4), SILHT numeric(7,5), SXJW numeric(5,3), ERLYW12 numeric(6,4), HYLBW numeric(5,3), HYQL numeric(6,4), LYX numeric(5,3), ERLYX11 numeric(5,3), ERLYX12 numeric(5,3), SLYX numeric(5,3), SILYX numeric(5,3), LDERX numeric(5,3), LLDERX numeric(6,4), JQ numeric(5,3), YQ numeric(5,3), SLYQ numeric(5,3), BXQ numeric(5,3), BXXAN numeric(6,4), BXQI numeric(5,3), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_ADLRR_B */ /*==============================================================*/ create table WQ_ADLRR_B ( ADDVCD varchar(6), LRCD varchar(8) ); /*==============================================================*/ /* Table: WQ_CONFIG_D */ /*==============================================================*/ create table WQ_CONFIG_D ( STCD varchar(8) not null, TYPE varchar(255), VALUE varchar(255), primary key (STCD) ); /*==============================================================*/ /* Table: WQ_LRSR_B */ /*==============================================================*/ create table WQ_LRSR_B ( LRCD varchar(8), STCD varchar(8) ); /*==============================================================*/ /* Table: WQ_MISP_D */ /*==============================================================*/ create table WQ_MISP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, CA numeric(5,2), MG numeric(5,2), K numeric(5,2), NA numeric(5,2), KNA numeric(5,2), CR6 numeric(5,3), TCR numeric(5,3), HG numeric(7,5), CU numeric(7,4), PB numeric(7,5), CD numeric(7,5), ZN numeric(6,4), FE numeric(4,2), MN numeric(4,2), AG numeric(7,5), NI numeric(7,5), MO numeric(7,5), CO numeric(7,5), BE numeric(7,5), SB numeric(7,5), BA numeric(7,5), V numeric(7,5), TI numeric(6,4), TL numeric(8,6), AL numeric(7,4), THRD numeric(6,2), ARS numeric(7,5), SE numeric(7,5), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_NMISP_D */ /*==============================================================*/ create table WQ_NMISP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, DOX numeric(4,2), CODMN numeric(4,1), CODCR numeric(7,1), BOD5 numeric(5,1), SO4 numeric(6,2), TIC numeric(7,2), TN numeric(5,2), NH3N numeric(7,2), NH3 numeric(4,3), NO2 numeric(5,3), NO3 numeric(5,2), KN numeric(4,2), S2 numeric(5,2), CN numeric(5,3), TCN numeric(5,3), EP numeric(6,4), TP numeric(5,3), YP numeric(6,4), PO4 numeric(5,3), DTP numeric(5,3), F numeric(5,2), CL numeric(7,2), FCHL numeric(5,3), ACHL numeric(5,3), TCHL numeric(5,3), I numeric(5,3), SI numeric(5,3), B numeric(4,2), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_PCP_D */ /*==============================================================*/ create table WQ_PCP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, AIRT numeric(3,1), ATM int(5), ILMT int(4), ILMI int(5), WT numeric(3,1), PH numeric(4,2), COND int(5), REDOX numeric(5,1), CHROMA int(3), SMELL char(1), NEOBJ char(40), TURB int(3), CLARITY numeric(4,2), SS numeric(7,1), MNDG numeric(7,2), ACID numeric(4,2), TALKY numeric(6,2), HCO3 numeric(5,2), CO3 numeric(5,2), DSCO2 numeric(4,2), AGCO2 numeric(4,2), TSOLID numeric(7,1), TDS numeric(7,2), TALATV numeric(6,4), TBTATV numeric(6,2), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_PHNCP_D */ /*==============================================================*/ create table WQ_PHNCP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, VLPH numeric(5,3), BENF numeric(5,2), ERLBF24 numeric(6,4), SLBF246 numeric(7,5), WLF numeric(7,6), SXJF246 numeric(5,3), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_WBHP_D */ /*==============================================================*/ create table WQ_WBHP_D ( STCD char(8) not null, PRPNM char(1) not null, LYNM char(1) not null, WBTP char(1) not null, SPT datetime not null, BCTC varchar(10), TCG varchar(10), FCG varchar(10), FS varchar(10), NT varchar(256), primary key (STCD, PRPNM, LYNM, WBTP, SPT) ); /*==============================================================*/ /* Table: WQ_WFRINF_B */ /*==============================================================*/ create table WQ_WFRINF_B ( ID bigint(64) not null, WFRCD varchar(14), WFRNM varchar(60), WFRSCSNM varchar(30), WFRECSNM varchar(30), BSNM varchar(30), HNNM varchar(30), RVNM varchar(30), ADDVCD char(6), WFRLN numeric(6,1) comment 'km', WFRAR numeric(6,2) comment '平方千米', WFRWQT varchar(6), WFRWFO varchar(40), NT varchar(256), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: WQ_WQSINF_B */ /*==============================================================*/ create table WQ_WQSINF_B ( ID bigint(64) not null, STCD char(8), STNM varchar(30), STGRD char(1) comment '1.国家级(重点) 2..国家级(一般) 3.省级 4地(市)级', BSNM varchar(30), HNNM varchar(30), RVNM varchar(30), LGTD numeric(12,9), LTTD numeric(11,9), STLC varchar(40), ADDVCD varchar(6), WRRCD varchar(7), WFRCD varchar(14), ADAG varchar(40), MNAG varchar(40), MNFRQ int(2) comment '次/年', ATMN int(1), ESSTYM date, WDSTYM date, NT varchar(256), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: WQ_WRRINF_B */ /*==============================================================*/ create table WQ_WRRINF_B ( ID bigint(64) not null, WRRCD varchar(7), WRRNM varchar(60), WRR5R numeric(9,2), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID) ); /*==============================================================*/ /* Table: WQ_WRRLRR_B */ /*==============================================================*/ create table WQ_WRRLRR_B ( WRRCD varchar(7), LRCD varchar(8) ); /*==============================================================*/ /* Table: WRP_DFR_SRHRDS */ /*==============================================================*/ create table WRP_DFR_SRHRDS ( DCODE varchar(50) not null, TIME datetime, XHRDS numeric(8,2), YHRDS numeric(8,2), ESLG numeric(9,6), NRLT numeric(8,6), primary key (DCODE) ); /*==============================================================*/ /* Table: WRP_DFR_SRVRDS */ /*==============================================================*/ create table WRP_DFR_SRVRDS ( DCODE varchar(50) not null, TIME datetime, VRDS numeric(8,2), INEL numeric(7,3), primary key (DCODE) ); /*==============================================================*/ /* Table: WRP_SPG_SPPR */ /*==============================================================*/ create table WRP_SPG_SPPR ( DCODE varchar(50) not null comment '测点编码', TIME datetime, SPPRWM numeric(7,3), WATER_LEVEL numeric(7,3) comment '通过渗压换算得来', TM numeric(4,1), primary key (DCODE) ); /*==============================================================*/ /* Table: WRP_SPG_SPPW */ /*==============================================================*/ create table WRP_SPG_SPPW ( DCODE varchar(50) not null, TIME datetime, SPPRWL numeric(7,3), TM numeric(4,1), primary key (DCODE) ); /*==============================================================*/ /* Table: irrbireach */ /*==============================================================*/ create table irrbireach ( ID bigint(64) not null, RIVER_CODE char(5) not null, RIVER_NAME varchar(20), RIVER_WIDTH numeric(8,2), RIVER_FLUX numeric(8,2), COORDINATESET varchar(1000), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID, RIVER_CODE) ); /*==============================================================*/ /* Table: reservoir_info */ /*==============================================================*/ create table reservoir_info ( ID bigint(64) not null, STCD varchar(8) not null, NAME varchar(100), LOCATION varchar(50), VILLAGE varchar(50), ROADLENGTH float, ROADCONDITIION varchar(40), BUILDDATE date, COMPLETEDDATE date, DISCHARGE float, RAINAREA float, DESIGNEDFLOODFLOW float, CHEDKEDFLOODFLOW float, DESIGNEDFILLAREA float, DESIGNEDTOTALFLOW float, CHECDEDTOTALFLOW float, AVERAGERAINFALL float, DESIGNEDMAXFLOW float, CHECKEDMAXFLOW float, VOLUME float, CHECKEDFLOODLEVEL float, HISTORICALMAXLEVEL float, FLOODCONTROLVOLUME float, DESIGNEDFLOODLEVEL float, MAXLEVELTIME datetime, UTILIZABLEVOLUME float, NORRMALLEVEL float, FLOODDETENTIONVOLUME float, DEADLEVEL float, AREA_CODE varchar(100), LRCD varchar(8), SZHLDM varchar(8), DONGJ float, BEIW float, MJFLSSCNWL numeric(6,2), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID, STCD) ); /*==============================================================*/ /* Table: reservoir_refdata */ /*==============================================================*/ create table reservoir_refdata ( STCD varchar(8), REFSTCD char(10), REFQPOINT varchar(50), REFZPOINT varchar(50) ); /*==============================================================*/ /* Table: st_stbprp_b */ /*==============================================================*/ create table st_stbprp_b ( ID bigint(64) not null, STCD char(8) not null, STNM char(30), RVNM char(30), HNNM char(30), BSNM char(30), LGTD char(10), LTTD char(10), STLC char(50), ADDVCD char(6), MDBZ numeric(6,2), MDPR numeric(4,2), DTMNM char(16), DTMEL numeric(7,3), STTP char(2), DFRTMS numeric(2), FRITM char(32), FRGRD char(1), BGFRYM char(6), EDFRYM char(6), ADMAUTH char(10), STBK char(1), DRNA numeric(7,0), PHCD char(6), ORG_ID char(30), RVID char(30), HNID char(30), BSID char(30), NLGTD numeric(15,6), NLTTD numeric(15,6), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2), primary key (ID, STCD) ); /*==============================================================*/ /* Table: st_zvarl_b */ /*==============================================================*/ create table st_zvarl_b ( ID bigint(64), STCD varchar(8), MSTM datetime, PTNO int(4), RZ numeric(7,3), W numeric(9,3), WSFA numeric(7,3), MODITIME datetime ); /*==============================================================*/ /* Table: wq_lrinf_b */ /*==============================================================*/ create table wq_lrinf_b ( ID bigint(64), LRCD char(8), WATP char(1), LRNM varchar(60), LRAR numeric(9,3), RSCP numeric(9,3), COORDINATESET varchar(2000), CREATE_USER bigint(64), CREATE_DEPT bigint(64), CREATE_TIME datetime, UPDATE_USER bigint(64), UPDATE_TIME datetime, STATUS int(2), IS_DELETED int(2) );