diff --git a/20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs b/20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs index 87a8280..963f331 100644 --- a/20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs +++ b/20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs @@ -52,6 +52,7 @@ namespace TempTask.WebEntry.Tools try { var _month = month.ToString().Length == 1 ? ("0" + month) : month.ToString(); + var week2 = week < 10 ? ("0" + week) : week.ToString(); int excelTypeInt = (int)excelType; string template_name = EnumHelper.GetEnumDescription(excelType); string excelFilePath = $"{App.WebHostEnvironment.WebRootPath}\\ExcelTemplate\\{template_name}"; @@ -75,7 +76,7 @@ namespace TempTask.WebEntry.Tools //{ // sheet = workbook.GetSheet(sheet_name.Value); //} - var api_result = HttpHelper.CallUrl(sheet_item.url, $"months={year}{_month}&w={week}"); + var api_result = HttpHelper.CallUrl(sheet_item.url.Replace("{year}", year.ToString()).Replace("{_month}", _month).Replace("{week}", week.ToString()).Replace("{week2}", week2), ""); var obj = JObject.Parse(api_result); var datas = obj["data"] as JArray; //从第几行开始 , 比如 行号是4 , 就写3 diff --git a/20220313_Excel/TempTask.WebEntry/urlconfig.json b/20220313_Excel/TempTask.WebEntry/urlconfig.json index 7647551..e550536 100644 --- a/20220313_Excel/TempTask.WebEntry/urlconfig.json +++ b/20220313_Excel/TempTask.WebEntry/urlconfig.json @@ -17,7 +17,7 @@ "null_row_count": 12, "start_cell": "B", "null_cell_count": 27, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/totalKeyRate", + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/totalKeyRate?months={year}{_month}&week={week2}", "skip_rows": [ 10, 12 ] }, { @@ -27,7 +27,7 @@ "null_row_count": 4, "start_cell": "B", "null_cell_count": 19, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/projectByALL" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/projectByALL?months={year}{_month}&w={week}" } ] }, @@ -42,7 +42,7 @@ "null_row_count": 8, "start_cell": "D", "null_cell_count": 27, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityUpdateKeyRate" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityUpdateKeyRate?months={year}{_month}&week={week2}" }, { "sheet_no": 2, @@ -51,7 +51,7 @@ "null_row_count": 14, "start_cell": "B", "null_cell_count": 24, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate1?type=104,105,106,107,108,109" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate1?type=104,105,106,107,108,109&months={year}{_month}&week={week2}" }, { "sheet_no": 3, @@ -60,7 +60,7 @@ "null_row_count": 6, "start_cell": "C", "null_cell_count": 20, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByInd" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByInd?months={year}{_month}&w={week}" }, { "sheet_no": 4, @@ -69,7 +69,7 @@ "null_row_count": 14, "start_cell": "B", "null_cell_count": 20, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByArea" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByArea?months={year}{_month}&w={week}" } ] }, @@ -84,7 +84,7 @@ "null_row_count": 7, "start_cell": "D", "null_cell_count": 27, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseInvestKeyRate" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseInvestKeyRate?months={year}{_month}&week={week2}" }, { "sheet_no": 2, @@ -93,7 +93,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 24, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate1?type=101,102,103" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate1?type=101,102,103&months={year}{_month}&week={week2}" }, { "sheet_no": 3, @@ -102,7 +102,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 12, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=301" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=301&months={year}{_month}&week={week2}" }, { "sheet_no": 4, @@ -111,7 +111,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 12, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=302" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=302&months={year}{_month}&week={week2}" }, { "sheet_no": 5, @@ -120,7 +120,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 12, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=401" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=401&months={year}{_month}&week={week2}" }, { "sheet_no": 6, @@ -129,7 +129,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 12, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=402" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=402&months={year}{_month}&week={week2}" }, { "sheet_no": 7, @@ -138,7 +138,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 12, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=403" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate2?type=403&months={year}{_month}&week={week2}" }, { "sheet_no": 8, @@ -147,7 +147,7 @@ "null_row_count": 4, "start_cell": "C", "null_cell_count": 20, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByInd" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByInd?months={year}{_month}&w={week}" }, { "sheet_no": 9, @@ -156,7 +156,7 @@ "null_row_count": 13, "start_cell": "B", "null_cell_count": 20, - "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByArea" + "url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByArea?months={year}{_month}&w={week}" } ] } diff --git a/20220313_Excel/TempTask.WebEntry/wwwroot/ExcelTemplate/住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx b/20220313_Excel/TempTask.WebEntry/wwwroot/ExcelTemplate/住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx index 078f9ec..16f5e11 100644 Binary files a/20220313_Excel/TempTask.WebEntry/wwwroot/ExcelTemplate/住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx and b/20220313_Excel/TempTask.WebEntry/wwwroot/ExcelTemplate/住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx differ