diff --git a/golang_learn/data_func/go_to_windows/build/build.bat b/golang_learn/data_func/go_to_windows/build/build.bat index 1cc2cc2..a279160 100644 --- a/golang_learn/data_func/go_to_windows/build/build.bat +++ b/golang_learn/data_func/go_to_windows/build/build.bat @@ -3,4 +3,4 @@ set GOARCH=386 cd ../ rsrc -manifest main.manifest -ico main.ico -o main.syso go generate -go build -ldflags="-s -w -H=windowsgui" -o HyServer.exe +go build -ldflags="-s -w -H=windowsgui" -o ÔËÐмà¿Ø.exe diff --git a/golang_learn/data_func/go_to_windows/main.go b/golang_learn/data_func/go_to_windows/main.go index 574abf8..76ea880 100644 --- a/golang_learn/data_func/go_to_windows/main.go +++ b/golang_learn/data_func/go_to_windows/main.go @@ -9,8 +9,6 @@ import ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/lxn/walk" - . "github.com/lxn/walk/declarative" - "github.com/lxn/win" "github.com/mzky/zip" "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" @@ -27,19 +25,11 @@ import ( "time" ) -var version = "V2021 1.0.1" -var passwordname = "Qw^e1@10&++Hzb...?8" - -func (mw *myApp) aboutactionTriggered() { - walk.MsgBox(mw.mw, "功能说明", strings.Join([]string{ - "1. å¯åŠ¨ã€ç»ˆæ­¢å¹¶è®¾ç½® 应用和数æ®åº“ æœåŠ¡", - "2. 清除 æµè§ˆå™¨å’Œåº”用 缓存", - "3. 设置 应用和数æ®åº“ 内存大å°", - "4. 实现 æ•°æ®å¤‡ä»½ 压缩备份库文件与备份照片", - "5. 实现 æ•°æ®è¿˜åŽŸ 执行还原库文件与还原照片", - fmt.Sprintf("版本:%s", version)}, "\n"), - walk.MsgBoxIconQuestion) -} +var app myApp +var service1, service3 myService +var Version = "V2021 1.0.1" // ç‰ˆæœ¬å· +var passwordname = "Qw^e1@10&++Hzb...?8" // è§£åŽ‹å¯†ç  +var path string // 该部分ä¸å­˜åœ¨æœ€åŽ 横线 (格å¼ä¸º D:\hzb2021),使用时需è¦è¡¥å……横线 type myApp struct { title string @@ -47,7 +37,6 @@ type myApp struct { msg *walk.TextEdit mw *walk.MainWindow } - type myService struct { text string serviceName string @@ -56,26 +45,10 @@ type myService struct { btnStart *walk.PushButton btnStop *walk.PushButton } - -var app myApp -var service1, service3 myService - -// 该部分ä¸å­˜åœ¨æœ€åŽ 横线 (格å¼ä¸º D:\hzb2021),使用时需è¦è¡¥å……横线 -var path string - -// 基础库部分脚本(除 a01 å’Œ b01) -var tableName = []string{ - "a02", "a05", "a06", "a08", "a14", "a15", "a17", "a36", "a30", "a33", "a57", "a65", "a99z1", -} - -// 统计部分脚本 -var tableNameTj = []string{ - "tj_un", "tb_set_unit", "tb_rpt_cv_cfg", - "J2001", "J2002", "J2003", "J2004", "J2005", "J2006", "J2007", "J2008", "J2101", "J2102", "J2103", "J2104", - "J2105", "J2106", "J2107", "J2108", "M_M01", "M_M02", "M_M03", "M_M04", "M_M05", "M_M06", "M_M07", "M_M09", - "M_N01", "M_N02", "M_N03", "M_N04", "M_N05", "M_P01", "M_P02", "M_P03", "M_Q01", "M_Q02", "M_Q03", "M_Q04", - "M_Q05", "M_Q06", "M_Q07", "M_Q08", "M_Q09", "M_Q10", "M_Q11", "M_Q12", "M_Q13", - "inner_check_result", "outer_check_result", "statistics_state", "middleverify_error_list", "tj_tbsm_item_list", "tb_zyhz", +type tabIdx struct { + tabName string // 表å + idxName string // 索引å + idxColumn string // 索引字段 } // init åˆå§‹åŒ– @@ -95,7 +68,12 @@ func init() { // main 程åºå…¥å£ func main() { - _ = getWindows() + err := GetWindows() + + if err != nil { + walk.MsgBox(app.mw, "错误", "程åºåˆå§‹åŒ–错误ï¼", walk.MsgBoxIconWarning) + return + } runMain() } @@ -146,170 +124,6 @@ func runMain() { app.mw.Run() } -// åˆå§‹å§‹åŒ–窗体 -func getWindows() error { - icon, _ := walk.NewIconFromResourceId(3) - err := MainWindow{ - Visible: false, - AssignTo: &app.mw, - Title: app.title, - Size: Size{Width: 500, Height: 360}, - Font: Font{Family: "微软雅黑", PointSize: 9}, - Icon: icon, - Layout: VBox{}, - MenuItems: []MenuItem{ - Menu{ - Text: "&编辑", - // Image: "./image//media.png", - Items: []MenuItem{ - Separator{}, - Action{ - // Image: "./image//qinghuancun.png", - Text: "清除缓存", - OnTriggered: clearAll, - }, - Action{ - // Image: "./image//beifen.png", - Text: "æ•°æ®å¤‡ä»½", - OnTriggered: dbBak, - }, - /*Action{ - // Image: "./image//huanyuan.png", - Text: "æ•°æ®è¿˜åŽŸ", - OnTriggered: reDbBak, - },*/ - Action{ - // Image: "./image//tuichu.png", - Text: "退出", - OnTriggered: func() { - walk.App().Exit(0) - }, - }, - }, - }, - Menu{ - Text: "&设置", - // Image: "./image//shezhi.png", - Items: []MenuItem{ - Separator{}, - Action{ - // Image: "./image//shujuku.png", - Text: "设置数æ®åº“内存", - OnTriggered: setDbSize, - }, - Action{ - // Image: "./image//yingyong.png", - Text: "设置应用内存", - OnTriggered: setServerSize, - }, - }, - }, - Menu{ - Text: "&帮助", - // Image: "./image//bangzhu.png", - Items: []MenuItem{ - Action{ - // Image: "./image//guanyu.png", - Text: "关于", - OnTriggered: app.aboutactionTriggered, - }, - /*Action{ - // Image: "./image//yaoqiu.png", - Text: "è¦æ±‚", - OnTriggered: app.aboutactionTriggered, - },*/ - }, - }, - }, - Children: []Widget{GroupBox{ - Title: "基础æœåŠ¡çŠ¶æ€", - Layout: Grid{Columns: 3}, - Children: []Widget{ - Label{Text: service1.text, MinSize: Size{Width: 220, Height: 30}, TextColor: walk.RGB(255, 255, 0)}, - Label{AssignTo: &service1.labelState, Text: "正在è¿è¡Œ", MinSize: Size{Width: 80, Height: 30}}, - Composite{ - Layout: HBox{}, - MaxSize: Size{Width: 198, Height: 30}, - Children: []Widget{ - PushButton{ - AssignTo: &service1.btnRegister, - MaxSize: Size{Width: 60, Height: 30}, - Text: "注册表", - }, - PushButton{ - AssignTo: &service1.btnStop, - MaxSize: Size{Width: 60, Height: 30}, - Text: "åœæ­¢", - }, - PushButton{ - AssignTo: &service1.btnStart, - MaxSize: Size{Width: 60, Height: 30}, - Text: "å¯åŠ¨", - }, - }, - }, - }, - }, GroupBox{ - Title: "业务æœåŠ¡çŠ¶æ€", - Layout: Grid{Columns: 3}, - Children: []Widget{ - Label{Text: service3.text, MinSize: Size{Width: 220, Height: 30}}, - Label{AssignTo: &service3.labelState, Text: "正在è¿è¡Œ", MinSize: Size{Width: 80, Height: 30}}, - Composite{ - Layout: HBox{}, - MaxSize: Size{Width: 198, Height: 30}, - Children: []Widget{ - PushButton{ - AssignTo: &service3.btnRegister, - MaxSize: Size{Width: 60, Height: 30}, - Text: "注册表", - }, - PushButton{ - AssignTo: &service3.btnStop, - MaxSize: Size{Width: 60, Height: 30}, - Text: "åœæ­¢", - }, - PushButton{ - AssignTo: &service3.btnStart, - MaxSize: Size{Width: 60, Height: 30}, - Text: "å¯åŠ¨", - }, - }, - }, - }, - }, TextEdit{AssignTo: &app.msg, VScroll: true, ReadOnly: true}, Composite{ - Layout: HBox{}, - Children: []Widget{ - PushButton{ - MinSize: Size{Width: 200, Height: 30}, - Text: "打开windowsæœåŠ¡ç®¡ç†ç¨‹åº", - OnClicked: openServices, - }, - HSpacer{}, - PushButton{ - MinSize: Size{Width: 140, Height: 30}, - Text: "关闭本监控窗å£", - OnClicked: func() { - walk.App().Exit(0) - }, - }, - }, - }}, - OnSizeChanged: func() { - _ = app.mw.SetSize(walk.Size(Size{Width: 500, Height: 360})) - }, - }.Create() - winLong := win.GetWindowLong(app.mw.Handle(), win.GWL_STYLE) - // ä¸èƒ½è°ƒæ•´çª—å£å¤§å°ï¼Œç¦ç”¨æœ€å¤§åŒ–按钮 - win.SetWindowLong(app.mw.Handle(), win.GWL_STYLE, winLong & ^win.WS_SIZEBOX & ^win.WS_MAXIMIZEBOX & ^win.WS_SIZEBOX) - // 设置窗体生æˆåœ¨å±å¹•çš„正中间,并处ç†é«˜åˆ†å±çš„情况 - // 窗体横åæ ‡ = ( å±å¹•å®½åº¦ - 窗体宽度 ) / 2 - // 窗体纵åæ ‡ = ( å±å¹•é«˜åº¦ - 窗体高度 ) / 2 - _ = app.mw.SetX((int(win.GetSystemMetrics(0)) - app.mw.Width()) / 2 / app.mw.DPI() * 96) - _ = app.mw.SetY((int(win.GetSystemMetrics(1)) - app.mw.Height()) / 2 / app.mw.DPI() * 96) - return err -} - // setServiceState 设置 æœåŠ¡çŠ¶æ€æè¿°å’ŒæŒ‰é’®çŠ¶æ€ func setServiceState(service myService, msg string, btnStartStatus, btnStopStatus, btnRegisterStatus bool) { _ = service.labelState.SetText(msg) @@ -638,6 +452,34 @@ func setServerSize() { }) } +// reDbIndex é‡æ–°æž„建索引 +func reDbIndex() { + // 判断 mysql æœåŠ¡åº”用å¯åŠ¨ + if service1.btnStart.Enabled() { + walk.MsgBox(app.mw, "错误", "æ•°æ®åº“æœåŠ¡æœªå¯åŠ¨ï¼Œå³å°†è¿›è¡Œæ•°æ®åº“æœåŠ¡å¯åŠ¨ï¼", walk.MsgBoxIconWarning) + startService(service1) + } + + time.Sleep(time.Second) + + db, _ := sql.Open("mysql", "root:admin@tcp(127.0.0.1:35017)/hy_qggwy?charset=utf8") + showMsg("连接数æ®åº“æˆåŠŸï¼\n请ä¸è¦è¿›è¡Œå…¶ä»–æ“作,å¦åˆ™å½±å“执行...") + for i := 0; i < len(DbIndex); i++ { + ExecSql(db, fmt.Sprintf(`DROP INDEX %s ON %s`, DbIndex[i].idxName, DbIndex[i].tabName)) + ExecSql(db, fmt.Sprintf(`ALTER TABLE %s ADD INDEX %s (%s) USING BTREE`, DbIndex[i].tabName, DbIndex[i].idxName, DbIndex[i].idxColumn)) + } + showMsg("已完æˆé‡æ–°æž„建索引ï¼") +} + +func ExecSql(db *sql.DB, sql string) { + stmt, err := db.Prepare(sql) + if err != nil { + log.Fatal(err) + } + _, _ = stmt.Exec() + defer stmt.Close() +} + // dbBak æ•°æ®å¤‡ä»½åŠŸèƒ½ func dbBak() { // 判断 mysql æœåŠ¡åº”用å¯åŠ¨ @@ -661,14 +503,14 @@ func dbBak() { } // ã€sqlæ–¹å¼ã€‘统计库部分 - /* for i := 0; i < len(tableNameTj); i++ { - QuerySQL(db, dir, "select * from "+tableNameTj[i], tableNameTj[i], []string{}) + /* for i := 0; i < len(TableNameTj); i++ { + QuerySQL(db, dir, "select * from "+TableNameTj[i], TableNameTj[i], []string{}) }*/ // ã€sqlæ–¹å¼ã€‘基础库部分 /* QuerySQL(db, dir, "select * from a01 where STATUS=1", "a01", []string{"A0155", "JSNLSJ", "TBSJ", "XGSJ"}) - for i := 0; i < len(tableName); i++ { - QuerySQL(db, dir, "select * from "+tableName[i]+" where a0000 in (select a0000 from a01 where status=1)", tableName[i], []string{}) + for i := 0; i < len(TableName); i++ { + QuerySQL(db, dir, "select * from "+TableName[i]+" where a0000 in (select a0000 from a01 where status=1)", TableName[i], []string{}) } QuerySQL(db, dir, "select * from b01", "b01", []string{})*/ @@ -677,6 +519,7 @@ func dbBak() { // 关闭æœåŠ¡ stopService(service1) + showMsg("程åºå¯èƒ½å‡ºçŽ°ã€æœªå“应】属于正常ï¼") time.Sleep(time.Second) @@ -714,257 +557,19 @@ func reDbBak() { }) } -//æ•°æ®åº“é…置结构 -type DbSetings struct { - InnodbBufferPoolSize int // æ•°æ®åº“ç¼“å­˜å¤§å° -} - -// è¿è¡Œ æ•°æ®åº“设置 Dialog -func (mw *myApp) RunDbSetingDialog(owner walk.Form, confirmCall func(*DbSetings)) { - var seting *DbSetings - var dlg *walk.Dialog - var db *walk.DataBinder - var acceptPB, cancelPB *walk.PushButton - - seting = new(DbSetings) - // 设置预定值 - seting.InnodbBufferPoolSize = 512 - - _, _ = Dialog{ - AssignTo: &dlg, - Title: "æ•°æ®æºå†…存设置", - Font: Font{Family: "微软雅黑", PointSize: 9}, - DefaultButton: &acceptPB, - CancelButton: &cancelPB, - DataBinder: DataBinder{ - AssignTo: &db, - Name: "setings", - DataSource: seting, - ErrorPresenter: ToolTipErrorPresenter{}, - }, - MinSize: Size{Width: 450, Height: 160}, - Layout: VBox{}, - Children: []Widget{ - Composite{ - Layout: Grid{Columns: 2}, - Children: []Widget{ - Label{Text: `      数æ®åº“内存:`}, - NumberEdit{Value: Bind("InnodbBufferPoolSize", Range{Min: 64, Max: 10240}), Suffix: " M", Decimals: 0}, - }, - }, - Composite{ - Layout: HBox{}, - Children: []Widget{ - HSpacer{}, - PushButton{ - AssignTo: &acceptPB, - Text: "ä¿å­˜", - OnClicked: func() { - if err := db.Submit(); err != nil { - showMsg("ã€å¼‚常】处ç†è®¾ç½®æ•°æ®åº“内存时,å‘生异常ï¼") - log.Fatal(err) - return - } - - // å…³é—­é¡µé¢ - dlg.Cancel() - - // 应用 回调函数 - confirmCall(seting) - }, - }, - PushButton{ - AssignTo: &cancelPB, - Text: "å–消", - OnClicked: func() { - dlg.Cancel() - }, - }, - }, - }, - }, - }.Run(owner) -} - -//应用é…置结构 -type AppSetings struct { - PermSize int // éžå †åŒºåˆå§‹å†…存分é…å¤§å° - MaxPermSize int // éžå †åŒºåˆ†é…çš„å†…å­˜çš„æœ€å¤§ä¸Šé™ - Xms int // 堆区内存åˆå§‹å†…存分é…çš„å¤§å° - Xmx int // 堆区内存å¯è¢«åˆ†é…çš„æœ€å¤§ä¸Šé™ -} - -// è¿è¡Œ 应用设置 Dialog -func (mw *myApp) RunAppSetingDialog(owner walk.Form, confirmCall func(*AppSetings)) { - var seting *AppSetings - var dlg *walk.Dialog - var db *walk.DataBinder - var acceptPB, cancelPB *walk.PushButton - - seting = new(AppSetings) - // 设置预定值 - seting.PermSize = 128 - seting.MaxPermSize = 256 - seting.Xmx = 512 - seting.Xms = 512 - - _, _ = Dialog{ - AssignTo: &dlg, - Title: "应用内存设置", - Font: Font{Family: "微软雅黑", PointSize: 9}, - DefaultButton: &acceptPB, - CancelButton: &cancelPB, - DataBinder: DataBinder{ - AssignTo: &db, - Name: "setings", - DataSource: seting, - ErrorPresenter: ToolTipErrorPresenter{}, - }, - MinSize: Size{Width: 450, Height: 270}, - Layout: VBox{}, - Children: []Widget{ - Composite{ - Layout: Grid{Columns: 2}, - Children: []Widget{ - Label{Text: `  PermSize(éžå †åŒºï¼‰åˆå§‹å†…存分é…大å°ï¼š`}, - NumberEdit{Value: Bind("PermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, - - Label{Text: `MaxPermSize(éžå †åŒºï¼‰æœ€å¤§å†…存分é…上é™ï¼š`}, - NumberEdit{Value: Bind("MaxPermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, - - Label{Text: `      Xms(堆区)åˆå§‹å†…存分é…大å°ï¼š`}, - NumberEdit{Value: Bind("Xms", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, - - Label{Text: `      Xmx(堆区)最大内存分é…上é™ï¼š`}, - NumberEdit{Value: Bind("Xmx", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, - }, - }, - Composite{ - Layout: HBox{}, - Children: []Widget{ - HSpacer{}, - PushButton{ - AssignTo: &acceptPB, - Text: "ä¿å­˜", - OnClicked: func() { - if err := db.Submit(); err != nil { - showMsg("ã€å¼‚常】处ç†è®¾ç½®æ•°æ®åº“内存时,å‘生异常ï¼") - log.Fatal(err) - return - } - - // å…³é—­é¡µé¢ - dlg.Cancel() - - // DB 回调函数 - confirmCall(seting) - }, - }, - PushButton{ - AssignTo: &cancelPB, - Text: "å–消", - OnClicked: func() { - dlg.Cancel() - }, - }, - }, - }, - }, - }.Run(owner) -} - -//æ•°æ®è¿˜åŽŸè®¾ç½® -type DbBakSetings struct { - *walk.MainWindow - searchBox *walk.LineEdit - path string -} - -// è¿è¡Œ æ•°æ®è¿˜åŽŸè®¾ç½® Dialog -func (mw *myApp) RunDbBakSetingDialog(owner walk.Form, confirmCall func(*DbBakSetings)) { - var seting *DbBakSetings - var dlg *walk.Dialog - var db *walk.DataBinder - var acceptPB, cancelPB *walk.PushButton - - seting = new(DbBakSetings) - // 设置预定值 - - _, _ = Dialog{ - AssignTo: &dlg, - Title: "æ•°æ®è¿˜åŽŸè®¾ç½®", - Font: Font{Family: "微软雅黑", PointSize: 9}, - DefaultButton: &acceptPB, - CancelButton: &cancelPB, - DataBinder: DataBinder{ - AssignTo: &db, - Name: "setings", - DataSource: seting, - ErrorPresenter: ToolTipErrorPresenter{}, - }, - MinSize: Size{Width: 450, Height: 220}, - Layout: VBox{}, - Children: []Widget{ - GroupBox{ - Layout: HBox{}, - Children: []Widget{ - LineEdit{ - ReadOnly: true, - AssignTo: &seting.searchBox, - }, - PushButton{ - Text: "选择", - OnClicked: seting.selectFile, - }, - }, - }, - Composite{ - Layout: HBox{}, - Children: []Widget{ - HSpacer{}, - PushButton{ - AssignTo: &acceptPB, - Text: "æ¢å¤", - OnClicked: func() { - if err := db.Submit(); err != nil { - showMsg("ã€å¼‚常】选择æ¢å¤æ–‡ä»¶æ—¶ï¼Œå‘生异常ï¼") - log.Fatal(err) - return - } - - // å…³é—­é¡µé¢ - dlg.Cancel() - - // DB 回调函数 - confirmCall(seting) - }, - }, - PushButton{ - AssignTo: &cancelPB, - Text: "å–消", - OnClicked: func() { - dlg.Cancel() - }, - }, - }, - }, - }, - }.Run(owner) -} - func (mw *DbBakSetings) selectFile() { dlg := new(walk.FileDialog) dlg.Title = "选择还原文件(格å¼ï¼šgz)" dlg.Filter = "å¯æ‰§è¡Œæ–‡ä»¶ (*.gz)|*.gz" - mw.searchBox.SetText("") //通过é‡å®šå‘å˜é‡è®¾ç½®TextEditçš„Text + _ = mw.searchBox.SetText("") //通过é‡å®šå‘å˜é‡è®¾ç½®TextEditçš„Text if ok, err := dlg.ShowOpen(mw); err != nil { showMsg("ã€å¼‚常】选择打开文件ï¼") } else if !ok { showMsg("Cancel\n") } - mw.searchBox.SetText(mw.path) + _ = mw.searchBox.SetText(mw.path) } // QuerySQL 获å–è¡¨æ•°æ® @@ -1028,7 +633,7 @@ func QuerySQL(db *sql.DB, dir, sqlStr, tableName string, colNil []string) { path = fmt.Sprintf("%s/%s.sql", dir, tableName) file3, _ := os.Create(path) _, _ = file3.WriteString(aa) - file3.Close() + _ = file3.Close() } // inStr 判断字段关系 @@ -1176,3 +781,7 @@ func Contains(array []fs.FileInfo, val string) (index int) { } return } + +func (mw *myApp) aboutactionTriggered() { + walk.MsgBox(mw.mw, "功能说明", Info, walk.MsgBoxIconQuestion) +} diff --git a/golang_learn/data_func/go_to_windows/winStruct.go b/golang_learn/data_func/go_to_windows/winStruct.go new file mode 100644 index 0000000..7cecd2e --- /dev/null +++ b/golang_learn/data_func/go_to_windows/winStruct.go @@ -0,0 +1,461 @@ +package main + +import ( + "fmt" + "strings" +) + +// 说明 +var Info = strings.Join([]string{ + "1. å¯åŠ¨ã€ç»ˆæ­¢å¹¶è®¾ç½® 应用和数æ®åº“ æœåŠ¡", + "2. 清除 æµè§ˆå™¨å’Œåº”用 缓存", + "3. 设置 应用和数æ®åº“ 内存大å°", + "4. 实现 æ•°æ®åº“索引 é‡æ–°æž„建", + "5. 实现 æ•°æ®å¤‡ä»½ 压缩备份库文件与备份照片", + //"6. 实现 æ•°æ®è¿˜åŽŸ 执行还原库文件与还原照片", + fmt.Sprintf("版本:%s", Version)}, "\n") + +// ã€åºŸå¼ƒã€‘基础库部分脚本(除 a01 å’Œ b01) +var TableName = []string{ + "a02", "a05", "a06", "a08", "a14", "a15", "a17", "a36", "a30", "a33", "a57", "a65", "a99z1", +} + +// ã€åºŸå¼ƒã€‘统计部分脚本 +var TableNameTj = []string{ + "tj_un", "tb_set_unit", "tb_rpt_cv_cfg", + "J2001", "J2002", "J2003", "J2004", "J2005", "J2006", "J2007", "J2008", "J2101", "J2102", "J2103", "J2104", + "J2105", "J2106", "J2107", "J2108", "M_M01", "M_M02", "M_M03", "M_M04", "M_M05", "M_M06", "M_M07", "M_M09", + "M_N01", "M_N02", "M_N03", "M_N04", "M_N05", "M_P01", "M_P02", "M_P03", "M_Q01", "M_Q02", "M_Q03", "M_Q04", + "M_Q05", "M_Q06", "M_Q07", "M_Q08", "M_Q09", "M_Q10", "M_Q11", "M_Q12", "M_Q13", + "inner_check_result", "outer_check_result", "statistics_state", "middleverify_error_list", "tj_tbsm_item_list", "tb_zyhz", +} + +// 索引脚本 +var DbIndex = []tabIdx{ + {tabName: "a01", idxName: "A01_IDX_001", idxColumn: "A0000,A0163,STATUS"}, + {tabName: "a01", idxName: "A01_IDX_002", idxColumn: "A0107"}, + {tabName: "a01", idxName: "A01_IDX_003", idxColumn: "A0134"}, + {tabName: "a01", idxName: "A01_IDX_004", idxColumn: "A0184"}, + {tabName: "a01", idxName: "A01_IDX_005", idxColumn: "A0192F"}, + {tabName: "a01", idxName: "A01_IDX_006", idxColumn: "A0221"}, + {tabName: "a01", idxName: "A01_IDX_007", idxColumn: "STATUS"}, + {tabName: "a01", idxName: "A01_IDX_008", idxColumn: "TORDER"}, + {tabName: "a02", idxName: "A02_IDX_001", idxColumn: "A0000,A0255"}, + {tabName: "a02", idxName: "A02_IDX_002", idxColumn: "A0000,A0201B"}, + {tabName: "a02", idxName: "A02_IDX_003", idxColumn: "A0000"}, + {tabName: "a02", idxName: "A02_IDX_004", idxColumn: "A0000,A0201B,A0281"}, + {tabName: "a02", idxName: "A02_IDX_005", idxColumn: "A0000,A0279"}, + {tabName: "a05", idxName: "A05_IDX_001", idxColumn: "A0524"}, + {tabName: "a05", idxName: "A05_IDX_002", idxColumn: "A0531"}, + {tabName: "a05", idxName: "A05_IDX_003", idxColumn: "A0000,A0531"}, + {tabName: "a05", idxName: "A05_IDX_004", idxColumn: "A0000,A0524"}, + {tabName: "a06", idxName: "A06_IDX_001", idxColumn: "A0000,A0601"}, + {tabName: "a06", idxName: "A06_IDX_002", idxColumn: "A0000,A0604"}, + {tabName: "a06", idxName: "A06_IDX_003", idxColumn: "A0000,A0699"}, + {tabName: "a08", idxName: "A08_IDX_001", idxColumn: "A0000"}, + {tabName: "a08", idxName: "A08_IDX_002", idxColumn: "A0000,A0801B"}, + {tabName: "a08", idxName: "A08_IDX_003", idxColumn: "A0000,A0831"}, + {tabName: "a08", idxName: "A08_IDX_004", idxColumn: "A0000,A0834"}, + {tabName: "a08", idxName: "A08_IDX_005", idxColumn: "A0000,A0835"}, + {tabName: "a08", idxName: "A08_IDX_006", idxColumn: "A0000,A0901B"}, + {tabName: "a14", idxName: "A14_IDX_001", idxColumn: "A0000,A1404b"}, + {tabName: "a14", idxName: "A14_IDX_002", idxColumn: "A0000,A1407"}, + {tabName: "a14", idxName: "A14_IDX_003", idxColumn: "A0000,A1414"}, + {tabName: "a15", idxName: "A15_IDX_001", idxColumn: "A0000,A1517"}, + {tabName: "a15", idxName: "A15_IDX_002", idxColumn: "A0000,A1521"}, + {tabName: "a30", idxName: "A30_IDX_001", idxColumn: "A0000"}, + {tabName: "a30", idxName: "A30_IDX_002", idxColumn: "A0000,A3001"}, + {tabName: "a30", idxName: "A30_IDX_003", idxColumn: "A0000,A3004"}, + {tabName: "a33", idxName: "A33_IDX_001", idxColumn: "A0000"}, + {tabName: "a33", idxName: "A33_IDX_002", idxColumn: "A0000,A3361"}, + {tabName: "a33", idxName: "A33_IDX_003", idxColumn: "A0000,A3362"}, + {tabName: "a33", idxName: "A33_IDX_004", idxColumn: "A0000,A3371"}, + {tabName: "a33", idxName: "A33_IDX_005", idxColumn: "A0000,A3372"}, + {tabName: "a36", idxName: "A36_IDX_001", idxColumn: "A0000"}, + {tabName: "a36", idxName: "A36_IDX_002", idxColumn: "A0000,A3604A"}, + {tabName: "a36", idxName: "A36_IDX_003", idxColumn: "A0000,A3627"}, + {tabName: "a36", idxName: "A36_IDX_004", idxColumn: "A0000,A3607"}, + {tabName: "a65", idxName: "A65_IDX_001", idxColumn: "A0000"}, + {tabName: "A99Z1", idxName: "A99Z1_IDX_001", idxColumn: "A0000"}, + {tabName: "A99Z1", idxName: "A99Z1_IDX_002", idxColumn: "A0000,A99Z101"}, + {tabName: "A99Z1", idxName: "A99Z1_IDX_003", idxColumn: "A0000,A99Z103"}, + {tabName: "A99Z1", idxName: "A99Z1_IDX_004", idxColumn: "A0000,A99Z191"}, + {tabName: "b01", idxName: "B01_IDX_001", idxColumn: "B0121"}, + {tabName: "b01", idxName: "B01_IDX_002", idxColumn: "B0131"}, + {tabName: "M_M01", idxName: "M_M01_IDX_001", idxColumn: "M0105"}, + {tabName: "M_M01", idxName: "M_M01_IDX_002", idxColumn: "M0101"}, + {tabName: "M_M01", idxName: "M_M01_IDX_003", idxColumn: "M0103"}, + {tabName: "M_M01", idxName: "M_M01_IDX_004", idxColumn: "M0104"}, + {tabName: "M_M01", idxName: "M_M01_IDX_005", idxColumn: "M0109"}, + {tabName: "M_M01", idxName: "M_M01_IDX_006", idxColumn: "M0110"}, + {tabName: "M_M01", idxName: "M_M01_IDX_007", idxColumn: "M0111"}, + {tabName: "M_M01", idxName: "M_M01_IDX_008", idxColumn: "UNID"}, + {tabName: "M_M01", idxName: "M_M01_IDX_009", idxColumn: "RPT"}, + {tabName: "M_M01", idxName: "M_M01_IDX_010", idxColumn: "RPT,UNID"}, + {tabName: "M_M02", idxName: "M_M02_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_M02", idxName: "M_M02_IDX_002", idxColumn: "RPT,UNID"}, + {tabName: "M_M02", idxName: "M_M02_IDX_003", idxColumn: "M0203"}, + {tabName: "M_M02", idxName: "M_M02_IDX_004", idxColumn: "RPT"}, + {tabName: "M_M02", idxName: "M_M02_IDX_005", idxColumn: "UNID"}, + {tabName: "M_M02", idxName: "M_M02_IDX_006", idxColumn: "M0201"}, + {tabName: "M_M02", idxName: "M_M02_IDX_007", idxColumn: "M0202"}, + {tabName: "M_M02", idxName: "M_M02_IDX_008", idxColumn: "M0204"}, + {tabName: "M_M02", idxName: "M_M02_IDX_009", idxColumn: "M0205"}, + {tabName: "M_M02", idxName: "M_M02_IDX_010", idxColumn: "M0206"}, + {tabName: "M_M02", idxName: "M_M02_IDX_011", idxColumn: "M0208"}, + {tabName: "M_M02", idxName: "M_M02_IDX_012", idxColumn: "M0212"}, + {tabName: "M_M02", idxName: "M_M02_IDX_013", idxColumn: "M0213"}, + {tabName: "M_M02", idxName: "M_M02_IDX_014", idxColumn: "M0216"}, + {tabName: "M_M02", idxName: "M_M02_IDX_015", idxColumn: "M0233_1"}, + {tabName: "M_M02", idxName: "M_M02_IDX_016", idxColumn: "M0234"}, + {tabName: "M_M02", idxName: "M_M02_IDX_017", idxColumn: "ORDERBY"}, + {tabName: "M_M03", idxName: "M_M03_IDX_001", idxColumn: "M0309"}, + {tabName: "M_M03", idxName: "M_M03_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M03", idxName: "M_M03_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M03", idxName: "M_M03_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_M03", idxName: "M_M03_IDX_005", idxColumn: "RPT"}, + {tabName: "M_M03", idxName: "M_M03_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_M04", idxName: "M_M04_IDX_001", idxColumn: "M0403"}, + {tabName: "M_M04", idxName: "M_M04_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M04", idxName: "M_M04_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M04", idxName: "M_M04_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_M04", idxName: "M_M04_IDX_005", idxColumn: "RPT"}, + {tabName: "M_M04", idxName: "M_M04_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_M05", idxName: "M_M05_IDX_001", idxColumn: "M0503"}, + {tabName: "M_M05", idxName: "M_M05_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M05", idxName: "M_M05_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M05", idxName: "M_M05_IDX_004", idxColumn: "M0501"}, + {tabName: "M_M05", idxName: "M_M05_IDX_005", idxColumn: "M0502"}, + {tabName: "M_M05", idxName: "M_M05_IDX_006", idxColumn: "M0503"}, + {tabName: "M_M05", idxName: "M_M05_IDX_007", idxColumn: "M0504"}, + {tabName: "M_M05", idxName: "M_M05_IDX_008", idxColumn: "M0505"}, + {tabName: "M_M05", idxName: "M_M05_IDX_009", idxColumn: "M0506"}, + {tabName: "M_M05", idxName: "M_M05_IDX_010", idxColumn: "M0507"}, + {tabName: "M_M05", idxName: "M_M05_IDX_011", idxColumn: "M0508"}, + {tabName: "M_M05", idxName: "M_M05_IDX_012", idxColumn: "ORDERBY"}, + {tabName: "M_M05", idxName: "M_M05_IDX_013", idxColumn: "RPT"}, + {tabName: "M_M05", idxName: "M_M05_IDX_014", idxColumn: "RPT,UNID"}, + {tabName: "M_M06", idxName: "M_M06_IDX_001", idxColumn: "M0602"}, + {tabName: "M_M06", idxName: "M_M06_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M06", idxName: "M_M06_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M06", idxName: "M_M06_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_M06", idxName: "M_M06_IDX_005", idxColumn: "RPT"}, + {tabName: "M_M06", idxName: "M_M06_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_M07", idxName: "M_M07_IDX_001", idxColumn: "M0702"}, + {tabName: "M_M07", idxName: "M_M07_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M07", idxName: "M_M07_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M07", idxName: "M_M07_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_M07", idxName: "M_M07_IDX_005", idxColumn: "RPT"}, + {tabName: "M_M07", idxName: "M_M07_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_M09", idxName: "M_M09_IDX_001", idxColumn: "M0903"}, + {tabName: "M_M09", idxName: "M_M09_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_M09", idxName: "M_M09_IDX_003", idxColumn: "UNID"}, + {tabName: "M_M09", idxName: "M_M09_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_M09", idxName: "M_M09_IDX_005", idxColumn: "RPT"}, + {tabName: "M_M09", idxName: "M_M09_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_M09", idxName: "M_M09_IDX_007", idxColumn: "ORDERBY"}, + {tabName: "M_N01", idxName: "M_N01_IDX_001", idxColumn: "UNID"}, + {tabName: "M_N01", idxName: "M_N01_IDX_002", idxColumn: "RPT"}, + {tabName: "M_N01", idxName: "M_N01_IDX_003", idxColumn: "RPT,UNID"}, + {tabName: "M_N02", idxName: "M_N02_IDX_001", idxColumn: "N0202"}, + {tabName: "M_N02", idxName: "M_N02_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_N02", idxName: "M_N02_IDX_003", idxColumn: "UNID"}, + {tabName: "M_N02", idxName: "M_N02_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_N02", idxName: "M_N02_IDX_005", idxColumn: "RPT"}, + {tabName: "M_N02", idxName: "M_N02_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_N03", idxName: "M_N03_IDX_001", idxColumn: "N0302"}, + {tabName: "M_N03", idxName: "M_N03_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_N03", idxName: "M_N03_IDX_003", idxColumn: "UNID"}, + {tabName: "M_N03", idxName: "M_N03_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_N03", idxName: "M_N03_IDX_005", idxColumn: "RPT"}, + {tabName: "M_N03", idxName: "M_N03_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_N04", idxName: "M_N04_IDX_001", idxColumn: "N0402"}, + {tabName: "M_N04", idxName: "M_N04_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_N04", idxName: "M_N04_IDX_003", idxColumn: "UNID"}, + {tabName: "M_N04", idxName: "M_N04_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_N04", idxName: "M_N04_IDX_005", idxColumn: "RPT"}, + {tabName: "M_N04", idxName: "M_N04_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_N05", idxName: "M_N05_IDX_001", idxColumn: "N0502"}, + {tabName: "M_N05", idxName: "M_N05_IDX_002", idxColumn: "OUUID"}, + {tabName: "M_N05", idxName: "M_N05_IDX_003", idxColumn: "UNID"}, + {tabName: "M_N05", idxName: "M_N05_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_N05", idxName: "M_N05_IDX_005", idxColumn: "RPT"}, + {tabName: "M_N05", idxName: "M_N05_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_P01", idxName: "M_P01_IDX_001", idxColumn: "UNID"}, + {tabName: "M_P01", idxName: "M_P01_IDX_002", idxColumn: "RPT"}, + {tabName: "M_P01", idxName: "M_P01_IDX_003", idxColumn: "RPT,UNID"}, + {tabName: "M_P02", idxName: "M_P02_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_P02", idxName: "M_P02_IDX_002", idxColumn: "P0204"}, + {tabName: "M_P02", idxName: "M_P02_IDX_003", idxColumn: "UNID"}, + {tabName: "M_P02", idxName: "M_P02_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_P02", idxName: "M_P02_IDX_005", idxColumn: "RPT"}, + {tabName: "M_P02", idxName: "M_P02_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_P03", idxName: "M_P03_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_P03", idxName: "M_P03_IDX_002", idxColumn: "P0304"}, + {tabName: "M_P03", idxName: "M_P03_IDX_003", idxColumn: "UNID"}, + {tabName: "M_P03", idxName: "M_P03_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_P03", idxName: "M_P03_IDX_005", idxColumn: "RPT"}, + {tabName: "M_P03", idxName: "M_P03_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q01", idxName: "M_Q01_IDX_001", idxColumn: "UNID"}, + {tabName: "M_Q01", idxName: "M_Q01_IDX_002", idxColumn: "RPT"}, + {tabName: "M_Q01", idxName: "M_Q01_IDX_003", idxColumn: "RPT,UNID"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_002", idxColumn: "Q0203"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q02", idxName: "M_Q02_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_002", idxColumn: "Q0303"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q03", idxName: "M_Q03_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_002", idxColumn: "Q0403"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q04", idxName: "M_Q04_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_002", idxColumn: "Q0503"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q05", idxName: "M_Q05_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_002", idxColumn: "Q0603"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q06", idxName: "M_Q06_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_002", idxColumn: "Q0703"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q07", idxName: "M_Q07_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_002", idxColumn: "Q0803"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q08", idxName: "M_Q08_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_002", idxColumn: "Q0903"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q09", idxName: "M_Q09_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_002", idxColumn: "Q1003"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q10", idxName: "M_Q10_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_002", idxColumn: "Q1103"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_003", idxColumn: "UNID"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_005", idxColumn: "RPT"}, + {tabName: "M_Q11", idxName: "M_Q11_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_002", idxColumn: "RPT,UNID"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_003", idxColumn: "Q1203"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_004", idxColumn: "RPT"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_005", idxColumn: "UNID"}, + {tabName: "M_Q12", idxName: "M_Q12_IDX_006", idxColumn: "ORDERBY"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_002", idxColumn: "RPT,UNID"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_003", idxColumn: "Q1303"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_004", idxColumn: "RPT"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_005", idxColumn: "UNID"}, + {tabName: "M_Q13", idxName: "M_Q13_IDX_006", idxColumn: "ORDERBY"}, + {tabName: "M_RPT_NODE", idxName: "M_RPT_NODE_IDX_001", idxColumn: "RPCODE,RPTABLEID"}, + {tabName: "M_S01", idxName: "M_S01_IDX_004", idxColumn: "S0103"}, + {tabName: "M_S01", idxName: "M_S01_IDX_001", idxColumn: "UNID"}, + {tabName: "M_S01", idxName: "M_S01_IDX_003", idxColumn: "S0102"}, + {tabName: "M_S01", idxName: "M_S01_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S01", idxName: "M_S01_IDX_002", idxColumn: "S0101"}, + {tabName: "M_S02", idxName: "M_S02_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S02", idxName: "M_S02_IDX_002", idxColumn: "S0202"}, + {tabName: "M_S02", idxName: "M_S02_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S02", idxName: "M_S02_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S02", idxName: "M_S02_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S02", idxName: "M_S02_IDX_006", idxColumn: "S0201"}, + {tabName: "M_S02", idxName: "M_S02_IDX_007", idxColumn: "S0205"}, + {tabName: "M_S02", idxName: "M_S02_IDX_008", idxColumn: "S0204"}, + {tabName: "M_S02", idxName: "M_S02_IDX_009", idxColumn: "S0206"}, + {tabName: "M_S03", idxName: "M_S03_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S03", idxName: "M_S03_IDX_002", idxColumn: "S0303"}, + {tabName: "M_S03", idxName: "M_S03_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S03", idxName: "M_S03_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S03", idxName: "M_S03_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S03", idxName: "M_S03_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_S03", idxName: "M_S03_IDX_007", idxColumn: "S0301"}, + {tabName: "M_S03", idxName: "M_S03_IDX_008", idxColumn: "S0305"}, + {tabName: "M_S03", idxName: "M_S03_IDX_009", idxColumn: "S0304"}, + {tabName: "M_S03", idxName: "M_S03_IDX_010", idxColumn: "S0306"}, + {tabName: "M_S04", idxName: "M_S04_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S04", idxName: "M_S04_IDX_002", idxColumn: "S0403"}, + {tabName: "M_S04", idxName: "M_S04_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S04", idxName: "M_S04_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S04", idxName: "M_S04_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S04", idxName: "M_S04_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_S04", idxName: "M_S04_IDX_007", idxColumn: "S0401"}, + {tabName: "M_S04", idxName: "M_S04_IDX_008", idxColumn: "S0405"}, + {tabName: "M_S04", idxName: "M_S04_IDX_009", idxColumn: "S0404"}, + {tabName: "M_S04", idxName: "M_S04_IDX_010", idxColumn: "S0406"}, + {tabName: "M_S05", idxName: "M_S05_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S05", idxName: "M_S05_IDX_002", idxColumn: "S0503"}, + {tabName: "M_S05", idxName: "M_S05_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S05", idxName: "M_S05_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S05", idxName: "M_S05_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S05", idxName: "M_S05_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_S05", idxName: "M_S05_IDX_007", idxColumn: "S0501"}, + {tabName: "M_S05", idxName: "M_S05_IDX_008", idxColumn: "S0505"}, + {tabName: "M_S05", idxName: "M_S05_IDX_009", idxColumn: "S0504"}, + {tabName: "M_S05", idxName: "M_S05_IDX_010", idxColumn: "S0506"}, + {tabName: "M_S06", idxName: "M_S06_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S06", idxName: "M_S06_IDX_002", idxColumn: "S0603"}, + {tabName: "M_S06", idxName: "M_S06_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S06", idxName: "M_S06_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S06", idxName: "M_S06_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S06", idxName: "M_S06_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_S06", idxName: "M_S06_IDX_007", idxColumn: "S0601"}, + {tabName: "M_S06", idxName: "M_S06_IDX_008", idxColumn: "S0605"}, + {tabName: "M_S06", idxName: "M_S06_IDX_009", idxColumn: "S0604"}, + {tabName: "M_S06", idxName: "M_S06_IDX_010", idxColumn: "S0606"}, + {tabName: "M_S07", idxName: "M_S07_IDX_001", idxColumn: "OUUID"}, + {tabName: "M_S07", idxName: "M_S07_IDX_002", idxColumn: "S0703"}, + {tabName: "M_S07", idxName: "M_S07_IDX_003", idxColumn: "UNID"}, + {tabName: "M_S07", idxName: "M_S07_IDX_004", idxColumn: "ORDERBY"}, + {tabName: "M_S07", idxName: "M_S07_IDX_005", idxColumn: "RPT"}, + {tabName: "M_S07", idxName: "M_S07_IDX_006", idxColumn: "RPT,UNID"}, + {tabName: "M_S07", idxName: "M_S07_IDX_007", idxColumn: "S0701"}, + {tabName: "M_S07", idxName: "M_S07_IDX_008", idxColumn: "S0705"}, + {tabName: "M_S07", idxName: "M_S07_IDX_009", idxColumn: "S0704"}, + {tabName: "M_S07", idxName: "M_S07_IDX_010", idxColumn: "S0706"}, + {tabName: "TJ_UN", idxName: "TJ_UN_IDX_001", idxColumn: "RPTYEAR"}, + {tabName: "TJ_UN", idxName: "TJ_UN_IDX_002", idxColumn: "SID"}, + {tabName: "TJ_UN", idxName: "TJ_UN_IDX_003", idxColumn: "SID,ID"}, + {tabName: "TJ_UN", idxName: "TJ_UN_IDX_004", idxColumn: "UORDER"}, + {tabName: "J0801", idxName: "J0801_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0802", idxName: "J0802_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0803", idxName: "J0803_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0804", idxName: "J0804_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0805", idxName: "J0805_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0806", idxName: "J0806_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0901", idxName: "J0901_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0902", idxName: "J0902_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0903", idxName: "J0903_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0904", idxName: "J0904_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0905", idxName: "J0905_IDX_001", idxColumn: "UNITID"}, + {tabName: "J0906", idxName: "J0906_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1001", idxName: "J1001_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1002", idxName: "J1002_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1003", idxName: "J1003_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1004", idxName: "J1004_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1005", idxName: "J1005_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1006", idxName: "J1006_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1101", idxName: "J1101_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1102", idxName: "J1102_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1103", idxName: "J1103_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1104", idxName: "J1104_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1105", idxName: "J1105_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1106", idxName: "J1106_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1201", idxName: "J1201_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1202", idxName: "J1202_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1203", idxName: "J1203_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1204", idxName: "J1204_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1205", idxName: "J1205_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1206", idxName: "J1206_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1301", idxName: "J1301_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1302", idxName: "J1302_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1303", idxName: "J1303_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1304", idxName: "J1304_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1305", idxName: "J1305_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1306", idxName: "J1306_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1401", idxName: "J1401_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1402", idxName: "J1402_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1403", idxName: "J1403_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1404", idxName: "J1404_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1405", idxName: "J1405_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1406", idxName: "J1406_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1501", idxName: "J1501_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1502", idxName: "J1502_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1503", idxName: "J1503_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1504", idxName: "J1504_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1505", idxName: "J1505_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1506", idxName: "J1506_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1507", idxName: "J1507_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1601", idxName: "J1601_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1602", idxName: "J1602_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1603", idxName: "J1603_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1604", idxName: "J1604_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1605", idxName: "J1605_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1606", idxName: "J1606_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1607", idxName: "J1607_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1701", idxName: "J1701_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1702", idxName: "J1702_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1703", idxName: "J1703_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1704", idxName: "J1704_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1705", idxName: "J1705_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1706", idxName: "J1706_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1707", idxName: "J1707_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1801", idxName: "J1801_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1802", idxName: "J1802_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1803", idxName: "J1803_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1804", idxName: "J1804_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1805", idxName: "J1805_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1806", idxName: "J1806_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1807", idxName: "J1807_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1901", idxName: "J1901_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1901", idxName: "J1901_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1902", idxName: "J1902_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1902", idxName: "J1902_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1903", idxName: "J1903_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1903", idxName: "J1903_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1904", idxName: "J1904_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1904", idxName: "J1904_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1905", idxName: "J1905_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1905", idxName: "J1905_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1906", idxName: "J1906_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1906", idxName: "J1906_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1907", idxName: "J1907_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1907", idxName: "J1907_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J1908", idxName: "J1908_IDX_001", idxColumn: "UNITID"}, + {tabName: "J1908", idxName: "J1908_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2001", idxName: "J2001_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2001", idxName: "J2001_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2002", idxName: "J2002_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2002", idxName: "J2002_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2003", idxName: "J2003_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2003", idxName: "J2003_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2004", idxName: "J2004_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2004", idxName: "J2004_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2005", idxName: "J2005_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2005", idxName: "J2005_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2006", idxName: "J2006_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2006", idxName: "J2006_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2007", idxName: "J2007_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2007", idxName: "J2007_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2008", idxName: "J2008_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2008", idxName: "J2008_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2101", idxName: "J2101_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2101", idxName: "J2101_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2102", idxName: "J2102_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2102", idxName: "J2102_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2103", idxName: "J2103_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2103", idxName: "J2103_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2104", idxName: "J2104_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2104", idxName: "J2104_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2105", idxName: "J2105_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2105", idxName: "J2105_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2106", idxName: "J2106_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2106", idxName: "J2106_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2107", idxName: "J2107_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2107", idxName: "J2107_IDX_002", idxColumn: "TABLEID"}, + {tabName: "J2108", idxName: "J2108_IDX_001", idxColumn: "UNITID"}, + {tabName: "J2108", idxName: "J2108_IDX_002", idxColumn: "TABLEID"}, +} diff --git a/golang_learn/data_func/go_to_windows/winView.go b/golang_learn/data_func/go_to_windows/winView.go new file mode 100644 index 0000000..adc01c3 --- /dev/null +++ b/golang_learn/data_func/go_to_windows/winView.go @@ -0,0 +1,415 @@ +package main + +import ( + "github.com/lxn/walk" + . "github.com/lxn/walk/declarative" + "github.com/lxn/win" + "log" +) + +// åˆå§‹å§‹åŒ–窗体 +func GetWindows() error { + icon, _ := walk.NewIconFromResourceId(3) + err := MainWindow{ + Visible: false, + AssignTo: &app.mw, + Title: app.title, + Size: Size{Width: 500, Height: 360}, + Font: Font{Family: "微软雅黑", PointSize: 9}, + Icon: icon, + Layout: VBox{}, + MenuItems: []MenuItem{ + Menu{ + Text: "&编辑", + // Image: "./image//media.png", + Items: []MenuItem{ + Separator{}, + Action{ + // Image: "./image//qinghuancun.png", + Text: "清除缓存", + OnTriggered: clearAll, + }, + Action{ + // Image: "./image//beifen.png", + Text: "é‡æž„索引", + OnTriggered: reDbIndex, + }, + Action{ + // Image: "./image//beifen.png", + Text: "æ•°æ®å¤‡ä»½", + OnTriggered: dbBak, + }, + /*Action{ + // Image: "./image//huanyuan.png", + Text: "æ•°æ®è¿˜åŽŸ", + OnTriggered: reDbBak, + },*/ + Action{ + // Image: "./image//tuichu.png", + Text: "退出", + OnTriggered: func() { + walk.App().Exit(0) + }, + }, + }, + }, + Menu{ + Text: "&设置", + // Image: "./image//shezhi.png", + Items: []MenuItem{ + Separator{}, + Action{ + // Image: "./image//shujuku.png", + Text: "设置数æ®åº“内存", + OnTriggered: setDbSize, + }, + Action{ + // Image: "./image//yingyong.png", + Text: "设置应用内存", + OnTriggered: setServerSize, + }, + }, + }, + Menu{ + Text: "&帮助", + // Image: "./image//bangzhu.png", + Items: []MenuItem{ + Action{ + // Image: "./image//guanyu.png", + Text: "关于", + OnTriggered: app.aboutactionTriggered, + }, + /*Action{ + // Image: "./image//yaoqiu.png", + Text: "è¦æ±‚", + OnTriggered: app.aboutactionTriggered, + },*/ + }, + }, + }, + Children: []Widget{GroupBox{ + Title: "基础æœåŠ¡çŠ¶æ€", + Layout: Grid{Columns: 3}, + Children: []Widget{ + Label{Text: service1.text, MinSize: Size{Width: 220, Height: 30}, TextColor: walk.RGB(255, 255, 0)}, + Label{AssignTo: &service1.labelState, Text: "正在è¿è¡Œ", MinSize: Size{Width: 80, Height: 30}}, + Composite{ + Layout: HBox{}, + MaxSize: Size{Width: 198, Height: 30}, + Children: []Widget{ + PushButton{ + AssignTo: &service1.btnRegister, + MaxSize: Size{Width: 60, Height: 30}, + Text: "注册表", + }, + PushButton{ + AssignTo: &service1.btnStop, + MaxSize: Size{Width: 60, Height: 30}, + Text: "åœæ­¢", + }, + PushButton{ + AssignTo: &service1.btnStart, + MaxSize: Size{Width: 60, Height: 30}, + Text: "å¯åŠ¨", + }, + }, + }, + }, + }, GroupBox{ + Title: "业务æœåŠ¡çŠ¶æ€", + Layout: Grid{Columns: 3}, + Children: []Widget{ + Label{Text: service3.text, MinSize: Size{Width: 220, Height: 30}}, + Label{AssignTo: &service3.labelState, Text: "正在è¿è¡Œ", MinSize: Size{Width: 80, Height: 30}}, + Composite{ + Layout: HBox{}, + MaxSize: Size{Width: 198, Height: 30}, + Children: []Widget{ + PushButton{ + AssignTo: &service3.btnRegister, + MaxSize: Size{Width: 60, Height: 30}, + Text: "注册表", + }, + PushButton{ + AssignTo: &service3.btnStop, + MaxSize: Size{Width: 60, Height: 30}, + Text: "åœæ­¢", + }, + PushButton{ + AssignTo: &service3.btnStart, + MaxSize: Size{Width: 60, Height: 30}, + Text: "å¯åŠ¨", + }, + }, + }, + }, + }, TextEdit{AssignTo: &app.msg, VScroll: true, ReadOnly: true}, Composite{ + Layout: HBox{}, + Children: []Widget{ + PushButton{ + MinSize: Size{Width: 200, Height: 30}, + Text: "打开windowsæœåŠ¡ç®¡ç†ç¨‹åº", + OnClicked: openServices, + }, + HSpacer{}, + PushButton{ + MinSize: Size{Width: 140, Height: 30}, + Text: "关闭本监控窗å£", + OnClicked: func() { + walk.App().Exit(0) + }, + }, + }, + }}, + OnSizeChanged: func() { + _ = app.mw.SetSize(walk.Size(Size{Width: 500, Height: 360})) + }, + }.Create() + winLong := win.GetWindowLong(app.mw.Handle(), win.GWL_STYLE) + // ä¸èƒ½è°ƒæ•´çª—å£å¤§å°ï¼Œç¦ç”¨æœ€å¤§åŒ–按钮 + win.SetWindowLong(app.mw.Handle(), win.GWL_STYLE, winLong & ^win.WS_SIZEBOX & ^win.WS_MAXIMIZEBOX & ^win.WS_SIZEBOX) + // 设置窗体生æˆåœ¨å±å¹•çš„正中间,并处ç†é«˜åˆ†å±çš„情况 + // 窗体横åæ ‡ = ( å±å¹•å®½åº¦ - 窗体宽度 ) / 2 + // 窗体纵åæ ‡ = ( å±å¹•é«˜åº¦ - 窗体高度 ) / 2 + _ = app.mw.SetX((int(win.GetSystemMetrics(0)) - app.mw.Width()) / 2 / app.mw.DPI() * 96) + _ = app.mw.SetY((int(win.GetSystemMetrics(1)) - app.mw.Height()) / 2 / app.mw.DPI() * 96) + return err +} + +//æ•°æ®åº“é…置结构 +type DbSetings struct { + InnodbBufferPoolSize int // æ•°æ®åº“ç¼“å­˜å¤§å° +} + +// è¿è¡Œ æ•°æ®åº“设置 Dialog +func (mw *myApp) RunDbSetingDialog(owner walk.Form, confirmCall func(*DbSetings)) { + var seting *DbSetings + var dlg *walk.Dialog + var db *walk.DataBinder + var acceptPB, cancelPB *walk.PushButton + + seting = new(DbSetings) + // 设置预定值 + seting.InnodbBufferPoolSize = 512 + + _, _ = Dialog{ + AssignTo: &dlg, + Title: "æ•°æ®æºå†…存设置", + Font: Font{Family: "微软雅黑", PointSize: 9}, + DefaultButton: &acceptPB, + CancelButton: &cancelPB, + DataBinder: DataBinder{ + AssignTo: &db, + Name: "setings", + DataSource: seting, + ErrorPresenter: ToolTipErrorPresenter{}, + }, + MinSize: Size{Width: 450, Height: 160}, + Layout: VBox{}, + Children: []Widget{ + Composite{ + Layout: Grid{Columns: 2}, + Children: []Widget{ + Label{Text: `      数æ®åº“内存:`}, + NumberEdit{Value: Bind("InnodbBufferPoolSize", Range{Min: 64, Max: 10240}), Suffix: " M", Decimals: 0}, + }, + }, + Composite{ + Layout: HBox{}, + Children: []Widget{ + HSpacer{}, + PushButton{ + AssignTo: &acceptPB, + Text: "ä¿å­˜", + OnClicked: func() { + if err := db.Submit(); err != nil { + showMsg("ã€å¼‚常】处ç†è®¾ç½®æ•°æ®åº“内存时,å‘生异常ï¼") + log.Fatal(err) + return + } + + // å…³é—­é¡µé¢ + dlg.Cancel() + + // 应用 回调函数 + confirmCall(seting) + }, + }, + PushButton{ + AssignTo: &cancelPB, + Text: "å–消", + OnClicked: func() { + dlg.Cancel() + }, + }, + }, + }, + }, + }.Run(owner) +} + +//应用é…置结构 +type AppSetings struct { + PermSize int // éžå †åŒºåˆå§‹å†…存分é…å¤§å° + MaxPermSize int // éžå †åŒºåˆ†é…çš„å†…å­˜çš„æœ€å¤§ä¸Šé™ + Xms int // 堆区内存åˆå§‹å†…存分é…çš„å¤§å° + Xmx int // 堆区内存å¯è¢«åˆ†é…çš„æœ€å¤§ä¸Šé™ +} + +// è¿è¡Œ 应用设置 Dialog +func (mw *myApp) RunAppSetingDialog(owner walk.Form, confirmCall func(*AppSetings)) { + var seting *AppSetings + var dlg *walk.Dialog + var db *walk.DataBinder + var acceptPB, cancelPB *walk.PushButton + + seting = new(AppSetings) + // 设置预定值 + seting.PermSize = 128 + seting.MaxPermSize = 256 + seting.Xmx = 512 + seting.Xms = 512 + + _, _ = Dialog{ + AssignTo: &dlg, + Title: "应用内存设置", + Font: Font{Family: "微软雅黑", PointSize: 9}, + DefaultButton: &acceptPB, + CancelButton: &cancelPB, + DataBinder: DataBinder{ + AssignTo: &db, + Name: "setings", + DataSource: seting, + ErrorPresenter: ToolTipErrorPresenter{}, + }, + MinSize: Size{Width: 450, Height: 270}, + Layout: VBox{}, + Children: []Widget{ + Composite{ + Layout: Grid{Columns: 2}, + Children: []Widget{ + Label{Text: `  PermSize(éžå †åŒºï¼‰åˆå§‹å†…存分é…大å°ï¼š`}, + NumberEdit{Value: Bind("PermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, + + Label{Text: `MaxPermSize(éžå †åŒºï¼‰æœ€å¤§å†…存分é…上é™ï¼š`}, + NumberEdit{Value: Bind("MaxPermSize", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, + + Label{Text: `      Xms(堆区)åˆå§‹å†…存分é…大å°ï¼š`}, + NumberEdit{Value: Bind("Xms", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, + + Label{Text: `      Xmx(堆区)最大内存分é…上é™ï¼š`}, + NumberEdit{Value: Bind("Xmx", Range{Min: 64, Max: 10240}), Suffix: " m", Decimals: 0}, + }, + }, + Composite{ + Layout: HBox{}, + Children: []Widget{ + HSpacer{}, + PushButton{ + AssignTo: &acceptPB, + Text: "ä¿å­˜", + OnClicked: func() { + if err := db.Submit(); err != nil { + showMsg("ã€å¼‚常】处ç†è®¾ç½®æ•°æ®åº“内存时,å‘生异常ï¼") + log.Fatal(err) + return + } + + // å…³é—­é¡µé¢ + dlg.Cancel() + + // DB 回调函数 + confirmCall(seting) + }, + }, + PushButton{ + AssignTo: &cancelPB, + Text: "å–消", + OnClicked: func() { + dlg.Cancel() + }, + }, + }, + }, + }, + }.Run(owner) +} + +//æ•°æ®è¿˜åŽŸè®¾ç½® +type DbBakSetings struct { + *walk.MainWindow + searchBox *walk.LineEdit + path string +} + +// è¿è¡Œ æ•°æ®è¿˜åŽŸè®¾ç½® Dialog +func (mw *myApp) RunDbBakSetingDialog(owner walk.Form, confirmCall func(*DbBakSetings)) { + var seting *DbBakSetings + var dlg *walk.Dialog + var db *walk.DataBinder + var acceptPB, cancelPB *walk.PushButton + + seting = new(DbBakSetings) + // 设置预定值 + + _, _ = Dialog{ + AssignTo: &dlg, + Title: "æ•°æ®è¿˜åŽŸè®¾ç½®", + Font: Font{Family: "微软雅黑", PointSize: 9}, + DefaultButton: &acceptPB, + CancelButton: &cancelPB, + DataBinder: DataBinder{ + AssignTo: &db, + Name: "setings", + DataSource: seting, + ErrorPresenter: ToolTipErrorPresenter{}, + }, + MinSize: Size{Width: 450, Height: 220}, + Layout: VBox{}, + Children: []Widget{ + GroupBox{ + Layout: HBox{}, + Children: []Widget{ + LineEdit{ + ReadOnly: true, + AssignTo: &seting.searchBox, + }, + PushButton{ + Text: "选择", + OnClicked: seting.selectFile, + }, + }, + }, + Composite{ + Layout: HBox{}, + Children: []Widget{ + HSpacer{}, + PushButton{ + AssignTo: &acceptPB, + Text: "æ¢å¤", + OnClicked: func() { + if err := db.Submit(); err != nil { + showMsg("ã€å¼‚常】选择æ¢å¤æ–‡ä»¶æ—¶ï¼Œå‘生异常ï¼") + log.Fatal(err) + return + } + + // å…³é—­é¡µé¢ + dlg.Cancel() + + // DB 回调函数 + confirmCall(seting) + }, + }, + PushButton{ + AssignTo: &cancelPB, + Text: "å–消", + OnClicked: func() { + dlg.Cancel() + }, + }, + }, + }, + }, + }.Run(owner) +}