|
@@ -93,7 +93,8 @@ func IndexYearMerge() {
|
|
|
}
|
|
|
templateFile.Close()
|
|
|
}
|
|
|
- //处理excel数据
|
|
|
+ //刷新数据
|
|
|
+ MysteelChemicalRefresh(yearIndexFilePath)
|
|
|
}
|
|
|
|
|
|
//季度
|
|
@@ -151,7 +152,8 @@ func IndexSeasonMerge() {
|
|
|
}
|
|
|
templateFile.Close()
|
|
|
}
|
|
|
- //处理excel数据
|
|
|
+ //刷新数据
|
|
|
+ MysteelChemicalRefresh(seasonIndexFilePath)
|
|
|
}
|
|
|
|
|
|
//月度
|
|
@@ -579,20 +581,20 @@ func indexMerge(frequency, filePre string, pageSize int) (err error) {
|
|
|
mergeIndexFilePath := utils.IndexMsergeSaveDir + fileName
|
|
|
fmt.Println(mergeIndexFilePath)
|
|
|
|
|
|
- var list []*index.BaseFromMysteelChemicalIndex
|
|
|
+ //var list []*index.BaseFromMysteelChemicalIndex
|
|
|
// 需要查询的指标数
|
|
|
size := pageSize
|
|
|
if i == 1 {
|
|
|
size = firstIndexCount // 第一页需要合并的新指标数
|
|
|
|
|
|
// 第一页需要的指标列表
|
|
|
- tmpList, tmpErr := indexObj.GetIndexByFrequencyListByMergeFilePath(frequency, mergeIndexFilePath)
|
|
|
- if tmpErr != nil {
|
|
|
- fmt.Println("GetIndexByFrequencyListByMergeFilePath Err:" + tmpErr.Error())
|
|
|
- err = tmpErr
|
|
|
- return
|
|
|
- }
|
|
|
- list = tmpList
|
|
|
+ //tmpList, tmpErr := indexObj.GetIndexByFrequencyListByMergeFilePath(frequency, mergeIndexFilePath)
|
|
|
+ //if tmpErr != nil {
|
|
|
+ // fmt.Println("GetIndexByFrequencyListByMergeFilePath Err:" + tmpErr.Error())
|
|
|
+ // err = tmpErr
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //list = tmpList
|
|
|
}
|
|
|
fmt.Println("需要查询", size, "个指标")
|
|
|
|
|
@@ -606,9 +608,9 @@ func indexMerge(frequency, filePre string, pageSize int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if len(list) > 0 {
|
|
|
- pageList = append(pageList, list...)
|
|
|
- }
|
|
|
+ //if len(list) > 0 {
|
|
|
+ // pageList = append(pageList, list...)
|
|
|
+ //}
|
|
|
|
|
|
commentResult, tmpErr := GetIndexComment(mergeIndexFilePath, pageList, maxFileIndex)
|
|
|
if tmpErr != nil {
|
|
@@ -651,6 +653,8 @@ func indexMerge(frequency, filePre string, pageSize int) (err error) {
|
|
|
}
|
|
|
maxFileIndex += 1
|
|
|
time.Sleep(1 * time.Second)
|
|
|
+ //刷新数据
|
|
|
+ MysteelChemicalRefresh(mergeIndexFilePath)
|
|
|
}
|
|
|
return
|
|
|
}
|
|
@@ -706,6 +710,8 @@ func GetIndexComment(indexFilePath string, list []*index.BaseFromMysteelChemical
|
|
|
|
|
|
indexObj := new(index.BaseFromMysteelChemicalIndex)
|
|
|
|
|
|
+ modelsList = append(modelsList, indexInfo.Models...)
|
|
|
+
|
|
|
for k, v := range list {
|
|
|
fmt.Println(k, v)
|
|
|
item := new(IndexModels)
|