|
@@ -4773,13 +4773,13 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
if v == "" {
|
|
|
continue
|
|
|
}
|
|
|
- if d, ok := outentry[strings.Trim(v, " ")]; ok {
|
|
|
+ if d, ok := outentry[v]; ok {
|
|
|
dtime, err := TransfTime(d.(string))
|
|
|
if err != nil {
|
|
|
- a = strings.Trim(v, " ")
|
|
|
+ a = v
|
|
|
break
|
|
|
}
|
|
|
- outentry[strings.Trim(v, " ")] = dtime
|
|
|
+ outentry[v] = dtime
|
|
|
}
|
|
|
}
|
|
|
if a != "" {
|
|
@@ -4795,8 +4795,8 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
- if d, ok := outentry[strings.Trim(v, " ")]; !ok || d == "" {
|
|
|
- a = strings.Trim(v, " ")
|
|
|
+ if d, ok := outentry[v]; !ok || d == "" {
|
|
|
+ a = v
|
|
|
break
|
|
|
}
|
|
|
}
|
|
@@ -4812,9 +4812,9 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
if v == "" {
|
|
|
continue
|
|
|
}
|
|
|
- d, ok := outentry[strings.Trim(v, " ")]
|
|
|
+ d, ok := outentry[v]
|
|
|
if !ok || d == "" {
|
|
|
- outentry[strings.Trim(v, " ")] = 0
|
|
|
+ outentry[v] = 0
|
|
|
} else {
|
|
|
var fl float64
|
|
|
switch d.(type) {
|
|
@@ -4822,7 +4822,7 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
fl, err = strconv.ParseFloat(d.(string), 64)
|
|
|
}
|
|
|
if err != nil || fl < 0 {
|
|
|
- a = strings.Trim(v, " ")
|
|
|
+ a = v
|
|
|
break
|
|
|
}
|
|
|
}
|
|
@@ -4916,8 +4916,8 @@ func FpdImportExcel(c *gin.Context) {
|
|
|
if _, ok := outentry["Pen Name"]; ok {
|
|
|
dataexcel["barname"] = outentry["Pen Name"]
|
|
|
}
|
|
|
- if _, ok := outentry["Actual Headcount"]; ok {
|
|
|
- dataexcel["ccount"] = outentry["Actual Headcount"]
|
|
|
+ if _, ok := outentry["Actual Cattle Number"]; ok {
|
|
|
+ dataexcel["ccount"] = outentry["Actual Cattle Number"]
|
|
|
}
|
|
|
if _, ok := outentry["Coefficient(%)"]; ok {
|
|
|
dataexcel["ratio"] = outentry["Coefficient(%)"]
|