V0 赛美科测试时间问题
This commit is contained in:
parent
2215d5e9cd
commit
99c88efa0f
@ -2,6 +2,7 @@ package report_reader
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"gitee.com/golang-module/carbon/v2"
|
||||||
"github.com/xuri/excelize/v2"
|
"github.com/xuri/excelize/v2"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"path"
|
"path"
|
||||||
@ -47,6 +48,7 @@ func FTSMCReportReader(filePath string) {
|
|||||||
PBI: info["pbi"],
|
PBI: info["pbi"],
|
||||||
SubBatch: info["sub_batch"],
|
SubBatch: info["sub_batch"],
|
||||||
ReportTestQuantity: info["report_test_quantity"],
|
ReportTestQuantity: info["report_test_quantity"],
|
||||||
|
OrderDate: carbon.Parse(info["order_date"]).Format("Y-m-d"),
|
||||||
ReportPassQuantity: info["report_pass_quantity"],
|
ReportPassQuantity: info["report_pass_quantity"],
|
||||||
ReportPassProbability: info["report_pass_probability"],
|
ReportPassProbability: info["report_pass_probability"],
|
||||||
Bin2: info["bin2"],
|
Bin2: info["bin2"],
|
||||||
@ -513,6 +515,12 @@ func FTEmptyInfoHandler(titleMap map[string]int, finalReportExcel *model.FinalRe
|
|||||||
} else if finalReportExcel.PBI != "" {
|
} else if finalReportExcel.PBI != "" {
|
||||||
info["pbi"] = row[titleMap[finalReportExcel.PBI]]
|
info["pbi"] = row[titleMap[finalReportExcel.PBI]]
|
||||||
}
|
}
|
||||||
|
finalReportExcel.OrderDate = strings.ReplaceAll(finalReportExcel.OrderDate, " ", "")
|
||||||
|
if _, ok := titleMap[finalReportExcel.OrderDate]; !ok {
|
||||||
|
info["order_date"] = ""
|
||||||
|
} else if finalReportExcel.OrderDate != "" {
|
||||||
|
info["order_date"] = row[titleMap[finalReportExcel.OrderDate]]
|
||||||
|
}
|
||||||
finalReportExcel.SubBatch = strings.ReplaceAll(finalReportExcel.SubBatch, " ", "")
|
finalReportExcel.SubBatch = strings.ReplaceAll(finalReportExcel.SubBatch, " ", "")
|
||||||
if _, ok := titleMap[finalReportExcel.SubBatch]; !ok {
|
if _, ok := titleMap[finalReportExcel.SubBatch]; !ok {
|
||||||
info["sub_batch"] = ""
|
info["sub_batch"] = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user