|
@@ -21,8 +21,8 @@ func FileCoalInland() () {
|
|
|
|
|
|
}
|
|
|
}()
|
|
|
- path := "/Users/xi/Desktop/内陆17省动力煤终端用户供耗存%s.xlsx"
|
|
|
-
|
|
|
+
|
|
|
+ path := "/home/code/python/coal_mail/emailFile/内陆17省动力煤终端用户供耗存%s.xlsx"
|
|
|
for i := 0;i < 7;i++{
|
|
|
npath := fmt.Sprintf(path,time.Now().AddDate(0,0,-i).Format(utils.FormatDateUnSpace))
|
|
|
fmt.Println(npath)
|
|
@@ -37,6 +37,7 @@ func FileCoalInland() () {
|
|
|
}
|
|
|
if i < 3 && !exist{
|
|
|
npath := "/home/code/python/coal_mail/emailFile/内陆17省动力煤终端用户供耗存.xlsx"
|
|
|
+
|
|
|
fmt.Println(npath)
|
|
|
exist,err := PathExists(npath)
|
|
|
if err != nil {
|
|
@@ -170,13 +171,17 @@ func FileCoalInland() () {
|
|
|
if k == 0 {
|
|
|
if s == 0 {
|
|
|
text := cell.String()
|
|
|
+
|
|
|
t, _ := time.ParseInLocation("01-02-06", text, time.Local)
|
|
|
dataTime = t.Format(utils.FormatDate)
|
|
|
+
|
|
|
} else {
|
|
|
text := cell.String()
|
|
|
- t, _ := time.ParseInLocation("01-02-06", text, time.Local)
|
|
|
- dataTime = t.Format(utils.FormatDate)
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dataTime = ExcelDateToDate(text).Format(utils.FormatDate)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
if k > 0 {
|