|
@@ -166,15 +166,18 @@ func ImportDataByExcel(mf multipart.File, eid int64, entid string) (int, int64,
|
|
|
"element_field": "industry", "pcode": common.IntAll((*info)["code"]), "element_value": id})
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- } else if fMap[index] == "bidopentime" || fMap[index] == "publishtime" || fMap[index] == "docstarttime" || fMap[index] == "bidstarttime" || fMap[index] == "bidendtime" {
|
|
|
- if cell.Type() == xlsx.CellTypeNumeric {
|
|
|
- dates, err := cell.GetTime(false)
|
|
|
- if err != nil {
|
|
|
- log.Debug("Error getting dates:", err)
|
|
|
+ } else if fMap[index] == "bidopentime" || fMap[index] == "publishtime" || fMap[index] == "docstarttime" || fMap[index] == "bidstarttime" || fMap[index] == "bidendtime" {
|
|
|
+ if cell.Type() == xlsx.CellTypeNumeric {
|
|
|
+ dates, err := cell.GetTime(false)
|
|
|
+ if err != nil {
|
|
|
+ log.Debug("Error getting dates:", err)
|
|
|
+ } else {
|
|
|
+ tmp[fMap[index]] = dates.Format(date.Date_Short_Layout)
|
|
|
+ }
|
|
|
} else {
|
|
|
- tmp[fMap[index]] = dates.Format(date.Date_Short_Layout)
|
|
|
+ tmp[fMap[index]] = val
|
|
|
}
|
|
|
+
|
|
|
} else if fMap[index] == "winner_tag" {
|
|
|
// 中标单位标签
|
|
|
if v := WtM[val]; v != nil && v != 0 {
|
|
@@ -189,18 +192,6 @@ func ImportDataByExcel(mf multipart.File, eid int64, entid string) (int, int64,
|
|
|
"element_field": "winner_tag", "pcode": common.IntAll((*info)["code"]), "element_value": id})
|
|
|
}
|
|
|
}
|
|
|
- } else if fMap[index] == "bidopentime" || fMap[index] == "publishtime" || fMap[index] == "docstarttime" || fMap[index] == "bidstarttime" || fMap[index] == "bidendtime" {
|
|
|
- if cell.Type() == xlsx.CellTypeNumeric {
|
|
|
- dates, err := cell.GetTime(false)
|
|
|
- if err != nil {
|
|
|
- log.Debug("Error getting dates:", err)
|
|
|
- } else {
|
|
|
- tmp[fMap[index]] = dates.Format(date.Date_Short_Layout)
|
|
|
- }
|
|
|
- } else {
|
|
|
- tmp[fMap[index]] = val
|
|
|
- }
|
|
|
-
|
|
|
} else {
|
|
|
if fMap[index] != "" {
|
|
|
tmp[fMap[index]] = val
|