天瑞部分表同步

  1. 1. 将以下两表权限给 TX_SUPERMAN
  2. //个检订单表 HM_YW_TJZ000_QZJ,
  3. //个检项目表 HM_YW_TJYW00_QZJ ,
  4. //团检订单表 ESI_HMZXDD_TTTJZ0
  5. //团检项目表 ESI_HMZXDD_TTYWZJ
  6. 执行SQL如下。另外三表同下
  7. grant select on ESI_HMZXDD_TTYWZJ to TX_SUPERMAN;
  8. CREATE OR REPLACE PUBLIC SYNONYM ESI_HMZXDD_TTYWZJ FOR tx_jk.ESI_HMZXDD_TTYWZJ;
  9. 2.确认表结构
  10. create table HM_YW_TJYW00_QZJ
  11. (
  12. sfywid NUMBER(30) not null,
  13. tjh000 NUMBER(30) not null,
  14. ttid00 NUMBER(10) default 0 not null,
  15. rwid00 NUMBER(10) default 0 not null,
  16. sqxmid NUMBER(5) not null,
  17. sfxmmc VARCHAR2(50),
  18. zyflid NUMBER(5),
  19. ysje00 NUMBER(12,2) default 0 not null,
  20. dj0000 NUMBER(12,2) default 0 not null,
  21. sl0000 NUMBER(12,2) default 1 not null,
  22. tsje00 NUMBER(12,2) default 0 not null,
  23. gwyje0 NUMBER(12,2) default 0 not null,
  24. zfje00 NUMBER(12,2) default 0 not null,
  25. ydj000 VARCHAR2(1) default '0' not null,
  26. fsxx00 VARCHAR2(20),
  27. djr000 NUMBER(6),
  28. djrq00 CHAR(8),
  29. djsj00 CHAR(8),
  30. txm000 VARCHAR2(12),
  31. cjrq00 CHAR(8),
  32. cjsj00 CHAR(8),
  33. cjr000 NUMBER(6),
  34. ybcjks NUMBER(6),
  35. jyyljg VARCHAR2(1) default '0' not null,
  36. jyylrq CHAR(8),
  37. jyylsj CHAR(8),
  38. qj0000 VARCHAR2(1) default '0' not null,
  39. jcbz00 VARCHAR2(1) default '0' not null,
  40. tfntbz VARCHAR2(1) default '0' not null,
  41. jcksid NUMBER(6) not null,
  42. kdrq00 CHAR(8) default to_char(sysdate,'YYYYMMDD') not null,
  43. kdsj00 CHAR(8) default to_char(sysdate,'HH24:MI:SS') not null,
  44. fkksrq CHAR(8) default '00000000',
  45. fkkssj CHAR(8),
  46. fkjsrq CHAR(8),
  47. fkjssj CHAR(8),
  48. kdys00 NUMBER(6),
  49. sfsf00 VARCHAR2(1) default '0' not null,
  50. sfjz00 VARCHAR2(1) default '0' not null,
  51. sfrq00 CHAR(8),
  52. sfsj00 CHAR(8),
  53. ksczy0 NUMBER(6),
  54. jcysid NUMBER(6),
  55. jcysxm VARCHAR2(30),
  56. jcrq00 CHAR(8),
  57. jcsj00 CHAR(8),
  58. zhxmid NUMBER(5),
  59. fywid0 NUMBER(10) default -1 not null,
  60. khqrbz VARCHAR2(1) default '0' not null,
  61. topacs VARCHAR2(1) default '0',
  62. fkjcid NUMBER(10),
  63. yyrq00 CHAR(8) default '00000000',
  64. bz0000 VARCHAR2(100),
  65. ypffy0 NUMBER(6),
  66. ypffrq VARCHAR2(30),
  67. jpydy0 VARCHAR2(1) default '0' not null,
  68. sgywid NUMBER(12) default 0,
  69. jpksid NUMBER(5),
  70. djywid NUMBER(12),
  71. xh0000 NUMBER(5),
  72. wsbz00 VARCHAR2(1),
  73. jyfs00 VARCHAR2(1) default '0' not null,
  74. txmold VARCHAR2(12),
  75. ywid00 NUMBER(12),
  76. jgflag VARCHAR2(1) default '0',
  77. jgzfje NUMBER(12,2) default 0,
  78. jgtsje NUMBER(12,2) default 0,
  79. sfttxm VARCHAR2(1) default '0',
  80. wwtjh VARCHAR2(30),
  81. code VARCHAR2(30)
  82. )
  83. create table HM_YW_TJZ000_QZJ
  84. (
  85. tjh000 NUMBER(30) not null,
  86. tjdm00 VARCHAR2(30),
  87. daid00 NUMBER(20),
  88. xm0000 VARCHAR2(30),
  89. pysm00 VARCHAR2(15),
  90. wbsm00 VARCHAR2(15),
  91. xb0000 VARCHAR2(1) default '0',
  92. nl0000 NUMBER(5),
  93. csrq00 VARCHAR2(8),
  94. nlys00 NUMBER(3),
  95. dh0000 VARCHAR2(30),
  96. dhfbr0 VARCHAR2(1),
  97. dz0000 VARCHAR2(120),
  98. sfzh00 VARCHAR2(30),
  99. nldwid NUMBER(5),
  100. hyzkid NUMBER(5),
  101. mzid00 NUMBER(5) default 1,
  102. dzyj00 VARCHAR2(80),
  103. zp0000 BLOB,
  104. brid00 NUMBER(12),
  105. ttid00 NUMBER(5) default 0,
  106. rwid00 NUMBER(10) default 0,
  107. fzid00 NUMBER(10),
  108. ttbm00 VARCHAR2(100),
  109. rwydid NUMBER(12),
  110. kl0000 NUMBER(5,1),
  111. tsxe00 NUMBER(12,2),
  112. kdysid NUMBER(6),
  113. lxid00 NUMBER(5) default 1,
  114. tjlxid NUMBER(5) default 1,
  115. sfyd00 VARCHAR2(1) default '0',
  116. jyid00 NUMBER(5),
  117. zyid00 NUMBER(5),
  118. dqid00 NUMBER(5) default 202,
  119. rzrq00 CHAR(8),
  120. cjr000 NUMBER(6),
  121. cjrq00 CHAR(8) default to_char(sysdate,'YYYYMMDD'),
  122. cjsj00 CHAR(8) default to_char(sysdate,'HH24:MI:SS'),
  123. djrq00 CHAR(8),
  124. djsj00 CHAR(8),
  125. yyrq00 CHAR(8),
  126. zydsm0 VARCHAR2(200),
  127. ydj000 VARCHAR2(1) default '0',
  128. djyid0 NUMBER(6),
  129. zydyd0 VARCHAR2(1) default '0',
  130. yjf000 VARCHAR2(1) default '0',
  131. ykstj0 VARCHAR2(1) default '0',
  132. fjwc00 VARCHAR2(1) default '0',
  133. fjwcrq CHAR(8) default '00000000',
  134. zjsd00 VARCHAR2(1) default '0',
  135. zjjsyy VARCHAR2(2000),
  136. zjjsrq VARCHAR2(20),
  137. zjwc00 VARCHAR2(1) default '0',
  138. zswc00 VARCHAR2(1) default '0',
  139. zjysid NUMBER(6),
  140. zjrq00 CHAR(8) default '00000000',
  141. zjsj00 CHAR(8),
  142. zsys00 NUMBER(6),
  143. fshys0 NUMBER(6),
  144. zsrq00 CHAR(8) default '00000000',
  145. zssj00 CHAR(8),
  146. bgfmyd VARCHAR2(1) default '0',
  147. bgydy0 VARCHAR2(1) default '0',
  148. bgdyid NUMBER(6),
  149. bgdyrq CHAR(8) default '00000000',
  150. bgdysj CHAR(8),
  151. bglqtz VARCHAR2(1) default '0',
  152. lqtzr0 NUMBER(6),
  153. lqtzrq CHAR(8),
  154. lqtzsj CHAR(8),
  155. tzfs00 NUMBER(5) default 2,
  156. lqfs00 NUMBER(5) default 6,
  157. bgyq00 VARCHAR2(1) default '0',
  158. bglqrq CHAR(8) default '00000000',
  159. bglqsj CHAR(8),
  160. zdjb00 VARCHAR2(1) default '0',
  161. ja0000 VARCHAR2(1) default '0',
  162. jarq00 CHAR(8) default '00000000',
  163. jasj00 CHAR(8),
  164. xygz00 VARCHAR2(1) default '0',
  165. fbrtj0 VARCHAR2(1) default '0',
  166. mj0000 VARCHAR2(1) default '0',
  167. jmdj00 NUMBER(3) default 0,
  168. yj0000 VARCHAR2(1) default '0',
  169. zxid00 VARCHAR2(60),
  170. zxmc00 VARCHAR2(200),
  171. sfsf00 VARCHAR2(1) default '0',
  172. bz0000 VARCHAR2(2000),
  173. zzjb00 NUMBER(5),
  174. zzsm00 VARCHAR2(50),
  175. zzytz0 VARCHAR2(1) default '0',
  176. zztzrq CHAR(8),
  177. zztzsj CHAR(8),
  178. zztzr0 NUMBER(5),
  179. zs0000 VARCHAR2(4000),
  180. jl0000 VARCHAR2(4000),
  181. jy0000 CLOB,
  182. jkjy00 VARCHAR2(4000),
  183. ysjy00 VARCHAR2(4000),
  184. yxjy00 VARCHAR2(4000),
  185. jkzs00 VARCHAR2(4000),
  186. wxts00 VARCHAR2(4000),
  187. yxzs00 VARCHAR2(4000),
  188. zsthyy VARCHAR2(4000),
  189. zsthfk VARCHAR2(4000),
  190. thbz00 VARCHAR2(1) default '0',
  191. zfje00 NUMBER(12,2) default 0,
  192. jzje00 NUMBER(12,2) default 0,
  193. fbbh00 NUMBER(5) default 1,
  194. ybjgbh VARCHAR2(2),
  195. ybrylb NUMBER(2),
  196. ybkh00 VARCHAR2(30),
  197. shbzh0 VARCHAR2(30),
  198. ybghh0 VARCHAR2(20),
  199. ybghrq CHAR(8),
  200. ybdjrq CHAR(8) default '00000000',
  201. ckyf00 VARCHAR2(1) default '0',
  202. jj0000 VARCHAR2(1) default '0',
  203. sfhy00 VARCHAR2(1) default '0',
  204. jabz00 VARCHAR2(2000),
  205. jasfcl CHAR(1) default '0',
  206. sfcjja CHAR(1) default '0',
  207. ybdjr0 NUMBER(6),
  208. djtsxx VARCHAR2(100),
  209. ttgh00 VARCHAR2(20),
  210. yybh00 CHAR(6) default '0',
  211. sjrq00 CHAR(8) default '00000000',
  212. zjwljj VARCHAR2(1) default '0',
  213. total_fee NUMBER(12,2) default 0,
  214. price NUMBER(12,2) default 0,
  215. code VARCHAR2(30),
  216. state NUMBER(1) default 0,
  217. discount VARCHAR2(10),
  218. suggestion VARCHAR2(1000),
  219. check_items VARCHAR2(1000),
  220. nwtjh VARCHAR2(30),
  221. yyqssj VARCHAR2(8),
  222. yyzzsj VARCHAR2(8),
  223. tjlxmc VARCHAR2(30),
  224. hyzk00 VARCHAR2(30),
  225. xsjfje NUMBER(12,2),
  226. mqxm00 VARCHAR2(30),
  227. mqsfzh VARCHAR2(30),
  228. csdz00 NUMBER(5),
  229. fjdz00 NUMBER(5),
  230. tcid00 NUMBER(10),
  231. tjly00 VARCHAR2(40),
  232. ykj000 VARCHAR2(1),
  233. ykjje0 NUMBER(12,2),
  234. ytjh00 NUMBER(12),
  235. bjh000 VARCHAR2(20),
  236. hishospitalld VARCHAR2(20)
  237. );
  238. -- Create table
  239. create table TX_JK.ESI_HMZXDD_TTYWZJ
  240. (
  241. TJH000 NUMBER(12) not null,
  242. SFYWID NUMBER(12),
  243. LB0000 NUMBER(5) not null,
  244. SQXMID NUMBER(10) not null,
  245. SQXMMC VARCHAR2(50),
  246. DJ0000 NUMBER(12,2),
  247. JE0000 NUMBER(12,2),
  248. CZRQ00 CHAR(8) default to_char(sysdate, 'YYYYMMDD'),
  249. CZSJ00 CHAR(8) default to_char(sysdate,'HH24:MI:SS'), --操作时间,
  250. SFXMMC VARCHAR2(200)
  251. )
  252. tablespace TS_JK
  253. pctfree 10
  254. initrans 1
  255. maxtrans 255
  256. storage
  257. (
  258. initial 64
  259. minextents 1
  260. maxextents unlimited
  261. );
  262. -- Create/Recreate indexes
  263. create index TX_JK.IDX_ESI_HMZXDD_TTYWZJ_SFYWID on TX_JK.ESI_HMZXDD_TTYWZJ (SFYWID)
  264. tablespace TS_JK_IND
  265. pctfree 10
  266. initrans 2
  267. maxtrans 255
  268. storage
  269. (
  270. initial 64K
  271. minextents 1
  272. maxextents unlimited
  273. );
  274. create index TX_JK.IDX_ESI_HMZXDD_TTYWZJ_TJH000 on TX_JK.ESI_HMZXDD_TTYWZJ (TJH000)
  275. tablespace TS_JK_IND
  276. pctfree 10
  277. initrans 2
  278. maxtrans 255
  279. storage
  280. (
  281. initial 64K
  282. minextents 1
  283. maxextents unlimited
  284. );
  285. -- Grant/Revoke object privileges
  286. grant select on TX_JK.ESI_HMZXDD_TTYWZJ to TX_SUPERMAN;
  287. -- Create table
  288. create table TX_JK.ESI_HMZXDD_TTTJZ0
  289. (
  290. TJH000 NUMBER(12) not null,
  291. XM0000 VARCHAR2(30),
  292. XB0000 VARCHAR2(30),
  293. NL0000 NUMBER(3),
  294. CSRQ00 VARCHAR2(8),
  295. SFZH00 VARCHAR2(18),
  296. HYZK00 VARCHAR2(4),
  297. SFHY00 VARCHAR2(1),
  298. DH0000 VARCHAR2(12),
  299. YYRQ00 VARCHAR2(8),
  300. YYQSSJ VARCHAR2(8),
  301. YYZZSJ VARCHAR2(8),
  302. CZRQ00 CHAR(8) default to_char(sysdate, 'YYYYMMDD'),
  303. CZSJ00 CHAR(8) default to_char(sysdate,'HH24:MI:SS'),
  304. YDJ000 VARCHAR2(2) default '0' not null,
  305. TJLXMC VARCHAR2(30),
  306. SFXMMC VARCHAR2(200)
  307. )
  308. tablespace TS_JK
  309. pctfree 10
  310. initrans 1
  311. maxtrans 255
  312. storage
  313. (
  314. initial 64
  315. minextents 1
  316. maxextents unlimited
  317. );
  318. -- Create/Recreate indexes
  319. create unique index TX_JK.IDX_ESI_HMZXDD_TTTJZ0_TJH000 on TX_JK.ESI_HMZXDD_TTTJZ0 (TJH000)
  320. tablespace TS_JK_IND
  321. pctfree 10
  322. initrans 2
  323. maxtrans 255
  324. storage
  325. (
  326. initial 64K
  327. minextents 1
  328. maxextents unlimited
  329. );
  330. -- Grant/Revoke object privileges
  331. grant select on TX_JK.ESI_HMZXDD_TTTJZ0 to TX_SUPERMAN;
文档更新时间: 2024-07-11 16:48