``增加跳列功能
This commit is contained in:
@@ -78,6 +78,11 @@ namespace TempTask.WebEntry.ApiController.Dto
|
||||
/// 跳过行 集合 行留空
|
||||
/// </summary>
|
||||
public List<int> skip_rows { get; set; }
|
||||
/// <summary>
|
||||
/// 跳过行 集合 行留空
|
||||
/// </summary>
|
||||
public List<string> skip_columns { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -85,7 +85,6 @@ namespace TempTask.WebEntry.Tools
|
||||
int current_skip_count = 0;
|
||||
for (int i = 0; i < sheet_item.null_row_count; i++)
|
||||
{
|
||||
|
||||
var c_rowindex = startRowIndex + i;
|
||||
if (sheet_item.skip_rows != null && sheet_item.skip_rows.Contains(c_rowindex + 1))
|
||||
{
|
||||
@@ -101,10 +100,13 @@ namespace TempTask.WebEntry.Tools
|
||||
}
|
||||
else
|
||||
{
|
||||
var column_letter = App.Configuration[$"column_name_match_{excelTypeInt}_{sheet_item.sheet_no}:{ x.ToExcelColumnName()}"];
|
||||
if (string.IsNullOrWhiteSpace(column_letter))
|
||||
var column_letter = x.ToExcelColumnName();
|
||||
if (sheet_item.skip_columns != null && sheet_item.skip_columns.Contains(column_letter))
|
||||
continue;
|
||||
var jtoken = datas[i - current_skip_count][column_letter];
|
||||
var api_column_name = App.Configuration[$"column_name_match_{excelTypeInt}_{sheet_item.sheet_no}:{ x.ToExcelColumnName()}"];
|
||||
if (string.IsNullOrWhiteSpace(api_column_name))
|
||||
continue;
|
||||
var jtoken = datas[i - current_skip_count][api_column_name];
|
||||
var cellvalue = string.Empty;
|
||||
if (jtoken.Type == JTokenType.Null)
|
||||
cellvalue = "/";
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 27,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/totalKeyRate?months={year}{_month}&week={week2}",
|
||||
"skip_rows": [ 10, 12 ]
|
||||
"skip_rows": [ 10, 12 ],
|
||||
|
||||
},
|
||||
{
|
||||
"sheet_no": 2,
|
||||
@@ -51,7 +52,8 @@
|
||||
"null_row_count": 14,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 27,
|
||||
"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}"
|
||||
"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}",
|
||||
//"skip_columns": [ "J", "S" ]
|
||||
},
|
||||
{
|
||||
"sheet_no": 3,
|
||||
@@ -93,7 +95,8 @@
|
||||
"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&months={year}{_month}&week={week2}"
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/areaKeyRate1?type=101,102,103&months={year}{_month}&week={week2}",
|
||||
//"skip_columns": [ "P", "S" ]
|
||||
},
|
||||
{
|
||||
"sheet_no": 3,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user