w_ol_mov_pipeline.srw 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. $PBExportHeader$w_ol_mov_pipeline.srw
  2. forward
  3. global type w_ol_mov_pipeline from w_publ_base
  4. end type
  5. type mle_log from multilineedit within w_ol_mov_pipeline
  6. end type
  7. type st_msg from statictext within w_ol_mov_pipeline
  8. end type
  9. type cb_1 from commandbutton within w_ol_mov_pipeline
  10. end type
  11. type st_vservermsg from statictext within w_ol_mov_pipeline
  12. end type
  13. type cb_obj_cnt from commandbutton within w_ol_mov_pipeline
  14. end type
  15. type st_obj_msg from statictext within w_ol_mov_pipeline
  16. end type
  17. type gb_14 from groupbox within w_ol_mov_pipeline
  18. end type
  19. type gb_2 from groupbox within w_ol_mov_pipeline
  20. end type
  21. type ddplb_obj_tran from dropdownpicturelistbox within w_ol_mov_pipeline
  22. end type
  23. type st_222 from statictext within w_ol_mov_pipeline
  24. end type
  25. type ddlb_st from dropdownlistbox within w_ol_mov_pipeline
  26. end type
  27. type st_3e from statictext within w_ol_mov_pipeline
  28. end type
  29. type em_ed from editmask within w_ol_mov_pipeline
  30. end type
  31. type dw_error from datawindow within w_ol_mov_pipeline
  32. end type
  33. type dw_1 from u_dw_rbtnfilter within w_ol_mov_pipeline
  34. end type
  35. type cb_2 from commandbutton within w_ol_mov_pipeline
  36. end type
  37. end forward
  38. global type w_ol_mov_pipeline from w_publ_base
  39. integer x = 46
  40. integer y = 32
  41. integer width = 3118
  42. integer height = 2168
  43. string title = "转移已截数数据"
  44. boolean maxbox = true
  45. windowstate windowstate = maximized!
  46. long backcolor = 80269524
  47. mle_log mle_log
  48. st_msg st_msg
  49. cb_1 cb_1
  50. st_vservermsg st_vservermsg
  51. cb_obj_cnt cb_obj_cnt
  52. st_obj_msg st_obj_msg
  53. gb_14 gb_14
  54. gb_2 gb_2
  55. ddplb_obj_tran ddplb_obj_tran
  56. st_222 st_222
  57. ddlb_st ddlb_st
  58. st_3e st_3e
  59. em_ed em_ed
  60. dw_error dw_error
  61. dw_1 dw_1
  62. cb_2 cb_2
  63. end type
  64. global w_ol_mov_pipeline w_ol_mov_pipeline
  65. type variables
  66. uo_remote_sqlca uo_rm_sqlca
  67. uo_yfimex_pipeline uo_pl_yfimex
  68. uo_getdbinfo uo_dbinfo
  69. uo_yfct uo_ct
  70. transaction obj_sqlca //目标数据传递事务对象
  71. int obj_hisflag,obj_ifd_msttake
  72. boolean obj_ifconnect=false
  73. end variables
  74. forward prototypes
  75. public function integer wf_pipeline_ctdata ()
  76. public function integer wf_check_data ()
  77. end prototypes
  78. public function integer wf_pipeline_ctdata ();//wf_pipeline_ctdata()
  79. DateTime arg_bg_changetime,arg_ed_changetime
  80. String arg_log,arg_msg,ls_tbname
  81. Int arg_getflag = 0,arg_usechangetime = 0
  82. Int rslt,ls_k,tbc = 0,ls_i
  83. Long bg_ctmint,ed_ctmint
  84. Long arg_commitstep = 100,arg_maxerrors = 100
  85. arg_bg_changetime = DateTime(Date(Left(ddlb_st.Text,10)),Time(Right(ddlb_st.Text,8)))
  86. arg_ed_changetime = DateTime(Date(Left(em_ed.Text,10)),Time(Right(em_ed.Text,8)))
  87. st_msg.Text = ''
  88. s_exporttableinfo arg_zipfileinfo[200]
  89. s_sys_tntblinfo ls_tntblinfo
  90. //0.取标记
  91. SELECT ct_dateint INTO :bg_ctmint FROM sys_ct_data Where ct_datetime = :arg_bg_changetime;
  92. IF sqlca.SQLCode <> 0 THEN
  93. MessageBox("错误",'查询截数开始时间标记失败',stopsign!,OK!)
  94. rslt = 0
  95. GOTO ext
  96. END IF
  97. SELECT ct_dateint INTO :ed_ctmint FROM sys_ct_data Where ct_datetime = :arg_ed_changetime;
  98. IF sqlca.SQLCode <> 0 THEN
  99. MessageBox("错误",'查询截数结束时间标记失败',stopsign!,OK!)
  100. rslt = 0
  101. GOTO ext
  102. END IF
  103. //2.表文件数组
  104. //2.1无filter_string表
  105. FOR ls_i = 1 TO UpperBound(s_tntblinfo)
  106. ls_tntblinfo = s_tntblinfo[ls_i]
  107. If (ls_tntblinfo.tabletype = 0 OR ls_tntblinfo.tabletype = 1) AND ls_tntblinfo.table_name <> '' THEN
  108. ls_k++
  109. arg_zipfileinfo[ls_k].table_name = s_tntblinfo[ls_i].table_name
  110. arg_zipfileinfo[ls_k].filter_string = ''
  111. END IF
  112. NEXT
  113. ls_k++
  114. arg_zipfileinfo[ls_k].table_name = 'u_bsnNo' //业务编号表
  115. arg_zipfileinfo[ls_k].filter_string = ''
  116. ls_k++
  117. arg_zipfileinfo[ls_k].table_name = 'Sys_scIdentity' //ID流水表
  118. arg_zipfileinfo[ls_k].filter_string = ''
  119. ls_k++
  120. arg_zipfileinfo[ls_k].table_name = 'u_mtrlware' //库存表
  121. arg_zipfileinfo[ls_k].filter_string = ''
  122. //2.2 有filter_string表
  123. Int arr_cnt
  124. Long ll_a
  125. s_yfct s_ctmx[]
  126. f_init_cttbinfo(arg_ed_changetime,bg_ctmint,ed_ctmint,s_ctmx[])
  127. arr_cnt = UpperBound(s_ctmx)
  128. FOR ll_a = 1 TO arr_cnt
  129. ls_k++
  130. arg_zipfileinfo[ls_k].table_name = s_ctmx[ll_a].etbname
  131. arg_zipfileinfo[ls_k].filter_string = s_ctmx[ll_a].ctstr
  132. NEXT
  133. uo_pl_yfimex.uf_pl_execute(sqlca,obj_sqlca,dw_error,arg_zipfileinfo[],ls_k,arg_commitstep,arg_maxerrors,arg_msg,arg_log,TRUE)
  134. //6.
  135. IF NOT if_hisdb THEN
  136. Long err_num,pos_1,pos_2,len_1
  137. String char_enter
  138. char_enter = Char(13)+Char(10)
  139. len_1 = Len(',总错误- ')
  140. pos_1 = Pos(arg_log,',总错误- ')
  141. pos_2 = Pos(arg_log,char_enter,pos_1)
  142. err_num = Long(Mid(arg_log, pos_1 + Len(',总错误- '),pos_2 - pos_1 - len_1 ))
  143. IF uo_ct.add_ct_datamx(0,arg_bg_changetime,arg_ed_changetime,err_num,0,arg_msg,1,sqlca) = 0 THEN
  144. st_msg.Text = st_msg.Text + arg_msg
  145. END IF
  146. IF uo_ct.add_ct_datamx(0,arg_bg_changetime,arg_ed_changetime,err_num,0,arg_msg,1,obj_sqlca) = 0 THEN
  147. st_msg.Text = st_msg.Text + arg_msg
  148. END IF
  149. END IF
  150. MessageBox("提示",'数据传递完毕!',information!,OK!)
  151. ext:
  152. mle_log.Text = arg_log
  153. RETURN 1
  154. end function
  155. public function integer wf_check_data ();Int rslt = 1
  156. DateTime arg_bg_changetime,arg_ed_changetime
  157. Long ll_i,ll_k,ll_row
  158. Long bg_ctmint,ed_ctmint
  159. Long ll_local,ll_his
  160. String ls_errsql
  161. String ls_msg
  162. Int arr_cnt
  163. s_yfct s_ctmx[]
  164. String str_dwSQl,str_SyntaxFromSQL
  165. DataStore ds_data,ds_data_his
  166. arg_bg_changetime = DateTime(Date(Left(ddlb_st.Text,10)),Time(Right(ddlb_st.Text,8)))
  167. arg_ed_changetime = DateTime(Date(Left(em_ed.Text,10)),Time(Right(em_ed.Text,8)))
  168. st_msg.Text = ''
  169. //0.取标记
  170. SELECT ct_dateint INTO :bg_ctmint FROM sys_ct_data Where ct_datetime = :arg_bg_changetime;
  171. IF sqlca.SQLCode <> 0 THEN
  172. MessageBox("错误",'查询截数开始时间标记失败',stopsign!,OK!)
  173. rslt = 0
  174. GOTO ext
  175. END IF
  176. SELECT ct_dateint INTO :ed_ctmint FROM sys_ct_data Where ct_datetime = :arg_ed_changetime;
  177. IF sqlca.SQLCode <> 0 THEN
  178. MessageBox("错误",'查询截数结束时间标记失败',stopsign!,OK!)
  179. rslt = 0
  180. GOTO ext
  181. END IF
  182. f_init_cttbinfo(arg_ed_changetime,bg_ctmint,ed_ctmint,s_ctmx[])
  183. arr_cnt = UpperBound(s_ctmx)
  184. ds_data = CREATE DataStore
  185. ds_data_his = CREATE DataStore
  186. OPEN(w_sys_wait_jdt)
  187. w_sys_wait_jdt.Show()
  188. w_sys_wait_jdt.wf_accepttol(arr_cnt) //初始化进度条1
  189. dw_1.SetRedraw(FALSE)
  190. FOR ll_i = 1 TO arr_cnt
  191. ls_msg = ''
  192. ls_errsql = ''
  193. ll_local = 0
  194. ll_his = 0
  195. ds_data.Reset()
  196. ds_data_his.Reset()
  197. if s_ctmx[ll_i].etbname = '' then continue
  198. w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在建dw..." //进度信息
  199. str_dwSQl = "select "+s_ctmx[ll_i].etbname+".* from "+s_ctmx[ll_i].etbname+s_ctmx[ll_i].ctstr
  200. str_SyntaxFromSQL = sqlca.SyntaxFromSQL(str_dwSQl,"style(type=grid)",ls_msg)
  201. IF ls_msg > '' THEN
  202. ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" dw语法生成失败"
  203. GOTO nexttable
  204. END IF
  205. ds_data.CREATE(str_SyntaxFromSQL,ls_msg)
  206. IF ls_msg > '' THEN
  207. ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 建立相关DW失败"
  208. GOTO nexttable
  209. END IF
  210. ds_data.SetTransObject(sqlca)
  211. w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在本地取数据..." //进度信息
  212. ll_local = ds_data.Retrieve()
  213. IF IsNull(ll_local) THEN ll_local = 0
  214. //历史
  215. str_SyntaxFromSQL = obj_sqlca.SyntaxFromSQL(str_dwSQl,"style(type=grid)",ls_msg)
  216. IF ls_msg > '' THEN
  217. ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" dw语法生成失败"
  218. GOTO nexttable
  219. END IF
  220. ds_data_his.CREATE(str_SyntaxFromSQL,ls_msg)
  221. IF ls_msg > '' THEN
  222. ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 历史建立相关DW失败"
  223. GOTO nexttable
  224. END IF
  225. ds_data_his.SetTransObject(obj_sqlca)
  226. w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在历史取数据..." //进度信息
  227. ll_his = ds_data_his.Retrieve()
  228. IF IsNull(ll_his) THEN ll_his = 0
  229. nexttable :
  230. ll_row = dw_1.InsertRow(0)
  231. dw_1.Object.tblname[ll_row] = s_ctmx[ll_i].ctbname
  232. dw_1.Object.etblname[ll_row] = s_ctmx[ll_i].etbname
  233. dw_1.Object.local[ll_row] = ll_local
  234. dw_1.Object.his[ll_row] = ll_his
  235. dw_1.Object.errsql[ll_row] = ls_errsql
  236. w_sys_wait_jdt.wf_inc(ll_i) //进度
  237. NEXT
  238. dw_1.SetRedraw(TRUE)
  239. CLOSE(w_sys_wait_jdt)
  240. DESTROY ds_data
  241. DESTROY ds_data_his
  242. MessageBox("提示",'数据检查完毕!',information!,OK!)
  243. ext:
  244. RETURN 1
  245. end function
  246. on w_ol_mov_pipeline.create
  247. int iCurrent
  248. call super::create
  249. this.mle_log=create mle_log
  250. this.st_msg=create st_msg
  251. this.cb_1=create cb_1
  252. this.st_vservermsg=create st_vservermsg
  253. this.cb_obj_cnt=create cb_obj_cnt
  254. this.st_obj_msg=create st_obj_msg
  255. this.gb_14=create gb_14
  256. this.gb_2=create gb_2
  257. this.ddplb_obj_tran=create ddplb_obj_tran
  258. this.st_222=create st_222
  259. this.ddlb_st=create ddlb_st
  260. this.st_3e=create st_3e
  261. this.em_ed=create em_ed
  262. this.dw_error=create dw_error
  263. this.dw_1=create dw_1
  264. this.cb_2=create cb_2
  265. iCurrent=UpperBound(this.Control)
  266. this.Control[iCurrent+1]=this.mle_log
  267. this.Control[iCurrent+2]=this.st_msg
  268. this.Control[iCurrent+3]=this.cb_1
  269. this.Control[iCurrent+4]=this.st_vservermsg
  270. this.Control[iCurrent+5]=this.cb_obj_cnt
  271. this.Control[iCurrent+6]=this.st_obj_msg
  272. this.Control[iCurrent+7]=this.gb_14
  273. this.Control[iCurrent+8]=this.gb_2
  274. this.Control[iCurrent+9]=this.ddplb_obj_tran
  275. this.Control[iCurrent+10]=this.st_222
  276. this.Control[iCurrent+11]=this.ddlb_st
  277. this.Control[iCurrent+12]=this.st_3e
  278. this.Control[iCurrent+13]=this.em_ed
  279. this.Control[iCurrent+14]=this.dw_error
  280. this.Control[iCurrent+15]=this.dw_1
  281. this.Control[iCurrent+16]=this.cb_2
  282. end on
  283. on w_ol_mov_pipeline.destroy
  284. call super::destroy
  285. destroy(this.mle_log)
  286. destroy(this.st_msg)
  287. destroy(this.cb_1)
  288. destroy(this.st_vservermsg)
  289. destroy(this.cb_obj_cnt)
  290. destroy(this.st_obj_msg)
  291. destroy(this.gb_14)
  292. destroy(this.gb_2)
  293. destroy(this.ddplb_obj_tran)
  294. destroy(this.st_222)
  295. destroy(this.ddlb_st)
  296. destroy(this.st_3e)
  297. destroy(this.em_ed)
  298. destroy(this.dw_error)
  299. destroy(this.dw_1)
  300. destroy(this.cb_2)
  301. end on
  302. event resize;dw_1.Width = THIS.Width - 30
  303. dw_error.Width = THIS.Width - 30
  304. mle_log.Width = THIS.Width - 30
  305. mle_log.Height = THIS.Height - mle_log.Y - 30
  306. end event
  307. event open;call super::open;uo_dbinfo=create uo_getdbinfo
  308. uo_pl_yfimex=create uo_yfimex_pipeline
  309. uo_ct=create uo_yfct
  310. obj_sqlca = create transaction
  311. end event
  312. event close;destroy uo_dbinfo
  313. destroy uo_pl_yfimex
  314. destroy uo_ct
  315. if obj_ifconnect then
  316. disconnect using obj_sqlca;
  317. end if
  318. end event
  319. type cb_func from w_publ_base`cb_func within w_ol_mov_pipeline
  320. boolean visible = false
  321. integer x = 1504
  322. boolean enabled = false
  323. end type
  324. type cb_exit from w_publ_base`cb_exit within w_ol_mov_pipeline
  325. boolean visible = false
  326. integer x = 1824
  327. boolean enabled = false
  328. end type
  329. type mle_log from multilineedit within w_ol_mov_pipeline
  330. integer y = 1356
  331. integer width = 3077
  332. integer height = 708
  333. integer taborder = 100
  334. boolean bringtotop = true
  335. integer textsize = -9
  336. integer weight = 400
  337. fontcharset fontcharset = gb2312charset!
  338. fontpitch fontpitch = variable!
  339. string facename = "宋体"
  340. long textcolor = 33554432
  341. boolean hscrollbar = true
  342. boolean vscrollbar = true
  343. boolean displayonly = true
  344. borderstyle borderstyle = stylelowered!
  345. end type
  346. type st_msg from statictext within w_ol_mov_pipeline
  347. integer y = 480
  348. integer width = 2880
  349. integer height = 88
  350. boolean bringtotop = true
  351. integer textsize = -9
  352. integer weight = 400
  353. fontcharset fontcharset = gb2312charset!
  354. fontpitch fontpitch = variable!
  355. string facename = "宋体"
  356. long backcolor = 16776960
  357. boolean enabled = false
  358. boolean border = true
  359. boolean focusrectangle = false
  360. end type
  361. type cb_1 from commandbutton within w_ol_mov_pipeline
  362. integer x = 2290
  363. integer y = 340
  364. integer width = 293
  365. integer height = 96
  366. integer taborder = 60
  367. boolean bringtotop = true
  368. integer textsize = -9
  369. integer weight = 700
  370. fontcharset fontcharset = gb2312charset!
  371. fontpitch fontpitch = variable!
  372. string facename = "宋体"
  373. string text = "执行传递"
  374. end type
  375. event clicked;if MessageBox("询问",'是否确定要传送数据? ', Exclamation!, yesno!, 2) =2 then return
  376. if if_hisdb then
  377. messagebox("提示",'当前数据库是历史查询数据库,不能通过管道传送数据!',information!,OK!)
  378. return
  379. end if
  380. if not obj_ifconnect then
  381. messagebox("提示",'目标数据库还没有连接,请检查!',information!,OK!)
  382. return
  383. end if
  384. if obj_hisflag=0 then
  385. messagebox("提示",'目标数据库不是历史查询数据库,不能通过管道传送数据!',information!,OK!)
  386. return
  387. end if
  388. wf_pipeline_ctdata()
  389. end event
  390. type st_vservermsg from statictext within w_ol_mov_pipeline
  391. integer x = 18
  392. integer y = 12
  393. integer width = 1344
  394. integer height = 64
  395. boolean bringtotop = true
  396. integer textsize = -9
  397. integer weight = 400
  398. fontcharset fontcharset = gb2312charset!
  399. fontpitch fontpitch = variable!
  400. string facename = "宋体"
  401. long textcolor = 255
  402. long backcolor = 80269524
  403. boolean enabled = false
  404. string text = "如果数据库连接错误,需要尝试等待60s才会提示失败."
  405. boolean focusrectangle = false
  406. end type
  407. type cb_obj_cnt from commandbutton within w_ol_mov_pipeline
  408. integer x = 635
  409. integer y = 144
  410. integer width = 247
  411. integer height = 88
  412. integer taborder = 50
  413. boolean bringtotop = true
  414. integer textsize = -9
  415. integer weight = 400
  416. fontcharset fontcharset = gb2312charset!
  417. fontpitch fontpitch = variable!
  418. string facename = "宋体"
  419. string text = "连接"
  420. end type
  421. event clicked;//st_obj_msg.Text = '正在连接...[如果连接失败可能需要等待60秒]'
  422. //Long ls_r,arg_cnt_no
  423. //String arg_msg,db_msg
  424. //arg_cnt_no = Integer(Right(ddplb_obj_tran.Text,2))
  425. //int li_switchflag
  426. //String arg_superpsw,arg_prg_id,arg_cur_version,ls_switchpsw
  427. //
  428. //ls_r = uo_rm_sqlca.cnt_remote_sqlca(arg_cnt_no,obj_sqlca,arg_msg)
  429. //IF ls_r = 1 THEN
  430. // IF uo_dbinfo.get_dbinfo(obj_sqlca,obj_hisflag,arg_superpsw,arg_prg_id,arg_cur_version,li_switchflag,ls_switchpsw,db_msg) = 0 THEN
  431. // MessageBox("系统提示",db_msg )
  432. // st_obj_msg.Text = '失败 >>'+arg_msg + ','+db_msg
  433. // obj_ifconnect = FALSE
  434. // ELSE
  435. // st_obj_msg.Text = '数据库连接 成功 >>'+String(Today())+' '+String(Now())
  436. // obj_ifconnect = TRUE
  437. // END IF
  438. //ELSE
  439. // st_obj_msg.Text = '失败 >>'+arg_msg
  440. // obj_ifconnect = FALSE
  441. //END IF
  442. int li_switchflag
  443. String ls_switchpsw
  444. st_obj_msg.Text = '正在连接...[如果连接失败可能需要等待60秒]'
  445. Long ls_r,ll_ConnectionID
  446. String arg_msg
  447. ll_ConnectionID = Integer(Mid(ddplb_obj_tran.Text,1,Pos(ddplb_obj_tran.Text,' ') - 1))
  448. IF f_connect_db(ll_ConnectionID,obj_sqlca,arg_msg) = 0 THEN
  449. MessageBox("错误",arg_msg,stopsign!,OK! )
  450. RETURN
  451. END IF
  452. String ls_superpsw
  453. string arg_prg_id
  454. string arg_cur_version
  455. IF uo_dbinfo.get_dbinfo(obj_sqlca,obj_hisflag,ls_superpsw,arg_prg_id,arg_cur_version,li_switchflag,ls_switchpsw,arg_msg) = 0 THEN
  456. MessageBox("错误",arg_msg,stopsign!,OK! )
  457. st_obj_msg.Text = '失败 >>'+arg_msg
  458. obj_ifconnect = FALSE
  459. ELSE
  460. st_obj_msg.Text = '数据库连接 成功 >>'+String(Today())+' '+String(Now())
  461. obj_ifconnect = TRUE
  462. END IF
  463. end event
  464. type st_obj_msg from statictext within w_ol_mov_pipeline
  465. integer x = 891
  466. integer y = 144
  467. integer width = 1966
  468. integer height = 88
  469. boolean bringtotop = true
  470. integer textsize = -9
  471. integer weight = 400
  472. fontcharset fontcharset = gb2312charset!
  473. fontpitch fontpitch = variable!
  474. string facename = "宋体"
  475. long backcolor = 16776960
  476. boolean enabled = false
  477. boolean border = true
  478. boolean focusrectangle = false
  479. end type
  480. type gb_14 from groupbox within w_ol_mov_pipeline
  481. integer y = 288
  482. integer width = 2880
  483. integer height = 192
  484. integer taborder = 70
  485. integer textsize = -9
  486. integer weight = 700
  487. fontcharset fontcharset = gb2312charset!
  488. fontpitch fontpitch = variable!
  489. string facename = "宋体"
  490. long textcolor = 33554432
  491. long backcolor = 67108864
  492. string text = "源数据库导出范围:"
  493. end type
  494. type gb_2 from groupbox within w_ol_mov_pipeline
  495. integer y = 88
  496. integer width = 2880
  497. integer height = 172
  498. integer taborder = 30
  499. integer textsize = -9
  500. integer weight = 700
  501. fontcharset fontcharset = gb2312charset!
  502. fontpitch fontpitch = variable!
  503. string facename = "宋体"
  504. long textcolor = 33554432
  505. long backcolor = 67108864
  506. string text = "目标数据库连接:"
  507. end type
  508. type ddplb_obj_tran from dropdownpicturelistbox within w_ol_mov_pipeline
  509. integer x = 23
  510. integer y = 140
  511. integer width = 613
  512. integer height = 908
  513. integer taborder = 40
  514. boolean bringtotop = true
  515. integer textsize = -9
  516. integer weight = 400
  517. fontcharset fontcharset = gb2312charset!
  518. fontpitch fontpitch = variable!
  519. string facename = "宋体"
  520. long textcolor = 33554432
  521. boolean vscrollbar = true
  522. borderstyle borderstyle = stylelowered!
  523. string picturename[] = {"Update!"}
  524. long picturemaskcolor = 553648127
  525. end type
  526. event selectionchanged;//setProfileString(sys_inifilename, parent.classname(), this.classname(), this.text)
  527. st_obj_msg.text='远程服务器: [未知连接]'
  528. obj_ifconnect=false
  529. end event
  530. event constructor;//string histxt
  531. //histxt=ProfileString(sys_inifilename, parent.classname(), this.classname(), '')
  532. //
  533. //int li
  534. //string arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg
  535. //this.reset()
  536. //for li=1 to sys_remote_sqlca_p
  537. // uo_rm_sqlca.Get_remote_sqlca(li,arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg)
  538. //
  539. // this.ADDItem(arg_cntname+string(li,'00'),1)
  540. //
  541. //next
  542. //this.text=histxt
  543. String ls_txt
  544. long ll_ConnectionID
  545. String ls_ConnectionName
  546. THIS.Reset()
  547. DECLARE cur_db CURSOR FOR
  548. SELECT U_OuterConnection.ConnectionID,
  549. U_OuterConnection.ConnectionName
  550. FROM U_OuterConnection
  551. WHERE U_OuterConnection.ConnectionType = 1;
  552. open cur_db;
  553. fetch cur_db into :ll_ConnectionID,:ls_ConnectionName;
  554. do while sqlca.sqlcode = 0
  555. ls_txt = string(ll_ConnectionID)+' '+ls_ConnectionName
  556. THIS.AddItem(ls_txt,1)
  557. fetch cur_db into :ll_ConnectionID,:ls_ConnectionName;
  558. loop
  559. THIS.Text = ls_txt
  560. end event
  561. type st_222 from statictext within w_ol_mov_pipeline
  562. integer x = 32
  563. integer y = 364
  564. integer width = 480
  565. integer height = 64
  566. boolean bringtotop = true
  567. integer textsize = -9
  568. integer weight = 400
  569. fontcharset fontcharset = gb2312charset!
  570. fontpitch fontpitch = variable!
  571. string facename = "宋体"
  572. long textcolor = 33554432
  573. long backcolor = 67108864
  574. boolean enabled = false
  575. string text = "截数时间开始时间:"
  576. boolean focusrectangle = false
  577. end type
  578. type ddlb_st from dropdownlistbox within w_ol_mov_pipeline
  579. integer x = 498
  580. integer y = 348
  581. integer width = 667
  582. integer height = 972
  583. integer taborder = 80
  584. boolean bringtotop = true
  585. integer textsize = -9
  586. integer weight = 400
  587. fontcharset fontcharset = gb2312charset!
  588. fontpitch fontpitch = variable!
  589. string facename = "宋体"
  590. long textcolor = 33554432
  591. boolean sorted = false
  592. boolean vscrollbar = true
  593. borderstyle borderstyle = stylelowered!
  594. end type
  595. event constructor;datetime ls_ctdt,first_ctdt
  596. long ctdt_num=0
  597. DECLARE ct_cur CURSOR FOR
  598. SELECT sys_ct_data.ct_datetime
  599. FROM sys_ct_data
  600. ORDER BY sys_ct_data.ct_datetime ASC ;
  601. open ct_cur;
  602. fetch ct_cur into :ls_ctdt;
  603. first_ctdt=ls_ctdt
  604. do while sqlca.sqlcode=0
  605. ddlb_st.additem(string(ls_ctdt,'yyyy-mm-dd hh:mm:ss'))
  606. ctdt_num++
  607. fetch ct_cur into :ls_ctdt;
  608. loop
  609. close ct_cur;
  610. if ctdt_num=0 then
  611. first_ctdt=datetime(date('1900-01-01'),time(0))
  612. ddlb_st.additem(string(first_ctdt,'yyyy-mm-dd hh:mm:ss'))
  613. end if
  614. ddlb_st.text=string(first_ctdt,'yyyy-mm-dd hh:mm:ss')
  615. end event
  616. type st_3e from statictext within w_ol_mov_pipeline
  617. integer x = 1179
  618. integer y = 364
  619. integer width = 480
  620. integer height = 64
  621. boolean bringtotop = true
  622. integer textsize = -9
  623. integer weight = 400
  624. fontcharset fontcharset = gb2312charset!
  625. fontpitch fontpitch = variable!
  626. string facename = "宋体"
  627. long textcolor = 33554432
  628. long backcolor = 67108864
  629. boolean enabled = false
  630. string text = "截数时间结束时间:"
  631. boolean focusrectangle = false
  632. end type
  633. type em_ed from editmask within w_ol_mov_pipeline
  634. integer x = 1664
  635. integer y = 348
  636. integer width = 617
  637. integer height = 84
  638. integer taborder = 90
  639. boolean bringtotop = true
  640. integer textsize = -9
  641. integer weight = 400
  642. fontcharset fontcharset = gb2312charset!
  643. fontpitch fontpitch = variable!
  644. string facename = "宋体"
  645. long textcolor = 33554432
  646. boolean enabled = false
  647. borderstyle borderstyle = stylelowered!
  648. maskdatatype maskdatatype = datetimemask!
  649. string mask = "yyyy-mm-dd hh:mm:ss"
  650. boolean spin = true
  651. end type
  652. event constructor;datetime last_ctdt
  653. select top 1 ct_datetime into :last_ctdt from sys_ct_data order by ct_dateint desc;
  654. if sqlca.sqlcode <>0 then last_ctdt=datetime(date('1900-01-01'),time(0))
  655. em_ed.text=string(last_ctdt,'yyyy-mm-dd hh:mm:ss')
  656. end event
  657. type dw_error from datawindow within w_ol_mov_pipeline
  658. integer y = 1156
  659. integer width = 3077
  660. integer height = 196
  661. integer taborder = 20
  662. boolean bringtotop = true
  663. boolean livescroll = true
  664. borderstyle borderstyle = stylelowered!
  665. end type
  666. type dw_1 from u_dw_rbtnfilter within w_ol_mov_pipeline
  667. integer y = 572
  668. integer width = 3077
  669. integer height = 584
  670. integer taborder = 20
  671. boolean bringtotop = true
  672. string dataobject = "dw_local_his"
  673. boolean hscrollbar = true
  674. boolean vscrollbar = true
  675. end type
  676. type cb_2 from commandbutton within w_ol_mov_pipeline
  677. integer x = 2583
  678. integer y = 340
  679. integer width = 274
  680. integer height = 96
  681. integer taborder = 100
  682. boolean bringtotop = true
  683. integer textsize = -9
  684. integer weight = 700
  685. fontcharset fontcharset = gb2312charset!
  686. fontpitch fontpitch = variable!
  687. string facename = "宋体"
  688. string text = "检查"
  689. end type
  690. event clicked;if MessageBox("询问",'是否确定要检查(本地数据库 - 历史数据库)数据? ', Exclamation!, OKCancel!, 2) =2 then return
  691. if not obj_ifconnect then
  692. messagebox("提示",'历史数据库还没有连接,请检查!',information!,OK!)
  693. return
  694. end if
  695. if obj_hisflag=0 then
  696. messagebox("提示",'目标数据库不是历史查询数据库,不能检查数据!',information!,OK!)
  697. return
  698. end if
  699. wf_check_data()
  700. end event