|
@@ -103,7 +103,7 @@ func FileCoalInland() () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- for s, sheet := range xlFile.Sheets {
|
|
|
|
|
|
+ for _, sheet := range xlFile.Sheets {
|
|
sheetName = sheet.Name
|
|
sheetName = sheet.Name
|
|
fmt.Println("sheetName:",sheetName)
|
|
fmt.Println("sheetName:",sheetName)
|
|
var unit string
|
|
var unit string
|
|
@@ -169,19 +169,11 @@ func FileCoalInland() () {
|
|
if k < 18 {
|
|
if k < 18 {
|
|
var item models.BaseFromCoalmineInlandIndex
|
|
var item models.BaseFromCoalmineInlandIndex
|
|
if k == 0 {
|
|
if k == 0 {
|
|
- if s == 0 {
|
|
|
|
- text := cell.String()
|
|
|
|
- //fmt.Println(text)
|
|
|
|
- t, _ := time.ParseInLocation("01-02-06", text, time.Local)
|
|
|
|
- dataTime = t.Format(utils.FormatDate)
|
|
|
|
- //fmt.Println(dataTime)
|
|
|
|
- } else {
|
|
|
|
- text := cell.String()
|
|
|
|
- //fmt.Println(text)
|
|
|
|
- //t, _ := time.ParseInLocation("01-02-06", text, time.Local)
|
|
|
|
- //dataTime = t.Format(utils.FormatDate)
|
|
|
|
|
|
+ text := cell.String()
|
|
|
|
+ t, _ := time.ParseInLocation("01-02-06", text, time.Local)
|
|
|
|
+ dataTime = t.Format(utils.FormatDate)
|
|
|
|
+ if len(text) < 6{
|
|
dataTime = ExcelDateToDate(text).Format(utils.FormatDate)
|
|
dataTime = ExcelDateToDate(text).Format(utils.FormatDate)
|
|
- //fmt.Println(dataTime)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if k > 0 {
|
|
if k > 0 {
|