|
@@ -64,7 +64,7 @@ func IndexCreateCheck() (err error) {
|
|
|
fmt.Println("IndexCreate saveFilePath:" + v.FilePath)
|
|
|
time.Sleep(1 * time.Second)
|
|
|
if utils.FileIsExist(saveFilePath) {
|
|
|
- AddIndexRefreshToLpush(saveFilePath)
|
|
|
+ AddIndexRefreshToLPush(saveFilePath)
|
|
|
}
|
|
|
fmt.Println("MysteelChemicalRefresh end:" + v.IndexCode)
|
|
|
}
|
|
@@ -156,27 +156,27 @@ func IndexRefreshAll() {
|
|
|
if v.Frequency == "年度" {
|
|
|
if month == 1 && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "季度" {
|
|
|
if (month == 1 || month == 4 || month == 7 || month == 10) && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "月度" {
|
|
|
if day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "周度" && frequency == "周度" {
|
|
|
if week > 2 && week < 6 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else {
|
|
|
if week < 6 && frequency == "" {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -207,27 +207,27 @@ func IndexRefreshMethanol() {
|
|
|
if v.Frequency == "年度" {
|
|
|
if month == 1 && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "季度" {
|
|
|
if (month == 1 || month == 4 || month == 7 || month == 10) && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "月度" {
|
|
|
if day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "周度" {
|
|
|
if week > 2 && week < 6 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else {
|
|
|
if week < 6 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -266,39 +266,38 @@ func IndexRefreshTimely() {
|
|
|
if v.Frequency == "年度" {
|
|
|
if month == 1 && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "季度" {
|
|
|
if (month == 1 || month == 4 || month == 7 || month == 10) && day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "月度" {
|
|
|
if day == 1 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else if v.Frequency == "周度" {
|
|
|
if week > 2 && week < 6 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
} else {
|
|
|
if week < 6 {
|
|
|
//MysteelChemicalRefresh(v.MergeFilePath)
|
|
|
- AddIndexRefreshToLpush(v.MergeFilePath)
|
|
|
+ AddIndexRefreshToLPush(v.MergeFilePath)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-var lock sync.RWMutex
|
|
|
-
|
|
|
+// pushLock excel路径写入的读写锁
|
|
|
var pushLock sync.RWMutex
|
|
|
|
|
|
-// AddIndexRefreshToLpush 添加到指标刷新
|
|
|
-func AddIndexRefreshToLpush(filePath string) {
|
|
|
+// AddIndexRefreshToLPush 添加到指标刷新
|
|
|
+func AddIndexRefreshToLPush(filePath string) {
|
|
|
pushLock.Lock()
|
|
|
//result := cache.IndexAutoRefresh(filePath)
|
|
|
cache.IndexAutoRefresh(filePath)
|