processor_business_logic.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. // Package fenwei
  2. // @Author gmy 2024/8/20 14:47:00
  3. package fenwei
  4. import (
  5. "encoding/json"
  6. "eta/eta_data_analysis/models"
  7. )
  8. // ThermalCoalSupplyProcessor 动力煤供应量
  9. type ThermalCoalSupplyProcessor struct {
  10. BaseProcessor
  11. }
  12. func (p *ThermalCoalSupplyProcessor) GenerateRequestParams(currentTime string) map[string]string {
  13. params := models.RequestParams{
  14. Category: nil,
  15. CheckedDims: map[string][]string{
  16. "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"},
  17. },
  18. DateRange: "20190820-" + currentTime,
  19. ProductCode: "FW4002D",
  20. QuotaName: "monthly_value,monthly_accumulation",
  21. SplitTypeKey: "province",
  22. IsTotal: 0,
  23. DataType: nil,
  24. IsSeason: 1,
  25. }
  26. // 将结构体转换为 JSON 字符串
  27. paramsJSON, _ := json.Marshal(params)
  28. // 返回为 map[string]string 类型
  29. return map[string]string{
  30. "params": string(paramsJSON),
  31. }
  32. }
  33. // CokingCleanCoalSupplyProcessor 炼焦精煤供应量
  34. type CokingCleanCoalSupplyProcessor struct {
  35. BaseProcessor
  36. }
  37. func (p *CokingCleanCoalSupplyProcessor) GenerateRequestParams(currentTime string) map[string]string {
  38. params := models.RequestParams{
  39. Category: nil,
  40. CheckedDims: map[string][]string{
  41. "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"},
  42. "coal_type": {"13", "10", "9", "8", "7", "5", "3"},
  43. },
  44. DateRange: "20190820-" + currentTime,
  45. ProductCode: "FW4001D",
  46. QuotaName: "monthly_value,monthly_accumulation",
  47. SplitTypeKey: "coal_type",
  48. IsTotal: 0,
  49. DataType: nil,
  50. IsSeason: 1,
  51. }
  52. // 将结构体转换为 JSON 字符串
  53. paramsJSON, _ := json.Marshal(params)
  54. // 返回为 map[string]string 类型
  55. return map[string]string{
  56. "params": string(paramsJSON),
  57. }
  58. }
  59. // RawCoalProvinceProductionProcessor 原煤分省分煤种产量
  60. type RawCoalProvinceProductionProcessor struct {
  61. BaseProcessor
  62. }
  63. func (p *RawCoalProvinceProductionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  64. params := models.RequestParams{
  65. Category: nil,
  66. CheckedDims: map[string][]string{
  67. "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"},
  68. "coal_type": {"14", "6", "40", "21"},
  69. },
  70. DateRange: "20190820-" + currentTime,
  71. ProductCode: "FW3050D",
  72. QuotaName: "monthly_value,monthly_accumulation",
  73. SplitTypeKey: "coal_type",
  74. IsTotal: 0,
  75. DataType: nil,
  76. IsSeason: 1,
  77. }
  78. // 将结构体转换为 JSON 字符串
  79. paramsJSON, _ := json.Marshal(params)
  80. // 返回为 map[string]string 类型
  81. return map[string]string{
  82. "params": string(paramsJSON),
  83. }
  84. }
  85. // StateOwnedKeyCoalMineRawCoalProductionProcessor 国有重点煤矿原煤产量
  86. type StateOwnedKeyCoalMineRawCoalProductionProcessor struct {
  87. BaseProcessor
  88. }
  89. func (p *StateOwnedKeyCoalMineRawCoalProductionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  90. params := models.RequestParams{
  91. Category: nil,
  92. CheckedDims: map[string][]string{
  93. "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "2", "27", "28"},
  94. },
  95. DateRange: "20190820-" + currentTime,
  96. ProductCode: "FW3007D",
  97. QuotaName: "monthly_value,monthly_accumulation",
  98. SplitTypeKey: "province",
  99. IsTotal: 0,
  100. DataType: nil,
  101. IsSeason: 1,
  102. }
  103. // 将结构体转换为 JSON 字符串
  104. paramsJSON, _ := json.Marshal(params)
  105. // 返回为 map[string]string 类型
  106. return map[string]string{
  107. "params": string(paramsJSON),
  108. }
  109. }
  110. // CokingBituminousCoalProductionProcessor 炼焦烟煤分煤种产量
  111. type CokingBituminousCoalProductionProcessor struct {
  112. BaseProcessor
  113. }
  114. func (p *CokingBituminousCoalProductionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  115. params := models.RequestParams{
  116. Category: nil,
  117. CheckedDims: map[string][]string{
  118. "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"},
  119. "coal_type": {"13", "10", "9", "8", "7", "5", "3"},
  120. },
  121. DateRange: "20190820-" + currentTime,
  122. ProductCode: "FW3001D",
  123. QuotaName: "monthly_value,monthly_accumulation",
  124. SplitTypeKey: "coal_type",
  125. IsTotal: 0,
  126. DataType: nil,
  127. IsSeason: 1,
  128. }
  129. // 将结构体转换为 JSON 字符串
  130. paramsJSON, _ := json.Marshal(params)
  131. // 返回为 map[string]string 类型
  132. return map[string]string{
  133. "params": string(paramsJSON),
  134. }
  135. }
  136. // ThermalCoalInventorySocietyProcessor 动力煤库存-全社会
  137. type ThermalCoalInventorySocietyProcessor struct {
  138. BaseProcessor
  139. }
  140. func (p *ThermalCoalInventorySocietyProcessor) GenerateRequestParams(currentTime string) map[string]string {
  141. params := models.RequestParams{
  142. Category: "79",
  143. CheckedDims: map[string][]string{
  144. "product_item_code": {"FW8004D-1"},
  145. },
  146. DateRange: "20190820-" + currentTime,
  147. ProductCode: "FW8004D",
  148. QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value",
  149. SplitTypeKey: "",
  150. DataType: nil,
  151. IsSeason: 1,
  152. }
  153. // 将结构体转换为 JSON 字符串
  154. paramsJSON, _ := json.Marshal(params)
  155. // 返回为 map[string]string 类型
  156. return map[string]string{
  157. "params": string(paramsJSON),
  158. }
  159. }
  160. // ThermalCoalInventoryProductionProcessor 动力煤库存-生产企业
  161. type ThermalCoalInventoryProductionProcessor struct {
  162. BaseProcessor
  163. }
  164. func (p *ThermalCoalInventoryProductionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  165. params := models.RequestParams{
  166. Category: "116",
  167. CheckedDims: map[string][]string{
  168. "product_item_code": {"FW8004D-2"},
  169. },
  170. DateRange: "20190820-" + currentTime,
  171. ProductCode: "FW8004D",
  172. QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value",
  173. SplitTypeKey: "",
  174. DataType: nil,
  175. IsSeason: 1,
  176. }
  177. // 将结构体转换为 JSON 字符串
  178. paramsJSON, _ := json.Marshal(params)
  179. // 返回为 map[string]string 类型
  180. return map[string]string{
  181. "params": string(paramsJSON),
  182. }
  183. }
  184. // ThermalCoalInventorySixPowerPlantProcessor 动力煤库存-六大电厂
  185. type ThermalCoalInventorySixPowerPlantProcessor struct {
  186. BaseProcessor
  187. }
  188. func (p *ThermalCoalInventorySixPowerPlantProcessor) GenerateRequestParams(currentTime string) map[string]string {
  189. params := models.RequestParams{
  190. Category: "118",
  191. CheckedDims: map[string][]string{
  192. "product_item_code": {"FW8004D-125500", "FW8004D-112534", "FW8004D-112548", "FW8004D-112549", "FW8004D-1129", "FW8004D-125", "FW8004D-125382", "FW8004D-125383"},
  193. },
  194. DateRange: "20190820-" + currentTime,
  195. ProductCode: "FW8004D",
  196. QuotaName: "stock,avaliable_days,daily_consumption,monthly_value,inventory_index,week_value",
  197. SplitTypeKey: "",
  198. DataType: nil,
  199. IsSeason: 1,
  200. }
  201. // 将结构体转换为 JSON 字符串
  202. paramsJSON, _ := json.Marshal(params)
  203. // 返回为 map[string]string 类型
  204. return map[string]string{
  205. "params": string(paramsJSON),
  206. }
  207. }
  208. // CokingCoalInventorySocietyProcessor 炼焦煤库存-全社会
  209. type CokingCoalInventorySocietyProcessor struct {
  210. BaseProcessor
  211. }
  212. func (p *CokingCoalInventorySocietyProcessor) GenerateRequestParams(currentTime string) map[string]string {
  213. params := models.RequestParams{
  214. Category: "79",
  215. CheckedDims: map[string][]string{
  216. "product_item_code": {"FW8005D-1"},
  217. },
  218. DateRange: "20190820-" + currentTime,
  219. ProductCode: "FW8005D",
  220. QuotaName: "stock,monthly_value,inventory_index,week_value",
  221. SplitTypeKey: "",
  222. DataType: nil,
  223. IsSeason: 1,
  224. }
  225. // 将结构体转换为 JSON 字符串
  226. paramsJSON, _ := json.Marshal(params)
  227. // 返回为 map[string]string 类型
  228. return map[string]string{
  229. "params": string(paramsJSON),
  230. }
  231. }
  232. // CokingCoalInventoryProductionProcessor 炼焦煤库存-生产企业
  233. type CokingCoalInventoryProductionProcessor struct {
  234. BaseProcessor
  235. }
  236. func (p *CokingCoalInventoryProductionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  237. params := models.RequestParams{
  238. Category: "116",
  239. CheckedDims: map[string][]string{
  240. "product_item_code": {"FW8005D-2"},
  241. },
  242. DateRange: "20190820-" + currentTime,
  243. ProductCode: "FW8005D",
  244. QuotaName: "stock,monthly_value,inventory_index,week_value",
  245. SplitTypeKey: "",
  246. DataType: nil,
  247. IsSeason: 1,
  248. }
  249. // 将结构体转换为 JSON 字符串
  250. paramsJSON, _ := json.Marshal(params)
  251. // 返回为 map[string]string 类型
  252. return map[string]string{
  253. "params": string(paramsJSON),
  254. }
  255. }
  256. // CokingCoalInventoryDownstreamProcessor 炼焦煤库存-下游企业
  257. type CokingCoalInventoryDownstreamProcessor struct {
  258. BaseProcessor
  259. }
  260. func (p *CokingCoalInventoryDownstreamProcessor) GenerateRequestParams(currentTime string) map[string]string {
  261. params := models.RequestParams{
  262. Category: "117",
  263. CheckedDims: map[string][]string{
  264. "product_item_code": {"FW8005D-3", "FW8005D-5"},
  265. },
  266. DateRange: "20190820-" + currentTime,
  267. ProductCode: "FW8005D",
  268. QuotaName: "stock,monthly_value,inventory_index,week_value",
  269. SplitTypeKey: "",
  270. DataType: nil,
  271. IsSeason: 1,
  272. }
  273. // 将结构体转换为 JSON 字符串
  274. paramsJSON, _ := json.Marshal(params)
  275. // 返回为 map[string]string 类型
  276. return map[string]string{
  277. "params": string(paramsJSON),
  278. }
  279. }
  280. // NationalCoalMineInventoryProcessor 全国煤矿库存
  281. type NationalCoalMineInventoryProcessor struct {
  282. BaseProcessor
  283. }
  284. func (p *NationalCoalMineInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string {
  285. params := models.RequestParams{
  286. Category: nil,
  287. CheckedDims: map[string][]string{},
  288. DateRange: "20190820-" + currentTime,
  289. ProductCode: "FW8001D",
  290. QuotaName: "monthly_value",
  291. SplitTypeKey: "",
  292. IsTotal: 0,
  293. DataType: nil,
  294. IsSeason: 1,
  295. }
  296. // 将结构体转换为 JSON 字符串
  297. paramsJSON, _ := json.Marshal(params)
  298. // 返回为 map[string]string 类型
  299. return map[string]string{
  300. "params": string(paramsJSON),
  301. }
  302. }
  303. // StateOwnedKeyCoalMineInventoryProcessor 国有重点煤矿库存
  304. type StateOwnedKeyCoalMineInventoryProcessor struct {
  305. BaseProcessor
  306. }
  307. func (p *StateOwnedKeyCoalMineInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string {
  308. params := models.RequestParams{
  309. Category: nil,
  310. CheckedDims: map[string][]string{
  311. "province": {"20", "16", "21", "6", "19", "23", "8", "1", "7", "17", "9", "15", "11", "22", "24", "4", "25", "12", "14", "13", "2", "27", "28"},
  312. },
  313. DateRange: "20190820-" + currentTime,
  314. ProductCode: "FW8003D",
  315. QuotaName: "monthly_value",
  316. SplitTypeKey: "province",
  317. IsTotal: 0,
  318. DataType: nil,
  319. IsSeason: 1,
  320. }
  321. // 将结构体转换为 JSON 字符串
  322. paramsJSON, _ := json.Marshal(params)
  323. // 返回为 map[string]string 类型
  324. return map[string]string{
  325. "params": string(paramsJSON),
  326. }
  327. }
  328. // CokeInventoryProcessor 焦炭库存
  329. type CokeInventoryProcessor struct {
  330. BaseProcessor
  331. }
  332. func (p *CokeInventoryProcessor) GenerateRequestParams(currentTime string) map[string]string {
  333. params := models.RequestParams{
  334. Category: nil,
  335. CheckedDims: map[string][]string{
  336. "product_item_code": {"FW1405D-1", "FW1405D-2", "FW1405D-3", "FW1405D-4", "FW1405D-5", "FW1405D-6", "FW1405D-7"},
  337. },
  338. DateRange: "20190820-" + currentTime,
  339. ProductCode: "FW1405D",
  340. QuotaName: "stock,inventory_index",
  341. SplitTypeKey: "",
  342. DataType: nil,
  343. IsSeason: 1,
  344. }
  345. // 将结构体转换为 JSON 字符串
  346. paramsJSON, _ := json.Marshal(params)
  347. // 返回为 map[string]string 类型
  348. return map[string]string{
  349. "params": string(paramsJSON),
  350. }
  351. }
  352. // PortDataInventoryNorthernPortProcessor 港口数据-库存-北方港口
  353. type PortDataInventoryNorthernPortProcessor struct {
  354. BaseProcessor
  355. }
  356. func (p *PortDataInventoryNorthernPortProcessor) GenerateRequestParams(currentTime string) map[string]string {
  357. params := models.RequestParams{
  358. Category: "79",
  359. CheckedDims: map[string][]string{
  360. "code": {"2332", "2333", "2335", "2334", "2337", "2339", "2340", "2341", "2342"},
  361. },
  362. DateRange: "20190820-" + currentTime,
  363. ProductCode: "FW1203D",
  364. QuotaName: "stock",
  365. SplitTypeKey: "",
  366. IsTotal: 0,
  367. DataType: nil,
  368. Type: 2,
  369. IsSeason: 1,
  370. }
  371. // 将结构体转换为 JSON 字符串
  372. paramsJSON, _ := json.Marshal(params)
  373. // 返回为 map[string]string 类型
  374. return map[string]string{
  375. "params": string(paramsJSON),
  376. }
  377. }
  378. // PortDataInventoryInlandPortProcessor 港口数据-库存-江内港口
  379. type PortDataInventoryInlandPortProcessor struct {
  380. BaseProcessor
  381. }
  382. func (p *PortDataInventoryInlandPortProcessor) GenerateRequestParams(currentTime string) map[string]string {
  383. params := models.RequestParams{
  384. Category: "79",
  385. CheckedDims: map[string][]string{
  386. "code": {"2321", "2320", "2324", "2323", "2322", "2325"},
  387. },
  388. DateRange: "20190820-" + currentTime,
  389. ProductCode: "FW1203D",
  390. QuotaName: "stock",
  391. SplitTypeKey: "product_item_code",
  392. IsTotal: 0,
  393. DataType: nil,
  394. Type: 2,
  395. IsSeason: 1,
  396. }
  397. // 将结构体转换为 JSON 字符串
  398. paramsJSON, _ := json.Marshal(params)
  399. // 返回为 map[string]string 类型
  400. return map[string]string{
  401. "params": string(paramsJSON),
  402. }
  403. }
  404. // PortDataDispatchNorthernPortProcessor 港口数据-调度-北方港口
  405. type PortDataDispatchNorthernPortProcessor struct {
  406. BaseProcessor
  407. }
  408. func (p *PortDataDispatchNorthernPortProcessor) GenerateRequestParams(currentTime string) map[string]string {
  409. params := models.RequestParams{
  410. Category: "120",
  411. CheckedDims: map[string][]string{
  412. "code": {"2364", "2365", "2366", "2363", "2367", "2368"},
  413. "port": {"2", "4", "7", "9", "11", "326", "327", "329", "330"},
  414. },
  415. DateRange: "20190820-" + currentTime,
  416. ProductCode: "FW1203D",
  417. QuotaName: "vehicle,ship,tons",
  418. SplitTypeKey: "product_item_code,port",
  419. IsTotal: 1,
  420. DataType: nil,
  421. Type: 2,
  422. IsSeason: 1,
  423. }
  424. // 将结构体转换为 JSON 字符串
  425. paramsJSON, _ := json.Marshal(params)
  426. // 返回为 map[string]string 类型
  427. return map[string]string{
  428. "params": string(paramsJSON),
  429. }
  430. }
  431. // PortDataThroughputProcessor 港口数据-运量
  432. type PortDataThroughputProcessor struct {
  433. BaseProcessor
  434. }
  435. func (p *PortDataThroughputProcessor) GenerateRequestParams(currentTime string) map[string]string {
  436. params := models.RequestParams{
  437. Category: "30",
  438. CheckedDims: map[string][]string{
  439. "code": {"2362"},
  440. "port_son": {"44", "43", "42", "41", "40", "39"},
  441. },
  442. DateRange: "20190820-" + currentTime,
  443. ProductCode: "FW1203D",
  444. QuotaName: "transport_volume",
  445. SplitTypeKey: "port_son",
  446. IsTotal: 0,
  447. DataType: nil,
  448. Type: 2,
  449. IsSeason: 1,
  450. }
  451. // 将结构体转换为 JSON 字符串
  452. paramsJSON, _ := json.Marshal(params)
  453. // 返回为 map[string]string 类型
  454. return map[string]string{
  455. "params": string(paramsJSON),
  456. }
  457. }
  458. // DaqinLineDailyThroughputProcessor 大秦线日运量
  459. type DaqinLineDailyThroughputProcessor struct {
  460. BaseProcessor
  461. }
  462. func (p *DaqinLineDailyThroughputProcessor) GenerateRequestParams(currentTime string) map[string]string {
  463. params := models.RequestParams{
  464. Category: nil,
  465. CheckedDims: map[string][]string{},
  466. DateRange: "20190820-" + currentTime,
  467. ProductCode: "FW1107D",
  468. QuotaName: "stock",
  469. SplitTypeKey: "",
  470. DataType: nil,
  471. IsSeason: 1,
  472. }
  473. // 将结构体转换为 JSON 字符串
  474. paramsJSON, _ := json.Marshal(params)
  475. // 返回为 map[string]string 类型
  476. return map[string]string{
  477. "params": string(paramsJSON),
  478. }
  479. }
  480. // ThermalCoalPortPriceProcessor 动力煤港口价格
  481. type ThermalCoalPortPriceProcessor struct {
  482. BaseProcessor
  483. }
  484. func (p *ThermalCoalPortPriceProcessor) GenerateRequestParams(currentTime string) map[string]string {
  485. params := models.RequestParams{
  486. Category: nil,
  487. CheckedDims: map[string][]string{
  488. "product_item_code": {"FW2001P-1001", "FW2001P-1002", "FW2001P-1004", "FW2001P-1005", "FW2001P-1003", "FW2001P-1171"},
  489. },
  490. DateRange: "20190820-" + currentTime,
  491. ProductCode: "FW2310R",
  492. QuotaName: "price_rmb,price_index_mom",
  493. SplitTypeKey: "",
  494. DataType: nil,
  495. IsSeason: 1,
  496. }
  497. // 将结构体转换为 JSON 字符串
  498. paramsJSON, _ := json.Marshal(params)
  499. // 返回为 map[string]string 类型
  500. return map[string]string{
  501. "params": string(paramsJSON),
  502. }
  503. }
  504. // ThermalCoalConsumptionProcessor 动力煤消费量
  505. type ThermalCoalConsumptionProcessor struct {
  506. BaseProcessor
  507. }
  508. func (p *ThermalCoalConsumptionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  509. params := models.RequestParams{
  510. Category: nil,
  511. CheckedDims: map[string][]string{
  512. "product_item_code": {"FW5002D-1", "FW5002D-2", "FW5002D-3", "FW5002D-4", "FW5002D-5", "FW5002D-6", "FW5002D-7"},
  513. },
  514. DateRange: "20190820-" + currentTime,
  515. ProductCode: "FW5002D",
  516. QuotaName: "monthly_value,monthly_accumulation",
  517. SplitTypeKey: "",
  518. DataType: nil,
  519. IsSeason: 1,
  520. }
  521. // 将结构体转换为 JSON 字符串
  522. paramsJSON, _ := json.Marshal(params)
  523. // 返回为 map[string]string 类型
  524. return map[string]string{
  525. "params": string(paramsJSON),
  526. }
  527. }
  528. // CokingCleanCoalConsumptionProcessor 炼焦精煤消费量
  529. type CokingCleanCoalConsumptionProcessor struct {
  530. BaseProcessor
  531. }
  532. func (p *CokingCleanCoalConsumptionProcessor) GenerateRequestParams(currentTime string) map[string]string {
  533. params := models.RequestParams{
  534. Category: nil,
  535. CheckedDims: map[string][]string{},
  536. DateRange: "20190820-" + currentTime,
  537. ProductCode: "FW5001D",
  538. QuotaName: "monthly_value,monthly_accumulation",
  539. SplitTypeKey: "",
  540. DataType: nil,
  541. IsSeason: 1,
  542. }
  543. // 将结构体转换为 JSON 字符串
  544. paramsJSON, _ := json.Marshal(params)
  545. // 返回为 map[string]string 类型
  546. return map[string]string{
  547. "params": string(paramsJSON),
  548. }
  549. }