V0 自动抓取测试文件处理

This commit is contained in:
jh_peng 2024-10-31 18:40:30 +08:00
parent c261e37772
commit af12b2447b

View File

@ -4,7 +4,6 @@ import (
"bufio" "bufio"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"gitee.com/golang-module/carbon/v2" "gitee.com/golang-module/carbon/v2"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/xuri/excelize/v2" "github.com/xuri/excelize/v2"
@ -614,13 +613,9 @@ func SaveCP(report *model.Report) { //pbi, product, lot, waferID string,
func SaveFT(report *model.Report) { //pbi, product, lot, subBatch string, func SaveFT(report *model.Report) { //pbi, product, lot, subBatch string,
var ftFile *model.FileHandled var ftFile *model.FileHandled
//global.PostGreSQL.Where("pbi = ? AND product = ? AND lot = ? AND sub_batch = ? AND step = ?",
// report.PBI, report.Product, report.Lot, report.SubBatch, "FT").Find(&ftFile)
global.PostGreSQL.Where("pbi = ? AND product = ? AND lot = ? AND sub_batch = ? AND step = ?", global.PostGreSQL.Where("pbi = ? AND product = ? AND lot = ? AND sub_batch = ? AND step = ?",
report.PBI, report.Product, report.Lot, report.SubBatch, "FT").Find(&ftFile) report.PBI, report.Product, report.Lot, report.SubBatch, "FT").Find(&ftFile)
if _, err := os.Stat(ftFile.Path); err != nil { if _, err := os.Stat(ftFile.Path); err != nil {
log.Println(fmt.Sprintf("pbi = %s AND product = %s AND lot = %s AND sub_batch = %s",
report.PBI, report.Product, report.Lot, report.SubBatch))
log.Println("该文件不存在") log.Println("该文件不存在")
} }