Commit aae2e5af by wyc

费用类别及系数配置(为空时赋20条空数据)

parent 57d3eaa9
...@@ -1229,22 +1229,25 @@ public HandsonTableBase GetDrugtypeFactorConfig(int hospitalId, int allotId) ...@@ -1229,22 +1229,25 @@ public HandsonTableBase GetDrugtypeFactorConfig(int hospitalId, int allotId)
} }
#endregion #endregion
if (data.Count <= 0) if (!data.Any() == true)
{ {
Dictionary<string, object> dict = new Dictionary<string, object> for (int i = 0; i < 20; i++)
{
Dictionary<string, object> dict = new Dictionary<string, object>
{ {
{ "Charge", "" }, { "Charge", "" },
{ "ChargeType", "" } { "ChargeType", "" }
}; };
foreach (var model in models) foreach (var model in models)
{
foreach (var column in defaultColumns)
{ {
dict.Add(column.Value + $"_{model.Id}", ""); foreach (var column in defaultColumns)
{
dict.Add(column.Value + $"_{model.Id}", "");
}
} }
data.Add(dict);
} }
data.Add(dict);
} }
table.Columns = columns; table.Columns = columns;
table.NestedHeadersArray = new object[] { mergeCells, cells }; table.NestedHeadersArray = new object[] { mergeCells, cells };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment