|
@@ -4203,7 +4203,7 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
if a != "" {
|
|
|
- outentry["error_msg"] = a + " 格式错误"
|
|
|
+ outentry["error_msg"] = a + " format error"
|
|
|
error++
|
|
|
queryData = append(queryData, outentry)
|
|
|
continue
|
|
@@ -4221,7 +4221,7 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
if a != "" {
|
|
|
- outentry["error_msg"] = a + " 未填或格式错误"
|
|
|
+ outentry["error_msg"] = a + " Unfilled or formatted incorrectly"
|
|
|
error++
|
|
|
queryData = append(queryData, outentry)
|
|
|
continue
|
|
@@ -4248,7 +4248,7 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
if a != "" {
|
|
|
- outentry["error_msg"] = a + " 为数值类型且不可为负数"
|
|
|
+ outentry["error_msg"] = a + " Numerical type and cannot be negative"
|
|
|
error++
|
|
|
queryData = append(queryData, outentry)
|
|
|
continue
|
|
@@ -4333,42 +4333,42 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
if !errExist {
|
|
|
|
|
|
dataexcel := make(map[string]interface{}, 0)
|
|
|
- if _, ok := outentry["栏舍名称"]; ok {
|
|
|
- dataexcel["barname"] = outentry["栏舍名称"]
|
|
|
+ if _, ok := outentry["Pen Name"]; ok {
|
|
|
+ dataexcel["barname"] = outentry["Pen Name"]
|
|
|
}
|
|
|
- if _, ok := outentry["实际牛头数"]; ok {
|
|
|
- dataexcel["ccount"] = outentry["实际牛头数"]
|
|
|
+ if _, ok := outentry["Actual Headcount"]; ok {
|
|
|
+ dataexcel["ccount"] = outentry["Actual Headcount"]
|
|
|
}
|
|
|
- if _, ok := outentry["系数(%)"]; ok {
|
|
|
- dataexcel["ratio"] = outentry["系数(%)"]
|
|
|
+ if _, ok := outentry["Coefficient(%)"]; ok {
|
|
|
+ dataexcel["ratio"] = outentry["Coefficient(%)"]
|
|
|
}
|
|
|
- if _, ok := outentry["配方模板"]; ok {
|
|
|
- dataexcel["ftname"] = outentry["配方模板"]
|
|
|
+ if _, ok := outentry["Formula Template"]; ok {
|
|
|
+ dataexcel["ftname"] = outentry["Formula Template"]
|
|
|
}
|
|
|
- if _, ok := outentry["补料配方"]; ok {
|
|
|
- dataexcel["ptsfname"] = outentry["补料配方"]
|
|
|
+ if _, ok := outentry["Supplement Formula"]; ok {
|
|
|
+ dataexcel["ptsfname"] = outentry["Supplement Formula"]
|
|
|
}
|
|
|
- if _, ok := outentry["第一班比例(%)"]; ok {
|
|
|
- dataexcel["1"] = outentry["第一班比例(%)"]
|
|
|
+ if _, ok := outentry["First Shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["1"] = outentry["First Shift Ratio(%)"]
|
|
|
}
|
|
|
- if _, ok := outentry["第二班比例(%)"]; ok {
|
|
|
- dataexcel["2"] = outentry["第二班比例(%)"]
|
|
|
+ if _, ok := outentry["Second Shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["2"] = outentry["Second Shift Ratio(%)"]
|
|
|
}
|
|
|
|
|
|
- if _, ok := outentry["第三班比例(%)"]; ok {
|
|
|
- dataexcel["3"] = outentry["第三班比例(%)"]
|
|
|
+ if _, ok := outentry["Third Shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["3"] = outentry["Third Shift Ratio(%)"]
|
|
|
}
|
|
|
|
|
|
- if _, ok := outentry["第四班比例(%)"]; ok {
|
|
|
- dataexcel["4"] = outentry["第四班比例(%)"]
|
|
|
+ if _, ok := outentry["Fourth Shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["4"] = outentry["Fourth Shift Ratio(%)"]
|
|
|
}
|
|
|
|
|
|
- if _, ok := outentry["第五班比例(%)"]; ok {
|
|
|
- dataexcel["5"] = outentry["第五班比例(%)"]
|
|
|
+ if _, ok := outentry["Fifth shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["5"] = outentry["Fifth shift Ratio(%)"]
|
|
|
}
|
|
|
|
|
|
- if _, ok := outentry["第六班比例(%)"]; ok {
|
|
|
- dataexcel["6"] = outentry["第六班比例(%)"]
|
|
|
+ if _, ok := outentry["Sixth shift Ratio(%)"]; ok {
|
|
|
+ dataexcel["6"] = outentry["Sixth shift Ratio(%)"]
|
|
|
}
|
|
|
|
|
|
existbar, err := tx.SQL(` select id from bar where bname = ? and pastureid = ? `, dataexcel["barname"], pastureid).Exist()
|
|
@@ -4396,7 +4396,7 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
existft, err := tx.SQL(` select id from feedtemplet where tname = ? and pastureid = ? `, dataexcel["ftname"], pastureid).Exist()
|
|
|
if err != nil {
|
|
|
logs.Error(err)
|
|
|
- appG.Response(http.StatusInternalServerError, e.ERROR, "配方不存在!")
|
|
|
+ appG.Response(http.StatusInternalServerError, e.ERROR, "Formula does not exist")
|
|
|
return
|
|
|
}
|
|
|
if !existft {
|