V0 测试文件手动导入字段判断
This commit is contained in:
parent
adeda66cda
commit
d81d1a1946
@ -43,22 +43,22 @@ func (D *UploadService) UploadAnswerFile(c *gin.Context) {
|
|||||||
files = append(files, v...)
|
files = append(files, v...)
|
||||||
}
|
}
|
||||||
if len(form.Value["pbi"]) < 1 {
|
if len(form.Value["pbi"]) < 1 {
|
||||||
response.FailWithMessage("缺少PBI名称", c)
|
response.FailWithMessage("请输入PBI信息", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
pbi := form.Value["pbi"][0]
|
pbi := form.Value["pbi"][0]
|
||||||
if len(form.Value["product"]) < 1 {
|
if len(form.Value["product"]) < 1 {
|
||||||
response.FailWithMessage("缺少产品名称", c)
|
response.FailWithMessage("请输入产品信息", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
productName := form.Value["product"][0]
|
productName := form.Value["product"][0]
|
||||||
if len(form.Value["lot"]) < 1 {
|
if len(form.Value["lot"]) < 1 {
|
||||||
response.FailWithMessage("缺少批次", c)
|
response.FailWithMessage("请输入批次信息", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
lot := form.Value["lot"][0]
|
lot := form.Value["lot"][0]
|
||||||
if len(form.Value["factory"]) < 1 {
|
if len(form.Value["factory"]) < 1 {
|
||||||
response.FailWithMessage("缺少厂商", c)
|
response.FailWithMessage("请选择测试厂信息", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
factory := form.Value["factory"][0]
|
factory := form.Value["factory"][0]
|
||||||
@ -68,10 +68,6 @@ func (D *UploadService) UploadAnswerFile(c *gin.Context) {
|
|||||||
} else {
|
} else {
|
||||||
subBatch = form.Value["sub_batch"][0]
|
subBatch = form.Value["sub_batch"][0]
|
||||||
}
|
}
|
||||||
if len(form.Value["step"]) < 1 {
|
|
||||||
response.FailWithMessage("缺少工序", c)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var waferID string
|
var waferID string
|
||||||
if len(form.Value["wafer_id"]) < 1 {
|
if len(form.Value["wafer_id"]) < 1 {
|
||||||
waferID = ""
|
waferID = ""
|
||||||
@ -84,12 +80,12 @@ func (D *UploadService) UploadAnswerFile(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
step := form.Value["step"][0]
|
step := form.Value["step"][0]
|
||||||
if len(form.Value["test_machine"]) < 1 {
|
if len(form.Value["test_machine"]) < 1 {
|
||||||
response.FailWithMessage("缺少机台类型", c)
|
response.FailWithMessage("请选择机台类型", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
machine := form.Value["test_machine"][0]
|
machine := form.Value["test_machine"][0]
|
||||||
if (lot == "" && subBatch == "") || productName == "" || step == "" || machine == "" {
|
if (lot == "" && subBatch == "") || productName == "" || step == "" || machine == "" {
|
||||||
response.FailWithMessage("信息不全", c)
|
response.FailWithMessage("必要信息不全", c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fileTexts := make([]*model.FileText, 0)
|
fileTexts := make([]*model.FileText, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user