|
@@ -66,6 +66,8 @@ type UsdaFasIndex struct {
|
|
|
Sort int `description:"排序号"`
|
|
|
Frequency string `description:"频度"`
|
|
|
TerminalCode string `description:"编码"`
|
|
|
+ Country string `description:"国家"`
|
|
|
+ Commodity string `description:"属性"`
|
|
|
ExcelDataMap map[string]string
|
|
|
}
|
|
|
|
|
@@ -213,7 +215,7 @@ func DownloadUsdaPsdData(commodityCode string, years []int) (err error) {
|
|
|
err = fmt.Errorf("parse excel timed out")
|
|
|
return*/
|
|
|
}
|
|
|
-
|
|
|
+ utils.FileLog.Info("月度供需 " + commodityCode + "结束")
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -491,6 +493,8 @@ func ParseUsdaFmsExcel(path string) (err error) {
|
|
|
indexItem = new(UsdaFasIndex)
|
|
|
indexItem.IndexName = indexName
|
|
|
indexItem.ClassifyName = classifyName
|
|
|
+ indexItem.Country = country
|
|
|
+ indexItem.Commodity = kind
|
|
|
indexItem.ParentClassifyName = "出口销售"
|
|
|
indexItem.ClassifySort = 0
|
|
|
indexItem.IndexCode = inCode
|
|
@@ -630,7 +634,9 @@ func handleUsdaFasPsd(item *UsdaPsdData) (err error) {
|
|
|
errMsg += fmt.Sprintf("指标名称为空 commodityRow:%s,countriesRow:%s,attributesRow:%s\n", commodityRow, countriesRow, attributesRow)
|
|
|
continue
|
|
|
}
|
|
|
- firstCommodityRow := utils.GetFirstLetter(commodityRow)
|
|
|
+ firstCommodityRow := strings.Replace(commodityRow, ", ", "", -1)
|
|
|
+ firstCommodityRow = strings.Replace(firstCommodityRow, " ", "", -1)
|
|
|
+ firstCommodityRow = strings.ToLower(firstCommodityRow)
|
|
|
firstAttributesRow := utils.GetFirstLetter(attributesRow)
|
|
|
firstLastStr := utils.GetFirstLetter(lastStr)
|
|
|
|
|
@@ -643,6 +649,8 @@ func handleUsdaFasPsd(item *UsdaPsdData) (err error) {
|
|
|
indexItem = new(UsdaFasIndex)
|
|
|
indexItem.IndexName = indexName
|
|
|
indexItem.ClassifyName = classifyName
|
|
|
+ indexItem.Country = countriesRow
|
|
|
+ indexItem.Commodity = attributesRow
|
|
|
indexItem.ParentClassifyName = "月度供需"
|
|
|
indexItem.ClassifySort = classifySort
|
|
|
indexItem.IndexCode = inCode
|