// Package fenwei // @Author gmy 2024/8/20 14:47:00 package fenwei import ( "encoding/json" "eta/eta_data_analysis/models" ) // ThermalCoalSupplyProcessor 动力煤供应量 type ThermalCoalSupplyProcessor struct { BaseProcessor } func (p *ThermalCoalSupplyProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "18", "3", "10", "5", "2", "37"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW4002D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "province", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingCleanCoalSupplyProcessor 炼焦精煤供应量 type CokingCleanCoalSupplyProcessor struct { BaseProcessor } func (p *CokingCleanCoalSupplyProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "18", "3", "10", "5", "2", "37"}, "coal_type": {"13", "10", "9", "8", "7", "5", "3"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW4001D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "coal_type", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // RawCoalProvinceProductionProcessor 原煤分省分煤种产量 type RawCoalProvinceProductionProcessor struct { BaseProcessor } func (p *RawCoalProvinceProductionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "18", "3", "10", "5", "2", "37"}, "coal_type": {"14", "6", "40", "21"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW3050D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "coal_type", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // StateOwnedKeyCoalMineRawCoalProductionProcessor 国有重点煤矿原煤产量 type StateOwnedKeyCoalMineRawCoalProductionProcessor struct { BaseProcessor } func (p *StateOwnedKeyCoalMineRawCoalProductionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "2", "27", "28"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW3007D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "province", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingBituminousCoalProductionProcessor 炼焦烟煤分煤种产量 type CokingBituminousCoalProductionProcessor struct { BaseProcessor } func (p *CokingBituminousCoalProductionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "18", "3", "10", "5", "2", "37"}, "coal_type": {"13", "10", "9", "8", "7", "5", "3"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW3001D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "coal_type", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // ThermalCoalInventorySocietyProcessor 动力煤库存-全社会 type ThermalCoalInventorySocietyProcessor struct { BaseProcessor } func (p *ThermalCoalInventorySocietyProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "79", CheckedDims: map[string][]string{ "product_item_code": {"FW8004D-1"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8004D", QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // ThermalCoalInventoryProductionProcessor 动力煤库存-生产企业 type ThermalCoalInventoryProductionProcessor struct { BaseProcessor } func (p *ThermalCoalInventoryProductionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "116", CheckedDims: map[string][]string{ "product_item_code": {"FW8004D-2"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8004D", QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // ThermalCoalInventorySixPowerPlantProcessor 动力煤库存-六大电厂 type ThermalCoalInventorySixPowerPlantProcessor struct { BaseProcessor } func (p *ThermalCoalInventorySixPowerPlantProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "118", CheckedDims: map[string][]string{ "product_item_code": {"FW8004D-125500", "FW8004D-112534", "FW8004D-112548", "FW8004D-112549", "FW8004D-1129", "FW8004D-125", "FW8004D-125382", "FW8004D-125383"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8004D", QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingCoalInventorySocietyProcessor 炼焦煤库存-全社会 type CokingCoalInventorySocietyProcessor struct { BaseProcessor } func (p *CokingCoalInventorySocietyProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "79", CheckedDims: map[string][]string{ "product_item_code": {"FW8005D-1"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8005D", QuotaName: "stock,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingCoalInventoryProductionProcessor 炼焦煤库存-生产企业 type CokingCoalInventoryProductionProcessor struct { BaseProcessor } func (p *CokingCoalInventoryProductionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "116", CheckedDims: map[string][]string{ "product_item_code": {"FW8005D-2"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8005D", QuotaName: "stock,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingCoalInventoryDownstreamProcessor 炼焦煤库存-下游企业 type CokingCoalInventoryDownstreamProcessor struct { BaseProcessor } func (p *CokingCoalInventoryDownstreamProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "117", CheckedDims: map[string][]string{ "product_item_code": {"FW8005D-3", "FW8005D-5"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8005D", QuotaName: "stock,monthly_value,inventory_index,week_value", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // NationalCoalMineInventoryProcessor 全国煤矿库存 type NationalCoalMineInventoryProcessor struct { BaseProcessor } func (p *NationalCoalMineInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{}, DateRange: "20190820-" + currentTime, ProductCode: "FW8001D", QuotaName: "monthly_value", SplitTypeKey: "", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // StateOwnedKeyCoalMineInventoryProcessor 国有重点煤矿库存 type StateOwnedKeyCoalMineInventoryProcessor struct { BaseProcessor } func (p *StateOwnedKeyCoalMineInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "2", "27", "28"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW8003D", QuotaName: "monthly_value", SplitTypeKey: "province", IsTotal: 0, DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokeInventoryProcessor 焦炭库存 type CokeInventoryProcessor struct { BaseProcessor } func (p *CokeInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "product_item_code": {"FW1405D-1", "FW1405D-2", "FW1405D-3", "FW1405D-4", "FW1405D-5", "FW1405D-6", "FW1405D-7"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW1405D", QuotaName: "stock,inventory_index", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // PortDataInventoryNorthernPortProcessor 港口数据-库存-北方港口 type PortDataInventoryNorthernPortProcessor struct { BaseProcessor } func (p *PortDataInventoryNorthernPortProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "79", CheckedDims: map[string][]string{ "code": {"2332", "2333", "2335", "2334", "2337", "2339", "2340", "2341", "2342"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW1203D", QuotaName: "stock", SplitTypeKey: "", IsTotal: 0, DataType: nil, Type: 2, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // PortDataInventoryInlandPortProcessor 港口数据-库存-江内港口 type PortDataInventoryInlandPortProcessor struct { BaseProcessor } func (p *PortDataInventoryInlandPortProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "79", CheckedDims: map[string][]string{ "code": {"2321", "2320", "2324", "2323", "2322", "2325"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW1203D", QuotaName: "stock", SplitTypeKey: "product_item_code", IsTotal: 0, DataType: nil, Type: 2, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // PortDataDispatchNorthernPortProcessor 港口数据-调度-北方港口 type PortDataDispatchNorthernPortProcessor struct { BaseProcessor } func (p *PortDataDispatchNorthernPortProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "120", CheckedDims: map[string][]string{ "code": {"2364", "2365", "2366", "2363", "2367", "2368"}, "port": {"2", "4", "7", "9", "11", "326", "327", "329", "330"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW1203D", QuotaName: "vehicle,ship,tons", SplitTypeKey: "product_item_code,port", IsTotal: 1, DataType: nil, Type: 2, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // PortDataThroughputProcessor 港口数据-运量 type PortDataThroughputProcessor struct { BaseProcessor } func (p *PortDataThroughputProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: "30", CheckedDims: map[string][]string{ "code": {"2362"}, "port_son": {"44", "43", "42", "41", "40", "39"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW1203D", QuotaName: "transport_volume", SplitTypeKey: "port_son", IsTotal: 0, DataType: nil, Type: 2, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // DaqinLineDailyThroughputProcessor 大秦线日运量 type DaqinLineDailyThroughputProcessor struct { BaseProcessor } func (p *DaqinLineDailyThroughputProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{}, DateRange: "20190820-" + currentTime, ProductCode: "FW1107D", QuotaName: "stock", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // ThermalCoalPortPriceProcessor 动力煤港口价格 type ThermalCoalPortPriceProcessor struct { BaseProcessor } func (p *ThermalCoalPortPriceProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "product_item_code": {"FW2001P-1001", "FW2001P-1002", "FW2001P-1004", "FW2001P-1005", "FW2001P-1003", "FW2001P-1171"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW2310R", QuotaName: "price_rmb,price_index_mom", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // ThermalCoalConsumptionProcessor 动力煤消费量 type ThermalCoalConsumptionProcessor struct { BaseProcessor } func (p *ThermalCoalConsumptionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{ "product_item_code": {"FW5002D-1", "FW5002D-2", "FW5002D-3", "FW5002D-4", "FW5002D-5", "FW5002D-6", "FW5002D-7"}, }, DateRange: "20190820-" + currentTime, ProductCode: "FW5002D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } } // CokingCleanCoalConsumptionProcessor 炼焦精煤消费量 type CokingCleanCoalConsumptionProcessor struct { BaseProcessor } func (p *CokingCleanCoalConsumptionProcessor) GenerateRequestParams(currentTime string) map[string]string { params := models.RequestParams{ Category: nil, CheckedDims: map[string][]string{}, DateRange: "20190820-" + currentTime, ProductCode: "FW5001D", QuotaName: "monthly_value,monthly_accumulation", SplitTypeKey: "", DataType: nil, IsSeason: 1, } // 将结构体转换为 JSON 字符串 paramsJSON, _ := json.Marshal(params) // 返回为 map[string]string 类型 return map[string]string{ "params": string(paramsJSON), } }