diff --git a/repository/test.data/report.list.cron.go b/repository/test.data/report.list.cron.go index ec0191e..4324c1d 100644 --- a/repository/test.data/report.list.cron.go +++ b/repository/test.data/report.list.cron.go @@ -994,6 +994,16 @@ func CronFTList() { } else if tcSfd.SfbFile.Sfb04 == "0" { continue } + var waferProduct string + for _, tcSfe := range tcSfc.TcSfeFile { + if tcSfe.TcSfe01 == tcSfc.TcSfc01 && tcSfe.TcSfe02 == tcSfd.TcSfd02 { + if (tcSfc.TcSfc08 == "FT" || (tcSfc.TcSfc08 == "ABFT" && tcSfc.TcSfc10 == "Y")) && !strings.Contains(tcSfc.TcSfc01, "M599") { + waferProduct = tcSfe.BmbFile.ImaFile.Ima02 + } else { + waferProduct = tcSfe.ImaFile.Ima02 + } + } + } var returnQuantity, passQuantity, failQuantity float64 orderDateStockMap := make(map[string][]float64) @@ -1020,6 +1030,7 @@ func CronFTList() { global.PostGreSQL.Transaction(func(tx *gorm.DB) error { global.PostGreSQL.Model(&ftList).Where("pbi = ? AND outsourcing_pbi = ?", tcSfc.TcSfc01, tcSfd.TcSfd13).Updates(map[string]interface{}{ + "wafer_product": waferProduct, "status": status, "online_quantity": tcSfd.TcSfd05 - returnQuantity, "return_quantity": returnQuantity,