ziwen 2 anni fa
parent
commit
4068806c8a
2 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. 12 0
      services/commodity_coal_inland.go
  2. 1 1
      services/task.go

+ 12 - 0
services/commodity_coal_inland.go

@@ -32,6 +32,18 @@ func FileCoalInland() () {
 			path = npath
 			break
 		}
+		if i < 3 && !exist{
+			path = "/home/code/python/coal_mail/emailFile/内陆17省动力煤终端用户供耗存.xlsx"
+			exist,err := PathExists(npath)
+			if err != nil {
+				fmt.Println(err)
+				return
+			}
+			if exist{
+				path = npath
+				break
+			}
+		}
 	}
 	xlFile, err := xlsx.OpenFile(path)
 	if err != nil {

+ 1 - 1
services/task.go

@@ -18,7 +18,7 @@ func Task() {
 	//FileCoalJsm()
 	//FileCoalFirm()
 	//FileCoalCoastal()
-	//FileCoalInland()
+	FileCoalInland()
 	fmt.Println("end crawler")
 }