package main

import (
	"testData/initialization"
)

func main() {
	initialization.InitConfig()
	initialization.InitPostgres()
	initialization.InitBaseDB()
	initialization.InitOracle()
	//initialization.InitMongoDB()
	initialization.InitLogger()
	//var reports []*model.Report
	//global.PostGreSQL.Where("step = ?", "FT").Find(&reports)
	//fmt.Println(len(reports))
	//for _, report := range reports {
	//	test_data.SaveFT(report)
	//}
	//var fileHandles []*model.FileHandled
	//global.PostGreSQL.Where("product = ? AND lot = ? AND wafer_id IN ?", "TP2202B", "EP5NYR.1", []string{"01", "02", "04", "06"}).
	//	Find(&fileHandles)
	//for _, fileHandle := range fileHandles {
	//	var report *model.Report
	//	global.PostGreSQL.Where("product = ? AND lot = ? AND wafer_id = ?", "TP2202B", "EP5NYR.1", fileHandle.WaferID).Find(&report)
	//	test_data.SaveCP(fileHandle.Product, fileHandle.Lot, fileHandle.WaferID, report)
	//}
	initialization.RunServer()
}
