V0 记录页面字段补充
This commit is contained in:
parent
47a10dc44a
commit
a1f58d7fbd
@ -1629,3 +1629,14 @@
|
||||
2024-10-25 15:38:49 INFO | 192.168.0.172 | 200 | 2.2275ms | GET | 未登录 | /testData/finalReport/excel?page=1&pageSize=20&key_word=
|
||||
2024-10-25 15:38:52 INFO | 192.168.0.172 | 200 | 1.5576ms | GET | 未登录 | /testData/import/testFile/factorySelection
|
||||
2024-10-25 15:38:58 INFO | 192.168.0.172 | 200 | 1.4621ms | POST | 未登录 | /testData/import/finalReport
|
||||
2024-10-30 11:22:38 INFO | 192.168.0.172 | 200 | 34.1421ms | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:24:14 INFO | 192.168.0.172 | 200 | 14.1612644s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:25:50 INFO | 192.168.0.172 | 200 | 3.0200245s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:26:08 INFO | 192.168.0.172 | 200 | 13.7761ms | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:26:10 INFO | 192.168.0.172 | 200 | 11.6227ms | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:30:12 INFO | 192.168.0.172 | 200 | 2m53.2790103s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:30:16 INFO | 192.168.0.172 | 200 | 2.3855633s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:30:48 INFO | 192.168.0.172 | 200 | 20.3990337s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:33:22 INFO | 192.168.0.172 | 200 | 2m21.7066369s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:33:29 INFO | 192.168.0.172 | 200 | 3.7144008s | POST | 未登录 | /testData/report/ft
|
||||
2024-10-30 11:34:02 INFO | 192.168.0.172 | 200 | 47.8578ms | POST | 未登录 | /testData/report/cp
|
||||
|
@ -161,6 +161,7 @@ type ReportBinFail struct {
|
||||
Bin string `json:"bin"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Proportion string `json:"proportion"`
|
||||
ReportQuantity float64 `json:"report_quantity"`
|
||||
ReportProportion string `json:"report_proportion"`
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ func Emails() {
|
||||
fmt.Println("Connected QQ Imap Receive Server(imap.exmail.qq.com)...")
|
||||
|
||||
// Login
|
||||
if err = c.Login("wip@tkplusemi.com", "Tkpluse123ip"); err != nil {
|
||||
if err = c.Login("data_analyse.tklpusemi.com", "Tkpluse123ip"); err != nil {
|
||||
fmt.Println("登陆IMAP服务器出错:", err)
|
||||
return
|
||||
}
|
||||
|
@ -562,6 +562,7 @@ func CPList(r *request.CPList) ([]*model.CPShowList, int64) {
|
||||
global.PostGreSQL.Where("pbi = ? AND product = ? AND lot = ? AND step LIKE ?",
|
||||
cpList.PBI, cpList.Product, cpList.Lot, "%CP%").Find(&finalReports)
|
||||
var reportTestQuantity, reportPassQuantity, reportPassProbability string
|
||||
reportHardBinFailMap := make(map[string]float64)
|
||||
for _, finalReport := range finalReports {
|
||||
reportTestQuantityDecimal, _ := decimal.NewFromString(reportTestQuantity)
|
||||
reportPassQuantityDecimal, _ := decimal.NewFromString(reportPassQuantity)
|
||||
@ -569,6 +570,56 @@ func CPList(r *request.CPList) ([]*model.CPShowList, int64) {
|
||||
finalReportPassQuantityDecimal, _ := decimal.NewFromString(finalReport.ReportPassQuantity)
|
||||
reportTestQuantity = reportTestQuantityDecimal.Add(finalReportTestQuantityDecimal).String()
|
||||
reportPassQuantity = reportPassQuantityDecimal.Add(finalReportPassQuantityDecimal).String()
|
||||
bin1Decimal, _ := decimal.NewFromString(finalReport.Bin1)
|
||||
if !bin1Decimal.IsZero() {
|
||||
bin1, _ := bin1Decimal.Float64()
|
||||
reportHardBinFailMap["1"] += bin1
|
||||
}
|
||||
bin2Decimal, _ := decimal.NewFromString(finalReport.Bin2)
|
||||
if !bin2Decimal.IsZero() {
|
||||
bin2, _ := bin2Decimal.Float64()
|
||||
reportHardBinFailMap["2"] += bin2
|
||||
}
|
||||
bin3Decimal, _ := decimal.NewFromString(finalReport.Bin3)
|
||||
if !bin3Decimal.IsZero() {
|
||||
bin3, _ := bin3Decimal.Float64()
|
||||
reportHardBinFailMap["3"] += bin3
|
||||
}
|
||||
bin4Decimal, _ := decimal.NewFromString(finalReport.Bin4)
|
||||
if !bin4Decimal.IsZero() {
|
||||
bin4, _ := bin4Decimal.Float64()
|
||||
reportHardBinFailMap["4"] += bin4
|
||||
}
|
||||
bin5Decimal, _ := decimal.NewFromString(finalReport.Bin5)
|
||||
if !bin5Decimal.IsZero() {
|
||||
bin5, _ := bin5Decimal.Float64()
|
||||
reportHardBinFailMap["5"] += bin5
|
||||
}
|
||||
bin6Decimal, _ := decimal.NewFromString(finalReport.Bin6)
|
||||
if !bin6Decimal.IsZero() {
|
||||
bin6, _ := bin6Decimal.Float64()
|
||||
reportHardBinFailMap["6"] += bin6
|
||||
}
|
||||
bin7Decimal, _ := decimal.NewFromString(finalReport.Bin7)
|
||||
if !bin7Decimal.IsZero() {
|
||||
bin7, _ := bin7Decimal.Float64()
|
||||
reportHardBinFailMap["7"] += bin7
|
||||
}
|
||||
bin8Decimal, _ := decimal.NewFromString(finalReport.Bin8)
|
||||
if !bin8Decimal.IsZero() {
|
||||
bin8, _ := bin8Decimal.Float64()
|
||||
reportHardBinFailMap["8"] += bin8
|
||||
}
|
||||
bin9Decimal, _ := decimal.NewFromString(finalReport.Bin9)
|
||||
if !bin9Decimal.IsZero() {
|
||||
bin9, _ := bin9Decimal.Float64()
|
||||
reportHardBinFailMap["9"] += bin9
|
||||
}
|
||||
bin10Decimal, _ := decimal.NewFromString(finalReport.Bin10)
|
||||
if !bin10Decimal.IsZero() {
|
||||
bin10, _ := bin10Decimal.Float64()
|
||||
reportHardBinFailMap["10"] += bin10
|
||||
}
|
||||
}
|
||||
finalReportTestQuantityDecimal, _ := decimal.NewFromString(reportTestQuantity)
|
||||
finalReportPassQuantityDecimal, _ := decimal.NewFromString(reportPassQuantity)
|
||||
@ -644,12 +695,25 @@ func CPList(r *request.CPList) ([]*model.CPShowList, int64) {
|
||||
return softBinFail[i].Quantity > softBinFail[j].Quantity
|
||||
})
|
||||
for hardBin, hardBinQuantity := range hardBinFailMap {
|
||||
|
||||
var finalReport *model.FinalReport
|
||||
global.PostGreSQL.Where("step = ? AND pbi = ? AND lot = ? AND sub_batch = ?", report.Step, report.PBI, report.Lot,
|
||||
report.SubBatch).Find(&finalReport)
|
||||
hardBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
var quantity float64
|
||||
var reportProportion string
|
||||
reportSoftBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
quantity = hardBinQuantity
|
||||
reportProportion = reportSoftBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%"
|
||||
|
||||
hardBinFail = append(hardBinFail, &model.ReportBinFail{
|
||||
Bin: hardBin,
|
||||
Quantity: hardBinQuantity,
|
||||
Proportion: hardBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
ReportQuantity: quantity,
|
||||
ReportProportion: reportProportion,
|
||||
})
|
||||
}
|
||||
sort.Slice(hardBinFail, func(i, j int) bool {
|
||||
@ -736,11 +800,15 @@ func CPList(r *request.CPList) ([]*model.CPShowList, int64) {
|
||||
})
|
||||
for hardBin, hardBinQuantity := range cpShowList.HardBinFailMap {
|
||||
hardBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
reportSoftBinQuantityDecimal := decimal.NewFromFloat(reportHardBinFailMap[hardBin])
|
||||
hardBinFail = append(hardBinFail, &model.ReportBinFail{
|
||||
Bin: hardBin,
|
||||
Quantity: hardBinQuantity,
|
||||
Proportion: hardBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
ReportQuantity: reportHardBinFailMap[hardBin],
|
||||
ReportProportion: reportSoftBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
})
|
||||
}
|
||||
sort.Slice(hardBinFail, func(i, j int) bool {
|
||||
@ -1050,6 +1118,7 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
global.PostGreSQL.Where("pbi = ? AND product = ? AND lot = ? AND step LIKE ?",
|
||||
ftList.PBI, ftList.Product, ftList.Lot, "FT").Find(&finalReports)
|
||||
var reportTestQuantity, reportPassQuantity, reportPassProbability string
|
||||
reportHardBinFailMap := make(map[string]float64)
|
||||
for _, finalReport := range finalReports {
|
||||
reportTestQuantityDecimal, _ := decimal.NewFromString(reportTestQuantity)
|
||||
reportPassQuantityDecimal, _ := decimal.NewFromString(reportPassQuantity)
|
||||
@ -1057,6 +1126,56 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
finalReportPassQuantityDecimal, _ := decimal.NewFromString(finalReport.ReportPassQuantity)
|
||||
reportTestQuantity = reportTestQuantityDecimal.Add(finalReportTestQuantityDecimal).String()
|
||||
reportPassQuantity = reportPassQuantityDecimal.Add(finalReportPassQuantityDecimal).String()
|
||||
bin1Decimal, _ := decimal.NewFromString(finalReport.Bin1)
|
||||
if !bin1Decimal.IsZero() {
|
||||
bin1, _ := bin1Decimal.Float64()
|
||||
reportHardBinFailMap["1"] += bin1
|
||||
}
|
||||
bin2Decimal, _ := decimal.NewFromString(finalReport.Bin2)
|
||||
if !bin2Decimal.IsZero() {
|
||||
bin2, _ := bin2Decimal.Float64()
|
||||
reportHardBinFailMap["2"] += bin2
|
||||
}
|
||||
bin3Decimal, _ := decimal.NewFromString(finalReport.Bin3)
|
||||
if !bin3Decimal.IsZero() {
|
||||
bin3, _ := bin3Decimal.Float64()
|
||||
reportHardBinFailMap["3"] += bin3
|
||||
}
|
||||
bin4Decimal, _ := decimal.NewFromString(finalReport.Bin4)
|
||||
if !bin4Decimal.IsZero() {
|
||||
bin4, _ := bin4Decimal.Float64()
|
||||
reportHardBinFailMap["4"] += bin4
|
||||
}
|
||||
bin5Decimal, _ := decimal.NewFromString(finalReport.Bin5)
|
||||
if !bin5Decimal.IsZero() {
|
||||
bin5, _ := bin5Decimal.Float64()
|
||||
reportHardBinFailMap["5"] += bin5
|
||||
}
|
||||
bin6Decimal, _ := decimal.NewFromString(finalReport.Bin6)
|
||||
if !bin6Decimal.IsZero() {
|
||||
bin6, _ := bin6Decimal.Float64()
|
||||
reportHardBinFailMap["6"] += bin6
|
||||
}
|
||||
bin7Decimal, _ := decimal.NewFromString(finalReport.Bin7)
|
||||
if !bin7Decimal.IsZero() {
|
||||
bin7, _ := bin7Decimal.Float64()
|
||||
reportHardBinFailMap["7"] += bin7
|
||||
}
|
||||
bin8Decimal, _ := decimal.NewFromString(finalReport.Bin8)
|
||||
if !bin8Decimal.IsZero() {
|
||||
bin8, _ := bin8Decimal.Float64()
|
||||
reportHardBinFailMap["8"] += bin8
|
||||
}
|
||||
bin9Decimal, _ := decimal.NewFromString(finalReport.Bin9)
|
||||
if !bin9Decimal.IsZero() {
|
||||
bin9, _ := bin9Decimal.Float64()
|
||||
reportHardBinFailMap["9"] += bin9
|
||||
}
|
||||
bin10Decimal, _ := decimal.NewFromString(finalReport.Bin10)
|
||||
if !bin10Decimal.IsZero() {
|
||||
bin10, _ := bin10Decimal.Float64()
|
||||
reportHardBinFailMap["10"] += bin10
|
||||
}
|
||||
}
|
||||
finalReportTestQuantityDecimal, _ := decimal.NewFromString(reportTestQuantity)
|
||||
finalReportPassQuantityDecimal, _ := decimal.NewFromString(reportPassQuantity)
|
||||
@ -1132,12 +1251,25 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
return softBinFail[i].Quantity > softBinFail[j].Quantity
|
||||
})
|
||||
for hardBin, hardBinQuantity := range hardBinFailMap {
|
||||
var finalReport *model.FinalReport
|
||||
global.PostGreSQL.Where("step = ? AND pbi = ? AND lot = ? AND sub_batch = ?", report.Step, report.PBI, report.Lot,
|
||||
report.SubBatch).Find(&finalReport)
|
||||
hardBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
var quantity float64
|
||||
var reportProportion string
|
||||
|
||||
reportSoftBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
quantity = hardBinQuantity
|
||||
reportProportion = reportSoftBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%"
|
||||
|
||||
hardBinFail = append(hardBinFail, &model.ReportBinFail{
|
||||
Bin: hardBin,
|
||||
Quantity: hardBinQuantity,
|
||||
Proportion: hardBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
ReportQuantity: quantity,
|
||||
ReportProportion: reportProportion,
|
||||
})
|
||||
}
|
||||
sort.Slice(hardBinFail, func(i, j int) bool {
|
||||
@ -1224,11 +1356,15 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
})
|
||||
for hardBin, hardBinQuantity := range ftShowList.HardBinFailMap {
|
||||
hardBinQuantityDecimal := decimal.NewFromFloat(hardBinQuantity)
|
||||
reportSoftBinQuantityDecimal := decimal.NewFromFloat(reportHardBinFailMap[hardBin])
|
||||
hardBinFail = append(hardBinFail, &model.ReportBinFail{
|
||||
Bin: hardBin,
|
||||
Quantity: hardBinQuantity,
|
||||
Proportion: hardBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
ReportQuantity: reportHardBinFailMap[hardBin],
|
||||
ReportProportion: reportSoftBinQuantityDecimal.Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100)).String() + "%",
|
||||
})
|
||||
}
|
||||
sort.Slice(hardBinFail, func(i, j int) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user