script.sql 308 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354
  1. USE [master]
  2. GO
  3. /****** Object: Database [HT20210416-005] Script Date: 05/20/2021 19:22:30 ******/
  4. CREATE DATABASE [HT20210416-005] ON PRIMARY
  5. ( NAME = N'CCJQ_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\HT20210416-005.mdf' , SIZE = 4736KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
  6. LOG ON
  7. ( NAME = N'CCJQ_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\HT20210416-005_log.ldf' , SIZE = 1024KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
  8. GO
  9. ALTER DATABASE [HT20210416-005] SET COMPATIBILITY_LEVEL = 80
  10. GO
  11. IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
  12. begin
  13. EXEC [HT20210416-005].[dbo].[sp_fulltext_database] @action = 'disable'
  14. end
  15. GO
  16. ALTER DATABASE [HT20210416-005] SET ANSI_NULL_DEFAULT OFF
  17. GO
  18. ALTER DATABASE [HT20210416-005] SET ANSI_NULLS OFF
  19. GO
  20. ALTER DATABASE [HT20210416-005] SET ANSI_PADDING OFF
  21. GO
  22. ALTER DATABASE [HT20210416-005] SET ANSI_WARNINGS OFF
  23. GO
  24. ALTER DATABASE [HT20210416-005] SET ARITHABORT OFF
  25. GO
  26. ALTER DATABASE [HT20210416-005] SET AUTO_CLOSE OFF
  27. GO
  28. ALTER DATABASE [HT20210416-005] SET AUTO_CREATE_STATISTICS ON
  29. GO
  30. ALTER DATABASE [HT20210416-005] SET AUTO_SHRINK OFF
  31. GO
  32. ALTER DATABASE [HT20210416-005] SET AUTO_UPDATE_STATISTICS ON
  33. GO
  34. ALTER DATABASE [HT20210416-005] SET CURSOR_CLOSE_ON_COMMIT OFF
  35. GO
  36. ALTER DATABASE [HT20210416-005] SET CURSOR_DEFAULT GLOBAL
  37. GO
  38. ALTER DATABASE [HT20210416-005] SET CONCAT_NULL_YIELDS_NULL OFF
  39. GO
  40. ALTER DATABASE [HT20210416-005] SET NUMERIC_ROUNDABORT OFF
  41. GO
  42. ALTER DATABASE [HT20210416-005] SET QUOTED_IDENTIFIER OFF
  43. GO
  44. ALTER DATABASE [HT20210416-005] SET RECURSIVE_TRIGGERS OFF
  45. GO
  46. ALTER DATABASE [HT20210416-005] SET DISABLE_BROKER
  47. GO
  48. ALTER DATABASE [HT20210416-005] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
  49. GO
  50. ALTER DATABASE [HT20210416-005] SET DATE_CORRELATION_OPTIMIZATION OFF
  51. GO
  52. ALTER DATABASE [HT20210416-005] SET TRUSTWORTHY OFF
  53. GO
  54. ALTER DATABASE [HT20210416-005] SET ALLOW_SNAPSHOT_ISOLATION OFF
  55. GO
  56. ALTER DATABASE [HT20210416-005] SET PARAMETERIZATION SIMPLE
  57. GO
  58. ALTER DATABASE [HT20210416-005] SET READ_COMMITTED_SNAPSHOT OFF
  59. GO
  60. ALTER DATABASE [HT20210416-005] SET HONOR_BROKER_PRIORITY OFF
  61. GO
  62. ALTER DATABASE [HT20210416-005] SET READ_WRITE
  63. GO
  64. ALTER DATABASE [HT20210416-005] SET RECOVERY SIMPLE
  65. GO
  66. ALTER DATABASE [HT20210416-005] SET MULTI_USER
  67. GO
  68. ALTER DATABASE [HT20210416-005] SET PAGE_VERIFY TORN_PAGE_DETECTION
  69. GO
  70. ALTER DATABASE [HT20210416-005] SET DB_CHAINING OFF
  71. GO
  72. EXEC sys.sp_db_vardecimal_storage_format N'HT20210416-005', N'ON'
  73. GO
  74. USE [HT20210416-005]
  75. GO
  76. /****** Object: Table [dbo].[周期类别] Script Date: 05/20/2021 19:22:32 ******/
  77. SET ANSI_NULLS ON
  78. GO
  79. SET QUOTED_IDENTIFIER ON
  80. GO
  81. SET ANSI_PADDING ON
  82. GO
  83. CREATE TABLE [dbo].[周期类别](
  84. [周期类别编号] [char](1) NOT NULL,
  85. [周期类别名称] [varchar](256) NULL,
  86. CONSTRAINT [PK_周期类别] PRIMARY KEY CLUSTERED
  87. (
  88. [周期类别编号] ASC
  89. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  90. ) ON [PRIMARY]
  91. GO
  92. SET ANSI_PADDING OFF
  93. GO
  94. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1.月度
  95. 2.季度
  96. 3.年度' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'周期类别'
  97. GO
  98. INSERT [dbo].[周期类别] ([周期类别编号], [周期类别名称]) VALUES (N'1', N'月')
  99. INSERT [dbo].[周期类别] ([周期类别编号], [周期类别名称]) VALUES (N'2', N'季')
  100. INSERT [dbo].[周期类别] ([周期类别编号], [周期类别名称]) VALUES (N'3', N'年')
  101. /****** Object: Table [dbo].[整理数据规则] Script Date: 05/20/2021 19:22:32 ******/
  102. SET ANSI_NULLS ON
  103. GO
  104. SET QUOTED_IDENTIFIER ON
  105. GO
  106. SET ANSI_PADDING ON
  107. GO
  108. CREATE TABLE [dbo].[整理数据规则](
  109. [ID] [int] IDENTITY(1,1) NOT NULL,
  110. [源设备ID] [varchar](50) NOT NULL,
  111. [源表名] [varchar](50) NOT NULL,
  112. [源表列名] [varchar](50) NOT NULL,
  113. [目的设备ID] [varchar](50) NOT NULL,
  114. [目的表名] [varchar](50) NOT NULL,
  115. [目的模板表] [varchar](50) NULL,
  116. [目的表列名] [varchar](50) NOT NULL,
  117. [数据类型] [varchar](50) NOT NULL,
  118. [整理数据间隔] [varchar](50) NOT NULL,
  119. [整理数据延时] [varchar](50) NOT NULL
  120. ) ON [PRIMARY]
  121. GO
  122. SET ANSI_PADDING OFF
  123. GO
  124. SET IDENTITY_INSERT [dbo].[整理数据规则] ON
  125. INSERT [dbo].[整理数据规则] ([ID], [源设备ID], [源表名], [源表列名], [目的设备ID], [目的表名], [目的模板表], [目的表列名], [数据类型], [整理数据间隔], [整理数据延时]) VALUES (1, N'150', N'历史记录_000150_2017', N'设备状态,通讯状态,数据来源,压力,电池电压', N'151', N'历史记录_000151_2017', NULL, N'设备状态,通讯状态,数据来源,压力,电池电压', N'日', N'30', N'2')
  126. SET IDENTITY_INSERT [dbo].[整理数据规则] OFF
  127. /****** Object: Table [dbo].[用水记录表] Script Date: 05/20/2021 19:22:32 ******/
  128. SET ANSI_NULLS ON
  129. GO
  130. SET QUOTED_IDENTIFIER ON
  131. GO
  132. SET ANSI_PADDING ON
  133. GO
  134. CREATE TABLE [dbo].[用水记录表](
  135. [ID] [int] IDENTITY(1,1) NOT NULL,
  136. [设备ID] [int] NOT NULL,
  137. [用水户ID] [int] NOT NULL,
  138. [用户卡号] [varchar](50) NOT NULL,
  139. [卡序列号] [varchar](50) NOT NULL,
  140. [记录来源] [varchar](50) NULL,
  141. [开泵时间] [datetime] NOT NULL,
  142. [开泵卡剩余水量] [numeric](18, 1) NOT NULL,
  143. [开泵卡剩余电量] [numeric](18, 1) NOT NULL,
  144. [关泵时间] [datetime] NOT NULL,
  145. [关泵卡剩余水量] [numeric](18, 1) NOT NULL,
  146. [关泵卡剩余电量] [numeric](18, 1) NOT NULL,
  147. [灌溉时长] [numeric](18, 0) NULL,
  148. [本次用水量] [numeric](18, 1) NOT NULL,
  149. [本次用电量] [numeric](18, 1) NOT NULL,
  150. [年累计用水量] [numeric](18, 1) NOT NULL,
  151. [年累计用电量] [numeric](18, 1) NOT NULL,
  152. [年可开采量] [numeric](18, 1) NOT NULL,
  153. [年剩余可开采量] [numeric](18, 1) NOT NULL,
  154. CONSTRAINT [PK_用水记录] PRIMARY KEY CLUSTERED
  155. (
  156. [ID] ASC
  157. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  158. ) ON [PRIMARY]
  159. GO
  160. SET ANSI_PADDING OFF
  161. GO
  162. /****** Object: Table [dbo].[用水计划] Script Date: 05/20/2021 19:22:32 ******/
  163. SET ANSI_NULLS ON
  164. GO
  165. SET QUOTED_IDENTIFIER ON
  166. GO
  167. SET ANSI_PADDING ON
  168. GO
  169. CREATE TABLE [dbo].[用水计划](
  170. [ID] [int] IDENTITY(1,1) NOT NULL,
  171. [名称] [varchar](50) NULL,
  172. [类别] [varchar](50) NULL,
  173. [所属ID] [varchar](50) NULL,
  174. [年] [varchar](50) NULL,
  175. [日期类型] [varchar](50) NULL,
  176. [计划用量] [varchar](500) NULL,
  177. [开始时间] [varchar](50) NULL,
  178. [监测量] [varchar](50) NULL,
  179. [操作员ID] [varchar](50) NULL,
  180. [创建时间] [datetime] NULL,
  181. CONSTRAINT [PK_用水计划] PRIMARY KEY CLUSTERED
  182. (
  183. [ID] ASC
  184. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  185. ) ON [PRIMARY]
  186. GO
  187. SET ANSI_PADDING OFF
  188. GO
  189. /****** Object: Table [dbo].[用水户定额] Script Date: 05/20/2021 19:22:32 ******/
  190. SET ANSI_NULLS ON
  191. GO
  192. SET QUOTED_IDENTIFIER ON
  193. GO
  194. CREATE TABLE [dbo].[用水户定额](
  195. [ID] [int] IDENTITY(1,1) NOT NULL,
  196. [用水户ID] [int] NOT NULL,
  197. [年份] [int] NOT NULL,
  198. [单位定额ID] [int] NULL,
  199. [面积] [numeric](18, 2) NULL,
  200. [定额] [numeric](18, 1) NULL,
  201. CONSTRAINT [PK_用水户定额] PRIMARY KEY CLUSTERED
  202. (
  203. [ID] ASC
  204. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  205. ) ON [PRIMARY]
  206. GO
  207. /****** Object: Table [dbo].[用水户] Script Date: 05/20/2021 19:22:32 ******/
  208. SET ANSI_NULLS ON
  209. GO
  210. SET QUOTED_IDENTIFIER ON
  211. GO
  212. SET ANSI_PADDING ON
  213. GO
  214. CREATE TABLE [dbo].[用水户](
  215. [ID] [int] IDENTITY(1,1) NOT NULL,
  216. [名称] [varchar](50) NOT NULL,
  217. [管理ID] [int] NOT NULL,
  218. [户号] [varchar](50) NOT NULL,
  219. [状态] [varchar](50) NOT NULL,
  220. [水价ID] [int] NOT NULL,
  221. [电价ID] [int] NOT NULL,
  222. [累计购水金额] [numeric](18, 2) NOT NULL,
  223. [累计购电金额] [numeric](18, 2) NOT NULL,
  224. [累计购水量] [numeric](18, 1) NULL,
  225. [累计购电量] [numeric](18, 1) NULL,
  226. [累计用水量] [numeric](18, 1) NULL,
  227. [累计用电量] [numeric](18, 1) NULL,
  228. [年累计购水量] [numeric](18, 1) NULL,
  229. [年累计购电量] [numeric](18, 1) NULL,
  230. [最后用水时间] [varchar](50) NOT NULL,
  231. [详细信息] [varchar](5000) NULL,
  232. CONSTRAINT [PK_用水户] PRIMARY KEY CLUSTERED
  233. (
  234. [ID] ASC
  235. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  236. ) ON [PRIMARY]
  237. GO
  238. SET ANSI_PADDING OFF
  239. GO
  240. /****** Object: Table [dbo].[用户信息] Script Date: 05/20/2021 19:22:32 ******/
  241. SET ANSI_NULLS ON
  242. GO
  243. SET QUOTED_IDENTIFIER ON
  244. GO
  245. SET ANSI_PADDING ON
  246. GO
  247. CREATE TABLE [dbo].[用户信息](
  248. [ID] [int] IDENTITY(1,1) NOT NULL,
  249. [用户名] [varchar](50) NOT NULL,
  250. [密码] [varchar](50) NOT NULL,
  251. [角色ID] [int] NOT NULL,
  252. [管理ID] [int] NOT NULL,
  253. [注册时间] [datetime] NULL,
  254. [所属地] [varchar](50) NULL,
  255. [上次登录时间] [datetime] NULL,
  256. [自定义测点] [varchar](20) NULL,
  257. [地图配置] [varchar](200) NULL,
  258. [操作密码] [varchar](50) NULL,
  259. [密码错误次数] [int] NULL,
  260. [锁定时间] [datetime] NULL,
  261. CONSTRAINT [PK_用户信息] PRIMARY KEY CLUSTERED
  262. (
  263. [ID] ASC
  264. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  265. ) ON [PRIMARY]
  266. GO
  267. SET ANSI_PADDING OFF
  268. GO
  269. SET IDENTITY_INSERT [dbo].[用户信息] ON
  270. INSERT [dbo].[用户信息] ([ID], [用户名], [密码], [角色ID], [管理ID], [注册时间], [所属地], [上次登录时间], [自定义测点], [地图配置], [操作密码], [密码错误次数], [锁定时间]) VALUES (1, N'data86', N'Data86@', 1, 1, CAST(0x00009EED00000000 AS DateTime), N'', CAST(0x0000ABB200BDAB78 AS DateTime), N'否', NULL, NULL, NULL, NULL)
  271. INSERT [dbo].[用户信息] ([ID], [用户名], [密码], [角色ID], [管理ID], [注册时间], [所属地], [上次登录时间], [自定义测点], [地图配置], [操作密码], [密码错误次数], [锁定时间]) VALUES (2, N'admin', N'123', 2, 1, CAST(0x00009EED00000000 AS DateTime), N'', CAST(0x0000ACA600E64F60 AS DateTime), N'否', N'经度:118.202278,纬度:39.713083,缩放级别:13', N'123456', 0, CAST(0x0000000000000000 AS DateTime))
  272. SET IDENTITY_INSERT [dbo].[用户信息] OFF
  273. /****** Object: Table [dbo].[用户级别] Script Date: 05/20/2021 19:22:32 ******/
  274. SET ANSI_NULLS ON
  275. GO
  276. SET QUOTED_IDENTIFIER ON
  277. GO
  278. SET ANSI_PADDING ON
  279. GO
  280. CREATE TABLE [dbo].[用户级别](
  281. [ID] [int] IDENTITY(1,1) NOT NULL,
  282. [级别名称] [varchar](50) NOT NULL,
  283. CONSTRAINT [PK_用户级别] PRIMARY KEY CLUSTERED
  284. (
  285. [ID] ASC
  286. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  287. ) ON [PRIMARY]
  288. GO
  289. SET ANSI_PADDING OFF
  290. GO
  291. SET IDENTITY_INSERT [dbo].[用户级别] ON
  292. INSERT [dbo].[用户级别] ([ID], [级别名称]) VALUES (1, N'data86')
  293. INSERT [dbo].[用户级别] ([ID], [级别名称]) VALUES (2, N'admin')
  294. INSERT [dbo].[用户级别] ([ID], [级别名称]) VALUES (3, N'市级')
  295. INSERT [dbo].[用户级别] ([ID], [级别名称]) VALUES (4, N'区级')
  296. INSERT [dbo].[用户级别] ([ID], [级别名称]) VALUES (5, N'单位级')
  297. SET IDENTITY_INSERT [dbo].[用户级别] OFF
  298. /****** Object: Table [dbo].[用户辅助字段] Script Date: 05/20/2021 19:22:32 ******/
  299. SET ANSI_NULLS ON
  300. GO
  301. SET QUOTED_IDENTIFIER ON
  302. GO
  303. SET ANSI_PADDING ON
  304. GO
  305. CREATE TABLE [dbo].[用户辅助字段](
  306. [ID] [int] IDENTITY(1,1) NOT NULL,
  307. [字段名] [varchar](50) NOT NULL,
  308. [字段类型] [varchar](100) NOT NULL,
  309. [是否必填] [varchar](50) NOT NULL,
  310. [字段提示] [varchar](50) NULL,
  311. PRIMARY KEY CLUSTERED
  312. (
  313. [ID] ASC
  314. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  315. ) ON [PRIMARY]
  316. GO
  317. SET ANSI_PADDING OFF
  318. GO
  319. SET IDENTITY_INSERT [dbo].[用户辅助字段] ON
  320. INSERT [dbo].[用户辅助字段] ([ID], [字段名], [字段类型], [是否必填], [字段提示]) VALUES (1, N'工程类型', N'CDB工程信息-ID-工程信息', N'是', NULL)
  321. INSERT [dbo].[用户辅助字段] ([ID], [字段名], [字段类型], [是否必填], [字段提示]) VALUES (2, N'编号', N'T', N'否', NULL)
  322. INSERT [dbo].[用户辅助字段] ([ID], [字段名], [字段类型], [是否必填], [字段提示]) VALUES (3, N'层面编号', N'C表层-中层-底层-其他', N'否', NULL)
  323. SET IDENTITY_INSERT [dbo].[用户辅助字段] OFF
  324. /****** Object: Table [dbo].[用户辅助信息] Script Date: 05/20/2021 19:22:32 ******/
  325. SET ANSI_NULLS ON
  326. GO
  327. SET QUOTED_IDENTIFIER ON
  328. GO
  329. SET ANSI_PADDING ON
  330. GO
  331. CREATE TABLE [dbo].[用户辅助信息](
  332. [ID] [int] IDENTITY(1,1) NOT NULL,
  333. [用户ID] [int] NOT NULL,
  334. [名称] [varchar](50) NOT NULL,
  335. [值] [varchar](500) NULL,
  336. PRIMARY KEY CLUSTERED
  337. (
  338. [ID] ASC
  339. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  340. ) ON [PRIMARY]
  341. GO
  342. SET ANSI_PADDING OFF
  343. GO
  344. SET IDENTITY_INSERT [dbo].[用户辅助信息] ON
  345. INSERT [dbo].[用户辅助信息] ([ID], [用户ID], [名称], [值]) VALUES (1, 2, N'工程类型', N'1')
  346. INSERT [dbo].[用户辅助信息] ([ID], [用户ID], [名称], [值]) VALUES (2, 2, N'编号', N'')
  347. INSERT [dbo].[用户辅助信息] ([ID], [用户ID], [名称], [值]) VALUES (3, 2, N'层面编号', N'')
  348. SET IDENTITY_INSERT [dbo].[用户辅助信息] OFF
  349. /****** Object: Table [dbo].[用户登录记录] Script Date: 05/20/2021 19:22:32 ******/
  350. SET ANSI_NULLS ON
  351. GO
  352. SET QUOTED_IDENTIFIER ON
  353. GO
  354. SET ANSI_PADDING ON
  355. GO
  356. CREATE TABLE [dbo].[用户登录记录](
  357. [ID] [int] IDENTITY(1,1) NOT NULL,
  358. [记录时间] [datetime] NOT NULL,
  359. [用户ID] [int] NOT NULL,
  360. [登录信息] [varchar](50) NOT NULL,
  361. CONSTRAINT [PK_用户登录记录] PRIMARY KEY CLUSTERED
  362. (
  363. [ID] ASC
  364. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  365. ) ON [PRIMARY]
  366. GO
  367. SET ANSI_PADDING OFF
  368. GO
  369. SET IDENTITY_INSERT [dbo].[用户登录记录] ON
  370. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (1, CAST(0x0000AC960091FD70 AS DateTime), 2, N'登入,IP:::1')
  371. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (2, CAST(0x0000AC96009266E8 AS DateTime), 2, N'登入,IP:::1')
  372. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (3, CAST(0x0000AC960092EB54 AS DateTime), 2, N'登入,IP:::1')
  373. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (4, CAST(0x0000AC9600938D0C AS DateTime), 2, N'登入,IP:::1')
  374. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (5, CAST(0x0000AC960093F1D4 AS DateTime), 2, N'登出,IP:::1')
  375. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (6, CAST(0x0000AC96009421E0 AS DateTime), 2, N'登入,IP:::1')
  376. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (7, CAST(0x0000AC960094DFB8 AS DateTime), 2, N'登入,IP:::1')
  377. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (8, CAST(0x0000AC9600979A28 AS DateTime), 2, N'登入,IP:::1')
  378. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (9, CAST(0x0000AC960098E6F8 AS DateTime), 2, N'登入,IP:::1')
  379. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (10, CAST(0x0000AC9600990B4C AS DateTime), 2, N'登入,IP:::1')
  380. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (11, CAST(0x0000AC9600E570B8 AS DateTime), 2, N'登入,IP:10.1.1.2')
  381. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (12, CAST(0x0000AC9600EAA074 AS DateTime), 2, N'登入,IP:10.1.1.2')
  382. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (13, CAST(0x0000AC9600F017AC AS DateTime), 2, N'登入,IP:10.1.1.2')
  383. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (14, CAST(0x0000AC9600F3A3E0 AS DateTime), 2, N'登入,IP:10.1.1.2')
  384. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (15, CAST(0x0000AC9600F77664 AS DateTime), 2, N'登入,IP:10.1.1.2')
  385. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (16, CAST(0x0000AC9600F7C290 AS DateTime), 2, N'登入,IP:10.1.1.2')
  386. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (17, CAST(0x0000ACA00095AF24 AS DateTime), 2, N'登入,IP:::1')
  387. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (18, CAST(0x0000ACA000997140 AS DateTime), 2, N'登入,IP:::1')
  388. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (19, CAST(0x0000ACA000A96E9C AS DateTime), 2, N'登入,IP:::1')
  389. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (20, CAST(0x0000ACA000B3B578 AS DateTime), 2, N'登入,IP:::1')
  390. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (21, CAST(0x0000ACA000B3F970 AS DateTime), 2, N'登入,IP:::1')
  391. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (22, CAST(0x0000ACA000B44218 AS DateTime), 2, N'登入,IP:::1')
  392. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (23, CAST(0x0000ACA000B4ED30 AS DateTime), 2, N'登入,IP:::1')
  393. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (24, CAST(0x0000ACA000B5B594 AS DateTime), 2, N'登入,IP:::1')
  394. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (25, CAST(0x0000ACA000B5FBE4 AS DateTime), 2, N'登入,IP:::1')
  395. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (26, CAST(0x0000ACA000B66B38 AS DateTime), 2, N'登入,IP:::1')
  396. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (27, CAST(0x0000ACA000B6C0C4 AS DateTime), 2, N'登入,IP:10.1.1.2')
  397. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (28, CAST(0x0000ACA000B70CF0 AS DateTime), 2, N'登入,IP:10.1.1.2')
  398. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (29, CAST(0x0000ACA000B70E1C AS DateTime), 2, N'登入,IP:::1')
  399. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (30, CAST(0x0000ACA000B73E28 AS DateTime), 2, N'登入,IP:10.1.1.2')
  400. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (31, CAST(0x0000ACA000B7B22C AS DateTime), 2, N'登入,IP:10.1.1.2')
  401. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (32, CAST(0x0000ACA000B86C80 AS DateTime), 2, N'登入,IP:10.1.1.2')
  402. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (33, CAST(0x0000ACA000BD6C30 AS DateTime), 2, N'登入,IP:::1')
  403. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (34, CAST(0x0000ACA000BD9FC0 AS DateTime), 2, N'登入,IP:::1')
  404. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (35, CAST(0x0000ACA000BF5E3C AS DateTime), 2, N'登入,IP:::1')
  405. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (36, CAST(0x0000ACA000BF98D4 AS DateTime), 2, N'登入,IP:10.1.1.2')
  406. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (37, CAST(0x0000ACA000BFBF80 AS DateTime), 2, N'登入,IP:10.1.1.2')
  407. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (38, CAST(0x0000ACA000C07E84 AS DateTime), 2, N'登入,IP:::1')
  408. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (39, CAST(0x0000ACA000C2F628 AS DateTime), 2, N'登入,IP:::1')
  409. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (40, CAST(0x0000ACA000C30A14 AS DateTime), 2, N'登入,IP:::1')
  410. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (41, CAST(0x0000ACA000E9226C AS DateTime), 2, N'登入,IP:::1')
  411. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (42, CAST(0x0000ACA0011BC938 AS DateTime), 2, N'登入,IP:10.1.1.2')
  412. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (43, CAST(0x0000ACA1008ECA4C AS DateTime), 2, N'登入,IP:::1')
  413. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (44, CAST(0x0000ACA2009DFCEC AS DateTime), 2, N'登入,IP:::1')
  414. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (45, CAST(0x0000ACA200A88B44 AS DateTime), 2, N'登入,IP:::1')
  415. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (46, CAST(0x0000ACA200AA5C80 AS DateTime), 2, N'登入,IP:::1')
  416. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (47, CAST(0x0000ACA200AE19EC AS DateTime), 2, N'登入,IP:::1')
  417. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (48, CAST(0x0000ACA200B0E71C AS DateTime), 2, N'登入,IP:::1')
  418. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (49, CAST(0x0000ACA2012104AC AS DateTime), 2, N'登入,IP:::1')
  419. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (50, CAST(0x0000ACA600AB2D18 AS DateTime), 2, N'登入,IP:::1')
  420. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (51, CAST(0x0000ACA600AC93B0 AS DateTime), 2, N'登入,IP:::1')
  421. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (52, CAST(0x0000ACA600E399A0 AS DateTime), 2, N'登入,IP:::1')
  422. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (53, CAST(0x0000ACA600E42AF0 AS DateTime), 2, N'登入,IP:::1')
  423. INSERT [dbo].[用户登录记录] ([ID], [记录时间], [用户ID], [登录信息]) VALUES (54, CAST(0x0000ACA600E64F60 AS DateTime), 2, N'登入,IP:::1')
  424. SET IDENTITY_INSERT [dbo].[用户登录记录] OFF
  425. /****** Object: Table [dbo].[用户测点关系] Script Date: 05/20/2021 19:22:32 ******/
  426. SET ANSI_NULLS ON
  427. GO
  428. SET QUOTED_IDENTIFIER ON
  429. GO
  430. SET ANSI_PADDING ON
  431. GO
  432. CREATE TABLE [dbo].[用户测点关系](
  433. [ID] [int] IDENTITY(1,1) NOT NULL,
  434. [用户ID] [int] NOT NULL,
  435. [设备ID] [varchar](50) NULL,
  436. [管理ID] [varchar](50) NULL,
  437. CONSTRAINT [PK_用户测点关系] PRIMARY KEY CLUSTERED
  438. (
  439. [ID] ASC
  440. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  441. ) ON [PRIMARY]
  442. GO
  443. SET ANSI_PADDING OFF
  444. GO
  445. /****** Object: Table [dbo].[用户操作类型] Script Date: 05/20/2021 19:22:32 ******/
  446. SET ANSI_NULLS ON
  447. GO
  448. SET QUOTED_IDENTIFIER ON
  449. GO
  450. SET ANSI_PADDING OFF
  451. GO
  452. CREATE TABLE [dbo].[用户操作类型](
  453. [ID] [int] IDENTITY(1,1) NOT NULL,
  454. [操作名称] [varchar](50) NOT NULL
  455. ) ON [PRIMARY]
  456. SET ANSI_PADDING ON
  457. ALTER TABLE [dbo].[用户操作类型] ADD [是否显示] [varchar](10) NULL
  458. ALTER TABLE [dbo].[用户操作类型] ADD CONSTRAINT [PK_用户操作类型] PRIMARY KEY CLUSTERED
  459. (
  460. [ID] ASC
  461. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  462. GO
  463. SET ANSI_PADDING OFF
  464. GO
  465. SET IDENTITY_INSERT [dbo].[用户操作类型] ON
  466. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (1, N'即时刷新', N'是')
  467. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (2, N'读取参数', N'是')
  468. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (3, N'设置参数', N'是')
  469. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (4, N'控制设备', N'是')
  470. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (24, N'新建操作员', NULL)
  471. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (25, N'修改操作员', NULL)
  472. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (26, N'删除操作员', NULL)
  473. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (27, N'新建设备', NULL)
  474. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (28, N'修改设备', NULL)
  475. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (29, N'删除设备', NULL)
  476. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (34, N'新建管理', NULL)
  477. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (35, N'修改管理', NULL)
  478. INSERT [dbo].[用户操作类型] ([ID], [操作名称], [是否显示]) VALUES (36, N'删除管理', NULL)
  479. SET IDENTITY_INSERT [dbo].[用户操作类型] OFF
  480. /****** Object: Table [dbo].[用户操作记录模板] Script Date: 05/20/2021 19:22:32 ******/
  481. SET ANSI_NULLS ON
  482. GO
  483. SET QUOTED_IDENTIFIER ON
  484. GO
  485. SET ANSI_PADDING ON
  486. GO
  487. CREATE TABLE [dbo].[用户操作记录模板](
  488. [ID] [int] IDENTITY(1,1) NOT NULL,
  489. [用户ID] [int] NOT NULL,
  490. [记录时间] [datetime] NOT NULL,
  491. [设备ID] [int] NOT NULL,
  492. [操作类型ID] [int] NOT NULL,
  493. [操作描述] [varchar](2000) NOT NULL,
  494. CONSTRAINT [PK_用户操作记录模板] PRIMARY KEY CLUSTERED
  495. (
  496. [ID] ASC
  497. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  498. ) ON [PRIMARY]
  499. GO
  500. SET ANSI_PADDING OFF
  501. GO
  502. /****** Object: Table [dbo].[用户操作记录] Script Date: 05/20/2021 19:22:32 ******/
  503. SET ANSI_NULLS ON
  504. GO
  505. SET QUOTED_IDENTIFIER ON
  506. GO
  507. SET ANSI_PADDING ON
  508. GO
  509. CREATE TABLE [dbo].[用户操作记录](
  510. [ID] [int] IDENTITY(1,1) NOT NULL,
  511. [用户ID] [int] NULL,
  512. [记录时间] [datetime] NULL,
  513. [设备ID] [int] NULL,
  514. [操作类型ID] [int] NULL,
  515. [操作描述] [varchar](2000) NULL,
  516. CONSTRAINT [PK_用户操作记录] PRIMARY KEY CLUSTERED
  517. (
  518. [ID] ASC
  519. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  520. ) ON [PRIMARY]
  521. GO
  522. SET ANSI_PADDING OFF
  523. GO
  524. SET IDENTITY_INSERT [dbo].[用户操作记录] ON
  525. INSERT [dbo].[用户操作记录] ([ID], [用户ID], [记录时间], [设备ID], [操作类型ID], [操作描述]) VALUES (1, 2, CAST(0x0000ACA000B41464 AS DateTime), 0, 25, N'修改操作员成功')
  526. INSERT [dbo].[用户操作记录] ([ID], [用户ID], [记录时间], [设备ID], [操作类型ID], [操作描述]) VALUES (2, 2, CAST(0x0000ACA2009E7B7C AS DateTime), 4, 4, N'控DO1开阀;执行结果:成功')
  527. SET IDENTITY_INSERT [dbo].[用户操作记录] OFF
  528. /****** Object: Table [dbo].[系统信息] Script Date: 05/20/2021 19:22:32 ******/
  529. SET ANSI_NULLS ON
  530. GO
  531. SET QUOTED_IDENTIFIER ON
  532. GO
  533. SET ANSI_PADDING ON
  534. GO
  535. CREATE TABLE [dbo].[系统信息](
  536. [系统名称] [varchar](50) NULL,
  537. [数据库版本] [varchar](50) NULL
  538. ) ON [PRIMARY]
  539. GO
  540. SET ANSI_PADDING OFF
  541. GO
  542. INSERT [dbo].[系统信息] ([系统名称], [数据库版本]) VALUES (N'远程监测系统', N'10.2.0')
  543. /****** Object: Table [dbo].[系统参数] Script Date: 05/20/2021 19:22:32 ******/
  544. SET ANSI_NULLS ON
  545. GO
  546. SET QUOTED_IDENTIFIER ON
  547. GO
  548. SET ANSI_PADDING ON
  549. GO
  550. CREATE TABLE [dbo].[系统参数](
  551. [ID] [int] NOT NULL,
  552. [参数名称] [varchar](100) NOT NULL,
  553. [参数值] [varchar](200) NOT NULL,
  554. CONSTRAINT [PK_系统参数] PRIMARY KEY NONCLUSTERED
  555. (
  556. [ID] ASC
  557. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  558. ) ON [PRIMARY]
  559. GO
  560. SET ANSI_PADDING OFF
  561. GO
  562. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'水资源应用系统需定义收费周期
  563. 计费周期明细编号:1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'系统参数'
  564. GO
  565. INSERT [dbo].[系统参数] ([ID], [参数名称], [参数值]) VALUES (1, N'周期明细编号', N'1')
  566. /****** Object: Table [dbo].[文件目录] Script Date: 05/20/2021 19:22:32 ******/
  567. SET ANSI_NULLS ON
  568. GO
  569. SET QUOTED_IDENTIFIER ON
  570. GO
  571. SET ANSI_PADDING ON
  572. GO
  573. CREATE TABLE [dbo].[文件目录](
  574. [ID] [int] IDENTITY(1,1) NOT NULL,
  575. [目录名称] [varchar](50) NOT NULL,
  576. [文件数量] [int] NULL,
  577. [上级目录ID] [int] NOT NULL,
  578. [创建用户ID] [varchar](50) NULL,
  579. [创建时间] [datetime] NULL,
  580. [是否私有] [varchar](50) NULL
  581. ) ON [PRIMARY]
  582. GO
  583. SET ANSI_PADDING OFF
  584. GO
  585. /****** Object: Table [dbo].[文件列表] Script Date: 05/20/2021 19:22:32 ******/
  586. SET ANSI_NULLS ON
  587. GO
  588. SET QUOTED_IDENTIFIER ON
  589. GO
  590. SET ANSI_PADDING ON
  591. GO
  592. CREATE TABLE [dbo].[文件列表](
  593. [ID] [int] IDENTITY(1,1) NOT NULL,
  594. [文件名称] [varchar](50) NOT NULL,
  595. [文件长度] [varchar](50) NOT NULL,
  596. [文件类型] [varchar](50) NULL,
  597. [目录索引] [int] NOT NULL,
  598. [上传用户] [int] NOT NULL,
  599. [上传时间] [datetime] NOT NULL,
  600. [下载次数] [int] NULL,
  601. [是否私有] [varchar](50) NULL
  602. ) ON [PRIMARY]
  603. GO
  604. SET ANSI_PADDING OFF
  605. GO
  606. /****** Object: Table [dbo].[通讯设备] Script Date: 05/20/2021 19:22:32 ******/
  607. SET ANSI_NULLS ON
  608. GO
  609. SET QUOTED_IDENTIFIER ON
  610. GO
  611. SET ANSI_PADDING ON
  612. GO
  613. CREATE TABLE [dbo].[通讯设备](
  614. [ID] [int] IDENTITY(1,1) NOT NULL,
  615. [名称] [varchar](50) NULL,
  616. [设备地址] [varchar](50) NULL,
  617. [设备协议] [varchar](50) NULL,
  618. [设备协议参数] [varchar](50) NULL,
  619. [是否轮询] [varchar](50) NULL,
  620. [轮询间隔] [varchar](50) NULL,
  621. [是否启用] [varchar](50) NOT NULL,
  622. CONSTRAINT [PK_通讯设备] PRIMARY KEY CLUSTERED
  623. (
  624. [ID] ASC
  625. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  626. ) ON [PRIMARY]
  627. GO
  628. SET ANSI_PADDING OFF
  629. GO
  630. SET IDENTITY_INSERT [dbo].[通讯设备] ON
  631. INSERT [dbo].[通讯设备] ([ID], [名称], [设备地址], [设备协议], [设备协议参数], [是否轮询], [轮询间隔], [是否启用]) VALUES (5, N'测点1_控制器', N'101', N'CD_PSController', N'1', N'是', N'120', N'是')
  632. INSERT [dbo].[通讯设备] ([ID], [名称], [设备地址], [设备协议], [设备协议参数], [是否轮询], [轮询间隔], [是否启用]) VALUES (6, N'测点2_控制器', N'101', N'CD_PSController', N'1', N'是', N'120', N'是')
  633. INSERT [dbo].[通讯设备] ([ID], [名称], [设备地址], [设备协议], [设备协议参数], [是否轮询], [轮询间隔], [是否启用]) VALUES (7, N'测点3_控制器', N'101', N'CD_PSController', N'1', N'是', N'120', N'是')
  634. INSERT [dbo].[通讯设备] ([ID], [名称], [设备地址], [设备协议], [设备协议参数], [是否轮询], [轮询间隔], [是否启用]) VALUES (8, N'测点4_控制器', N'101', N'CD_PSController', N'1', N'是', N'120', N'是')
  635. SET IDENTITY_INSERT [dbo].[通讯设备] OFF
  636. /****** Object: Table [dbo].[通讯参数] Script Date: 05/20/2021 19:22:32 ******/
  637. SET ANSI_NULLS ON
  638. GO
  639. SET QUOTED_IDENTIFIER ON
  640. GO
  641. SET ANSI_PADDING ON
  642. GO
  643. CREATE TABLE [dbo].[通讯参数](
  644. [Id] [int] IDENTITY(1,1) NOT NULL,
  645. [模板ID] [int] NULL,
  646. [量名称] [varchar](50) NULL,
  647. [量种类] [varchar](50) NULL,
  648. [量类型] [varchar](50) NULL,
  649. [子站索引] [varchar](50) NULL,
  650. [数据起始索引] [int] NULL,
  651. [转换方式] [varchar](50) NULL,
  652. [转换方式参数] [varchar](200) NULL,
  653. [开关量预设值] [varchar](50) NULL,
  654. [开关量描述] [varchar](50) NULL,
  655. [开关量颜色] [varchar](50) NULL,
  656. [是否报警] [varchar](50) NULL,
  657. [报警条件] [varchar](50) NULL,
  658. [衍生表达式] [varchar](2000) NULL,
  659. [模拟量小数位数] [int] NULL,
  660. [模拟量系数] [decimal](10, 4) NULL,
  661. [模拟量单位] [varchar](50) NULL,
  662. [是否显示] [varchar](50) NULL,
  663. [变化方式] [varchar](50) NULL,
  664. [顺序号] [int] NULL,
  665. [所在控件名] [varchar](50) NULL,
  666. CONSTRAINT [PK_通讯参数] PRIMARY KEY NONCLUSTERED
  667. (
  668. [Id] ASC
  669. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  670. ) ON [PRIMARY]
  671. GO
  672. SET ANSI_PADDING OFF
  673. GO
  674. SET IDENTITY_INSERT [dbo].[通讯参数] ON
  675. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (1, 1, N'预留水位', N'基础量', N'模拟量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, CAST(0.0100 AS Decimal(10, 4)), N'm', N'是', N'波动量', NULL, NULL)
  676. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (2, 1, N'实测水位', N'基础量', N'模拟量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, CAST(0.0100 AS Decimal(10, 4)), N'm', N'是', N'波动量', NULL, NULL)
  677. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (3, 1, N'基准水位', N'基础量', N'模拟量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, CAST(0.0100 AS Decimal(10, 4)), N'm', N'是', N'波动量', NULL, NULL)
  678. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (4, 1, N'信号强度', N'基础量', N'模拟量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, CAST(1.0000 AS Decimal(10, 4)), NULL, N'是', N'波动量', NULL, NULL)
  679. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (5, 1, N'电池电压', N'基础量', N'模拟量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, CAST(0.0100 AS Decimal(10, 4)), N'V', N'是', N'波动量', NULL, NULL)
  680. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (6, 1, N'模拟量水位故障', N'基础量', N'开关量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, CAST(1.0000 AS Decimal(10, 4)), NULL, N'是', NULL, NULL, NULL)
  681. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (7, 1, N'箱门开关', N'基础量', N'开关量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, CAST(1.0000 AS Decimal(10, 4)), NULL, N'是', NULL, NULL, NULL)
  682. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (8, 1, N'水位计故障', N'基础量', N'开关量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, CAST(1.0000 AS Decimal(10, 4)), NULL, N'是', NULL, NULL, NULL)
  683. INSERT [dbo].[通讯参数] ([Id], [模板ID], [量名称], [量种类], [量类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [开关量预设值], [开关量描述], [开关量颜色], [是否报警], [报警条件], [衍生表达式], [模拟量小数位数], [模拟量系数], [模拟量单位], [是否显示], [变化方式], [顺序号], [所在控件名]) VALUES (9, 1, N'电池电压下限报警', N'基础量', N'开关量', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, CAST(1.0000 AS Decimal(10, 4)), NULL, N'是', NULL, NULL, NULL)
  684. SET IDENTITY_INSERT [dbo].[通讯参数] OFF
  685. /****** Object: Table [dbo].[水资源费] Script Date: 05/20/2021 19:22:32 ******/
  686. SET ANSI_NULLS ON
  687. GO
  688. SET QUOTED_IDENTIFIER ON
  689. GO
  690. CREATE TABLE [dbo].[水资源费](
  691. [Id] [int] IDENTITY(1,1) NOT NULL,
  692. [名称] [nvarchar](50) NOT NULL,
  693. [一阶价格] [numeric](18, 2) NOT NULL,
  694. [一阶水量] [numeric](18, 2) NOT NULL,
  695. [二阶价格] [numeric](18, 2) NOT NULL,
  696. [二阶水量] [numeric](18, 2) NOT NULL,
  697. [三阶价格] [numeric](18, 2) NOT NULL,
  698. [三阶水量] [numeric](18, 2) NOT NULL,
  699. [生效日期] [datetime] NOT NULL,
  700. [失效日期] [datetime] NULL
  701. ) ON [PRIMARY]
  702. GO
  703. /****** Object: Table [dbo].[水资源_远程监控] Script Date: 05/20/2021 19:22:32 ******/
  704. SET ANSI_NULLS ON
  705. GO
  706. SET QUOTED_IDENTIFIER ON
  707. GO
  708. SET ANSI_PADDING ON
  709. GO
  710. CREATE TABLE [dbo].[水资源_远程监控](
  711. [序号] [int] IDENTITY(1,1) NOT NULL,
  712. [取水单位名称] [varchar](50) NOT NULL,
  713. [SIM卡号码] [varchar](50) NULL,
  714. [最新采用时间] [varchar](50) NULL,
  715. [表具读数] [decimal](18, 2) NULL,
  716. [取水系数] [decimal](18, 2) NULL,
  717. [取水流量] [decimal](18, 2) NULL,
  718. [本月用水量] [decimal](18, 2) NULL,
  719. [总用水量] [decimal](18, 2) NULL,
  720. [取水状态] [varchar](50) NULL,
  721. [供电状态] [varchar](50) NULL,
  722. [门状态] [varchar](50) NULL,
  723. [图像监控] [varchar](50) NULL,
  724. CONSTRAINT [PK_远程监控] PRIMARY KEY CLUSTERED
  725. (
  726. [序号] ASC
  727. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  728. ) ON [PRIMARY]
  729. GO
  730. SET ANSI_PADDING OFF
  731. GO
  732. /****** Object: Table [dbo].[水资源_用水计划] Script Date: 05/20/2021 19:22:32 ******/
  733. SET ANSI_NULLS ON
  734. GO
  735. SET QUOTED_IDENTIFIER ON
  736. GO
  737. SET ANSI_PADDING ON
  738. GO
  739. CREATE TABLE [dbo].[水资源_用水计划](
  740. [ID] [int] IDENTITY(1,1) NOT NULL,
  741. [Name] [varchar](50) NULL,
  742. [Tag] [varchar](50) NULL,
  743. [Year] [varchar](50) NULL,
  744. [Type] [varchar](50) NULL,
  745. [Plan] [varchar](500) NULL,
  746. [Start] [varchar](50) NULL,
  747. [DeviceName] [varchar](50) NULL,
  748. [Monitor] [varchar](50) NULL
  749. ) ON [PRIMARY]
  750. GO
  751. SET ANSI_PADDING OFF
  752. GO
  753. /****** Object: Table [dbo].[水资源_取水单位基本信息] Script Date: 05/20/2021 19:22:32 ******/
  754. SET ANSI_NULLS ON
  755. GO
  756. SET QUOTED_IDENTIFIER ON
  757. GO
  758. SET ANSI_PADDING ON
  759. GO
  760. CREATE TABLE [dbo].[水资源_取水单位基本信息](
  761. [序号] [int] IDENTITY(1,1) NOT NULL,
  762. [取水单位名称] [varchar](50) NOT NULL,
  763. [单位地址] [varchar](50) NULL,
  764. [管理人员] [varchar](50) NULL,
  765. [联系电话] [varchar](50) NULL,
  766. [取水许可证号] [varchar](50) NULL,
  767. [申请年取水量] [int] NULL,
  768. [取水口地理位置] [varchar](50) NULL,
  769. [取水口编码] [varchar](50) NULL,
  770. [SIM卡号码] [varchar](50) NULL,
  771. [计量设备] [varchar](50) NULL,
  772. [取水系数] [decimal](18, 2) NULL,
  773. [费率] [decimal](18, 2) NULL,
  774. [采集方式] [varchar](50) NULL
  775. ) ON [PRIMARY]
  776. GO
  777. SET ANSI_PADDING OFF
  778. GO
  779. /****** Object: Table [dbo].[水源类型] Script Date: 05/20/2021 19:22:32 ******/
  780. SET ANSI_NULLS ON
  781. GO
  782. SET QUOTED_IDENTIFIER ON
  783. GO
  784. SET ANSI_PADDING ON
  785. GO
  786. CREATE TABLE [dbo].[水源类型](
  787. [ID] [int] IDENTITY(1,1) NOT NULL,
  788. [名称] [varchar](50) NOT NULL,
  789. CONSTRAINT [PK_水源类型] PRIMARY KEY CLUSTERED
  790. (
  791. [ID] ASC
  792. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  793. ) ON [PRIMARY]
  794. GO
  795. SET ANSI_PADDING OFF
  796. GO
  797. /****** Object: Table [dbo].[水权回购价格] Script Date: 05/20/2021 19:22:32 ******/
  798. SET ANSI_NULLS ON
  799. GO
  800. SET QUOTED_IDENTIFIER ON
  801. GO
  802. SET ANSI_PADDING ON
  803. GO
  804. CREATE TABLE [dbo].[水权回购价格](
  805. [ID] [int] IDENTITY(1,1) NOT NULL,
  806. [名称] [varchar](50) NULL,
  807. [价格] [numeric](18, 2) NULL,
  808. [开始实施日期] [datetime] NULL,
  809. [设置时间] [datetime] NULL,
  810. [取水用途ID] [int] NOT NULL,
  811. CONSTRAINT [PK_水权回购价格] PRIMARY KEY CLUSTERED
  812. (
  813. [ID] ASC
  814. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  815. ) ON [PRIMARY]
  816. GO
  817. SET ANSI_PADDING OFF
  818. GO
  819. SET IDENTITY_INSERT [dbo].[水权回购价格] ON
  820. INSERT [dbo].[水权回购价格] ([ID], [名称], [价格], [开始实施日期], [设置时间], [取水用途ID]) VALUES (1, N'AAA', CAST(1.00 AS Numeric(18, 2)), CAST(0x0000A7C900000000 AS DateTime), CAST(0x0000A7CB00000000 AS DateTime), 1)
  821. SET IDENTITY_INSERT [dbo].[水权回购价格] OFF
  822. /****** Object: Table [dbo].[水价表] Script Date: 05/20/2021 19:22:32 ******/
  823. SET ANSI_NULLS ON
  824. GO
  825. SET QUOTED_IDENTIFIER ON
  826. GO
  827. SET ANSI_PADDING ON
  828. GO
  829. CREATE TABLE [dbo].[水价表](
  830. [ID] [int] IDENTITY(1,1) NOT NULL,
  831. [名称] [varchar](50) NOT NULL,
  832. [类型] [int] NOT NULL,
  833. [设置时间] [datetime] NULL,
  834. CONSTRAINT [PK_水价表] PRIMARY KEY CLUSTERED
  835. (
  836. [ID] ASC
  837. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  838. ) ON [PRIMARY]
  839. GO
  840. SET ANSI_PADDING OFF
  841. GO
  842. /****** Object: Table [dbo].[数据通道] Script Date: 05/20/2021 19:22:32 ******/
  843. SET ANSI_NULLS ON
  844. GO
  845. SET QUOTED_IDENTIFIER ON
  846. GO
  847. SET ANSI_PADDING ON
  848. GO
  849. CREATE TABLE [dbo].[数据通道](
  850. [ID] [int] IDENTITY(1,1) NOT NULL,
  851. [通道类型] [varchar](50) NULL,
  852. [通道参数] [varchar](50) NULL,
  853. [是否需要服务支持] [varchar](50) NULL,
  854. [通道服务类型] [varchar](50) NULL,
  855. [通道服务参数] [varchar](50) NULL,
  856. CONSTRAINT [PK_数据通道] PRIMARY KEY CLUSTERED
  857. (
  858. [ID] ASC
  859. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  860. ) ON [PRIMARY]
  861. GO
  862. SET ANSI_PADDING OFF
  863. GO
  864. SET IDENTITY_INSERT [dbo].[数据通道] ON
  865. INSERT [dbo].[数据通道] ([ID], [通道类型], [通道参数], [是否需要服务支持], [通道服务类型], [通道服务参数]) VALUES (138, N'DC_TCP_FromServer', N'', N'是', N'DS_TCP_Server', N'60001')
  866. SET IDENTITY_INSERT [dbo].[数据通道] OFF
  867. /****** Object: Table [dbo].[数据来源] Script Date: 05/20/2021 19:22:32 ******/
  868. SET ANSI_NULLS ON
  869. GO
  870. SET QUOTED_IDENTIFIER ON
  871. GO
  872. SET ANSI_PADDING ON
  873. GO
  874. CREATE TABLE [dbo].[数据来源](
  875. [ID] [int] IDENTITY(1,1) NOT NULL,
  876. [数据来源] [varchar](50) NULL
  877. ) ON [PRIMARY]
  878. GO
  879. SET ANSI_PADDING OFF
  880. GO
  881. SET IDENTITY_INSERT [dbo].[数据来源] ON
  882. INSERT [dbo].[数据来源] ([ID], [数据来源]) VALUES (1, N'定期存储')
  883. INSERT [dbo].[数据来源] ([ID], [数据来源]) VALUES (2, N'历史记录')
  884. SET IDENTITY_INSERT [dbo].[数据来源] OFF
  885. /****** Object: Table [dbo].[数据卡资费] Script Date: 05/20/2021 19:22:32 ******/
  886. SET ANSI_NULLS ON
  887. GO
  888. SET QUOTED_IDENTIFIER ON
  889. GO
  890. SET ANSI_PADDING ON
  891. GO
  892. CREATE TABLE [dbo].[数据卡资费](
  893. [ID] [int] IDENTITY(1,1) NOT NULL,
  894. [名称] [varchar](50) NULL,
  895. [资费] [numeric](18, 2) NULL,
  896. [周期] [numeric](18, 0) NULL,
  897. [描述] [varchar](50) NULL,
  898. CONSTRAINT [PK_数据卡资费] PRIMARY KEY CLUSTERED
  899. (
  900. [ID] ASC
  901. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  902. ) ON [PRIMARY]
  903. GO
  904. SET ANSI_PADDING OFF
  905. GO
  906. /****** Object: Table [dbo].[数据卡信息] Script Date: 05/20/2021 19:22:32 ******/
  907. SET ANSI_NULLS ON
  908. GO
  909. SET QUOTED_IDENTIFIER ON
  910. GO
  911. SET ANSI_PADDING ON
  912. GO
  913. CREATE TABLE [dbo].[数据卡信息](
  914. [ID] [int] IDENTITY(1,1) NOT NULL,
  915. [SIM卡号] [varchar](50) NULL,
  916. [手机卡号] [varchar](50) NOT NULL,
  917. [资费标准] [int] NOT NULL,
  918. [充值时间] [datetime] NULL,
  919. [充值金额] [numeric](18, 2) NULL,
  920. [充值人] [varchar](50) NULL,
  921. [累计充值金额] [numeric](18, 2) NULL,
  922. [当前余额] [numeric](18, 2) NULL,
  923. [管理ID] [varchar](50) NULL,
  924. [设备ID] [varchar](50) NULL,
  925. [是否删除] [varchar](50) NULL,
  926. [扣费时间] [datetime] NULL,
  927. CONSTRAINT [PK_数据卡信息] PRIMARY KEY CLUSTERED
  928. (
  929. [ID] ASC
  930. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  931. ) ON [PRIMARY]
  932. GO
  933. SET ANSI_PADDING OFF
  934. GO
  935. /****** Object: Table [dbo].[数据卡充值记录] Script Date: 05/20/2021 19:22:32 ******/
  936. SET ANSI_NULLS ON
  937. GO
  938. SET QUOTED_IDENTIFIER ON
  939. GO
  940. SET ANSI_PADDING ON
  941. GO
  942. CREATE TABLE [dbo].[数据卡充值记录](
  943. [id] [int] IDENTITY(1,1) NOT NULL,
  944. [数据卡ID] [int] NULL,
  945. [充值时间] [datetime] NULL,
  946. [充值金额] [numeric](18, 2) NULL,
  947. [充值人] [varchar](50) NULL,
  948. [操作员ID] [int] NULL,
  949. CONSTRAINT [PK_数据卡充值记录] PRIMARY KEY CLUSTERED
  950. (
  951. [id] ASC
  952. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  953. ) ON [PRIMARY]
  954. GO
  955. SET ANSI_PADDING OFF
  956. GO
  957. /****** Object: Table [dbo].[售水年结算记录] Script Date: 05/20/2021 19:22:32 ******/
  958. SET ANSI_NULLS ON
  959. GO
  960. SET QUOTED_IDENTIFIER ON
  961. GO
  962. SET ANSI_PADDING ON
  963. GO
  964. CREATE TABLE [dbo].[售水年结算记录](
  965. [ID] [int] IDENTITY(1,1) NOT NULL,
  966. [用水户ID] [int] NOT NULL,
  967. [计量方式ID] [int] NOT NULL,
  968. [结算年份] [int] NOT NULL,
  969. [年分配水权] [numeric](18, 2) NOT NULL,
  970. [年用水量] [numeric](18, 2) NOT NULL,
  971. [年剩余水权] [numeric](18, 2) NULL,
  972. [水权回购单价] [numeric](18, 2) NULL,
  973. [年剩余水权总价] [numeric](18, 2) NULL,
  974. [年购水金额] [numeric](18, 2) NULL,
  975. [年用水金额] [numeric](18, 2) NULL,
  976. [卡内余额] [numeric](18, 2) NOT NULL,
  977. [年总结余] [numeric](18, 2) NULL,
  978. [售水金额] [numeric](18, 2) NULL,
  979. [退款金额] [numeric](18, 2) NULL,
  980. [操作员ID] [int] NOT NULL,
  981. [操作时间] [datetime] NOT NULL,
  982. [结算人] [varchar](50) NOT NULL,
  983. [备注] [varchar](50) NULL,
  984. [计费详细] [varchar](500) NULL,
  985. [售水记录ID] [int] NULL,
  986. CONSTRAINT [PK_售水年结算记录] PRIMARY KEY CLUSTERED
  987. (
  988. [ID] ASC
  989. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  990. ) ON [PRIMARY]
  991. GO
  992. SET ANSI_PADDING OFF
  993. GO
  994. /****** Object: Table [dbo].[售水记录] Script Date: 05/20/2021 19:22:32 ******/
  995. SET ANSI_NULLS ON
  996. GO
  997. SET QUOTED_IDENTIFIER ON
  998. GO
  999. SET ANSI_PADDING ON
  1000. GO
  1001. CREATE TABLE [dbo].[售水记录](
  1002. [Id] [int] IDENTITY(1,1) NOT NULL,
  1003. [用水户ID] [int] NOT NULL,
  1004. [购水设备ID] [int] NOT NULL,
  1005. [水资源费ID] [int] NOT NULL,
  1006. [计费方式ID] [int] NOT NULL,
  1007. [计量方式ID] [int] NOT NULL,
  1008. [售水方式ID] [int] NOT NULL,
  1009. [售水金额] [numeric](18, 2) NOT NULL,
  1010. [售出水量] [numeric](18, 1) NOT NULL,
  1011. [售电金额] [numeric](18, 2) NOT NULL,
  1012. [售出电量] [numeric](18, 1) NOT NULL,
  1013. [应收金额] [numeric](18, 2) NULL,
  1014. [实收金额] [numeric](18, 2) NULL,
  1015. [售水时间] [datetime] NOT NULL,
  1016. [操作员ID] [int] NOT NULL,
  1017. [购水人] [varchar](50) NOT NULL,
  1018. [备注] [varchar](50) NULL,
  1019. [详细信息] [varchar](500) NULL
  1020. ) ON [PRIMARY]
  1021. GO
  1022. SET ANSI_PADDING OFF
  1023. GO
  1024. /****** Object: Table [dbo].[售水方式] Script Date: 05/20/2021 19:22:32 ******/
  1025. SET ANSI_NULLS ON
  1026. GO
  1027. SET QUOTED_IDENTIFIER ON
  1028. GO
  1029. CREATE TABLE [dbo].[售水方式](
  1030. [Id] [int] IDENTITY(1,1) NOT NULL,
  1031. [名称] [nvarchar](50) NOT NULL
  1032. ) ON [PRIMARY]
  1033. GO
  1034. /****** Object: Table [dbo].[视频] Script Date: 05/20/2021 19:22:32 ******/
  1035. SET ANSI_NULLS ON
  1036. GO
  1037. SET QUOTED_IDENTIFIER ON
  1038. GO
  1039. SET ANSI_PADDING ON
  1040. GO
  1041. CREATE TABLE [dbo].[视频](
  1042. [ID] [int] IDENTITY(1,1) NOT NULL,
  1043. [管理ID] [int] NULL,
  1044. [名称] [varchar](50) NULL,
  1045. [IP地址] [varchar](500) NULL,
  1046. [端口号] [int] NULL,
  1047. [视频通道] [int] NULL,
  1048. [用户名] [varchar](50) NULL,
  1049. [密码] [varchar](50) NULL,
  1050. [音频通道] [int] NULL,
  1051. [是否定焦] [varchar](50) NULL,
  1052. [启用音频] [varchar](50) NULL,
  1053. [设备序列号] [varchar](50) NULL,
  1054. [视频厂家] [varchar](50) NULL,
  1055. [码流类型] [varchar](50) NULL
  1056. ) ON [PRIMARY]
  1057. GO
  1058. SET ANSI_PADDING OFF
  1059. GO
  1060. /****** Object: Table [dbo].[事件记录模板] Script Date: 05/20/2021 19:22:32 ******/
  1061. SET ANSI_NULLS ON
  1062. GO
  1063. SET QUOTED_IDENTIFIER ON
  1064. GO
  1065. SET ANSI_PADDING ON
  1066. GO
  1067. CREATE TABLE [dbo].[事件记录模板](
  1068. [id] [int] IDENTITY(1,1) NOT NULL,
  1069. [设备ID] [int] NOT NULL,
  1070. [事件类型] [varchar](50) NOT NULL,
  1071. [记录时间] [datetime] NOT NULL,
  1072. [采集时间] [datetime] NOT NULL,
  1073. CONSTRAINT [PK_事件记录模板] PRIMARY KEY CLUSTERED
  1074. (
  1075. [id] ASC
  1076. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1077. ) ON [PRIMARY]
  1078. GO
  1079. SET ANSI_PADDING OFF
  1080. GO
  1081. /****** Object: Table [dbo].[事件记录参数] Script Date: 05/20/2021 19:22:32 ******/
  1082. SET ANSI_NULLS ON
  1083. GO
  1084. SET QUOTED_IDENTIFIER ON
  1085. GO
  1086. SET ANSI_PADDING ON
  1087. GO
  1088. CREATE TABLE [dbo].[事件记录参数](
  1089. [Id] [int] IDENTITY(1,1) NOT NULL,
  1090. [模板ID] [int] NULL,
  1091. [事件类型] [varchar](50) NOT NULL,
  1092. [量名称] [varchar](50) NULL,
  1093. [量种类] [varchar](50) NULL,
  1094. [量类型] [varchar](50) NULL,
  1095. [子站索引] [varchar](50) NULL,
  1096. [数据起始索引] [int] NULL,
  1097. [转换方式] [varchar](50) NULL,
  1098. [转换方式参数] [varchar](200) NULL,
  1099. [开关量预设值] [varchar](50) NULL,
  1100. [开关量描述] [varchar](50) NULL,
  1101. [开关量颜色] [varchar](50) NULL,
  1102. [是否报警] [varchar](50) NULL,
  1103. [报警条件] [varchar](50) NULL,
  1104. [衍生表达式] [varchar](2000) NULL,
  1105. [模拟量小数位数] [int] NULL,
  1106. [模拟量系数] [decimal](18, 2) NULL,
  1107. [模拟量单位] [varchar](50) NULL,
  1108. [是否显示] [varchar](50) NULL,
  1109. [变化方式] [varchar](50) NULL,
  1110. [顺序号] [int] NULL,
  1111. [所在控件名] [varchar](50) NULL,
  1112. CONSTRAINT [PK_事件记录参数] PRIMARY KEY CLUSTERED
  1113. (
  1114. [Id] ASC
  1115. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1116. ) ON [PRIMARY]
  1117. GO
  1118. SET ANSI_PADDING OFF
  1119. GO
  1120. /****** Object: Table [dbo].[时段水价表] Script Date: 05/20/2021 19:22:32 ******/
  1121. SET ANSI_NULLS ON
  1122. GO
  1123. SET QUOTED_IDENTIFIER ON
  1124. GO
  1125. SET ANSI_PADDING ON
  1126. GO
  1127. CREATE TABLE [dbo].[时段水价表](
  1128. [ID] [int] IDENTITY(1,1) NOT NULL,
  1129. [水价ID] [int] NOT NULL,
  1130. [阶梯数量] [int] NOT NULL,
  1131. [阶梯类型] [varchar](50) NOT NULL,
  1132. [起始时间] [varchar](50) NULL,
  1133. [结束时间] [varchar](50) NULL,
  1134. [一阶水量] [decimal](18, 2) NULL,
  1135. [一阶价格] [decimal](18, 3) NULL,
  1136. [二阶水量] [decimal](18, 2) NULL,
  1137. [二阶价格] [decimal](18, 3) NULL,
  1138. [三阶水量] [decimal](18, 2) NULL,
  1139. [三阶价格] [decimal](18, 3) NULL,
  1140. [四阶水量] [decimal](18, 2) NULL,
  1141. [四阶价格] [decimal](18, 3) NULL
  1142. ) ON [PRIMARY]
  1143. GO
  1144. SET ANSI_PADDING OFF
  1145. GO
  1146. /****** Object: Table [dbo].[设备信息] Script Date: 05/20/2021 19:22:32 ******/
  1147. SET ANSI_NULLS ON
  1148. GO
  1149. SET QUOTED_IDENTIFIER ON
  1150. GO
  1151. SET ANSI_PADDING ON
  1152. GO
  1153. CREATE TABLE [dbo].[设备信息](
  1154. [ID] [int] IDENTITY(1,1) NOT NULL,
  1155. [名称] [varchar](50) NULL,
  1156. [用户站类型] [varchar](50) NULL,
  1157. [用户站参数] [varchar](50) NULL,
  1158. [管理ID] [varchar](50) NULL,
  1159. [通讯设备ID] [varchar](50) NULL,
  1160. [传输设备ID] [varchar](50) NULL,
  1161. [数据采集方式] [int] NULL,
  1162. [是否启用] [varchar](50) NOT NULL,
  1163. [衍生相关量] [varchar](5000) NULL,
  1164. [显示量] [varchar](500) NULL,
  1165. CONSTRAINT [PK_设备信息] PRIMARY KEY CLUSTERED
  1166. (
  1167. [ID] ASC
  1168. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1169. ) ON [PRIMARY]
  1170. GO
  1171. SET ANSI_PADDING OFF
  1172. GO
  1173. SET IDENTITY_INSERT [dbo].[设备信息] ON
  1174. INSERT [dbo].[设备信息] ([ID], [名称], [用户站类型], [用户站参数], [管理ID], [通讯设备ID], [传输设备ID], [数据采集方式], [是否启用], [衍生相关量], [显示量]) VALUES (4, N'测点1', N'US_Common', N'1', N'3', N'5', N'4', 0, N'是', N'', N'')
  1175. INSERT [dbo].[设备信息] ([ID], [名称], [用户站类型], [用户站参数], [管理ID], [通讯设备ID], [传输设备ID], [数据采集方式], [是否启用], [衍生相关量], [显示量]) VALUES (5, N'测点2', N'US_Common', N'1', N'3', N'6', N'5', 0, N'是', N'', N'')
  1176. INSERT [dbo].[设备信息] ([ID], [名称], [用户站类型], [用户站参数], [管理ID], [通讯设备ID], [传输设备ID], [数据采集方式], [是否启用], [衍生相关量], [显示量]) VALUES (6, N'测点3', N'US_Common', N'1', N'3', N'7', N'6', 0, N'是', N'', N'')
  1177. INSERT [dbo].[设备信息] ([ID], [名称], [用户站类型], [用户站参数], [管理ID], [通讯设备ID], [传输设备ID], [数据采集方式], [是否启用], [衍生相关量], [显示量]) VALUES (7, N'测点4', N'US_Common', N'1', N'3', N'8', N'7', 0, N'是', N'', N'')
  1178. SET IDENTITY_INSERT [dbo].[设备信息] OFF
  1179. /****** Object: Table [dbo].[设备图片] Script Date: 05/20/2021 19:22:32 ******/
  1180. SET ANSI_NULLS ON
  1181. GO
  1182. SET QUOTED_IDENTIFIER ON
  1183. GO
  1184. SET ANSI_PADDING ON
  1185. GO
  1186. CREATE TABLE [dbo].[设备图片](
  1187. [ID] [int] IDENTITY(1,1) NOT NULL,
  1188. [设备ID] [int] NOT NULL,
  1189. [图片索引] [varchar](50) NOT NULL,
  1190. [图片] [image] NOT NULL,
  1191. [备注] [varchar](500) NULL
  1192. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  1193. GO
  1194. SET ANSI_PADDING OFF
  1195. GO
  1196. /****** Object: Table [dbo].[设备辅助信息] Script Date: 05/20/2021 19:22:32 ******/
  1197. SET ANSI_NULLS ON
  1198. GO
  1199. SET QUOTED_IDENTIFIER ON
  1200. GO
  1201. SET ANSI_PADDING ON
  1202. GO
  1203. CREATE TABLE [dbo].[设备辅助信息](
  1204. [ID] [int] IDENTITY(1,1) NOT NULL,
  1205. [设备ID] [int] NOT NULL,
  1206. [名称] [varchar](50) NOT NULL,
  1207. [值] [varchar](500) NULL,
  1208. CONSTRAINT [PK_设备辅助信息] PRIMARY KEY CLUSTERED
  1209. (
  1210. [ID] ASC
  1211. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1212. ) ON [PRIMARY]
  1213. GO
  1214. SET ANSI_PADDING OFF
  1215. GO
  1216. /****** Object: Table [dbo].[设备参数] Script Date: 05/20/2021 19:22:32 ******/
  1217. SET ANSI_NULLS ON
  1218. GO
  1219. SET QUOTED_IDENTIFIER ON
  1220. GO
  1221. SET ANSI_PADDING ON
  1222. GO
  1223. CREATE TABLE [dbo].[设备参数](
  1224. [ID] [int] IDENTITY(1,1) NOT NULL,
  1225. [名称] [nvarchar](50) NOT NULL,
  1226. [用户站类型] [varchar](50) NULL,
  1227. [子站索引] [varchar](50) NULL,
  1228. [数据起始索引] [varchar](50) NULL,
  1229. [转换方式] [varchar](50) NULL,
  1230. [转换方式参数] [varchar](200) NULL,
  1231. [系数] [decimal](18, 3) NULL,
  1232. [最小值] [decimal](18, 0) NULL,
  1233. [最大值] [decimal](18, 0) NULL,
  1234. [单位] [varchar](50) NULL,
  1235. [是否显示] [varchar](50) NULL,
  1236. CONSTRAINT [PK_设备参数] PRIMARY KEY CLUSTERED
  1237. (
  1238. [ID] ASC
  1239. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1240. ) ON [PRIMARY]
  1241. GO
  1242. SET ANSI_PADDING OFF
  1243. GO
  1244. SET IDENTITY_INSERT [dbo].[设备参数] ON
  1245. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (1, N'海拔高度', N'1', NULL, NULL, N'int', N'4', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1246. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (2, N'电池电压下限', N'1', NULL, NULL, N'ushort', N'2', CAST(0.100 AS Decimal(18, 3)), NULL, NULL, N'V', N'是')
  1247. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (3, N'DI采集间隔', N'1', NULL, NULL, N'ushort', N'2', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N'ms', N'是')
  1248. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (4, N'清空历史记录', N'1', NULL, NULL, N'ushort', N'2', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, NULL, N'是')
  1249. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (5, N'模拟量水位量程', N'1', NULL, NULL, N'ushort', N'2', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1250. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (6, N'模拟量水位最小值', N'1', NULL, NULL, N'ushort', N'2', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1251. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (7, N'模拟量水位上限报警', N'1', NULL, NULL, N'ushort', N'2', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1252. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (8, N'模拟量水位下限报警', N'1', NULL, NULL, N'ushort', N'2', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1253. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (9, N'模拟量水位零点', N'1', NULL, NULL, N'ushort', N'2', CAST(0.001 AS Decimal(18, 3)), NULL, NULL, N'mA', N'是')
  1254. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (10, N'模拟量水位满度', N'1', NULL, NULL, N'ushort', N'2', CAST(0.001 AS Decimal(18, 3)), NULL, NULL, N'mA', N'是')
  1255. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (11, N'模拟量水位偏移量', N'1', NULL, NULL, N'ushort', N'2', CAST(0.010 AS Decimal(18, 3)), NULL, NULL, N'm', N'是')
  1256. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (12, N'模拟量采集间隔', N'1', NULL, NULL, N'uint', N'4', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N's', N'是')
  1257. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (13, N'存储间隔间隔', N'1', NULL, NULL, N'uint', N'4', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N's', N'是')
  1258. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (14, N'历史记录上报间隔', N'1', NULL, NULL, N'uint', N'4', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N's', N'是')
  1259. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (15, N'实时数上报间隔', N'1', NULL, NULL, N'uint', N'4', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N's', N'是')
  1260. INSERT [dbo].[设备参数] ([ID], [名称], [用户站类型], [子站索引], [数据起始索引], [转换方式], [转换方式参数], [系数], [最小值], [最大值], [单位], [是否显示]) VALUES (16, N'水位计采集间隔', N'1', NULL, NULL, N'uint', N'4', CAST(1.000 AS Decimal(18, 3)), NULL, NULL, N's', N'是')
  1261. SET IDENTITY_INSERT [dbo].[设备参数] OFF
  1262. /****** Object: Table [dbo].[权限列表] Script Date: 05/20/2021 19:22:32 ******/
  1263. SET ANSI_NULLS ON
  1264. GO
  1265. SET QUOTED_IDENTIFIER ON
  1266. GO
  1267. SET ANSI_PADDING ON
  1268. GO
  1269. CREATE TABLE [dbo].[权限列表](
  1270. [ID] [int] IDENTITY(1,1) NOT NULL,
  1271. [权限名称] [varchar](50) NOT NULL,
  1272. [权限说明] [varchar](2000) NULL,
  1273. CONSTRAINT [PK_权限列表] PRIMARY KEY CLUSTERED
  1274. (
  1275. [ID] ASC
  1276. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1277. ) ON [PRIMARY]
  1278. GO
  1279. SET ANSI_PADDING OFF
  1280. GO
  1281. SET IDENTITY_INSERT [dbo].[权限列表] ON
  1282. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (3, N'操作员编辑', N'是否允许编辑登录名、角色名称及所属单位')
  1283. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (6, N'修改密码', N'是否允许操作员修改自己的密码')
  1284. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (9, N'角色高级', N'是否允许用户修改角色和权限的高级设置')
  1285. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (12, N'地图编辑', N'是否允许编辑测点在地图上的位置')
  1286. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (13, N'用户编辑', N'修改登录名称、修改角色以及所属单位')
  1287. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (14, N'单位编辑', N'添加、删除测点以及管理辅助信息')
  1288. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (15, N'控制权限', N'是否允许控制现场设备')
  1289. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (16, N'参数权限', N'是否允许设置、读取现场设备的参数')
  1290. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (17, N'界面设置', N'是否允许用户改变界面显示风格')
  1291. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (18, N'视频管理', N'是否允许用户查看和操作视频')
  1292. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (19, N'测点编辑', N'是否允许用户编辑测点')
  1293. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (20, N'拍照权限', N'是否允许用户拍照')
  1294. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (22, N'退出系统', N'是否允许用户退出系统')
  1295. INSERT [dbo].[权限列表] ([ID], [权限名称], [权限说明]) VALUES (23, N'个人设置', NULL)
  1296. SET IDENTITY_INSERT [dbo].[权限列表] OFF
  1297. /****** Object: Table [dbo].[全局状态] Script Date: 05/20/2021 19:22:32 ******/
  1298. SET ANSI_NULLS ON
  1299. GO
  1300. SET QUOTED_IDENTIFIER ON
  1301. GO
  1302. SET ANSI_PADDING ON
  1303. GO
  1304. CREATE TABLE [dbo].[全局状态](
  1305. [id] [int] IDENTITY(1,1) NOT NULL,
  1306. [设备ID] [int] NULL,
  1307. [记录时间] [datetime] NOT NULL,
  1308. [采集时间] [datetime] NOT NULL,
  1309. [设备状态] [varchar](10) NOT NULL,
  1310. [通讯状态] [varchar](10) NOT NULL,
  1311. [数据来源] [varchar](10) NOT NULL,
  1312. [预留水位] [numeric](18, 2) NULL,
  1313. [实测水位] [numeric](18, 2) NULL,
  1314. [基准水位] [numeric](18, 2) NULL,
  1315. [信号强度] [numeric](18, 0) NULL,
  1316. [电池电压] [numeric](18, 2) NULL,
  1317. [模拟量水位故障] [varchar](50) NULL,
  1318. [箱门开关] [varchar](50) NULL,
  1319. [水位计故障] [varchar](50) NULL,
  1320. [电池电压下限报警] [varchar](50) NULL
  1321. ) ON [PRIMARY]
  1322. GO
  1323. SET ANSI_PADDING OFF
  1324. GO
  1325. SET IDENTITY_INSERT [dbo].[全局状态] ON
  1326. INSERT [dbo].[全局状态] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (1, 4, CAST(0x0000AD2E013EC12C AS DateTime), CAST(0x0000AD2E008F109C AS DateTime), N'全部中断', N'全部中断', N'实时数据', CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0 AS Numeric(18, 0)), CAST(0.00 AS Numeric(18, 2)), N'0', N'0', N'0', N'0')
  1327. INSERT [dbo].[全局状态] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (2, 5, CAST(0x0000AD2E013EC12C AS DateTime), CAST(0x0000AD2E008F109C AS DateTime), N'全部中断', N'全部中断', N'实时数据', CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0 AS Numeric(18, 0)), CAST(0.00 AS Numeric(18, 2)), N'0', N'0', N'0', N'0')
  1328. INSERT [dbo].[全局状态] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (3, 6, CAST(0x0000AD2E013EC12C AS DateTime), CAST(0x0000AD2E008F109C AS DateTime), N'全部中断', N'全部中断', N'实时数据', CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0 AS Numeric(18, 0)), CAST(0.00 AS Numeric(18, 2)), N'0', N'0', N'0', N'0')
  1329. INSERT [dbo].[全局状态] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (4, 7, CAST(0x0000AD2E013EC12C AS DateTime), CAST(0x0000AD2E008F109C AS DateTime), N'全部中断', N'全部中断', N'实时数据', CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0 AS Numeric(18, 0)), CAST(0.00 AS Numeric(18, 2)), N'0', N'0', N'0', N'0')
  1330. SET IDENTITY_INSERT [dbo].[全局状态] OFF
  1331. /****** Object: Table [dbo].[配置信息] Script Date: 05/20/2021 19:22:32 ******/
  1332. SET ANSI_NULLS ON
  1333. GO
  1334. SET QUOTED_IDENTIFIER ON
  1335. GO
  1336. SET ANSI_PADDING ON
  1337. GO
  1338. CREATE TABLE [dbo].[配置信息](
  1339. [ID] [int] IDENTITY(1,1) NOT NULL,
  1340. [标识子列] [varchar](50) NULL,
  1341. [数据标识] [varchar](50) NULL,
  1342. [显示名称] [varchar](50) NULL
  1343. ) ON [PRIMARY]
  1344. GO
  1345. SET ANSI_PADDING OFF
  1346. GO
  1347. SET IDENTITY_INSERT [dbo].[配置信息] ON
  1348. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (1, N'用户站类型', N'US_Common', N'水源井监控')
  1349. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (2, N'传输协议', N'无协议', N'ADSL协议')
  1350. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (3, N'用户站参数', N'1', N'水源井监控')
  1351. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (5, N'设备协议', N'CD_PSController', N'控制器')
  1352. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (6, N'设备协议参数', N'1', N'水源井监控')
  1353. INSERT [dbo].[配置信息] ([ID], [标识子列], [数据标识], [显示名称]) VALUES (7, N'传输协议', N'平升协议', N'GPRS协议')
  1354. SET IDENTITY_INSERT [dbo].[配置信息] OFF
  1355. /****** Object: Table [dbo].[模板信息] Script Date: 05/20/2021 19:22:32 ******/
  1356. SET ANSI_NULLS ON
  1357. GO
  1358. SET QUOTED_IDENTIFIER ON
  1359. GO
  1360. SET ANSI_PADDING ON
  1361. GO
  1362. CREATE TABLE [dbo].[模板信息](
  1363. [ID] [int] IDENTITY(1,1) NOT NULL,
  1364. [协议类型] [varchar](50) NULL,
  1365. [协议名称] [varchar](50) NULL,
  1366. [模板名称] [varchar](50) NULL,
  1367. [用户站参数] [varchar](10) NULL,
  1368. [子设备] [varchar](50) NULL,
  1369. [可支持的模板ID] [varchar](50) NULL,
  1370. [地址说明] [varchar](50) NULL,
  1371. [远程操作窗体] [varchar](50) NULL,
  1372. [辅助信息描述] [varchar](500) NULL,
  1373. CONSTRAINT [PK_模板信息] PRIMARY KEY CLUSTERED
  1374. (
  1375. [ID] ASC
  1376. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1377. ) ON [PRIMARY]
  1378. GO
  1379. SET ANSI_PADDING OFF
  1380. GO
  1381. SET IDENTITY_INSERT [dbo].[模板信息] ON
  1382. INSERT [dbo].[模板信息] ([ID], [协议类型], [协议名称], [模板名称], [用户站参数], [子设备], [可支持的模板ID], [地址说明], [远程操作窗体], [辅助信息描述]) VALUES (12, N'传输设备', N'平升协议', N'平升协议', NULL, NULL, NULL, NULL, NULL, NULL)
  1383. INSERT [dbo].[模板信息] ([ID], [协议类型], [协议名称], [模板名称], [用户站参数], [子设备], [可支持的模板ID], [地址说明], [远程操作窗体], [辅助信息描述]) VALUES (37, N'用户站', N'US_Common', N'控制器', N'1', N'控制器', N'', NULL, NULL, NULL)
  1384. INSERT [dbo].[模板信息] ([ID], [协议类型], [协议名称], [模板名称], [用户站参数], [子设备], [可支持的模板ID], [地址说明], [远程操作窗体], [辅助信息描述]) VALUES (53, N'通讯设备', N'CD_PSController', N'控制器', N'1', NULL, NULL, NULL, NULL, NULL)
  1385. SET IDENTITY_INSERT [dbo].[模板信息] OFF
  1386. /****** Object: Table [dbo].[联系人] Script Date: 05/20/2021 19:22:32 ******/
  1387. SET ANSI_NULLS ON
  1388. GO
  1389. SET QUOTED_IDENTIFIER ON
  1390. GO
  1391. SET ANSI_PADDING ON
  1392. GO
  1393. CREATE TABLE [dbo].[联系人](
  1394. [ID] [int] IDENTITY(1,1) NOT NULL,
  1395. [卡号] [varchar](50) NULL,
  1396. [姓名] [varchar](50) NULL,
  1397. [年龄] [varchar](50) NULL,
  1398. [地址] [varchar](50) NULL,
  1399. [组] [varchar](50) NULL,
  1400. [备注] [varchar](100) NULL
  1401. ) ON [PRIMARY]
  1402. GO
  1403. SET ANSI_PADDING OFF
  1404. GO
  1405. SET IDENTITY_INSERT [dbo].[联系人] ON
  1406. INSERT [dbo].[联系人] ([ID], [卡号], [姓名], [年龄], [地址], [组], [备注]) VALUES (1, N'15690458845', N'xiaotiantain', N'23', N'', N'xiao', N'')
  1407. SET IDENTITY_INSERT [dbo].[联系人] OFF
  1408. /****** Object: Table [dbo].[历史记录模板] Script Date: 05/20/2021 19:22:32 ******/
  1409. SET ANSI_NULLS ON
  1410. GO
  1411. SET QUOTED_IDENTIFIER ON
  1412. GO
  1413. SET ANSI_PADDING ON
  1414. GO
  1415. CREATE TABLE [dbo].[历史记录模板](
  1416. [id] [int] IDENTITY(1,1) NOT NULL,
  1417. [设备ID] [int] NULL,
  1418. [记录时间] [datetime] NOT NULL,
  1419. [采集时间] [datetime] NOT NULL,
  1420. [设备状态] [varchar](10) NOT NULL,
  1421. [通讯状态] [varchar](10) NOT NULL,
  1422. [数据来源] [varchar](10) NOT NULL,
  1423. [预留水位] [numeric](18, 2) NULL,
  1424. [实测水位] [numeric](18, 2) NULL,
  1425. [基准水位] [numeric](18, 2) NULL,
  1426. [信号强度] [numeric](18, 0) NULL,
  1427. [电池电压] [numeric](18, 2) NULL,
  1428. [模拟量水位故障] [varchar](50) NULL,
  1429. [箱门开关] [varchar](50) NULL,
  1430. [水位计故障] [varchar](50) NULL,
  1431. [电池电压下限报警] [varchar](50) NULL,
  1432. CONSTRAINT [PK_历史记录模板] PRIMARY KEY CLUSTERED
  1433. (
  1434. [id] ASC
  1435. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1436. ) ON [PRIMARY]
  1437. GO
  1438. SET ANSI_PADDING OFF
  1439. GO
  1440. /****** Object: Table [dbo].[历史记录_000004_2021] Script Date: 05/20/2021 19:22:32 ******/
  1441. SET ANSI_NULLS ON
  1442. GO
  1443. SET QUOTED_IDENTIFIER ON
  1444. GO
  1445. SET ANSI_PADDING ON
  1446. GO
  1447. CREATE TABLE [dbo].[历史记录_000004_2021](
  1448. [id] [int] IDENTITY(1,1) NOT NULL,
  1449. [设备ID] [int] NULL,
  1450. [记录时间] [datetime] NOT NULL,
  1451. [采集时间] [datetime] NOT NULL,
  1452. [设备状态] [varchar](10) NOT NULL,
  1453. [通讯状态] [varchar](10) NOT NULL,
  1454. [数据来源] [varchar](10) NOT NULL,
  1455. [预留水位] [numeric](18, 2) NULL,
  1456. [实测水位] [numeric](18, 2) NULL,
  1457. [基准水位] [numeric](18, 2) NULL,
  1458. [信号强度] [numeric](18, 0) NULL,
  1459. [电池电压] [numeric](18, 2) NULL,
  1460. [模拟量水位故障] [varchar](50) NULL,
  1461. [箱门开关] [varchar](50) NULL,
  1462. [水位计故障] [varchar](50) NULL,
  1463. [电池电压下限报警] [varchar](50) NULL
  1464. ) ON [PRIMARY]
  1465. GO
  1466. SET ANSI_PADDING OFF
  1467. GO
  1468. CREATE NONCLUSTERED INDEX [采集时间] ON [dbo].[历史记录_000004_2021]
  1469. (
  1470. [采集时间] ASC
  1471. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1472. GO
  1473. SET IDENTITY_INSERT [dbo].[历史记录_000004_2021] ON
  1474. INSERT [dbo].[历史记录_000004_2021] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (1, 4, CAST(0x0000AD17009BA168 AS DateTime), CAST(0x0000AD1700A4CB80 AS DateTime), N'全部正常', N'全部正常', N'历史记录', CAST(6.55 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(11 AS Numeric(18, 0)), CAST(11.27 AS Numeric(18, 2)), N'报警', N'正常', N'报警', N'报警')
  1475. INSERT [dbo].[历史记录_000004_2021] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (2, 4, CAST(0x0000AD17009BA168 AS DateTime), CAST(0x0000AD17009B2E90 AS DateTime), N'全部正常', N'全部正常', N'历史记录', CAST(6.55 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(17 AS Numeric(18, 0)), CAST(11.27 AS Numeric(18, 2)), N'报警', N'正常', N'报警', N'报警')
  1476. SET IDENTITY_INSERT [dbo].[历史记录_000004_2021] OFF
  1477. /****** Object: Table [dbo].[控制参数] Script Date: 05/20/2021 19:22:32 ******/
  1478. SET ANSI_NULLS ON
  1479. GO
  1480. SET QUOTED_IDENTIFIER ON
  1481. GO
  1482. CREATE TABLE [dbo].[控制参数](
  1483. [ID] [int] IDENTITY(1,1) NOT NULL,
  1484. [名称] [nvarchar](50) NULL,
  1485. [用户站类型] [nvarchar](50) NULL
  1486. ) ON [PRIMARY]
  1487. GO
  1488. /****** Object: Table [dbo].[角色信息] Script Date: 05/20/2021 19:22:32 ******/
  1489. SET ANSI_NULLS ON
  1490. GO
  1491. SET QUOTED_IDENTIFIER ON
  1492. GO
  1493. SET ANSI_PADDING ON
  1494. GO
  1495. CREATE TABLE [dbo].[角色信息](
  1496. [ID] [int] IDENTITY(1,1) NOT NULL,
  1497. [角色名称] [varchar](50) NOT NULL,
  1498. [角色描述] [varchar](500) NULL,
  1499. [创建时间] [datetime] NULL,
  1500. CONSTRAINT [PK_角色信息] PRIMARY KEY CLUSTERED
  1501. (
  1502. [ID] ASC
  1503. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1504. ) ON [PRIMARY]
  1505. GO
  1506. SET ANSI_PADDING OFF
  1507. GO
  1508. SET IDENTITY_INSERT [dbo].[角色信息] ON
  1509. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (1, N'开发人员', NULL, NULL)
  1510. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (2, N'总管理员', N'总管理员', NULL)
  1511. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (3, N'分管理员1', N'', NULL)
  1512. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (4, N'浏览用户', N'', NULL)
  1513. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (15, N'test1', N'非', CAST(0x0000AA56008B05D8 AS DateTime))
  1514. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (19, N'测试', N'', CAST(0x0000AA7300A84878 AS DateTime))
  1515. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (20, N'测试2', N'123', CAST(0x0000AA7600E26440 AS DateTime))
  1516. INSERT [dbo].[角色信息] ([ID], [角色名称], [角色描述], [创建时间]) VALUES (21, N'test2', N'新建测试角色', CAST(0x0000AA77009A99BC AS DateTime))
  1517. SET IDENTITY_INSERT [dbo].[角色信息] OFF
  1518. /****** Object: Table [dbo].[角色权限关系] Script Date: 05/20/2021 19:22:32 ******/
  1519. SET ANSI_NULLS ON
  1520. GO
  1521. SET QUOTED_IDENTIFIER ON
  1522. GO
  1523. SET ANSI_PADDING ON
  1524. GO
  1525. CREATE TABLE [dbo].[角色权限关系](
  1526. [ID] [int] IDENTITY(1,1) NOT NULL,
  1527. [角色ID] [int] NOT NULL,
  1528. [权限ID] [int] NOT NULL,
  1529. [权限值] [varchar](50) NOT NULL,
  1530. CONSTRAINT [PK_角色权限关系] PRIMARY KEY CLUSTERED
  1531. (
  1532. [ID] ASC
  1533. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1534. ) ON [PRIMARY]
  1535. GO
  1536. SET ANSI_PADDING OFF
  1537. GO
  1538. SET IDENTITY_INSERT [dbo].[角色权限关系] ON
  1539. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (27, 1, 3, N'1')
  1540. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (30, 1, 6, N'1')
  1541. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (33, 1, 9, N'1')
  1542. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (36, 2, 3, N'1')
  1543. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (39, 2, 6, N'1')
  1544. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (42, 2, 9, N'1')
  1545. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (45, 3, 3, N'1')
  1546. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (48, 3, 6, N'1')
  1547. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (51, 3, 9, N'1')
  1548. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (54, 4, 3, N'0')
  1549. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (57, 4, 6, N'1')
  1550. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (60, 4, 9, N'0')
  1551. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (70, 1, 12, N'1')
  1552. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (71, 1, 13, N'1')
  1553. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (72, 1, 14, N'1')
  1554. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (73, 1, 15, N'1')
  1555. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (74, 1, 16, N'1')
  1556. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (75, 1, 17, N'1')
  1557. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (76, 1, 18, N'1')
  1558. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (77, 1, 19, N'1')
  1559. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (78, 1, 20, N'1')
  1560. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (79, 2, 12, N'1')
  1561. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (80, 2, 13, N'1')
  1562. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (81, 2, 14, N'1')
  1563. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (82, 2, 15, N'1')
  1564. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (83, 2, 16, N'1')
  1565. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (84, 2, 17, N'1')
  1566. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (85, 2, 18, N'1')
  1567. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (86, 2, 19, N'1')
  1568. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (87, 2, 20, N'1')
  1569. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (89, 2, 22, N'1')
  1570. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (90, 1, 22, N'0')
  1571. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (91, 3, 12, N'1')
  1572. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (92, 3, 13, N'1')
  1573. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (93, 3, 14, N'1')
  1574. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (94, 3, 15, N'0')
  1575. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (95, 3, 16, N'0')
  1576. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (96, 3, 17, N'0')
  1577. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (97, 3, 18, N'1')
  1578. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (98, 3, 19, N'1')
  1579. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (99, 3, 20, N'0')
  1580. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (100, 3, 22, N'0')
  1581. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (101, 4, 12, N'0')
  1582. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (102, 4, 13, N'0')
  1583. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (103, 4, 14, N'0')
  1584. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (104, 4, 15, N'0')
  1585. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (105, 4, 16, N'0')
  1586. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (106, 4, 17, N'0')
  1587. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (107, 4, 18, N'0')
  1588. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (108, 4, 19, N'0')
  1589. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (109, 4, 20, N'0')
  1590. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (110, 4, 22, N'0')
  1591. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (111, 1, 23, N'1')
  1592. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (114, 2, 23, N'1')
  1593. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (121, 3, 23, N'1')
  1594. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (122, 4, 23, N'0')
  1595. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (133, 15, 9, N'0')
  1596. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (134, 15, 13, N'0')
  1597. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (135, 15, 14, N'0')
  1598. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (136, 15, 15, N'0')
  1599. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (137, 15, 16, N'0')
  1600. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (138, 15, 18, N'0')
  1601. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (139, 15, 19, N'0')
  1602. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (140, 15, 20, N'0')
  1603. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (141, 15, 23, N'0')
  1604. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (151, 19, 9, N'0')
  1605. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (152, 19, 13, N'0')
  1606. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (153, 19, 14, N'0')
  1607. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (154, 19, 15, N'0')
  1608. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (155, 19, 16, N'0')
  1609. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (156, 19, 18, N'0')
  1610. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (157, 19, 19, N'0')
  1611. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (158, 19, 20, N'0')
  1612. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (159, 19, 23, N'0')
  1613. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (160, 20, 9, N'0')
  1614. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (161, 20, 13, N'1')
  1615. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (162, 20, 14, N'0')
  1616. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (163, 20, 15, N'0')
  1617. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (164, 20, 16, N'0')
  1618. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (165, 20, 18, N'0')
  1619. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (166, 20, 19, N'0')
  1620. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (167, 20, 20, N'0')
  1621. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (168, 20, 23, N'0')
  1622. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (169, 21, 9, N'1')
  1623. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (170, 21, 13, N'1')
  1624. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (171, 21, 14, N'1')
  1625. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (172, 21, 15, N'0')
  1626. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (173, 21, 16, N'0')
  1627. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (174, 21, 18, N'0')
  1628. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (175, 21, 19, N'1')
  1629. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (176, 21, 20, N'0')
  1630. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (177, 21, 23, N'1')
  1631. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (178, 21, 6, N'0')
  1632. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (215, 19, 6, N'1')
  1633. INSERT [dbo].[角色权限关系] ([ID], [角色ID], [权限ID], [权限值]) VALUES (226, 20, 6, N'1')
  1634. SET IDENTITY_INSERT [dbo].[角色权限关系] OFF
  1635. /****** Object: Table [dbo].[角色菜单关系表] Script Date: 05/20/2021 19:22:32 ******/
  1636. SET ANSI_NULLS ON
  1637. GO
  1638. SET QUOTED_IDENTIFIER ON
  1639. GO
  1640. CREATE TABLE [dbo].[角色菜单关系表](
  1641. [ID] [int] IDENTITY(1,1) NOT NULL,
  1642. [角色ID] [int] NOT NULL,
  1643. [菜单ID] [int] NOT NULL,
  1644. CONSTRAINT [PK_角色菜单关系表] PRIMARY KEY CLUSTERED
  1645. (
  1646. [ID] ASC
  1647. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1648. ) ON [PRIMARY]
  1649. GO
  1650. SET IDENTITY_INSERT [dbo].[角色菜单关系表] ON
  1651. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (760, 1, 1)
  1652. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (761, 1, 59)
  1653. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (762, 1, 7)
  1654. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (763, 1, 60)
  1655. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (764, 1, 8)
  1656. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (765, 1, 3)
  1657. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (766, 1, 9)
  1658. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (767, 1, 32)
  1659. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (768, 1, 10)
  1660. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (769, 1, 11)
  1661. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (770, 1, 12)
  1662. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (771, 1, 19)
  1663. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (772, 1, 45)
  1664. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (773, 1, 49)
  1665. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (774, 1, 51)
  1666. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (775, 1, 47)
  1667. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (776, 1, 52)
  1668. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (777, 1, 53)
  1669. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (778, 1, 4)
  1670. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (779, 1, 57)
  1671. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (780, 1, 35)
  1672. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (781, 1, 37)
  1673. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (782, 1, 58)
  1674. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (783, 1, 43)
  1675. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (784, 1, 6)
  1676. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (785, 1, 56)
  1677. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (786, 1, 15)
  1678. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (787, 1, 23)
  1679. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (788, 1, 36)
  1680. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (789, 1, 34)
  1681. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (790, 1, 64)
  1682. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1073, 15, 64)
  1683. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1074, 15, 1)
  1684. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1075, 15, 7)
  1685. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1076, 15, 6)
  1686. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1077, 15, 56)
  1687. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1078, 15, 15)
  1688. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1804, 4, 64)
  1689. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1857, 19, 64)
  1690. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1858, 19, 6)
  1691. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1859, 19, 15)
  1692. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1862, 21, 64)
  1693. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1863, 21, 1)
  1694. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1864, 21, 7)
  1695. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1865, 21, 8)
  1696. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1866, 21, 45)
  1697. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1867, 21, 49)
  1698. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1868, 21, 19)
  1699. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1869, 21, 47)
  1700. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1870, 21, 52)
  1701. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1871, 21, 53)
  1702. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1872, 21, 3)
  1703. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1873, 21, 9)
  1704. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1874, 21, 10)
  1705. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1875, 21, 11)
  1706. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1876, 21, 12)
  1707. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1877, 21, 4)
  1708. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1878, 21, 57)
  1709. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1879, 21, 35)
  1710. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1880, 21, 37)
  1711. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1881, 21, 43)
  1712. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1882, 21, 6)
  1713. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1883, 21, 56)
  1714. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1884, 21, 15)
  1715. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1885, 21, 23)
  1716. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1886, 21, 36)
  1717. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1887, 21, 34)
  1718. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1892, 1, 67)
  1719. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1981, 20, 64)
  1720. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1982, 20, 1)
  1721. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1983, 20, 7)
  1722. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1984, 20, 8)
  1723. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1985, 3, 64)
  1724. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1986, 3, 1)
  1725. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1987, 3, 7)
  1726. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1988, 3, 8)
  1727. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1989, 3, 47)
  1728. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1990, 3, 52)
  1729. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1991, 3, 53)
  1730. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1992, 3, 3)
  1731. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1993, 3, 9)
  1732. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1994, 3, 10)
  1733. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1995, 3, 11)
  1734. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1996, 3, 45)
  1735. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1997, 3, 49)
  1736. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1998, 3, 19)
  1737. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (1999, 3, 4)
  1738. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2000, 3, 57)
  1739. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2001, 3, 35)
  1740. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2002, 3, 37)
  1741. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2003, 3, 43)
  1742. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2004, 3, 6)
  1743. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2005, 3, 56)
  1744. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2006, 3, 15)
  1745. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2007, 3, 23)
  1746. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2008, 3, 36)
  1747. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2009, 3, 34)
  1748. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2010, 3, 76)
  1749. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2280, 1, 78)
  1750. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2382, 2, 64)
  1751. GO
  1752. print 'Processed 100 total records'
  1753. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2383, 2, 1)
  1754. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2384, 2, 71)
  1755. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2385, 2, 7)
  1756. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2386, 2, 3)
  1757. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2387, 2, 9)
  1758. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2388, 2, 10)
  1759. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2389, 2, 11)
  1760. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2390, 2, 12)
  1761. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2391, 2, 4)
  1762. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2392, 2, 57)
  1763. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2393, 2, 35)
  1764. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2394, 2, 37)
  1765. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2395, 2, 43)
  1766. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2396, 2, 6)
  1767. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2397, 2, 56)
  1768. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2398, 2, 15)
  1769. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2399, 2, 23)
  1770. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2400, 2, 36)
  1771. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2401, 2, 34)
  1772. INSERT [dbo].[角色菜单关系表] ([ID], [角色ID], [菜单ID]) VALUES (2402, 2, 68)
  1773. SET IDENTITY_INSERT [dbo].[角色菜单关系表] OFF
  1774. /****** Object: Table [dbo].[价格类型] Script Date: 05/20/2021 19:22:32 ******/
  1775. SET ANSI_NULLS ON
  1776. GO
  1777. SET QUOTED_IDENTIFIER ON
  1778. GO
  1779. SET ANSI_PADDING ON
  1780. GO
  1781. CREATE TABLE [dbo].[价格类型](
  1782. [ID] [int] IDENTITY(1,1) NOT NULL,
  1783. [名称] [varchar](50) NOT NULL,
  1784. CONSTRAINT [PK_价格种类] PRIMARY KEY CLUSTERED
  1785. (
  1786. [ID] ASC
  1787. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1788. ) ON [PRIMARY]
  1789. GO
  1790. SET ANSI_PADDING OFF
  1791. GO
  1792. /****** Object: Table [dbo].[计量方式] Script Date: 05/20/2021 19:22:32 ******/
  1793. SET ANSI_NULLS ON
  1794. GO
  1795. SET QUOTED_IDENTIFIER ON
  1796. GO
  1797. CREATE TABLE [dbo].[计量方式](
  1798. [Id] [int] IDENTITY(1,1) NOT NULL,
  1799. [名称] [nvarchar](50) NULL
  1800. ) ON [PRIMARY]
  1801. GO
  1802. /****** Object: Table [dbo].[计费方式] Script Date: 05/20/2021 19:22:32 ******/
  1803. SET ANSI_NULLS ON
  1804. GO
  1805. SET QUOTED_IDENTIFIER ON
  1806. GO
  1807. CREATE TABLE [dbo].[计费方式](
  1808. [Id] [int] IDENTITY(1,1) NOT NULL,
  1809. [名称] [nvarchar](50) NOT NULL
  1810. ) ON [PRIMARY]
  1811. GO
  1812. /****** Object: Table [dbo].[级别信息] Script Date: 05/20/2021 19:22:32 ******/
  1813. SET ANSI_NULLS ON
  1814. GO
  1815. SET QUOTED_IDENTIFIER ON
  1816. GO
  1817. SET ANSI_PADDING ON
  1818. GO
  1819. CREATE TABLE [dbo].[级别信息](
  1820. [ID] [int] IDENTITY(1,1) NOT NULL,
  1821. [级别名称] [varchar](50) NOT NULL,
  1822. [级别描述] [varchar](200) NULL,
  1823. [显示别名] [varchar](50) NULL,
  1824. CONSTRAINT [PK_级别信息] PRIMARY KEY CLUSTERED
  1825. (
  1826. [ID] ASC
  1827. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1828. ) ON [PRIMARY]
  1829. GO
  1830. SET ANSI_PADDING OFF
  1831. GO
  1832. SET IDENTITY_INSERT [dbo].[级别信息] ON
  1833. INSERT [dbo].[级别信息] ([ID], [级别名称], [级别描述], [显示别名]) VALUES (1, N'系统', NULL, N'系统')
  1834. INSERT [dbo].[级别信息] ([ID], [级别名称], [级别描述], [显示别名]) VALUES (5, N'城市', NULL, N'城市')
  1835. INSERT [dbo].[级别信息] ([ID], [级别名称], [级别描述], [显示别名]) VALUES (6, N'区县', NULL, N'区域')
  1836. INSERT [dbo].[级别信息] ([ID], [级别名称], [级别描述], [显示别名]) VALUES (8, N'设备', NULL, N'测站')
  1837. SET IDENTITY_INSERT [dbo].[级别信息] OFF
  1838. /****** Object: Table [dbo].[换表类型] Script Date: 05/20/2021 19:22:32 ******/
  1839. SET ANSI_NULLS ON
  1840. GO
  1841. SET QUOTED_IDENTIFIER ON
  1842. GO
  1843. SET ANSI_PADDING ON
  1844. GO
  1845. CREATE TABLE [dbo].[换表类型](
  1846. [ID] [int] IDENTITY(1,1) NOT NULL,
  1847. [换表类型] [varchar](50) NULL,
  1848. CONSTRAINT [PK_换表类型] PRIMARY KEY NONCLUSTERED
  1849. (
  1850. [ID] ASC
  1851. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1852. ) ON [PRIMARY]
  1853. GO
  1854. SET ANSI_PADDING OFF
  1855. GO
  1856. SET IDENTITY_INSERT [dbo].[换表类型] ON
  1857. INSERT [dbo].[换表类型] ([ID], [换表类型]) VALUES (1, N'更换水表')
  1858. INSERT [dbo].[换表类型] ([ID], [换表类型]) VALUES (2, N'水表满度')
  1859. SET IDENTITY_INSERT [dbo].[换表类型] OFF
  1860. /****** Object: Table [dbo].[换表记录] Script Date: 05/20/2021 19:22:32 ******/
  1861. SET ANSI_NULLS ON
  1862. GO
  1863. SET QUOTED_IDENTIFIER ON
  1864. GO
  1865. SET ANSI_PADDING ON
  1866. GO
  1867. CREATE TABLE [dbo].[换表记录](
  1868. [ID] [int] IDENTITY(1,1) NOT NULL,
  1869. [设备ID] [int] NOT NULL,
  1870. [记录时间] [datetime] NOT NULL,
  1871. [旧表停用时间] [datetime] NOT NULL,
  1872. [旧表指数] [numeric](18, 2) NOT NULL,
  1873. [补偿值] [numeric](18, 2) NOT NULL,
  1874. [新表启用时间] [datetime] NOT NULL,
  1875. [新表指数] [numeric](18, 2) NOT NULL,
  1876. [换表类型ID] [int] NOT NULL,
  1877. [换表原因] [varchar](200) NULL,
  1878. [换表人员] [varchar](50) NULL,
  1879. [更新记录] [varchar](50) NULL,
  1880. [更新方式] [varchar](50) NULL,
  1881. [操作员ID] [int] NOT NULL,
  1882. [有效性] [varchar](50) NULL,
  1883. PRIMARY KEY CLUSTERED
  1884. (
  1885. [ID] ASC
  1886. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1887. ) ON [PRIMARY]
  1888. GO
  1889. SET ANSI_PADDING OFF
  1890. GO
  1891. /****** Object: Table [dbo].[管理信息] Script Date: 05/20/2021 19:22:32 ******/
  1892. SET ANSI_NULLS ON
  1893. GO
  1894. SET QUOTED_IDENTIFIER ON
  1895. GO
  1896. SET ANSI_PADDING ON
  1897. GO
  1898. CREATE TABLE [dbo].[管理信息](
  1899. [ID] [int] IDENTITY(1,1) NOT NULL,
  1900. [级别ID] [int] NOT NULL,
  1901. [名称] [varchar](50) NOT NULL,
  1902. [上级ID] [int] NOT NULL,
  1903. [级别描述] [nvarchar](1000) NULL,
  1904. CONSTRAINT [PK_管理信息] PRIMARY KEY CLUSTERED
  1905. (
  1906. [ID] ASC
  1907. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1908. ) ON [PRIMARY]
  1909. GO
  1910. SET ANSI_PADDING OFF
  1911. GO
  1912. SET IDENTITY_INSERT [dbo].[管理信息] ON
  1913. INSERT [dbo].[管理信息] ([ID], [级别ID], [名称], [上级ID], [级别描述]) VALUES (1, 1, N'远程监测管理平台', 0, NULL)
  1914. INSERT [dbo].[管理信息] ([ID], [级别ID], [名称], [上级ID], [级别描述]) VALUES (2, 5, N'xx市', 1, NULL)
  1915. INSERT [dbo].[管理信息] ([ID], [级别ID], [名称], [上级ID], [级别描述]) VALUES (3, 6, N'xx区', 2, NULL)
  1916. SET IDENTITY_INSERT [dbo].[管理信息] OFF
  1917. /****** Object: Table [dbo].[管理辅助信息] Script Date: 05/20/2021 19:22:32 ******/
  1918. SET ANSI_NULLS ON
  1919. GO
  1920. SET QUOTED_IDENTIFIER ON
  1921. GO
  1922. SET ANSI_PADDING ON
  1923. GO
  1924. CREATE TABLE [dbo].[管理辅助信息](
  1925. [ID] [int] IDENTITY(1,1) NOT NULL,
  1926. [管理ID] [int] NOT NULL,
  1927. [名称] [varchar](50) NULL,
  1928. [值] [varchar](50) NULL,
  1929. CONSTRAINT [PK_级别辅助信息] PRIMARY KEY CLUSTERED
  1930. (
  1931. [ID] ASC
  1932. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1933. ) ON [PRIMARY]
  1934. GO
  1935. SET ANSI_PADDING OFF
  1936. GO
  1937. /****** Object: Table [dbo].[购水设备] Script Date: 05/20/2021 19:22:32 ******/
  1938. SET ANSI_NULLS ON
  1939. GO
  1940. SET QUOTED_IDENTIFIER ON
  1941. GO
  1942. CREATE TABLE [dbo].[购水设备](
  1943. [Id] [int] IDENTITY(1,1) NOT NULL,
  1944. [名称] [nvarchar](50) NOT NULL,
  1945. [设备ID] [int] NOT NULL,
  1946. [水资源费ID] [int] NOT NULL,
  1947. [计费方式ID] [int] NOT NULL,
  1948. [计量方式ID] [int] NOT NULL,
  1949. [售水方式ID] [int] NOT NULL,
  1950. [设备主板号] [nvarchar](50) NOT NULL,
  1951. [水表倍率] [int] NOT NULL,
  1952. [报警下限] [numeric](18, 2) NOT NULL,
  1953. [初始计费值] [numeric](18, 2) NOT NULL,
  1954. [累计购水量] [numeric](18, 2) NOT NULL
  1955. ) ON [PRIMARY]
  1956. GO
  1957. /****** Object: Table [dbo].[工程信息] Script Date: 05/20/2021 19:22:32 ******/
  1958. SET ANSI_NULLS ON
  1959. GO
  1960. SET QUOTED_IDENTIFIER ON
  1961. GO
  1962. SET ANSI_PADDING ON
  1963. GO
  1964. CREATE TABLE [dbo].[工程信息](
  1965. [ID] [int] IDENTITY(1,1) NOT NULL,
  1966. [工程信息] [varchar](50) NOT NULL,
  1967. CONSTRAINT [PK_工程信息] PRIMARY KEY CLUSTERED
  1968. (
  1969. [ID] ASC
  1970. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1971. ) ON [PRIMARY]
  1972. GO
  1973. SET ANSI_PADDING OFF
  1974. GO
  1975. SET IDENTITY_INSERT [dbo].[工程信息] ON
  1976. INSERT [dbo].[工程信息] ([ID], [工程信息]) VALUES (1, N'分组1')
  1977. INSERT [dbo].[工程信息] ([ID], [工程信息]) VALUES (2, N'分组2')
  1978. INSERT [dbo].[工程信息] ([ID], [工程信息]) VALUES (3, N'分组3')
  1979. SET IDENTITY_INSERT [dbo].[工程信息] OFF
  1980. /****** Object: Table [dbo].[个人显示规则] Script Date: 05/20/2021 19:22:32 ******/
  1981. SET ANSI_NULLS ON
  1982. GO
  1983. SET QUOTED_IDENTIFIER ON
  1984. GO
  1985. SET ANSI_PADDING ON
  1986. GO
  1987. CREATE TABLE [dbo].[个人显示规则](
  1988. [id] [int] IDENTITY(1,1) NOT NULL,
  1989. [名称] [varchar](50) NULL,
  1990. [模板ID] [int] NULL,
  1991. [设置类型] [varchar](50) NULL,
  1992. [操作员] [varchar](50) NULL,
  1993. PRIMARY KEY CLUSTERED
  1994. (
  1995. [id] ASC
  1996. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  1997. ) ON [PRIMARY]
  1998. GO
  1999. SET ANSI_PADDING OFF
  2000. GO
  2001. SET IDENTITY_INSERT [dbo].[个人显示规则] ON
  2002. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (1, N'默认', 0, N'实时列表', N'default')
  2003. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (2, N'默认', 0, N'历史记录', N'default')
  2004. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (5, N'默认', 0, N'报表统计', N'default')
  2005. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (6, N'默认', 0, N'测点信息', N'default')
  2006. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (7, N'默认', 0, N'事件记录', N'default')
  2007. INSERT [dbo].[个人显示规则] ([id], [名称], [模板ID], [设置类型], [操作员]) VALUES (9, N'默认', 0, N'地图实时列表', N'default')
  2008. SET IDENTITY_INSERT [dbo].[个人显示规则] OFF
  2009. /****** Object: Table [dbo].[个人显示参数] Script Date: 05/20/2021 19:22:32 ******/
  2010. SET ANSI_NULLS ON
  2011. GO
  2012. SET QUOTED_IDENTIFIER ON
  2013. GO
  2014. SET ANSI_PADDING ON
  2015. GO
  2016. CREATE TABLE [dbo].[个人显示参数](
  2017. [id] [int] IDENTITY(1,1) NOT NULL,
  2018. [规则ID] [varchar](50) NULL,
  2019. [量名称] [varchar](50) NULL,
  2020. [是否显示] [char](2) NULL,
  2021. [顺序号] [int] NULL,
  2022. [是否冻结] [varchar](50) NULL,
  2023. [量类型] [varchar](50) NULL,
  2024. [对齐方式] [varchar](50) NULL,
  2025. [是否排序] [varchar](50) NULL,
  2026. [组名] [varchar](50) NULL,
  2027. [显示名称] [varchar](50) NULL,
  2028. [列宽] [varchar](50) NULL,
  2029. PRIMARY KEY CLUSTERED
  2030. (
  2031. [id] ASC
  2032. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2033. ) ON [PRIMARY]
  2034. GO
  2035. SET ANSI_PADDING OFF
  2036. GO
  2037. SET IDENTITY_INSERT [dbo].[个人显示参数] ON
  2038. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (423, N'2', N'单位名称', N'是', 0, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2039. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (424, N'2', N'设备名称', N'是', 1, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2040. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (425, N'2', N'通讯状态', N'是', 2, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2041. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (426, N'2', N'设备状态', N'是', 3, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2042. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (427, N'2', N'记录时间', N'是', 4, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2043. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (428, N'2', N'采集时间', N'是', 5, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2044. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (429, N'2', N'数据来源', N'是', 6, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2045. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (430, N'2', N'信号强度', N'是', 7, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2046. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (431, N'2', N'电源电压', N'是', 8, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2047. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (432, N'2', N'水位1', N'是', 9, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2048. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (433, N'2', N'水位2', N'是', 10, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2049. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (434, N'2', N'压力', N'是', 11, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2050. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (435, N'2', N'水位1断线报警', N'否', 12, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2051. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (436, N'2', N'水位2断线报警', N'否', 13, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2052. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (437, N'2', N'门开关', N'是', 14, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2053. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (438, N'2', N'电源监测', N'是', 15, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2054. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (439, N'2', N'电源电压下限报警', N'否', 16, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2055. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (440, N'2', N'电源电压下下限报警', N'否', 17, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2056. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (441, N'2', N'压力断线报警', N'否', 18, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2057. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (442, N'2', N'水位1上限报警', N'否', 19, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2058. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (443, N'2', N'水位1下限报警', N'否', 20, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2059. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (444, N'2', N'水位2上限报警', N'否', 21, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2060. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (445, N'2', N'水位2下限报警', N'否', 22, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2061. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (446, N'2', N'压力上限报警', N'否', 23, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2062. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (447, N'2', N'压力下限报警', N'否', 24, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2063. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (448, N'2', N'水位计1状态', N'是', 25, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2064. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (449, N'2', N'水位计2状态', N'是', 26, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2065. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (450, N'2', N'压力计状态', N'是', 27, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2066. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (451, N'2', N'电源状态', N'是', 28, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2067. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (452, N'2', N'真实经度', N'否', 29, N'否', N'测点信息', N'left', N'是', N'', N'', NULL)
  2068. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (453, N'2', N'真实纬度', N'否', 30, N'否', N'测点信息', N'left', N'是', N'', N'', NULL)
  2069. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (454, N'2', N'安装时间', N'否', 31, N'否', N'测点信息', N'left', N'是', N'', N'', NULL)
  2070. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (455, N'2', N'安装位置', N'否', 32, N'否', N'测点信息', N'left', N'是', N'', N'', NULL)
  2071. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (456, N'2', N'手机卡号', N'是', 33, N'否', N'测点信息', N'left', N'是', N'', N'', NULL)
  2072. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (457, N'1', N'单位名称', N'否', 0, N'否', N'通讯参数', N'left', N'否', N'', N'', NULL)
  2073. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (458, N'1', N'设备名称', N'是', 1, N'否', N'通讯参数', N'center', N'否', N'', N'测点名称', NULL)
  2074. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (459, N'1', N'通讯状态', N'是', 2, N'否', N'通讯参数', N'left', N'否', N'', N'', NULL)
  2075. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (460, N'1', N'设备状态', N'是', 3, N'否', N'通讯参数', N'left', N'否', N'', N'', NULL)
  2076. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (461, N'1', N'更新时间', N'是', 4, N'否', N'通讯参数', N'center', N'是', N'', N'', NULL)
  2077. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (462, N'1', N'消毒装置空高', N'是', 5, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2078. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (463, N'1', N'消毒装置水位', N'是', 6, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2079. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (464, N'1', N'清水池空高', N'否', 7, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2080. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (465, N'1', N'清水池水位', N'是', 8, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2081. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (466, N'1', N'电源电压', N'是', 9, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2082. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (467, N'1', N'吸水池空高', N'是', 10, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2083. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (468, N'1', N'吸水池水位', N'是', 11, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2084. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (469, N'1', N'平升水位计水位', N'是', 12, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2085. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (470, N'1', N'一号压力', N'是', 13, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2086. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (471, N'1', N'二号压力', N'是', 14, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2087. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (472, N'1', N'浊度', N'是', 15, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2088. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (473, N'1', N'余氯', N'是', 16, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2089. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (474, N'1', N'表1瞬时流量', N'是', 17, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2090. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (475, N'1', N'表1正累计', N'是', 18, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2091. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (476, N'1', N'表1负累计', N'是', 19, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2092. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (477, N'1', N'表1净累计', N'是', 20, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2093. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (478, N'1', N'表2瞬时流量', N'是', 21, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2094. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (479, N'1', N'表2正累计', N'是', 22, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2095. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (480, N'1', N'表2负累计', N'是', 23, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2096. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (481, N'1', N'表2净累计', N'是', 24, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2097. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (482, N'1', N'门开关', N'是', 25, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2098. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (483, N'1', N'真实经度', N'否', 26, N'否', N'测点信息', N'left', N'否', N'', N'', NULL)
  2099. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (484, N'1', N'电池电压下限报警', N'是', 27, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2100. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (485, N'1', N'真实纬度', N'否', 28, N'否', N'测点信息', N'left', N'否', N'', N'', NULL)
  2101. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (486, N'1', N'电池电压下下限报警', N'是', 29, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2102. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (487, N'1', N'安装时间', N'否', 30, N'否', N'测点信息', N'left', N'否', N'', N'', NULL)
  2103. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (488, N'1', N'消毒装置水位计断线报警', N'是', 31, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2104. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (489, N'1', N'消毒装置水位上限报警', N'是', 32, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2105. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (490, N'1', N'消毒装置水位下限报警', N'是', 33, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2106. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (491, N'1', N'安装位置', N'否', 34, N'否', N'测点信息', N'left', N'否', N'', N'', NULL)
  2107. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (492, N'1', N'手机卡号', N'否', 35, N'否', N'测点信息', N'left', N'否', N'', N'', NULL)
  2108. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (493, N'1', N'清水池水位计断线报警', N'是', 36, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2109. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (494, N'1', N'清水池水位上限报警', N'是', 37, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2110. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (495, N'1', N'清水池水位下限报警', N'是', 38, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2111. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (496, N'1', N'吸水井水位计断线报警', N'是', 39, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2112. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (497, N'1', N'吸水井水位上限报警', N'是', 40, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2113. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (498, N'1', N'吸水井水位下限报警', N'是', 41, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2114. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (499, N'1', N'浊度分析仪断线报警', N'是', 42, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2115. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (500, N'1', N'浊度上限报警', N'是', 43, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2116. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (501, N'1', N'浊度下限报警', N'是', 44, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2117. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (502, N'1', N'余氯分析仪断线报警', N'是', 45, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2118. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (503, N'1', N'余氯上限报警', N'是', 46, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2119. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (504, N'1', N'余氯下限报警', N'是', 47, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2120. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (505, N'1', N'海峰表1通讯报警', N'是', 48, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2121. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (506, N'1', N'海峰表2通讯报警', N'是', 49, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2122. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (507, N'1', N'平升水位计通讯报警', N'是', 50, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2123. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (508, N'1', N'一号压力变送器通讯报警', N'是', 51, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2124. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (509, N'1', N'二号压力变送器通讯报警', N'是', 52, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2125. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (510, N'1', N'平升水位计水位上限报警', N'是', 53, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2126. INSERT [dbo].[个人显示参数] ([id], [规则ID], [量名称], [是否显示], [顺序号], [是否冻结], [量类型], [对齐方式], [是否排序], [组名], [显示名称], [列宽]) VALUES (511, N'1', N'平升水位计水位下限报警', N'是', 54, N'否', N'通讯参数', N'left', N'是', N'', N'', NULL)
  2127. SET IDENTITY_INSERT [dbo].[个人显示参数] OFF
  2128. /****** Object: Table [dbo].[个人设置] Script Date: 05/20/2021 19:22:32 ******/
  2129. SET ANSI_NULLS ON
  2130. GO
  2131. SET QUOTED_IDENTIFIER ON
  2132. GO
  2133. SET ANSI_PADDING ON
  2134. GO
  2135. CREATE TABLE [dbo].[个人设置](
  2136. [id] [int] IDENTITY(1,1) NOT NULL,
  2137. [名称] [varchar](50) NULL,
  2138. [模板ID] [int] NULL,
  2139. [设置类型] [varchar](50) NULL,
  2140. [设置规则] [varchar](200) NULL,
  2141. [操作员] [varchar](50) NULL
  2142. ) ON [PRIMARY]
  2143. GO
  2144. SET ANSI_PADDING OFF
  2145. GO
  2146. SET IDENTITY_INSERT [dbo].[个人设置] ON
  2147. INSERT [dbo].[个人设置] ([id], [名称], [模板ID], [设置类型], [设置规则], [操作员]) VALUES (1, N'默认', 1, N'实时列表', N'011111111111111111111', N'default')
  2148. INSERT [dbo].[个人设置] ([id], [名称], [模板ID], [设置类型], [设置规则], [操作员]) VALUES (2, N'默认', 1, N'历史查询', N'0111111111111111111111', N'default')
  2149. INSERT [dbo].[个人设置] ([id], [名称], [模板ID], [设置类型], [设置规则], [操作员]) VALUES (3, N'默认', 2, N'实时列表', N'011111111111110', N'default')
  2150. INSERT [dbo].[个人设置] ([id], [名称], [模板ID], [设置类型], [设置规则], [操作员]) VALUES (4, N'默认', 2, N'历史查询', N'01111101111111000', N'default')
  2151. SET IDENTITY_INSERT [dbo].[个人设置] OFF
  2152. /****** Object: Table [dbo].[分区信息] Script Date: 05/20/2021 19:22:32 ******/
  2153. SET ANSI_NULLS ON
  2154. GO
  2155. SET QUOTED_IDENTIFIER ON
  2156. GO
  2157. SET ANSI_PADDING ON
  2158. GO
  2159. CREATE TABLE [dbo].[分区信息](
  2160. [ID] [int] IDENTITY(1,1) NOT NULL,
  2161. [编号] [varchar](10) NULL,
  2162. [名称] [varchar](50) NULL,
  2163. [上级分区ID] [int] NULL,
  2164. [分区模板ID] [int] NULL,
  2165. [地图范围] [text] NULL,
  2166. [范围描述] [varchar](50) NULL,
  2167. [净流入水量公式] [text] NULL,
  2168. CONSTRAINT [PK_分区信息] PRIMARY KEY CLUSTERED
  2169. (
  2170. [ID] ASC
  2171. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2172. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  2173. GO
  2174. SET ANSI_PADDING OFF
  2175. GO
  2176. /****** Object: Table [dbo].[分区模板] Script Date: 05/20/2021 19:22:32 ******/
  2177. SET ANSI_NULLS ON
  2178. GO
  2179. SET QUOTED_IDENTIFIER ON
  2180. GO
  2181. SET ANSI_PADDING ON
  2182. GO
  2183. CREATE TABLE [dbo].[分区模板](
  2184. [ID] [int] IDENTITY(1,1) NOT NULL,
  2185. [模板名称] [varchar](50) NULL,
  2186. [总表支持模板ID] [varchar](50) NULL,
  2187. [总表支持量名称] [varchar](50) NULL,
  2188. [分表支持模板ID] [varchar](50) NULL,
  2189. [分表支持量名称] [varchar](50) NULL
  2190. ) ON [PRIMARY]
  2191. GO
  2192. SET ANSI_PADDING OFF
  2193. GO
  2194. /****** Object: Table [dbo].[分区和管理关系表] Script Date: 05/20/2021 19:22:32 ******/
  2195. SET ANSI_NULLS ON
  2196. GO
  2197. SET QUOTED_IDENTIFIER ON
  2198. GO
  2199. CREATE TABLE [dbo].[分区和管理关系表](
  2200. [ID] [int] IDENTITY(1,1) NOT NULL,
  2201. [分区ID] [int] NULL,
  2202. [管理ID] [int] NULL
  2203. ) ON [PRIMARY]
  2204. GO
  2205. /****** Object: Table [dbo].[分区分表信息] Script Date: 05/20/2021 19:22:32 ******/
  2206. SET ANSI_NULLS ON
  2207. GO
  2208. SET QUOTED_IDENTIFIER ON
  2209. GO
  2210. SET ANSI_PADDING ON
  2211. GO
  2212. CREATE TABLE [dbo].[分区分表信息](
  2213. [ID] [int] IDENTITY(1,1) NOT NULL,
  2214. [分区ID] [int] NULL,
  2215. [表类型] [varchar](10) NULL,
  2216. [设备ID] [int] NULL,
  2217. [量名称] [varchar](20) NULL,
  2218. CONSTRAINT [PK_分区分表信息] PRIMARY KEY CLUSTERED
  2219. (
  2220. [ID] ASC
  2221. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2222. ) ON [PRIMARY]
  2223. GO
  2224. SET ANSI_PADDING OFF
  2225. GO
  2226. /****** Object: Table [dbo].[发送结果] Script Date: 05/20/2021 19:22:32 ******/
  2227. SET ANSI_NULLS ON
  2228. GO
  2229. SET QUOTED_IDENTIFIER ON
  2230. GO
  2231. SET ANSI_PADDING ON
  2232. GO
  2233. CREATE TABLE [dbo].[发送结果](
  2234. [ID] [int] IDENTITY(1,1) NOT NULL,
  2235. [手机号] [varchar](50) NULL,
  2236. [发送结果] [varchar](50) NULL,
  2237. [发送内容] [varchar](50) NULL,
  2238. [发送时间] [varchar](50) NULL
  2239. ) ON [PRIMARY]
  2240. GO
  2241. SET ANSI_PADDING OFF
  2242. GO
  2243. /****** Object: Table [dbo].[发卡原因] Script Date: 05/20/2021 19:22:32 ******/
  2244. SET ANSI_NULLS ON
  2245. GO
  2246. SET QUOTED_IDENTIFIER ON
  2247. GO
  2248. CREATE TABLE [dbo].[发卡原因](
  2249. [Id] [int] IDENTITY(1,1) NOT NULL,
  2250. [名称] [nvarchar](50) NOT NULL
  2251. ) ON [PRIMARY]
  2252. GO
  2253. /****** Object: Table [dbo].[单位性质] Script Date: 05/20/2021 19:22:32 ******/
  2254. SET ANSI_NULLS ON
  2255. GO
  2256. SET QUOTED_IDENTIFIER ON
  2257. GO
  2258. SET ANSI_PADDING ON
  2259. GO
  2260. CREATE TABLE [dbo].[单位性质](
  2261. [ID] [int] NOT NULL,
  2262. [名称] [varchar](50) NOT NULL
  2263. ) ON [PRIMARY]
  2264. GO
  2265. SET ANSI_PADDING OFF
  2266. GO
  2267. INSERT [dbo].[单位性质] ([ID], [名称]) VALUES (2, N'工业')
  2268. INSERT [dbo].[单位性质] ([ID], [名称]) VALUES (3, N'居民生活')
  2269. INSERT [dbo].[单位性质] ([ID], [名称]) VALUES (4, N'行政')
  2270. INSERT [dbo].[单位性质] ([ID], [名称]) VALUES (5, N'服务')
  2271. INSERT [dbo].[单位性质] ([ID], [名称]) VALUES (6, N'特服')
  2272. /****** Object: Table [dbo].[单位定额] Script Date: 05/20/2021 19:22:32 ******/
  2273. SET ANSI_NULLS ON
  2274. GO
  2275. SET QUOTED_IDENTIFIER ON
  2276. GO
  2277. SET ANSI_PADDING ON
  2278. GO
  2279. CREATE TABLE [dbo].[单位定额](
  2280. [ID] [int] IDENTITY(1,1) NOT NULL,
  2281. [名称] [varchar](50) NOT NULL,
  2282. [定额方式ID] [int] NOT NULL,
  2283. [单位定额] [numeric](18, 1) NOT NULL,
  2284. CONSTRAINT [PK_单位定额] PRIMARY KEY CLUSTERED
  2285. (
  2286. [ID] ASC
  2287. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2288. ) ON [PRIMARY]
  2289. GO
  2290. SET ANSI_PADDING OFF
  2291. GO
  2292. /****** Object: Table [dbo].[传输设备] Script Date: 05/20/2021 19:22:32 ******/
  2293. SET ANSI_NULLS ON
  2294. GO
  2295. SET QUOTED_IDENTIFIER ON
  2296. GO
  2297. SET ANSI_PADDING ON
  2298. GO
  2299. CREATE TABLE [dbo].[传输设备](
  2300. [ID] [int] IDENTITY(1,1) NOT NULL,
  2301. [传输协议] [varchar](50) NULL,
  2302. [传输协议参数] [varchar](50) NULL,
  2303. [数据通道ID] [int] NULL,
  2304. [是否启用] [varchar](50) NOT NULL,
  2305. CONSTRAINT [PK_传输设备] PRIMARY KEY CLUSTERED
  2306. (
  2307. [ID] ASC
  2308. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2309. ) ON [PRIMARY]
  2310. GO
  2311. SET ANSI_PADDING OFF
  2312. GO
  2313. SET IDENTITY_INSERT [dbo].[传输设备] ON
  2314. INSERT [dbo].[传输设备] ([ID], [传输协议], [传输协议参数], [数据通道ID], [是否启用]) VALUES (4, N'平升协议', N'13811122201,1', 138, N'是')
  2315. INSERT [dbo].[传输设备] ([ID], [传输协议], [传输协议参数], [数据通道ID], [是否启用]) VALUES (5, N'平升协议', N'13811122202,1', 138, N'是')
  2316. INSERT [dbo].[传输设备] ([ID], [传输协议], [传输协议参数], [数据通道ID], [是否启用]) VALUES (6, N'平升协议', N'13811122203,1', 138, N'是')
  2317. INSERT [dbo].[传输设备] ([ID], [传输协议], [传输协议参数], [数据通道ID], [是否启用]) VALUES (7, N'平升协议', N'13811122204,1', 138, N'是')
  2318. SET IDENTITY_INSERT [dbo].[传输设备] OFF
  2319. /****** Object: Table [dbo].[查询设置] Script Date: 05/20/2021 19:22:32 ******/
  2320. SET ANSI_NULLS ON
  2321. GO
  2322. SET QUOTED_IDENTIFIER ON
  2323. GO
  2324. SET ANSI_PADDING ON
  2325. GO
  2326. CREATE TABLE [dbo].[查询设置](
  2327. [ID] [int] IDENTITY(1,1) NOT NULL,
  2328. [操作员ID] [varchar](50) NULL,
  2329. [列选择] [varchar](5000) NULL
  2330. ) ON [PRIMARY]
  2331. GO
  2332. SET ANSI_PADDING OFF
  2333. GO
  2334. /****** Object: Table [dbo].[册本信息] Script Date: 05/20/2021 19:22:32 ******/
  2335. SET ANSI_NULLS ON
  2336. GO
  2337. SET QUOTED_IDENTIFIER ON
  2338. GO
  2339. SET ANSI_PADDING ON
  2340. GO
  2341. CREATE TABLE [dbo].[册本信息](
  2342. [ID] [int] IDENTITY(1,1) NOT NULL,
  2343. [册本号] [varchar](50) NOT NULL,
  2344. [管理ID] [int] NOT NULL,
  2345. [建立时间] [datetime] NOT NULL,
  2346. [更换时间] [datetime] NULL,
  2347. CONSTRAINT [PK_册本信息] PRIMARY KEY CLUSTERED
  2348. (
  2349. [ID] ASC
  2350. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2351. ) ON [PRIMARY]
  2352. GO
  2353. SET ANSI_PADDING OFF
  2354. GO
  2355. /****** Object: Table [dbo].[菜单项管理] Script Date: 05/20/2021 19:22:32 ******/
  2356. SET ANSI_NULLS ON
  2357. GO
  2358. SET QUOTED_IDENTIFIER ON
  2359. GO
  2360. SET ANSI_PADDING ON
  2361. GO
  2362. CREATE TABLE [dbo].[菜单项管理](
  2363. [ID] [int] IDENTITY(1,1) NOT NULL,
  2364. [父菜单ID] [int] NOT NULL,
  2365. [菜单名称] [varchar](20) NOT NULL,
  2366. [入口URL] [varchar](100) NULL,
  2367. [顺序号] [int] NOT NULL,
  2368. [相关文件] [varchar](200) NULL,
  2369. [是否启用] [varchar](50) NULL,
  2370. CONSTRAINT [PK_Menu] PRIMARY KEY CLUSTERED
  2371. (
  2372. [ID] ASC
  2373. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2374. ) ON [PRIMARY]
  2375. GO
  2376. SET ANSI_PADDING OFF
  2377. GO
  2378. SET IDENTITY_INSERT [dbo].[菜单项管理] ON
  2379. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (1, 0, N'实时监测', N'DataMonitor/MonitorList.html', 2, N'el-icon-ps-shishijiance', NULL)
  2380. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (3, 0, N'数据查询', N'DataQuery/DataQuery.html', 5, N'el-icon-ps-shujuchaxun', NULL)
  2381. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (4, 0, N'统计分析', N'DataReport/PeriodReport.html', 7, N'el-icon-ps-tongjifenxi', NULL)
  2382. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (5, 111, N'数据图表', N'DataChart/PeriodChart.aspx', 9, N'PurviewMgmt.html', NULL)
  2383. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (6, 0, N'系统设置', N'SystemAdmin/MonitorManager.html', 8, N'el-icon-ps-xitongshezhi', NULL)
  2384. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (7, 1, N'实时数据', N'DataMonitor/MonitorList.html', 2, N'el-icon-ps-msnui-analyse', NULL)
  2385. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (8, 111, N'电子地图-谷歌', N'GlobalView/GMap.html', 3, N'el-icon-ps-ditu', NULL)
  2386. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (9, 3, N'历史数据查询', N'DataQuery/HistoryDataQuery.html', 1, N'el-icon-ps-lishishuju', NULL)
  2387. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (10, 3, N'报警数据查询', N'DataQuery/AlarmDataQueryForTrace.html', 2, N'el-icon-ps-real-time-alarm', NULL)
  2388. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (11, 3, N'操作记录查询', N'DataQuery/OperateQuery.html', 3, N'tu1217', NULL)
  2389. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (12, 3, N'登录查询', N'DataQuery/LoginRecords.html', 4, N'LoginRecords.html', NULL)
  2390. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (13, 400, N'户充值统计', N'DataReport/UserRechargeStatistic.html', 1, N'tu0306', NULL)
  2391. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (14, 400, N'村充值统计', N'DataReport/VillageRechargeStatistic.html', 2, N'tu0306', NULL)
  2392. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (15, 6, N'操作员管理', N'WebAdmin/OperatorManager.html', 1, N'tu0625', NULL)
  2393. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (19, 45, N'照片查询', N'DataQuery/AlarmPhotoQuery.html', 5, N'tu0805', NULL)
  2394. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (21, 5, N'通用曲线', N'DataChart/MonitorParamsCompareChart.html', 1, NULL, NULL)
  2395. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (23, 6, N'区域管理', N'SystemAdmin/AreaManager.html', 2, N'tu1605', NULL)
  2396. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (26, 400, N'户用水统计', N'DataReport/UserWaterStatistic.html', 3, N'tuwater', NULL)
  2397. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (27, 400, N'村用水统计', N'DataReport/VillageWaterStatistic.html', 4, N'tuwater', NULL)
  2398. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (29, 33, N'用水户管理', N'SystemAdmin/WaterUserManager.html', 4, N'tu1911', NULL)
  2399. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (30, 33, N'价格管理', N'SystemAdmin/PriceManager.html', 5, N'tu1814', NULL)
  2400. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (31, 33, N'作物管理', N'SystemAdmin/CropManager.html', 5, N'tu1705', NULL)
  2401. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (33, 112, N'信息管理', NULL, 6, N'信息管理.png', NULL)
  2402. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (34, 6, N'个人设置', N'SystemAdmin/PersonalOption.html', 4, N'tu0625', NULL)
  2403. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (35, 4, N'通用报表', N'DataReport/CommonReport.html', 7, N'tu1305', NULL)
  2404. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (36, 6, N'测点管理', N'SystemAdmin/MonitorManager.html', 3, N'tu1112', NULL)
  2405. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (37, 4, N'曲线分析', N'DataChart/CommonChart.html', 8, N'tu1405', NULL)
  2406. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (38, 33, N'用水计划', N'SaleWater/WaterPlan.html', 6, N'tuwater', NULL)
  2407. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (39, 400, N'水资源报表', N'DataReport/SiShui_QuaterChargeReport.html', 5, N'tuwater', NULL)
  2408. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (42, 400, N'企业报表', N'EnterpriseReport/SummaryReport.html', 6, N'tu1705', NULL)
  2409. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (43, 4, N'对比曲线', N'DataChart/SingleDeviceChart.html', 9, N'tu1505', NULL)
  2410. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (45, 0, N'图像管理', N'BDMap.html', 6, N'el-icon-ps-tuxiangguanli', NULL)
  2411. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (47, 0, N'视频管理', N'bdmap.html', 4, N'el-icon-ps-shipinguanli', N'否')
  2412. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (49, 45, N'图像监测', N'DataMonitor/ImageMonitorList.html', 1, N'tu0805', NULL)
  2413. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (52, 47, N'视频管理', N'SystemAdmin/VideoInfoManager.html', 1, N'el-icon-ps-shipinguanli', NULL)
  2414. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (53, 47, N'视频查询-直播', N'DataMonitor/VideoParamMonitorListLive.html', 2, N'el-icon-ps-shishishipinjiankong', NULL)
  2415. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (56, 6, N'角色管理', N'WebAdmin/RoleRightManager.html', 0, N'tu1911', N'是')
  2416. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (57, 4, N'汇总报表', N'DataReport/SummaryReport.html', 1, N'tu1305', NULL)
  2417. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (64, 0, N'首页', N'SystemAdmin/MonitorInfo.html', 1, N'el-icon-ps-zhandiangaikuang', NULL)
  2418. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (67, 333, N'事件查询', N'DataQuery/EventDataQuery.html', 5, NULL, NULL)
  2419. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (68, 1, N'百度地图', N'GlobalView/BDMap.html', 4, N'el-icon-ps-ditu', NULL)
  2420. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (71, 1, N'实时曲线', N'DataMonitor/MonitorChartList.html', 1, NULL, NULL)
  2421. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (76, 47, N'视频查询-控件', N'DataMonitor/VideoParamMonitorList.html', 3, NULL, NULL)
  2422. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (77, 1, N'视频测试', N'Interface/123.html', 8, NULL, N'否')
  2423. INSERT [dbo].[菜单项管理] ([ID], [父菜单ID], [菜单名称], [入口URL], [顺序号], [相关文件], [是否启用]) VALUES (80, 0, N'系统概况', N'SystemAdmin/SystemGeneralSituation.html', 1, N'el-icon-ps-shishishipinjiankong', NULL)
  2424. SET IDENTITY_INSERT [dbo].[菜单项管理] OFF
  2425. /****** Object: Table [dbo].[菜单权限关系] Script Date: 05/20/2021 19:22:32 ******/
  2426. SET ANSI_NULLS ON
  2427. GO
  2428. SET QUOTED_IDENTIFIER ON
  2429. GO
  2430. SET ANSI_PADDING ON
  2431. GO
  2432. CREATE TABLE [dbo].[菜单权限关系](
  2433. [ID] [int] IDENTITY(1,1) NOT NULL,
  2434. [菜单ID] [int] NULL,
  2435. [权限ID] [int] NULL,
  2436. [权限别名] [varchar](50) NULL,
  2437. PRIMARY KEY CLUSTERED
  2438. (
  2439. [ID] ASC
  2440. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2441. ) ON [PRIMARY]
  2442. GO
  2443. SET ANSI_PADDING OFF
  2444. GO
  2445. SET IDENTITY_INSERT [dbo].[菜单权限关系] ON
  2446. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (1, 7, 15, N'控制')
  2447. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (2, 7, 16, N'读设参')
  2448. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (3, 7, 20, N'拍照')
  2449. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (4, 8, 15, N'控制')
  2450. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (5, 8, 16, N'读设参')
  2451. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (6, 8, 20, N'拍照')
  2452. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (7, 15, 13, N'编辑')
  2453. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (8, 17, 19, N'编辑')
  2454. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (9, 23, 14, N'编辑')
  2455. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (10, 34, 23, N'编辑')
  2456. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (11, 36, 19, N'编辑')
  2457. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (12, 45, 15, N'控制')
  2458. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (13, 45, 16, N'读设参')
  2459. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (14, 45, 20, N'拍照')
  2460. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (15, 47, 15, N'控制')
  2461. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (16, 47, 16, N'读设参')
  2462. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (17, 47, 20, N'拍照')
  2463. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (18, 49, 20, N'拍照')
  2464. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (19, 52, 18, N'编辑')
  2465. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (20, 53, 15, N'控制')
  2466. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (21, 53, 16, N'读设参')
  2467. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (22, 53, 20, N'拍照')
  2468. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (23, 54, 16, N'读设参')
  2469. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (24, 56, 9, N'编辑')
  2470. INSERT [dbo].[菜单权限关系] ([ID], [菜单ID], [权限ID], [权限别名]) VALUES (25, 15, 6, N'修改密码')
  2471. SET IDENTITY_INSERT [dbo].[菜单权限关系] OFF
  2472. /****** Object: Table [dbo].[表具信息] Script Date: 05/20/2021 19:22:32 ******/
  2473. SET ANSI_NULLS ON
  2474. GO
  2475. SET QUOTED_IDENTIFIER ON
  2476. GO
  2477. SET ANSI_PADDING ON
  2478. GO
  2479. CREATE TABLE [dbo].[表具信息](
  2480. [ID] [int] IDENTITY(1,1) NOT NULL,
  2481. [名称] [varchar](50) NOT NULL,
  2482. [类型] [varchar](50) NOT NULL,
  2483. [水表口径] [int] NOT NULL,
  2484. [型号] [varchar](50) NOT NULL,
  2485. [常用流量] [decimal](18, 2) NOT NULL,
  2486. [分界流量] [decimal](18, 2) NOT NULL,
  2487. [过载流量] [decimal](18, 2) NOT NULL,
  2488. [最小流量] [decimal](18, 2) NOT NULL,
  2489. [最大示值] [decimal](18, 2) NOT NULL,
  2490. [过载压力损失] [decimal](18, 2) NULL,
  2491. [生产厂家] [varchar](200) NULL,
  2492. [厂家电话] [varchar](15) NULL,
  2493. [备注] [varchar](500) NULL,
  2494. CONSTRAINT [PK_表具信息] PRIMARY KEY CLUSTERED
  2495. (
  2496. [ID] ASC
  2497. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2498. ) ON [PRIMARY]
  2499. GO
  2500. SET ANSI_PADDING OFF
  2501. GO
  2502. SET IDENTITY_INSERT [dbo].[表具信息] ON
  2503. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (1, N'天津旋翼式DN80', N'旋翼式', 80, N'旋翼式DN80', CAST(30.00 AS Decimal(18, 2)), CAST(6.00 AS Decimal(18, 2)), CAST(60.00 AS Decimal(18, 2)), CAST(0.90 AS Decimal(18, 2)), CAST(99999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'天津仪表有限公司', N'', N'天津水表厂')
  2504. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (2, N'天津旋翼式DN100', N'旋翼式', 100, N'旋翼式DN100', CAST(50.00 AS Decimal(18, 2)), CAST(10.00 AS Decimal(18, 2)), CAST(100.00 AS Decimal(18, 2)), CAST(1.50 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'天津仪表有限公司', N'', N'')
  2505. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (3, N'天津旋翼式DN150', N'旋翼式', 150, N'旋翼式DN150', CAST(100.00 AS Decimal(18, 2)), CAST(20.00 AS Decimal(18, 2)), CAST(200.00 AS Decimal(18, 2)), CAST(3.00 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'天津仪表有限公司', N'', N'')
  2506. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (4, N'真兰垂直螺翼式DN80', N'垂直螺翼式', 80, N'垂直螺翼式DN80', CAST(55.00 AS Decimal(18, 2)), CAST(3.00 AS Decimal(18, 2)), CAST(80.00 AS Decimal(18, 2)), CAST(0.60 AS Decimal(18, 2)), CAST(999999.00 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'福州真兰水表有限公司', N'', N'')
  2507. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (5, N'真兰垂直螺翼式DN100', N'垂直螺翼式', 100, N'垂直螺翼式DN100', CAST(80.00 AS Decimal(18, 2)), CAST(4.50 AS Decimal(18, 2)), CAST(120.00 AS Decimal(18, 2)), CAST(0.70 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'福州真兰水表有限公司', N'', N'')
  2508. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (6, N'真兰垂直螺翼式DN150', N'垂直螺翼式', 150, N'垂直螺翼式DN150', CAST(200.00 AS Decimal(18, 2)), CAST(9.00 AS Decimal(18, 2)), CAST(300.00 AS Decimal(18, 2)), CAST(1.50 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'福州真兰水表有限公司', N'', N'')
  2509. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (7, N'连利垂直螺翼式DN80', N'垂直螺翼式', 80, N'垂直螺翼式DN80', CAST(40.00 AS Decimal(18, 2)), CAST(8.00 AS Decimal(18, 2)), CAST(80.00 AS Decimal(18, 2)), CAST(1.20 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'连利水表有限公司', N'', N'')
  2510. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (8, N'连利垂直螺翼式DN100', N'旋翼式', 100, N'垂直螺翼式DN100', CAST(60.00 AS Decimal(18, 2)), CAST(12.00 AS Decimal(18, 2)), CAST(120.00 AS Decimal(18, 2)), CAST(1.80 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'连利水表有限公司', N'', N'')
  2511. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (9, N'连利垂直螺翼式DN150', N'旋翼式', 150, N'垂直螺翼式DN150', CAST(150.00 AS Decimal(18, 2)), CAST(30.00 AS Decimal(18, 2)), CAST(300.00 AS Decimal(18, 2)), CAST(4.50 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'连利水表有限公司', N'', N'')
  2512. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (10, N'郑州旋翼式DN40', N'旋翼式', 40, N'旋翼式DN40', CAST(10.00 AS Decimal(18, 2)), CAST(0.80 AS Decimal(18, 2)), CAST(20.00 AS Decimal(18, 2)), CAST(0.20 AS Decimal(18, 2)), CAST(999999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'郑州水表厂', N'', N'')
  2513. INSERT [dbo].[表具信息] ([ID], [名称], [类型], [水表口径], [型号], [常用流量], [分界流量], [过载流量], [最小流量], [最大示值], [过载压力损失], [生产厂家], [厂家电话], [备注]) VALUES (11, N'郑州旋翼式DN50', N'旋翼式', 50, N'旋翼式DN50', CAST(15.00 AS Decimal(18, 2)), CAST(1.50 AS Decimal(18, 2)), CAST(30.00 AS Decimal(18, 2)), CAST(0.40 AS Decimal(18, 2)), CAST(99999.99 AS Decimal(18, 2)), CAST(0.10 AS Decimal(18, 2)), N'郑州水表厂', N'', N'')
  2514. SET IDENTITY_INSERT [dbo].[表具信息] OFF
  2515. /****** Object: Table [dbo].[报警图片模板] Script Date: 05/20/2021 19:22:32 ******/
  2516. SET ANSI_NULLS ON
  2517. GO
  2518. SET QUOTED_IDENTIFIER ON
  2519. GO
  2520. SET ANSI_PADDING ON
  2521. GO
  2522. CREATE TABLE [dbo].[报警图片模板](
  2523. [ID] [int] IDENTITY(1,1) NOT NULL,
  2524. [设备ID] [int] NULL,
  2525. [时间] [datetime] NULL,
  2526. [图片] [image] NULL,
  2527. [照片来源] [varchar](50) NULL,
  2528. CONSTRAINT [PK_报警图片模板] PRIMARY KEY CLUSTERED
  2529. (
  2530. [ID] ASC
  2531. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2532. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  2533. GO
  2534. SET ANSI_PADDING OFF
  2535. GO
  2536. /****** Object: Table [dbo].[报警设置] Script Date: 05/20/2021 19:22:32 ******/
  2537. SET ANSI_NULLS ON
  2538. GO
  2539. SET QUOTED_IDENTIFIER ON
  2540. GO
  2541. SET ANSI_PADDING ON
  2542. GO
  2543. CREATE TABLE [dbo].[报警设置](
  2544. [ID] [int] IDENTITY(1,1) NOT NULL,
  2545. [设备ID] [int] NOT NULL,
  2546. [规则名称] [varchar](50) NOT NULL,
  2547. [量名称] [varchar](50) NOT NULL,
  2548. [量类型] [varchar](10) NOT NULL,
  2549. [正常值] [varchar](50) NULL,
  2550. [报警值] [varchar](50) NULL,
  2551. [结束值] [varchar](50) NULL,
  2552. [变化方式] [varchar](50) NOT NULL,
  2553. [描述信息] [varchar](200) NOT NULL,
  2554. [报警周期] [int] NOT NULL,
  2555. [报警次数] [int] NOT NULL,
  2556. [报警解除次数] [int] NOT NULL,
  2557. [变化量] [int] NOT NULL,
  2558. [记录类型] [varchar](50) NULL,
  2559. CONSTRAINT [PK_报警设置] PRIMARY KEY CLUSTERED
  2560. (
  2561. [ID] ASC
  2562. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2563. ) ON [PRIMARY]
  2564. GO
  2565. SET ANSI_PADDING OFF
  2566. GO
  2567. /****** Object: Table [dbo].[报警类别] Script Date: 05/20/2021 19:22:32 ******/
  2568. SET ANSI_NULLS ON
  2569. GO
  2570. SET QUOTED_IDENTIFIER ON
  2571. GO
  2572. SET ANSI_PADDING ON
  2573. GO
  2574. CREATE TABLE [dbo].[报警类别](
  2575. [ID] [int] IDENTITY(1,1) NOT NULL,
  2576. [用户站参数] [varchar](50) NULL,
  2577. [量名称] [varchar](50) NULL,
  2578. [规则名称] [varchar](50) NULL,
  2579. [量类型] [varchar](50) NULL,
  2580. [正常值] [varchar](50) NULL,
  2581. [报警值] [varchar](50) NULL,
  2582. [结束值] [varchar](50) NULL,
  2583. [变化方式] [varchar](50) NULL,
  2584. [描述信息] [varchar](200) NULL,
  2585. [报警周期] [int] NULL,
  2586. [报警次数] [int] NULL,
  2587. [报警解除次数] [int] NULL,
  2588. [变化量] [int] NULL,
  2589. [记录类型] [varchar](50) NULL,
  2590. [级别] [varchar](50) NULL,
  2591. [背景色] [varchar](50) NULL,
  2592. [前景色] [varchar](50) NULL,
  2593. [是否启用] [bit] NULL
  2594. ) ON [PRIMARY]
  2595. GO
  2596. SET ANSI_PADDING OFF
  2597. GO
  2598. SET IDENTITY_INSERT [dbo].[报警类别] ON
  2599. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (14, N'1', N'水位1下限报警', N'水位1下限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位1下限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2600. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (2, N'1', N'通讯状态', N'通讯状态', N'状态量', N'全部正常', N'全部中断', NULL, N'ValueChanged', N'设备离线|连续[时间]离线', 1, 1, 1, 0, N'', NULL, NULL, NULL, 1)
  2601. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (7, N'1', N'水位1断线报警', N'水位1断线报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位1断线报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2602. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (8, N'1', N'水位2断线报警', N'水位2断线报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位2断线报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2603. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (9, N'1', N'门开关', N'门开关', N'开关量', NULL, N'门开', NULL, N'EqualNew', N'门开关|连续[时间]门开', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2604. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (10, N'1', N'电源电压下限报警', N'电源电压下限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'电源电压下限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2605. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (11, N'1', N'压力断线报警', N'压力断线报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'压力断线报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2606. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (13, N'1', N'水位1上限报警', N'水位1上限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位1上限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2607. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (15, N'1', N'水位2上限报警', N'水位2上限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位2上限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2608. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (16, N'1', N'水位2下限报警', N'水位2下限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'水位2下限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2609. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (17, N'1', N'压力上限报警', N'压力上限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'压力上限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2610. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (18, N'1', N'压力下限报警', N'压力下限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'压力下限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2611. INSERT [dbo].[报警类别] ([ID], [用户站参数], [量名称], [规则名称], [量类型], [正常值], [报警值], [结束值], [变化方式], [描述信息], [报警周期], [报警次数], [报警解除次数], [变化量], [记录类型], [级别], [背景色], [前景色], [是否启用]) VALUES (19, N'1', N'电源电压下下限报警', N'电源电压下下限报警', N'开关量', NULL, N'报警', NULL, N'EqualNew', N'电源电压下下限报警|连续[时间]报警', 1, 1, 1, 0, N'全部', N'#32CD32', N'#FF8C00', NULL, NULL)
  2612. SET IDENTITY_INSERT [dbo].[报警类别] OFF
  2613. /****** Object: Table [dbo].[报警快照模板] Script Date: 05/20/2021 19:22:32 ******/
  2614. SET ANSI_NULLS ON
  2615. GO
  2616. SET QUOTED_IDENTIFIER ON
  2617. GO
  2618. SET ANSI_PADDING ON
  2619. GO
  2620. CREATE TABLE [dbo].[报警快照模板](
  2621. [id] [int] IDENTITY(1,1) NOT NULL,
  2622. [记录时间] [datetime] NOT NULL,
  2623. [采集时间] [datetime] NOT NULL,
  2624. [设备状态] [varchar](10) NOT NULL,
  2625. [通讯状态] [varchar](10) NOT NULL,
  2626. [电源电压] [numeric](18, 2) NULL,
  2627. [消毒装置空高] [numeric](18, 2) NULL,
  2628. [消毒装置水位] [numeric](18, 2) NULL,
  2629. [清水池空高] [numeric](18, 2) NULL,
  2630. [清水池水位] [numeric](18, 2) NULL,
  2631. [吸水池空高] [numeric](18, 2) NULL,
  2632. [吸水池水位] [numeric](18, 2) NULL,
  2633. [浊度] [numeric](18, 2) NULL,
  2634. [余氯] [numeric](18, 2) NULL,
  2635. [表1瞬时流量] [numeric](18, 2) NULL,
  2636. [表1正累计] [numeric](18, 0) NULL,
  2637. [表1负累计] [numeric](18, 0) NULL,
  2638. [表1净累计] [numeric](18, 0) NULL,
  2639. [表2瞬时流量] [numeric](18, 2) NULL,
  2640. [表2正累计] [numeric](18, 0) NULL,
  2641. [表2负累计] [numeric](18, 0) NULL,
  2642. [表2净累计] [numeric](18, 0) NULL,
  2643. [平升水位计水位] [numeric](18, 3) NULL,
  2644. [一号压力] [numeric](18, 0) NULL,
  2645. [二号压力] [numeric](18, 0) NULL,
  2646. [门开关] [varchar](50) NULL,
  2647. [电池电压下限报警] [varchar](50) NULL,
  2648. [电池电压下下限报警] [varchar](50) NULL,
  2649. [消毒装置水位计断线报警] [varchar](50) NULL,
  2650. [消毒装置水位上限报警] [varchar](50) NULL,
  2651. [消毒装置水位下限报警] [varchar](50) NULL,
  2652. [清水池水位计断线报警] [varchar](50) NULL,
  2653. [清水池水位上限报警] [varchar](50) NULL,
  2654. [清水池水位下限报警] [varchar](50) NULL,
  2655. [吸水井水位计断线报警] [varchar](50) NULL,
  2656. [吸水井水位上限报警] [varchar](50) NULL,
  2657. [吸水井水位下限报警] [varchar](50) NULL,
  2658. [浊度分析仪断线报警] [varchar](50) NULL,
  2659. [浊度上限报警] [varchar](50) NULL,
  2660. [浊度下限报警] [varchar](50) NULL,
  2661. [余氯分析仪断线报警] [varchar](50) NULL,
  2662. [余氯上限报警] [varchar](50) NULL,
  2663. [余氯下限报警] [varchar](50) NULL,
  2664. [海峰表1通讯报警] [varchar](50) NULL,
  2665. [海峰表2通讯报警] [varchar](50) NULL,
  2666. [平升水位计通讯报警] [varchar](50) NULL,
  2667. [一号压力变送器通讯报警] [varchar](50) NULL,
  2668. [二号压力变送器通讯报警] [varchar](50) NULL,
  2669. [平升水位计水位上限报警] [varchar](50) NULL,
  2670. [平升水位计水位下限报警] [varchar](50) NULL,
  2671. CONSTRAINT [PK_报警快照模板] PRIMARY KEY CLUSTERED
  2672. (
  2673. [id] ASC
  2674. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2675. ) ON [PRIMARY]
  2676. GO
  2677. SET ANSI_PADDING OFF
  2678. GO
  2679. /****** Object: Table [dbo].[报警记录模板] Script Date: 05/20/2021 19:22:32 ******/
  2680. SET ANSI_NULLS ON
  2681. GO
  2682. SET QUOTED_IDENTIFIER ON
  2683. GO
  2684. SET ANSI_PADDING ON
  2685. GO
  2686. CREATE TABLE [dbo].[报警记录模板](
  2687. [id] [int] IDENTITY(1,1) NOT NULL,
  2688. [设备ID] [int] NULL,
  2689. [记录时间] [datetime] NOT NULL,
  2690. [采集时间] [datetime] NOT NULL,
  2691. [设备状态] [varchar](10) NOT NULL,
  2692. [通讯状态] [varchar](10) NOT NULL,
  2693. [变化类型] [varchar](50) NULL,
  2694. [变化描述] [varchar](50) NULL,
  2695. [数据来源] [varchar](50) NULL,
  2696. [预留水位] [numeric](18, 2) NULL,
  2697. [实测水位] [numeric](18, 2) NULL,
  2698. [基准水位] [numeric](18, 2) NULL,
  2699. [信号强度] [numeric](18, 0) NULL,
  2700. [电池电压] [numeric](18, 2) NULL,
  2701. [模拟量水位故障] [varchar](50) NULL,
  2702. [箱门开关] [varchar](50) NULL,
  2703. [水位计故障] [varchar](50) NULL,
  2704. [电池电压下限报警] [varchar](50) NULL,
  2705. CONSTRAINT [PK_报警记录模板] PRIMARY KEY CLUSTERED
  2706. (
  2707. [id] ASC
  2708. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2709. ) ON [PRIMARY]
  2710. GO
  2711. SET ANSI_PADDING OFF
  2712. GO
  2713. /****** Object: Table [dbo].[IC卡状态] Script Date: 05/20/2021 19:22:32 ******/
  2714. SET ANSI_NULLS ON
  2715. GO
  2716. SET QUOTED_IDENTIFIER ON
  2717. GO
  2718. CREATE TABLE [dbo].[IC卡状态](
  2719. [Id] [int] IDENTITY(1,1) NOT NULL,
  2720. [名称] [nvarchar](50) NOT NULL
  2721. ) ON [PRIMARY]
  2722. GO
  2723. /****** Object: Table [dbo].[IC卡信息] Script Date: 05/20/2021 19:22:32 ******/
  2724. SET ANSI_NULLS ON
  2725. GO
  2726. SET QUOTED_IDENTIFIER ON
  2727. GO
  2728. CREATE TABLE [dbo].[IC卡信息](
  2729. [Id] [int] IDENTITY(1,1) NOT NULL,
  2730. [内部编号] [nvarchar](50) NOT NULL,
  2731. [印刷编号] [nvarchar](50) NULL,
  2732. [建卡日期] [datetime] NOT NULL,
  2733. [IC卡类型ID] [int] NOT NULL,
  2734. [购水设备ID数组] [nvarchar](50) NULL,
  2735. [IC卡状态ID] [int] NOT NULL,
  2736. [持卡人名称] [nvarchar](50) NULL,
  2737. [单位名称] [nvarchar](50) NULL,
  2738. [用水户ID] [int] NOT NULL,
  2739. [用户卡号] [int] NULL,
  2740. CONSTRAINT [PK_IC卡信息] PRIMARY KEY CLUSTERED
  2741. (
  2742. [Id] ASC
  2743. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2744. ) ON [PRIMARY]
  2745. GO
  2746. /****** Object: Table [dbo].[IC卡类型] Script Date: 05/20/2021 19:22:32 ******/
  2747. SET ANSI_NULLS ON
  2748. GO
  2749. SET QUOTED_IDENTIFIER ON
  2750. GO
  2751. CREATE TABLE [dbo].[IC卡类型](
  2752. [Id] [int] IDENTITY(1,1) NOT NULL,
  2753. [名称] [nvarchar](50) NOT NULL
  2754. ) ON [PRIMARY]
  2755. GO
  2756. /****** Object: Table [dbo].[IC卡发卡记录] Script Date: 05/20/2021 19:22:32 ******/
  2757. SET ANSI_NULLS ON
  2758. GO
  2759. SET QUOTED_IDENTIFIER ON
  2760. GO
  2761. CREATE TABLE [dbo].[IC卡发卡记录](
  2762. [Id] [int] IDENTITY(1,1) NOT NULL,
  2763. [发卡原因ID] [int] NOT NULL,
  2764. [IC卡信息ID] [int] NOT NULL,
  2765. [发卡日期] [datetime] NOT NULL,
  2766. CONSTRAINT [PK_IC卡发卡记录] PRIMARY KEY CLUSTERED
  2767. (
  2768. [Id] ASC
  2769. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2770. ) ON [PRIMARY]
  2771. GO
  2772. /****** Object: Table [dbo].[最后状态] Script Date: 05/20/2021 19:22:32 ******/
  2773. SET ANSI_NULLS ON
  2774. GO
  2775. SET QUOTED_IDENTIFIER ON
  2776. GO
  2777. SET ANSI_PADDING ON
  2778. GO
  2779. CREATE TABLE [dbo].[最后状态](
  2780. [id] [int] IDENTITY(1,1) NOT NULL,
  2781. [设备ID] [int] NULL,
  2782. [记录时间] [datetime] NOT NULL,
  2783. [采集时间] [datetime] NOT NULL,
  2784. [设备状态] [varchar](10) NOT NULL,
  2785. [通讯状态] [varchar](10) NOT NULL,
  2786. [数据来源] [varchar](10) NOT NULL,
  2787. [预留水位] [numeric](18, 2) NULL,
  2788. [实测水位] [numeric](18, 2) NULL,
  2789. [基准水位] [numeric](18, 2) NULL,
  2790. [信号强度] [numeric](18, 0) NULL,
  2791. [电池电压] [numeric](18, 2) NULL,
  2792. [模拟量水位故障] [varchar](50) NULL,
  2793. [箱门开关] [varchar](50) NULL,
  2794. [水位计故障] [varchar](50) NULL,
  2795. [电池电压下限报警] [varchar](50) NULL
  2796. ) ON [PRIMARY]
  2797. GO
  2798. SET ANSI_PADDING OFF
  2799. GO
  2800. SET IDENTITY_INSERT [dbo].[最后状态] ON
  2801. INSERT [dbo].[最后状态] ([id], [设备ID], [记录时间], [采集时间], [设备状态], [通讯状态], [数据来源], [预留水位], [实测水位], [基准水位], [信号强度], [电池电压], [模拟量水位故障], [箱门开关], [水位计故障], [电池电压下限报警]) VALUES (1, 4, CAST(0x0000AD1900FBA900 AS DateTime), CAST(0x0000AD1900FBA900 AS DateTime), N'全部正常', N'全部正常', N'历史记录', CAST(6.55 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(0.00 AS Numeric(18, 2)), CAST(12 AS Numeric(18, 0)), CAST(11.26 AS Numeric(18, 2)), N'报警', N'正常', N'报警', N'报警')
  2802. SET IDENTITY_INSERT [dbo].[最后状态] OFF
  2803. /****** Object: Table [dbo].[周期明细] Script Date: 05/20/2021 19:22:32 ******/
  2804. SET ANSI_NULLS ON
  2805. GO
  2806. SET QUOTED_IDENTIFIER ON
  2807. GO
  2808. SET ANSI_PADDING ON
  2809. GO
  2810. CREATE TABLE [dbo].[周期明细](
  2811. [ID] [int] NOT NULL,
  2812. [名称] [varchar](256) NULL,
  2813. [周期类别编号] [char](1) NULL,
  2814. [开始时间] [varchar](20) NULL,
  2815. [结束时间] [varchar](20) NULL,
  2816. CONSTRAINT [PK_周期明细] PRIMARY KEY CLUSTERED
  2817. (
  2818. [ID] ASC
  2819. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  2820. ) ON [PRIMARY]
  2821. GO
  2822. SET ANSI_PADDING OFF
  2823. GO
  2824. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1.年周期.3.10-1 00:00:00 .10-1 00:00:00
  2825. 大于等于起始,小于结束
  2826. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'周期明细'
  2827. GO
  2828. INSERT [dbo].[周期明细] ([ID], [名称], [周期类别编号], [开始时间], [结束时间]) VALUES (1, N'年', N'3', N'10-01', N'10-01')
  2829. /****** Object: View [dbo].[VIEW_用户登录记录] Script Date: 05/20/2021 19:22:33 ******/
  2830. SET ANSI_NULLS ON
  2831. GO
  2832. SET QUOTED_IDENTIFIER ON
  2833. GO
  2834. CREATE VIEW [dbo].[VIEW_用户登录记录]
  2835. AS
  2836. SELECT TOP 100 PERCENT dbo.用户登录记录.用户ID, dbo.用户信息.用户名,
  2837. dbo.用户登录记录.记录时间, dbo.用户登录记录.登录信息
  2838. FROM dbo.用户登录记录 INNER JOIN
  2839. dbo.用户信息 ON dbo.用户登录记录.用户ID = dbo.用户信息.ID
  2840. ORDER BY dbo.用户登录记录.用户ID, dbo.用户登录记录.记录时间
  2841. GO
  2842. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
  2843. Begin DesignProperties =
  2844. Begin PaneConfigurations =
  2845. Begin PaneConfiguration = 0
  2846. NumPanes = 4
  2847. Configuration = "(H (1[40] 4[20] 2[20] 3) )"
  2848. End
  2849. Begin PaneConfiguration = 1
  2850. NumPanes = 3
  2851. Configuration = "(H (1 [50] 4 [25] 3))"
  2852. End
  2853. Begin PaneConfiguration = 2
  2854. NumPanes = 3
  2855. Configuration = "(H (1[50] 2[25] 3) )"
  2856. End
  2857. Begin PaneConfiguration = 3
  2858. NumPanes = 3
  2859. Configuration = "(H (4 [30] 2 [40] 3))"
  2860. End
  2861. Begin PaneConfiguration = 4
  2862. NumPanes = 2
  2863. Configuration = "(H (1 [56] 3))"
  2864. End
  2865. Begin PaneConfiguration = 5
  2866. NumPanes = 2
  2867. Configuration = "(H (2 [66] 3))"
  2868. End
  2869. Begin PaneConfiguration = 6
  2870. NumPanes = 2
  2871. Configuration = "(H (4 [50] 3))"
  2872. End
  2873. Begin PaneConfiguration = 7
  2874. NumPanes = 1
  2875. Configuration = "(V (3))"
  2876. End
  2877. Begin PaneConfiguration = 8
  2878. NumPanes = 3
  2879. Configuration = "(H (1 [56] 4 [18] 2))"
  2880. End
  2881. Begin PaneConfiguration = 9
  2882. NumPanes = 2
  2883. Configuration = "(H (1 [75] 4))"
  2884. End
  2885. Begin PaneConfiguration = 10
  2886. NumPanes = 2
  2887. Configuration = "(H (1[66] 2) )"
  2888. End
  2889. Begin PaneConfiguration = 11
  2890. NumPanes = 2
  2891. Configuration = "(H (4 [60] 2))"
  2892. End
  2893. Begin PaneConfiguration = 12
  2894. NumPanes = 1
  2895. Configuration = "(H (1) )"
  2896. End
  2897. Begin PaneConfiguration = 13
  2898. NumPanes = 1
  2899. Configuration = "(V (4))"
  2900. End
  2901. Begin PaneConfiguration = 14
  2902. NumPanes = 1
  2903. Configuration = "(V (2))"
  2904. End
  2905. ActivePaneConfig = 0
  2906. End
  2907. Begin DiagramPane =
  2908. Begin Origin =
  2909. Top = 0
  2910. Left = 0
  2911. End
  2912. Begin Tables =
  2913. Begin Table = "用户登录记录"
  2914. Begin Extent =
  2915. Top = 6
  2916. Left = 38
  2917. Bottom = 116
  2918. Right = 173
  2919. End
  2920. DisplayFlags = 280
  2921. TopColumn = 0
  2922. End
  2923. Begin Table = "用户信息"
  2924. Begin Extent =
  2925. Top = 6
  2926. Left = 211
  2927. Bottom = 116
  2928. Right = 364
  2929. End
  2930. DisplayFlags = 280
  2931. TopColumn = 0
  2932. End
  2933. End
  2934. End
  2935. Begin SQLPane =
  2936. End
  2937. Begin DataPane =
  2938. Begin ParameterDefaults = ""
  2939. End
  2940. RowHeights = 240
  2941. Begin ColumnWidths = 5
  2942. Width = 284
  2943. Width = 1440
  2944. Width = 1440
  2945. Width = 1440
  2946. Width = 1440
  2947. End
  2948. End
  2949. Begin CriteriaPane =
  2950. Begin ColumnWidths = 11
  2951. Column = 1440
  2952. Alias = 900
  2953. Table = 2010
  2954. Output = 720
  2955. Append = 1400
  2956. NewValue = 1170
  2957. SortType = 1350
  2958. SortOrder = 1410
  2959. GroupBy = 1350
  2960. Filter = 1350
  2961. Or = 1350
  2962. Or = 1350
  2963. Or = 1350
  2964. End
  2965. End
  2966. End
  2967. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_用户登录记录'
  2968. GO
  2969. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_用户登录记录'
  2970. GO
  2971. /****** Object: View [dbo].[VIEW_用户操作记录] Script Date: 05/20/2021 19:22:33 ******/
  2972. SET ANSI_NULLS ON
  2973. GO
  2974. SET QUOTED_IDENTIFIER ON
  2975. GO
  2976. CREATE VIEW [dbo].[VIEW_用户操作记录]
  2977. AS
  2978. SELECT dbo.用户操作记录.用户ID, dbo.用户信息.用户名, dbo.用户操作记录.设备ID, dbo.设备信息.名称 AS 设备名称, dbo.用户操作记录.记录时间,
  2979. dbo.用户操作类型.操作名称, dbo.用户操作记录.操作描述
  2980. FROM dbo.用户操作记录 INNER JOIN
  2981. dbo.用户信息 ON dbo.用户操作记录.用户ID = dbo.用户信息.ID INNER JOIN
  2982. dbo.用户操作类型 ON dbo.用户操作记录.操作类型ID = dbo.用户操作类型.ID LEFT OUTER JOIN
  2983. dbo.设备信息 ON dbo.用户操作记录.设备ID = dbo.设备信息.ID
  2984. GO
  2985. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
  2986. Begin DesignProperties =
  2987. Begin PaneConfigurations =
  2988. Begin PaneConfiguration = 0
  2989. NumPanes = 4
  2990. Configuration = "(H (1[40] 4[20] 2[20] 3) )"
  2991. End
  2992. Begin PaneConfiguration = 1
  2993. NumPanes = 3
  2994. Configuration = "(H (1 [50] 4 [25] 3))"
  2995. End
  2996. Begin PaneConfiguration = 2
  2997. NumPanes = 3
  2998. Configuration = "(H (1 [50] 2 [25] 3))"
  2999. End
  3000. Begin PaneConfiguration = 3
  3001. NumPanes = 3
  3002. Configuration = "(H (4 [30] 2 [40] 3))"
  3003. End
  3004. Begin PaneConfiguration = 4
  3005. NumPanes = 2
  3006. Configuration = "(H (1 [56] 3))"
  3007. End
  3008. Begin PaneConfiguration = 5
  3009. NumPanes = 2
  3010. Configuration = "(H (2 [66] 3))"
  3011. End
  3012. Begin PaneConfiguration = 6
  3013. NumPanes = 2
  3014. Configuration = "(H (4 [50] 3))"
  3015. End
  3016. Begin PaneConfiguration = 7
  3017. NumPanes = 1
  3018. Configuration = "(V (3))"
  3019. End
  3020. Begin PaneConfiguration = 8
  3021. NumPanes = 3
  3022. Configuration = "(H (1[56] 4[18] 2) )"
  3023. End
  3024. Begin PaneConfiguration = 9
  3025. NumPanes = 2
  3026. Configuration = "(H (1 [75] 4))"
  3027. End
  3028. Begin PaneConfiguration = 10
  3029. NumPanes = 2
  3030. Configuration = "(H (1[66] 2) )"
  3031. End
  3032. Begin PaneConfiguration = 11
  3033. NumPanes = 2
  3034. Configuration = "(H (4 [60] 2))"
  3035. End
  3036. Begin PaneConfiguration = 12
  3037. NumPanes = 1
  3038. Configuration = "(H (1) )"
  3039. End
  3040. Begin PaneConfiguration = 13
  3041. NumPanes = 1
  3042. Configuration = "(V (4))"
  3043. End
  3044. Begin PaneConfiguration = 14
  3045. NumPanes = 1
  3046. Configuration = "(V (2))"
  3047. End
  3048. ActivePaneConfig = 0
  3049. End
  3050. Begin DiagramPane =
  3051. Begin Origin =
  3052. Top = 0
  3053. Left = 0
  3054. End
  3055. Begin Tables =
  3056. Begin Table = "用户操作记录"
  3057. Begin Extent =
  3058. Top = 71
  3059. Left = 13
  3060. Bottom = 190
  3061. Right = 161
  3062. End
  3063. DisplayFlags = 280
  3064. TopColumn = 0
  3065. End
  3066. Begin Table = "用户信息"
  3067. Begin Extent =
  3068. Top = 0
  3069. Left = 245
  3070. Bottom = 119
  3071. Right = 406
  3072. End
  3073. DisplayFlags = 280
  3074. TopColumn = 0
  3075. End
  3076. Begin Table = "设备信息"
  3077. Begin Extent =
  3078. Top = 53
  3079. Left = 496
  3080. Bottom = 172
  3081. Right = 657
  3082. End
  3083. DisplayFlags = 280
  3084. TopColumn = 0
  3085. End
  3086. Begin Table = "用户操作类型"
  3087. Begin Extent =
  3088. Top = 180
  3089. Left = 206
  3090. Bottom = 269
  3091. Right = 348
  3092. End
  3093. DisplayFlags = 280
  3094. TopColumn = 0
  3095. End
  3096. End
  3097. End
  3098. Begin SQLPane =
  3099. End
  3100. Begin DataPane =
  3101. Begin ParameterDefaults = ""
  3102. End
  3103. End
  3104. Begin CriteriaPane =
  3105. Begin ColumnWidths = 11
  3106. Column = 1440
  3107. Alias = 900
  3108. Table = 1170
  3109. Output = 720
  3110. Append = 1400
  3111. NewValue = 1170
  3112. SortType = 1350
  3113. SortOrder = 1410
  3114. GroupBy = 1350
  3115. Filter = 1350
  3116. Or = 1350
  3117. Or = 1350
  3118. Or = 1350
  3119. End
  3120. End
  3121. End
  3122. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_用户操作记录'
  3123. GO
  3124. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_用户操作记录'
  3125. GO
  3126. /****** Object: View [dbo].[VIEW_售水记录] Script Date: 05/20/2021 19:22:33 ******/
  3127. SET ANSI_NULLS ON
  3128. GO
  3129. SET QUOTED_IDENTIFIER ON
  3130. GO
  3131. CREATE VIEW [dbo].[VIEW_售水记录]
  3132. AS
  3133. SELECT dbo.水资源费.名称 AS 水价模板名称, dbo.计费方式.名称 AS 计费方式,
  3134. dbo.计量方式.名称 AS 计量方式, dbo.售水方式.名称 AS 售水方式, dbo.售水记录.Id,
  3135. dbo.售水记录.购水设备ID, dbo.售水记录.售水金额, dbo.售水记录.售出水量,
  3136. dbo.售水记录.售水时间, dbo.售水记录.操作员ID, dbo.售水记录.购水人,
  3137. dbo.售水记录.备注
  3138. FROM dbo.水资源费 INNER JOIN
  3139. dbo.购水设备 ON dbo.水资源费.Id = dbo.购水设备.水资源费ID INNER JOIN
  3140. dbo.售水方式 ON dbo.购水设备.售水方式ID = dbo.售水方式.Id INNER JOIN
  3141. dbo.计量方式 ON dbo.购水设备.计量方式ID = dbo.计量方式.Id INNER JOIN
  3142. dbo.计费方式 ON dbo.购水设备.计费方式ID = dbo.计费方式.Id INNER JOIN
  3143. dbo.售水记录 ON dbo.水资源费.Id = dbo.售水记录.水资源费ID AND
  3144. dbo.购水设备.Id = dbo.售水记录.购水设备ID AND
  3145. dbo.售水方式.Id = dbo.售水记录.售水方式ID AND
  3146. dbo.计量方式.Id = dbo.售水记录.计量方式ID AND
  3147. dbo.计费方式.Id = dbo.售水记录.计费方式ID
  3148. GO
  3149. /****** Object: View [dbo].[VIEW_管理信息] Script Date: 05/20/2021 19:22:33 ******/
  3150. SET ANSI_NULLS ON
  3151. GO
  3152. SET QUOTED_IDENTIFIER ON
  3153. GO
  3154. CREATE VIEW [dbo].[VIEW_管理信息]
  3155. AS
  3156. SELECT dbo.管理信息.ID, dbo.管理信息.名称, dbo.管理信息.上级ID, dbo.管理信息.级别ID,
  3157. dbo.级别信息.级别名称, dbo.级别信息.级别描述
  3158. FROM dbo.级别信息 INNER JOIN
  3159. dbo.管理信息 ON dbo.级别信息.ID = dbo.管理信息.级别ID
  3160. GO
  3161. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
  3162. Begin DesignProperties =
  3163. Begin PaneConfigurations =
  3164. Begin PaneConfiguration = 0
  3165. NumPanes = 4
  3166. Configuration = "(H (1[41] 4[20] 2[10] 3) )"
  3167. End
  3168. Begin PaneConfiguration = 1
  3169. NumPanes = 3
  3170. Configuration = "(H (1 [50] 4 [25] 3))"
  3171. End
  3172. Begin PaneConfiguration = 2
  3173. NumPanes = 3
  3174. Configuration = "(H (1[50] 2[25] 3) )"
  3175. End
  3176. Begin PaneConfiguration = 3
  3177. NumPanes = 3
  3178. Configuration = "(H (4 [30] 2 [40] 3))"
  3179. End
  3180. Begin PaneConfiguration = 4
  3181. NumPanes = 2
  3182. Configuration = "(H (1 [56] 3))"
  3183. End
  3184. Begin PaneConfiguration = 5
  3185. NumPanes = 2
  3186. Configuration = "(H (2 [66] 3))"
  3187. End
  3188. Begin PaneConfiguration = 6
  3189. NumPanes = 2
  3190. Configuration = "(H (4 [50] 3))"
  3191. End
  3192. Begin PaneConfiguration = 7
  3193. NumPanes = 1
  3194. Configuration = "(V (3))"
  3195. End
  3196. Begin PaneConfiguration = 8
  3197. NumPanes = 3
  3198. Configuration = "(H (1 [56] 4 [18] 2))"
  3199. End
  3200. Begin PaneConfiguration = 9
  3201. NumPanes = 2
  3202. Configuration = "(H (1 [75] 4))"
  3203. End
  3204. Begin PaneConfiguration = 10
  3205. NumPanes = 2
  3206. Configuration = "(H (1[66] 2) )"
  3207. End
  3208. Begin PaneConfiguration = 11
  3209. NumPanes = 2
  3210. Configuration = "(H (4 [60] 2))"
  3211. End
  3212. Begin PaneConfiguration = 12
  3213. NumPanes = 1
  3214. Configuration = "(H (1) )"
  3215. End
  3216. Begin PaneConfiguration = 13
  3217. NumPanes = 1
  3218. Configuration = "(V (4))"
  3219. End
  3220. Begin PaneConfiguration = 14
  3221. NumPanes = 1
  3222. Configuration = "(V (2))"
  3223. End
  3224. ActivePaneConfig = 0
  3225. End
  3226. Begin DiagramPane =
  3227. Begin Origin =
  3228. Top = 0
  3229. Left = 0
  3230. End
  3231. Begin Tables =
  3232. Begin Table = "级别信息"
  3233. Begin Extent =
  3234. Top = 6
  3235. Left = 211
  3236. Bottom = 116
  3237. Right = 346
  3238. End
  3239. DisplayFlags = 280
  3240. TopColumn = 0
  3241. End
  3242. Begin Table = "管理信息"
  3243. Begin Extent =
  3244. Top = 6
  3245. Left = 38
  3246. Bottom = 112
  3247. Right = 173
  3248. End
  3249. DisplayFlags = 280
  3250. TopColumn = 0
  3251. End
  3252. End
  3253. End
  3254. Begin SQLPane =
  3255. End
  3256. Begin DataPane =
  3257. Begin ParameterDefaults = ""
  3258. End
  3259. RowHeights = 240
  3260. Begin ColumnWidths = 7
  3261. Width = 284
  3262. Width = 1440
  3263. Width = 1440
  3264. Width = 1440
  3265. Width = 1440
  3266. Width = 1440
  3267. Width = 1440
  3268. End
  3269. End
  3270. Begin CriteriaPane =
  3271. Begin ColumnWidths = 11
  3272. Column = 1440
  3273. Alias = 900
  3274. Table = 1170
  3275. Output = 720
  3276. Append = 1400
  3277. NewValue = 1170
  3278. SortType = 1350
  3279. SortOrder = 1410
  3280. GroupBy = 1350
  3281. Filter = 1350
  3282. Or = 1350
  3283. Or = 1350
  3284. Or = 1350
  3285. End
  3286. End
  3287. End
  3288. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_管理信息'
  3289. GO
  3290. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'VIEW_管理信息'
  3291. GO
  3292. /****** Object: View [dbo].[VIEW_购水设备] Script Date: 05/20/2021 19:22:33 ******/
  3293. SET ANSI_NULLS ON
  3294. GO
  3295. SET QUOTED_IDENTIFIER ON
  3296. GO
  3297. CREATE VIEW [dbo].[VIEW_购水设备]
  3298. AS
  3299. SELECT dbo.购水设备.Id, dbo.购水设备.设备ID, dbo.购水设备.设备主板号,
  3300. dbo.计费方式.名称 AS 计费方式, dbo.计量方式.名称 AS 计量方式,
  3301. dbo.售水方式.名称 AS 售水方式, dbo.购水设备.初始计费值, dbo.购水设备.报警下限,
  3302. dbo.购水设备.水表倍率, dbo.购水设备.名称, dbo.购水设备.累计购水量,
  3303. dbo.水资源费.名称 AS 水价模板名称
  3304. FROM dbo.购水设备 INNER JOIN
  3305. dbo.计费方式 ON dbo.购水设备.计费方式ID = dbo.计费方式.Id INNER JOIN
  3306. dbo.计量方式 ON dbo.购水设备.计量方式ID = dbo.计量方式.Id INNER JOIN
  3307. dbo.售水方式 ON dbo.购水设备.售水方式ID = dbo.售水方式.Id INNER JOIN
  3308. dbo.水资源费 ON dbo.购水设备.水资源费ID = dbo.水资源费.Id
  3309. GO
  3310. /****** Object: View [dbo].[VIEW_发卡记录] Script Date: 05/20/2021 19:22:33 ******/
  3311. SET ANSI_NULLS ON
  3312. GO
  3313. SET QUOTED_IDENTIFIER ON
  3314. GO
  3315. CREATE VIEW [dbo].[VIEW_发卡记录]
  3316. AS
  3317. SELECT dbo.IC卡发卡记录.Id, dbo.IC卡发卡记录.IC卡信息ID, dbo.IC卡发卡记录.发卡日期,
  3318. dbo.发卡原因.名称 AS 发卡原因
  3319. FROM dbo.IC卡发卡记录 INNER JOIN
  3320. dbo.发卡原因 ON dbo.IC卡发卡记录.发卡原因ID = dbo.发卡原因.Id
  3321. GO
  3322. /****** Object: View [dbo].[VIEW_IC卡管理] Script Date: 05/20/2021 19:22:33 ******/
  3323. SET ANSI_NULLS ON
  3324. GO
  3325. SET QUOTED_IDENTIFIER ON
  3326. GO
  3327. CREATE VIEW [dbo].[VIEW_IC卡管理]
  3328. AS
  3329. SELECT dbo.IC卡信息.Id AS ID, dbo.IC卡信息.内部编号, dbo.IC卡信息.印刷编号,
  3330. dbo.IC卡信息.建卡日期, dbo.IC卡类型.名称 AS IC卡类型,
  3331. dbo.IC卡状态.名称 AS IC卡状态, dbo.IC卡信息.购水设备ID数组,
  3332. dbo.IC卡信息.持卡人名称, dbo.IC卡信息.单位名称
  3333. FROM dbo.IC卡信息 INNER JOIN
  3334. dbo.IC卡状态 ON dbo.IC卡信息.IC卡状态ID = dbo.IC卡状态.Id INNER JOIN
  3335. dbo.IC卡类型 ON dbo.IC卡信息.IC卡类型ID = dbo.IC卡类型.Id
  3336. GO
  3337. /****** Object: Default [DF_通讯设备_是否启用] Script Date: 05/20/2021 19:22:32 ******/
  3338. ALTER TABLE [dbo].[通讯设备] ADD CONSTRAINT [DF_通讯设备_是否启用] DEFAULT ('是') FOR [是否启用]
  3339. GO
  3340. /****** Object: Default [DF_数据卡信息_是否删除] Script Date: 05/20/2021 19:22:32 ******/
  3341. ALTER TABLE [dbo].[数据卡信息] ADD CONSTRAINT [DF_数据卡信息_是否删除] DEFAULT ('否') FOR [是否删除]
  3342. GO
  3343. /****** Object: Default [DF_设备信息_数据采集方式] Script Date: 05/20/2021 19:22:32 ******/
  3344. ALTER TABLE [dbo].[设备信息] ADD CONSTRAINT [DF_设备信息_数据采集方式] DEFAULT (0) FOR [数据采集方式]
  3345. GO
  3346. /****** Object: Default [DF_传输设备_是否启用] Script Date: 05/20/2021 19:22:32 ******/
  3347. ALTER TABLE [dbo].[传输设备] ADD CONSTRAINT [DF_传输设备_是否启用] DEFAULT ('是') FOR [是否启用]
  3348. GO
  3349. /****** Object: ForeignKey [FK_周期明细_REFERENCE_周期类别] Script Date: 05/20/2021 19:22:32 ******/
  3350. ALTER TABLE [dbo].[周期明细] WITH CHECK ADD CONSTRAINT [FK_周期明细_REFERENCE_周期类别] FOREIGN KEY([周期类别编号])
  3351. REFERENCES [dbo].[周期类别] ([周期类别编号])
  3352. GO
  3353. ALTER TABLE [dbo].[周期明细] CHECK CONSTRAINT [FK_周期明细_REFERENCE_周期类别]
  3354. GO