Commit a7bc1fc7 by 钟博

Merge branch '优化录入' into 大屏优化录入

# Conflicts:
#	performance/Performance.Services/ConfigService.cs
#	performance/Performance.Services/EmployeeService.cs
parents 4030fe47 08dabd96
......@@ -301,6 +301,36 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 获取收入费用类别
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("GetDrugtypeHands")]
[HttpPost]
public ApiResponse GetDrugtypeHands([CustomizeValidator(RuleSet = "Select"), FromBody] DrugpropRequest request)
{
var list = _configService.GetDrugtypeHands(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 保存收入费用类别
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SaveDrugtypeHands/{allotId}")]
[HttpPost]
public ApiResponse SaveDrugtypeHands(int allotId, [FromBody] SaveConfigData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
_configService.SaveDrugtypeHands(allotId, request);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region cofagain
......@@ -411,6 +441,36 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
///获取工作量绩效配置(hands)
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("GetWorkItemHands")]
[HttpPost]
public ApiResponse GetWorkItemHands([CustomizeValidator(RuleSet = "Select"), FromBody] WorkItemRequest request)
{
var list = _configService.GetWorkItemHands(request.AllotID,request.Type);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 保存工作量绩效配置(hands)
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SaveWorkItemHands/{allotId}")]
[HttpPost]
public ApiResponse SaveWorkItemHands(int allotId, [FromBody] SaveConfigData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
_configService.SaveWorkItemHands(allotId, request);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region depttype
......@@ -466,6 +526,36 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 获取科室类别配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("GetDepttypeHands")]
[HttpPost]
public ApiResponse GetDepttypeHands([CustomizeValidator(RuleSet = "Select"), FromBody] DrugpropRequest request)
{
var list = _configService.GetDepttypeHands(request.AllotID);
return new ApiResponse(ResponseType.OK, "ok", list);
}
/// <summary>
/// 保存科室类别配置
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SaveDepttypeHands/{allotId}")]
[HttpPost]
public ApiResponse SaveDepttypeHands(int allotId, [FromBody] SaveConfigData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
_configService.SaveDepttypeHands(allotId, request);
return new ApiResponse(ResponseType.OK);
}
#endregion
#region cmi
......@@ -564,7 +654,7 @@ public ApiResponse GetHrpDeptHands([FromRoute] int hospitalId, int allotId)
/// <returns></returns>
[Route("savehrpdept/{hospitalId}/allot/{allotId}")]
[HttpPost]
public ApiResponse SaveHrpDept(int hospitalId, int allotId, [FromBody] SaveCollectData request)
public ApiResponse SaveHrpDept(int hospitalId, int allotId, [FromBody] SaveConfigData request)
{
if (hospitalId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "HospitalId无效");
......
......@@ -456,6 +456,38 @@ public ApiResponse<per_apr_amount> GetEmployeeMessage([FromBody] per_apr_amount
}
/// <summary>
/// 获取其他绩效信息
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[HttpPost("GetAprHands/{allotId}")]
public ApiResponse GetAprHands(int allotId)
{
if (allotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprHands(allotId,claim.GetUserId());
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 保存其他绩效信息
/// </summary>
/// <param name="HospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SaveAprHands/{allotId}")]
[HttpPost]
public ApiResponse SaveAprHands(int allotId, [FromBody] SaveConfigData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
employeeService.SaveAprHands(allotId, request);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 绩效类型字典
/// </summary>
/// <param name="allotId"></param>
......
......@@ -323,5 +323,62 @@ public ApiResponse Config([FromBody] ModModuleRequest request)
var configs = configService.GetHospitalconfigs(request.HospitalId.Value);
return new ApiResponse(ResponseType.OK, "绩效抽取数据地址!", configs);
}
/// <summary>
/// 绩效收入模板配置项列表
/// </summary>
/// <returns></returns>
[Route("GetItemHands")]
[HttpPost]
public ApiResponse GetItemHands([FromBody] ModModuleRequest request)
{
bool isSingle = false;
if (!configService.QueryHosConfigs(request.ModuleId.Value, ref isSingle, out int sheetType))
return new ApiResponse(ResponseType.Fail, "当前医院未配置地址");
if (sheetType == (int)SheetType.Income)
{
if (isSingle)
{
configService.AddItems(request.ModuleId.Value);
}
else
{
logger.LogInformation($"绩效收入模板配置项列表 : 请求地址 {options.HttpPost}modextract/items");
var http = new RestSharpHelper();
var url = http.SetUrl(options.HttpPost, "modextract/items");
var req = http.CreatePostRequest(JsonHelper.Serialize(request));
var res = http.GetResponse(url, req);
var ret = http.GetContent<ApiResponse>(res);
logger.LogInformation($"绩效收入模板配置项列表在{DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss完成请求")}");
}
}
request.SheetType = sheetType;
var list = configService.GetQueryItemHands(request);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 绩效收入模板配置项新增
/// </summary>
/// <returns></returns>
[Route("SaveItemHands/{ModuleId}")]
[HttpPost]
public ApiResponse SaveItemHands(int ModuleId, [FromBody] SaveItemData request)
{
if (ModuleId != 0)
{
configService.SaveItemHands(ModuleId, request);
return new ApiResponse(ResponseType.OK);
}
return new ApiResponse(ResponseType.ParameterError, "ModuleId 参数错误!");
}
}
}
......@@ -37,6 +37,36 @@ public ApiResponse GetPersons(int allotId)
}
/// <summary>
/// 获取员工记录
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[Route("GetPersonsHands/{allotId}/hosp/{hospitalId}")]
[HttpPost]
public ApiResponse GetPersonsHands(int allotId,int hospitalId)
{
var list = personService.GetPersonHands(allotId,hospitalId, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 保存员工信息
/// </summary>
/// <param name="HospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SavePersonHands/{allotId}/hosp/{HospitalId}")]
[HttpPost]
public ApiResponse SavePersonHands(int allotId,int HospitalId, [FromBody] SaveConfigData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
personService.SavePersonHands(allotId,HospitalId,request);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 新增员工信息
/// </summary>
/// <param name="request"></param>
......@@ -93,6 +123,19 @@ public ApiResponse GetDepartments(int hospitalId)
}
/// <summary>
/// 获取科室记录
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[Route("GetDepartmentHands/{hospitalId}")]
[HttpPost]
public ApiResponse GetDepartmentHands(int hospitalId)
{
var list = personService.GetDepartmentHands(hospitalId);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 新增科室信息
/// </summary>
/// <param name="request"></param>
......@@ -181,5 +224,22 @@ public ApiResponse DeptIncomeDetail([CustomizeValidator(RuleSet = "Select"), Fro
var data = personService.DeptIncomeDetail(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, data);
}
/// <summary>
/// 保存科室字典(hands)
/// </summary>
/// <param name="HospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("SaveDepartmentHands/{HospitalId}")]
[HttpPost]
public ApiResponse SaveDeptDicHands(int HospitalId, [FromBody] SaveConfigData request)
{
if (HospitalId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
personService.SaveDeptDicHands(HospitalId, request);
return new ApiResponse(ResponseType.OK);
}
}
}
......@@ -52,5 +52,18 @@ public ApiResponse SheetExport([FromBody]SheetExportRequest request)
return new ApiResponse(ResponseType.OK, exportData);
}
/// <summary>
/// sheet 数据详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("SheetExportHands")]
[HttpPost]
public ApiResponse SheetExportHands([FromBody] SheetExportRequest request)
{
var exportData = _sheetSevice.SheetExportHands(request.SheetID);
return new ApiResponse(ResponseType.OK, exportData);
}
}
}
......@@ -23,7 +23,9 @@ public HandsonTable(int sheetType, string[] cols, List<collect_permission> permi
public string[] ColHeaders { get; private set; }
public List<Dictionary<string, string>> Data => _data;
public HandsonColumn[] Columns { get; private set; }
public List<NestedHeaders>[] NestHeaders { get;set; }
public string SheetName { get; set; }
/// <summary>
///
/// </summary>
......@@ -133,7 +135,18 @@ public class NumericFormat
{
public string Pattern { get; set; }
}
public class NestedHeaders
{
public NestedHeaders(string label, int colspan)
{
Label = label;
Colspan = colspan;
}
public string Label { get; set; }
public int Colspan { get; set; } = 1;
}
public class DefalutHandsonHeader
{
public SheetType SheetType { get; set; }
......
......@@ -25,4 +25,20 @@ public class Deptdic
public int Id { get; set; }
public string AccountingUnit { get; set; }
}
public class DeptdicHands
{
public int HospitalId { get; set; }
public string HISDeptName { get; set; }
public string Department { get; set; }
public string OutDoctorAccounting { get; set; }
public string OutNurseAccounting { get; set; }
public string OutTechnicAccounting { get; set; }
public string InpatDoctorAccounting { get; set; }
public string InpatNurseAccounting { get; set; }
public string InpatTechnicAccounting { get; set; }
public string LogisticsAccounting { get; set; }
public string SpecialAccounting { get; set; }
public DateTime? CreateTime { get; set; }
}
}
......@@ -11,4 +11,19 @@ public class SaveCollectData
public string[] ColHeaders { get; set; }
public string[][] Data { get; set; }
}
public class SaveConfigData
{
public string[] ColHeaders { get; set; }
public string[][] Data { get; set; }
}
public class SaveItemData
{
public Nullable<int> HospitalId { get; set; }
public List<int> ExecuteType { get; set; }
public Nullable<int> SheetType { get; set; }
public string[] ColHeaders { get; set; }
public string[][] Data { get; set; }
}
}
......@@ -375,6 +375,74 @@ public bool DrugtypeDelete(DrugpropRequest request)
return _drugtypeRepository.Remove(entity);
}
public HandsonTable GetDrugtypeHands(int allotId)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, DrueType.Select(c => c.Value).ToArray(), DrueType.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
string[] costType = { "手术/麻醉费", "床位/护理费", "材料费", "治疗费", "化验费", "检查费", "药费", "体检费", "其他费", "新筛费", "疫苗费" };
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (column.Data == "费用类别")
{
column.Type = "autocomplete";
column.Source = costType;
}
}
}
var list = _drugtypeRepository.GetEntities(t => t.AllotID == allotId)?.OrderBy(c=>c.Charge);
if (list == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in DrueType
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
cells.Add(new HandsonCellData(nameof(item.ID), item.ID));
if (item.ChargeType == null)
{
cells.Add(new HandsonCellData(DrueType.First(c => c.Key == nameof(item.ChargeType)).Value, item.ChargeType));
}
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SaveDrugtypeHands(int allotId, SaveConfigData request)
{
var dicData = CreateDataRow(0,allotId, request, DrueType);
List<cof_drugtype> drugs = new List<cof_drugtype>();
foreach (var item in dicData)
{
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_drugtype>(json);
if (!string.IsNullOrEmpty(data.Charge))
{
drugs.Add(data);
}
}
_drugtypeRepository.Execute("delete from cof_drugtype where allotid = @allotid", new { allotId });
_drugtypeRepository.AddRange(drugs.ToArray());
}
#endregion
#region cof_workitem 工作量绩效
......@@ -438,6 +506,115 @@ public bool WorkItemkDelete(WorkItemRequest request)
return _workitemRepository.Remove(workyear);
}
public HandsonTable GetWorkItemHands(int allotId, int type)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, WorkConfig.Select(c => c.Value).ToArray(), WorkConfig.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
var headerArr = WorkHeader(allotId).Select(c => c.Value).ToArray();
string[] workType = { "药占比", "CMI", "工作量倾斜" };
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (column.Data == "工作量计算项")
{
column.Type = "autocomplete";
column.Source = headerArr;
}
if (column.Data == "类型")
{
column.Type = "autocomplete";
column.Source = workType;
}
}
}
var list = (type > 0)
? _workitemRepository.GetEntities(t => t.AllotID == allotId && t.Type == type)
: _workitemRepository.GetEntities(t => t.AllotID == allotId);
if (list == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list.OrderBy(c=>c.Item))
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in WorkConfig
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
cells.Add(new HandsonCellData(nameof(item.ID), item.ID));
switch (item.Type)
{
case 1:
cells.First(c => c.Value.ToString() == "1").Value="药占比";
break;
case 2:
cells.First(c => c.Value.ToString() == "2").Value="CMI";
break;
case 3:
cells.First(c => c.Value.ToString() == "3").Value="工作量倾斜";
break;
default:
cells.First(c => c.Value.ToString() == "0").Value="";
break;
}
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SaveWorkItemHands(int allotId, SaveConfigData request)
{
var dicData = CreateDataRow(0,allotId, request, WorkConfig);
List<cof_workitem> works = new List<cof_workitem>();
foreach (var item in dicData)
{
if (item.ContainsKey("Type"))
{
if (item.ContainsValue("药占比"))
{
item["Type"] = "1";
}
else if (item.ContainsValue("CMI"))
{
item["Type"] = "2";
}
else if (item.ContainsValue("工作量倾斜"))
{
item["Type"] = "3";
}
else
{
item["Type"] = "0";
}
}
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_workitem>(json);
if (!string.IsNullOrEmpty(data.Item))
{
works.Add(data);
}
}
_workitemRepository.Execute("delete from cof_workitem where allotid = @allotid", new { allotId });
_workitemRepository.AddRange(works.ToArray());
}
#endregion
#region cof_depttype 科室别配置
......@@ -503,6 +680,67 @@ public bool DepttypeDelete(DrugpropRequest request)
return perforCofdepttypeRepository.Remove(entity);
}
public HandsonTable GetDepttypeHands(int allotId)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, DeptConfig.Select(c => c.Value).ToArray(), DeptConfig.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
var list = perforCofdepttypeRepository.GetEntities(t => t.AllotID == allotId)?.OrderBy(c=>c.Charge);
if (list == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in DeptConfig
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
cells.Add(new HandsonCellData(nameof(item.ID), item.ID));
if (item.Charge == null)
{
cells.Add(new HandsonCellData(DeptConfig.First(c => c.Key == nameof(item.Charge)).Value, item.Charge));
}
if (item.ChargeType == null)
{
cells.Add(new HandsonCellData(DeptConfig.First(c => c.Key == nameof(item.Charge)).Value, item.Charge));
}
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SaveDepttypeHands(int allotId, SaveConfigData request)
{
var dicData = CreateDataRow(0,allotId, request, DeptConfig);
List<cof_depttype> depts = new List<cof_depttype>();
foreach (var item in dicData)
{
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_depttype>(json);
if (!string.IsNullOrEmpty(data.Charge))
{
depts.Add(data);
}
}
perforCofdepttypeRepository.Execute("delete from cof_depttype where allotid = @allotid", new { allotId });
perforCofdepttypeRepository.AddRange(depts.ToArray());
}
#endregion
#region cof_cmi cmi
......@@ -866,7 +1104,7 @@ public HandsonTable GetHrpDeptHands(int HospitalId,int AllotId)
return result;
}
public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData request)
public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request)
{
var dicData = CreateDataRow(hospitalId,allotId, request, HrpDept);
......@@ -888,7 +1126,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
perforCofHrpDeptRepository.AddRange(depts.ToArray());
}
private List<Dictionary<string, string>> CreateDataRow(int hospitalId, int allotId, SaveCollectData request, Dictionary<string, string> config)
private List<Dictionary<string, string>> CreateDataRow(int hospitalId, int allotId, SaveConfigData request, Dictionary<string, string> config)
{
List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>();
......@@ -898,13 +1136,15 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
Dictionary<string, string> baseData = CreateBaseData(request, config, r);
baseData.Add(nameof(cof_hrp_department.AllotId), allotId.ToString());
baseData.Add(nameof(cof_hrp_department.HospitalId),hospitalId.ToString());
baseData.Add(nameof(collect_data.AllotID), allotId.ToString());
allData.Add(baseData);
}
return allData;
}
private Dictionary<string, string> CreateBaseData(SaveCollectData request, Dictionary<string, string> config, int rownumber)
private Dictionary<string, string> CreateBaseData(SaveConfigData request, Dictionary<string, string> config, int rownumber)
{
Dictionary<string, string> result = new Dictionary<string, string>();
for (int c = 0; c < request.ColHeaders.Length; c++)
......@@ -927,6 +1167,25 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
{nameof(cof_hrp_department.HRPDepartment), "hrp人员科室"},
{nameof(cof_hrp_department.AccountingUnit), "核算单元"},
};
public static Dictionary<string, string> DrueType { get; } = new Dictionary<string, string>
{
{ nameof(cof_drugtype.Charge), "费用名称" },
{ nameof(cof_drugtype.ChargeType), "费用类别" }
};
public static Dictionary<string, string> DeptConfig { get; } = new Dictionary<string, string>
{
{ nameof(cof_depttype.Charge), "科室名称" },
{ nameof(cof_depttype.ChargeType), "科室类别" }
};
public static Dictionary<string, string> WorkConfig { get; } = new Dictionary<string, string>
{
{ nameof(cof_workitem.Item), "工作量计算项" },
{ nameof(cof_workitem.Type), "类型" }
};
///// <summary>
///// CMI值
///// </summary>
......
......@@ -690,5 +690,153 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
}
#endregion
public HandsonTable GetAprHands(int allotId, int userId)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, OrtherPerfDic.Select(c => c.Value).ToArray(), OrtherPerfDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (column.Data == "绩效类型")
{
column.Type = "autocomplete";
column.Source = new[] { "基础绩效", "管理绩效" };
column.Strict = false;
}
if (new[] { "状态", "备注" }.Contains(column.Data))
{
column.ReadOnly = true;
}
}
}
var list = GetAprList(allotId, userId);
if (list == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in OrtherPerfDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
var status = cells.First(c => c.Name == "状态");
switch (status.Value)
{
case "1":
status.Value = "未提交";
break;
case "2":
status.Value = "等待审核";
break;
case "3":
status.Value = "审核通过";
break;
case "4":
status.Value = "驳回";
break;
}
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SaveAprHands(int AllotId, SaveConfigData request)
{
var dicData = CreateDataRow(request, OrtherPerfDic);
List<per_apr_amount> empDics = new List<per_apr_amount>();
foreach (var dic in dicData)
{
if (dic.ContainsKey("Status"))
{
if (dic.ContainsValue("未提交"))
{
dic["Status"] = "1";
}
else if (dic.ContainsValue("等待审核"))
{
dic["Status"] = "2";
}
else if (dic.ContainsValue("审核通过"))
{
dic["Status"] = "3";
}
else
{
dic["Status"] = "4";
}
}
var json = JsonHelper.Serialize(dic);
var data = JsonHelper.Deserialize<per_apr_amount>(json);
if (!string.IsNullOrEmpty(data.DoctorName) || !string.IsNullOrEmpty(data.PersonnelNumber))
{
data.AllotId = AllotId;
data.CreateDate=Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
empDics.Add(data);
}
}
perapramountRepository.Execute("delete from per_apr_amount where AllotId = @AllotId", new { AllotId });
perapramountRepository.AddRange(empDics.ToArray());
}
private List<Dictionary<string, string>> CreateDataRow(SaveConfigData request, Dictionary<string, string> config)
{
List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>();
for (int r = 0; r < request.Data.Length; r++)
{
// 创建固定数据列
Dictionary<string, string> baseData = CreateBaseData(request, config, r);
//baseData.Add(nameof(collect_data), HospitalId.ToString());
allData.Add(baseData);
}
return allData;
}
private Dictionary<string, string> CreateBaseData(SaveConfigData request, Dictionary<string, string> config, int rownumber)
{
Dictionary<string, string> result = new Dictionary<string, string>();
for (int c = 0; c < request.ColHeaders.Length; c++)
{
var header = request.ColHeaders[c];
var first = config.FirstOrDefault(w => w.Value == header);
if (!default(KeyValuePair<string, string>).Equals(first)
&& !result.ContainsKey(header)
&& request.Data[rownumber].Length > c)
{
result.Add(first.Key, request.Data[rownumber][c]);
}
}
return result;
}
public static Dictionary<string, string> OrtherPerfDic { get; } = new Dictionary<string, string>
{
{ nameof(per_apr_amount.TypeInDepartment), "录入科室" },
{ nameof(per_apr_amount.AccountingUnit), "核算单元" },
{ nameof(per_apr_amount.PersonnelNumber), "人员工号" },
{ nameof(per_apr_amount.DoctorName), "姓名" },
{ nameof(per_apr_amount.PerforType), "绩效类型" },
{ nameof(per_apr_amount.Amount), "金额" },
{ nameof(per_apr_amount.Status), "状态" },
{ nameof(per_apr_amount.Remark), "备注" }
};
}
}
......@@ -66,18 +66,8 @@ ILogger<ExConfigService> logger
#region Modules
public List<ex_module> QueryModule(int hospitalId)
{
//首次添加费用字典默认值
DefaultModules(hospitalId);
var list = exmoduleRepository.GetEntities(t => t.HospitalId == hospitalId).OrderBy(t => t.ModuleName).ToList();
return list;
}
private void DefaultModules(int hospitalId)
{
var moduleList = new ex_module[]
private readonly ex_module[] moduleList = new ex_module[]
{
new ex_module{ ModuleName = "1.0.1 额外收入", SheetType = (int)SheetType.OtherIncome },
new ex_module{ ModuleName = "1.1.1 门诊开单收入", SheetType = (int)SheetType.Income },
......@@ -89,6 +79,18 @@ private void DefaultModules(int hospitalId)
new ex_module{ ModuleName = "3.2 护理组工作量绩效测算表", SheetType = (int)SheetType.Workload },
};
public List<ex_module> QueryModule(int hospitalId)
{
//首次添加费用字典默认值
DefaultModules(hospitalId);
var list = exmoduleRepository.GetEntities(t => t.HospitalId == hospitalId).OrderBy(t => t.ModuleName).ToList();
return list;
}
private void DefaultModules(int hospitalId)
{
var data = exmoduleRepository.GetEntities(t => t.HospitalId == hospitalId);
var inexistence = data == null ? moduleList : moduleList.Where(t => !data.Select(p => p.ModuleName).ToArray().Contains(t.ModuleName));
......@@ -290,6 +292,183 @@ public void DelItem(int itemId)
exitemRepository.Remove(item);
}
public HandsonTable GetQueryItemHands(ModModuleRequest request)
{
var DicType = new Dictionary<string, string>();
var module = exmoduleRepository.GetEntity(t => t.Id == request.ModuleId);
if (request.SheetType == (int)SheetType.Workload)
DicType = WorkLoadDic;
else if (request.SheetType==(int)SheetType.Income)
//else if (moduleList.Where(t=>t.SheetType == (int)SheetType.Income).Select(t=>t.ModuleName).Contains(module.ModuleName) )
DicType =OutDic;
else
DicType = CostDic;
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, DicType.Select(c => c.Value).ToArray(), DicType.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
var scheme = ExtractScheme(Convert.ToInt32(request.HospitalId), request.ExecuteType, 0);
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (new[]{"医生系数","护理系数","医技系数"}.Contains(column.Data))
{
column.Type = "numeric";
column.NumericFormat=new NumericFormat(){Pattern = "%"};
column.Strict = false;
}
if (column.Data=="单元工作量绩效标准")
{
column.Type = "numeric";
column.Strict = false;
}
if (column.Data == "自动提取规则(无法提取的考核项请勿填写)")
{
column.Type = "autocomplete";
column.Source = scheme?.Select(c => c.Title).ToArray();
column.Strict = false;
}
}
}
var list = exitemRepository.GetEntities(t => t.ModuleId == request.ModuleId)?.OrderBy(c=>c.ItemName);
if (list == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var typeId = scheme.Where(c => c.Value == item.TypeId.ToString());
if (typeId.Any())
firstDic["typeid"] = typeId.First().Title;
else
firstDic["typeid"] = "";
var cells = (from conf in DicType
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SaveItemHands(int ModuleId, SaveItemData request)
{
var entity = exmoduleRepository.GetEntity(t => t.Id == ModuleId);
if (entity == null)
throw new PerformanceException("选择的绩效抽取方案不存在!");
var dicData = CreateDataRow(ModuleId, request, CostDic);
List<ex_item> exItems = new List<ex_item>();
foreach (var item in dicData)
{
var dicValue =
ExtractScheme(Convert.ToInt32(request.HospitalId), request.ExecuteType, request.SheetType)
.Where(t => t.Title == item["TypeId"]);
if (dicValue.Any())
item["TypeId"] = dicValue.First().Value;
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<ex_item>(json);
if (!string.IsNullOrEmpty(data.ItemName))
{
data.ModuleId = ModuleId;
if (string.IsNullOrEmpty(data.FactorValue1.ToString()))
{
data.FactorValue1 = 0;
}
if (string.IsNullOrEmpty(data.FactorValue2.ToString()))
{
data.FactorValue2 = 0;
}
if (string.IsNullOrEmpty(data.FactorValue3.ToString()))
{
data.FactorValue3 = 0;
}
exItems.Add(data);
}
}
exitemRepository.Execute("delete from ex_item where ModuleId = @ModuleId", new { ModuleId });
exitemRepository.AddRange(exItems.ToArray());
}
private List<Dictionary<string, string>> CreateDataRow(int allotId, SaveItemData request, Dictionary<string, string> config)
{
List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>();
for (int r = 0; r < request.Data.Length; r++)
{
// 创建固定数据列
Dictionary<string, string> baseData = CreateBaseData(request, config, r);
baseData.Add(nameof(collect_data.AllotID), allotId.ToString());
allData.Add(baseData);
}
return allData;
}
private Dictionary<string, string> CreateBaseData(SaveItemData request, Dictionary<string, string> config, int rownumber)
{
Dictionary<string, string> result = new Dictionary<string, string>();
for (int c = 0; c < request.ColHeaders.Length; c++)
{
var header = request.ColHeaders[c];
var first = config.FirstOrDefault(w => w.Value == header);
if (!default(KeyValuePair<string, string>).Equals(first)
&& !result.ContainsKey(header)
&& request.Data[rownumber].Length > c)
{
result.Add(first.Key, request.Data[rownumber][c]);
}
}
return result;
}
public static Dictionary<string, string> CostDic { get; } = new Dictionary<string, string>
{
{ nameof(ex_item.ItemName), "绩效考核项" },
{ nameof(ex_item.FactorValue1), "医生系数" },
{ nameof(ex_item.FactorValue2), "护理系数" },
{ nameof(ex_item.FactorValue3), "医技系数" },
{ nameof(ex_item.TypeId), "自动提取规则(无法提取的考核项请勿填写)" }
};
public static Dictionary<string, string> OutDic { get; } = new Dictionary<string, string>
{
{ nameof(ex_item.ItemName), "绩效考核项" },
{ nameof(ex_item.FactorValue1), "医生系数" },
{ nameof(ex_item.FactorValue2), "护理系数" },
{ nameof(ex_item.FactorValue3), "医技系数" }
};
public static Dictionary<string, string> WorkLoadDic { get; } = new Dictionary<string, string>
{
{ nameof(ex_item.ItemName), "绩效考核项" },
{ nameof(ex_item.FactorValue1), "单元工作量绩效标准" },
{ nameof(ex_item.TypeId), "自动提取规则(无法提取的考核项请勿填写)" }
};
#endregion Items
#region 特殊科室
......
......@@ -568,5 +568,355 @@ public object DeptIncomeDetail(WorkDetailRequest request, int userId)
return new string[] { };
}
#region HandsTable
public HandsonTable GetDepartmentHands(int hospitalId)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, DeptDic.Select(c => c.Value).ToArray(), DeptDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (column.Data == "标准科室")
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 2).Select(c => c.Value).ToArray();
}
if (column.Data == "系统科室")
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 1).Select(c => c.Value).ToArray();
}
if (new[] { "住院·核算单元医生组", "住院·核算单元护理组", "住院·核算单元医技组", "门诊·核算单元医生组", "门诊·核算单元护理组", "门诊·核算单元医技组" }.Contains(column.Data))
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 3).Select(c => c.Value).ToArray();
}
if (column.Data == "行政后勤")
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 4).Select(c => c.Value).ToArray();
}
if (column.Data == "特殊核算组")
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 5).Select(c => c.Value).ToArray();
}
}
}
var getDept = GetDepartments(hospitalId).OrderBy(c => c.Department);
var rowDatas = DeptHandsonRowData(getDept);
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public HandsonTable GetPersonHands(int allotId, int hospitalId,int userId)
{
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, PersonDic.Select(c => c.Value).ToArray(), PersonDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
var deptdics = perdeptdicRepository.GetEntities(t => t.HospitalId == hospitalId);
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
if (column.Data == "核算单元")
{
column.Type = "autocomplete";
column.Source = deptdics?.Select(t => t.Department).Distinct().ToArray();
}
if (column.Data == "科室名称")
{
column.Type = "autocomplete";
column.Source = deptdics?
.Where(t => !new string[] {UnitType.行政后勤.ToString(), UnitType.特殊核算组.ToString()}.Contains(t.UnitType))
.Select(t => t.AccountingUnit).Distinct().ToArray();
}
if (column.Data == "人员类别")
{
column.Type = "autocomplete";
column.Source = deptdics?
.Where(t => !new string[] { UnitType.专家组.ToString() }.Contains(t.UnitType))
.Select(t => t.UnitType).Distinct().ToArray();
}
}
}
var list = peremployeeRepository.GetEntities(t => t.AllotId == allotId && t.HospitalId==hospitalId)?.OrderBy(c=>c.AccountingUnit);
if (list==null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in PersonDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public void SavePersonHands(int AllotId,int HospitalId, SaveConfigData request)
{
var dicData = CreateDataRow(AllotId, request, PersonDic);
List<per_employee> empDics = new List<per_employee>();
foreach (var dic in dicData)
{
var json = JsonHelper.Serialize(dic);
var data = JsonHelper.Deserialize<per_employee>(json);
if (!string.IsNullOrEmpty(data.Department) || !string.IsNullOrEmpty(data.AccountingUnit))
{
data.HospitalId = HospitalId;
data.AllotId = AllotId;
data.CreateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:dd"));
empDics.Add(data);
}
}
peremployeeRepository.Execute("delete from per_employee where AllotId = @AllotId", new { AllotId });
peremployeeRepository.AddRange(empDics.ToArray());
}
public void SaveDeptDicHands(int HospitalId, SaveConfigData request)
{
var dicData = CreateDataRow(HospitalId, request, DeptDic);
List<per_dept_dic> deptDics = new List<per_dept_dic>();
foreach (var dic in dicData)
{
var json = JsonHelper.Serialize(dic);
var data = JsonHelper.Deserialize<DeptdicHands>(json);
if (!string.IsNullOrEmpty(data.Department) || !string.IsNullOrEmpty(data.HISDeptName))
{
DeptDicList(HospitalId, deptDics, data);
}
}
perdeptdicRepository.Execute("delete from per_dept_dic where HospitalId = @HospitalId", new { HospitalId });
perdeptdicRepository.AddRange(deptDics.ToArray());
}
private List<HandsonRowData> DeptHandsonRowData(IEnumerable<DeptdicResponse> getDept)
{
if (getDept == null) return null;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in getDept)
{
DeptdicResponse tempDept = new DeptdicResponse()
{ Department = item.Department, HISDeptName = item.HISDeptName, HospitalId = item.HospitalId };
var temp = JsonHelper.Serialize(tempDept);
var tempDic = JsonHelper.Deserialize<Dictionary<string, Object>>(temp);
tempDic.Add(nameof(item.InpatNurseAccounting), item.InpatNurseAccounting.AccountingUnit);
tempDic.Add(nameof(item.InpatDoctorAccounting), item.InpatDoctorAccounting.AccountingUnit);
tempDic.Add(nameof(item.InpatTechnicAccounting), item.InpatTechnicAccounting.AccountingUnit);
tempDic.Add(nameof(item.OutNurseAccounting), item.OutNurseAccounting.AccountingUnit);
tempDic.Add(nameof(item.OutTechnicAccounting), item.OutTechnicAccounting.AccountingUnit);
tempDic.Add(nameof(item.OutDoctorAccounting), item.OutDoctorAccounting.AccountingUnit);
tempDic.Add(nameof(item.LogisticsAccounting), item.LogisticsAccounting.AccountingUnit); ;
tempDic.Add(nameof(item.SpecialAccounting), item.SpecialAccounting.AccountingUnit);
var cells = (from conf in DeptDic
join fst in tempDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
}
return rowDatas;
}
private List<Dictionary<string, string>> CreateDataRow(int HospitalId, SaveConfigData request, Dictionary<string, string> config)
{
List<Dictionary<string, string>> allData = new List<Dictionary<string, string>>();
for (int r = 0; r < request.Data.Length; r++)
{
// 创建固定数据列
Dictionary<string, string> baseData = CreateBaseData(request, config, r);
//baseData.Add(nameof(collect_data), HospitalId.ToString());
allData.Add(baseData);
}
return allData;
}
private Dictionary<string, string> CreateBaseData(SaveConfigData request, Dictionary<string, string> config, int rownumber)
{
Dictionary<string, string> result = new Dictionary<string, string>();
for (int c = 0; c < request.ColHeaders.Length; c++)
{
var header = request.ColHeaders[c];
var first = config.FirstOrDefault(w => w.Value == header);
if (!default(KeyValuePair<string, string>).Equals(first)
&& !result.ContainsKey(header)
&& request.Data[rownumber].Length > c)
{
result.Add(first.Key, request.Data[rownumber][c]);
}
}
return result;
}
private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHands data)
{
var nowTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
#region 住院
if (data.InpatDoctorAccounting != "" || data.InpatNurseAccounting != "" || data.InpatTechnicAccounting != "")
{
if (data.InpatDoctorAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "住院", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.InpatDoctorAccounting;
deptDic.UnitType = "医生组";
deptDics.Add(deptDic);
}
if (data.InpatNurseAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "住院", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.InpatNurseAccounting;
deptDic.UnitType = "护理组";
deptDics.Add(deptDic);
}
if (data.InpatTechnicAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "住院", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.InpatTechnicAccounting;
deptDic.UnitType = "医技组";
deptDics.Add(deptDic);
}
}
#endregion
#region 门诊
if (data.OutDoctorAccounting != "" || data.OutNurseAccounting != "" || data.OutTechnicAccounting != "")
{
if (data.OutDoctorAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "门诊", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.OutDoctorAccounting;
deptDic.UnitType = "医生组";
deptDics.Add(deptDic);
}
if (data.OutNurseAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "门诊", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.OutNurseAccounting;
deptDic.UnitType = "护理组";
deptDics.Add(deptDic);
}
if (data.OutTechnicAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "门诊", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
deptDic.AccountingUnit = data.OutTechnicAccounting;
deptDic.UnitType = "医技组";
deptDics.Add(deptDic);
}
}
#endregion
if (data.LogisticsAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic()
{
HospitalId = HospitalId,
Department = data.Department,
HISDeptName = data.HISDeptName,
CreateTime = nowTime,
AccountingUnit = data.LogisticsAccounting,
UnitType = "行政后勤"
};
deptDics.Add(deptDic);
}
if (data.SpecialAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic()
{
HospitalId = HospitalId,
Department = data.Department,
HISDeptName = data.HISDeptName,
CreateTime = nowTime,
AccountingUnit = data.LogisticsAccounting,
UnitType = "特殊核算组"
};
deptDics.Add(deptDic);
}
}
private static Dictionary<string, string> DeptDic { get; } = new Dictionary<string, string>
{
{ nameof(DeptdicResponse.Department), "标准科室" },
{ nameof(DeptdicResponse.HISDeptName), "系统科室" },
{ nameof(DeptdicResponse.OutDoctorAccounting), "门诊·核算单元医生组" },
{ nameof(DeptdicResponse.OutNurseAccounting), "门诊·核算单元护理组" },
{ nameof(DeptdicResponse.OutTechnicAccounting), "门诊·核算单元医技组" },
{ nameof(DeptdicResponse.InpatDoctorAccounting), "住院·核算单元医生组" },
{ nameof(DeptdicResponse.InpatNurseAccounting), "住院·核算单元护理组" },
{ nameof(DeptdicResponse.InpatTechnicAccounting), "住院·核算单元医技组" },
{ nameof(DeptdicResponse.LogisticsAccounting), "行政后勤" },
{ nameof(DeptdicResponse.SpecialAccounting), "特殊核算组" }
};
private static Dictionary<string, string> PersonDic { get; } = new Dictionary<string, string>
{
{nameof(per_employee.AccountingUnit), "核算单元"},
{nameof(per_employee.Department), "科室名称"},
{nameof(per_employee.DoctorName), "姓名"},
{nameof(per_employee.PersonnelNumber), "员工工号"},
{nameof(per_employee.JobCategory), "正式/临聘"},
{nameof(per_employee.Duty), "职务"},
{nameof(per_employee.JobTitle), "职称"},
{nameof(per_employee.UnitType), "人员类别"},
{nameof(per_employee.AttendanceDay), "出勤天数"},
{nameof(per_employee.EfficiencyNumber), "效率绩效人数"},
{nameof(per_employee.WorkTime), "参加工作时间"},
{nameof(per_employee.BirthDate), "出生年月"},
{nameof(per_employee.Age), "年龄"},
{nameof(per_employee.PermanentStaff), "核算单元人员数量"},
{nameof(per_employee.Remark), "备注"},
};
#endregion
}
}
......@@ -7,6 +7,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
namespace Performance.Services
{
......@@ -362,7 +363,7 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
if (list != null && list.Count() > 0)
{
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal
List<(string, Func<res_account, object>, int, int, bool, bool)> pairs =
List<(string, Func<res_account, object>, int, int, bool, bool)> AccountDic =
new List<(string, Func<res_account, object>, int, int, bool, bool)>
{
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false),
......@@ -386,7 +387,7 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
};
var row = new Row(0);
int index = 1;
foreach (var item in pairs)
foreach (var item in AccountDic)
{
row.Data.Add(new Cell(index, item.Item1, item.Item3, item.Item4, item.Item5, item.Item6));
index += 1;
......@@ -398,7 +399,7 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
var account = list.ElementAt(i);
var rowbody = new Row(i);
index = 1;
foreach (var item in pairs)
foreach (var item in AccountDic)
{
rowbody.Data.Add(new Cell(index, item.Item2.Invoke(account), item.Item3, item.Item4, item.Item5, item.Item6, id: account.ID));
index += 1;
......@@ -642,5 +643,705 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
}
return response;
}
#region Hands
public HandsonTable SheetExportHands(int sheetID)
{
var sheet = _perforImSheetRepository.GetEntity(t => t.ID == sheetID);
if (sheet == null)
throw new PerformanceException("参数sheetid无效");
HandsonTable handson = null;
if (sheet.SheetType == (int)SheetType.Employee)
{
handson = EmployeeHands(sheetID);
}
else if (sheet.SheetType == (int)SheetType.ClinicEmployee)
{
handson = ClinicEmployeeHands(sheetID);
}
else if (sheet.SheetType == (int)SheetType.LogisticsEmployee)
{
handson = LogisticsEmployeeHands(sheetID);
}
else if (sheet.SheetType == (int)SheetType.SpecialUnit)
{
handson = SpecialUnitHands(sheetID);
}
else if (sheet.SheetType == (int)SheetType.ComputeDoctorAccount)
{
handson = AccountDoctorHands(sheetID);
}
else if (sheet.SheetType == (int)SheetType.ComputeNurseAccount)
{
handson = AccountNurseHands(sheetID);
}
else
{
handson = CommonHands(sheetID);
}
handson.SheetName = sheet.SheetName;
return handson;
}
private HandsonTable EmployeeHands(int sheetId)
{
var pairs = PerSheetHeader.employeeHeaders;
Dictionary<string, string> empDic = new Dictionary<string, string>();
foreach (var item in pairs)
{
empDic.Add(item.Rest.Item1, item.Item1);
}
var handson = new HandsonTable((int)SheetType.Unidentifiable, empDic.Select(c => c.Value).ToArray(), empDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
if (new[] { "考核得分率", "出勤率", "调节系数" }.Contains(column.Data))
{
column.Type = "numeric";
column.NumericFormat = new NumericFormat() { Pattern = "0,00.00%" };
column.Strict = false;
}
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in empDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[] { nesteds };
var employeeList = _perforImEmployeeRepository.GetEntities(t => t.SheetID == sheetId)?
.OrderByDescending(t => t.AccountType)
.ThenBy(t => t.AccountingUnit);
if (employeeList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in employeeList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in empDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable ClinicEmployeeHands(int sheetId)
{
var pairs = PerSheetHeader.employeeClinicHeaders;
Dictionary<string, string> clinicEmpDic = new Dictionary<string, string>();
foreach (var item in pairs)
{
clinicEmpDic.Add(item.Rest.Item1, item.Item1);
}
var handson = new HandsonTable((int)SheetType.Unidentifiable, clinicEmpDic.Select(c => c.Value).ToArray(), clinicEmpDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
if (new[] { "效率绩效系数", "规模绩效系数", "管理绩效发放系数", "考核得分率", "出勤率", "调节系数" }.Contains(column.Data))
{
column.Type = "numeric";
column.NumericFormat = new NumericFormat() { Pattern = "0,00.00%" };
column.Strict = false;
}
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in clinicEmpDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[] { nesteds };
var clinicList = _perforImemployeeclinicRepository.GetEntities(t => t.SheetID == sheetId)?
.OrderByDescending(t => t.UnitType)
.ThenBy(t => t.AccountingUnit);
if (clinicList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in clinicList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in clinicEmpDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable LogisticsEmployeeHands(int sheetId)
{
var pairs = PerSheetHeader.employeeLogisticsHeaders;
Dictionary<string, string> logEmpDic = new Dictionary<string, string>();
foreach (var item in pairs)
{
logEmpDic.Add(item.Rest.Item1, item.Item1);
}
var handson = new HandsonTable((int)SheetType.Unidentifiable, logEmpDic.Select(c => c.Value).ToArray(), logEmpDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
if (column.Data == "出勤率")
{
column.Type = "numeric";
column.NumericFormat = new NumericFormat() { Pattern = "0,00.00%" };
column.Strict = false;
}
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in logEmpDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[] { nesteds };
var logisticsList = _perforImemployeelogisticsRepository.GetEntities(t => t.SheetID == sheetId)?
.OrderByDescending(t => t.AccountType)
.ThenBy(t => t.AccountingUnit);
if (logisticsList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in logisticsList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in logEmpDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable SpecialUnitHands(int sheetId)
{
var pairs = PerSheetHeader.specialUnitHeaders;
Dictionary<string, string> specialUnitDic = new Dictionary<string, string>();
foreach (var item in pairs)
{
specialUnitDic.Add(item.Rest.Item1, item.Item1);
}
var handson = new HandsonTable((int)SheetType.Unidentifiable, specialUnitDic.Select(c => c.Value).ToArray(), specialUnitDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
if (new[] { "考核得分率", "出勤率", "调节系数" }.Contains(column.Data))
{
column.Type = "numeric";
column.NumericFormat = new NumericFormat() { Pattern = "0,00.00%" };
column.Strict = false;
}
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in specialUnitDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[] { nesteds };
var specialList = _perforImspecialunitRepository.GetEntities(t => t.SheetID == sheetId)?
.OrderByDescending(t => t.AccountingUnit);
if (specialList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in specialList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in specialUnitDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable AccountDoctorHands(int sheetId)
{
var handson = new HandsonTable((int)SheetType.Unidentifiable, AccountDic.Select(c => c.Value).ToArray(), AccountDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in AccountDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[]{nesteds};
var accountList = _perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.SheetID == sheetId)?.OrderByDescending(t => t.AccountingUnit);
if (accountList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in accountList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in AccountDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable AccountNurseHands(int sheetId)
{
var handson = new HandsonTable((int)SheetType.Unidentifiable, AccountDic.Select(c => c.Value).ToArray(), AccountDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
}
}
List<NestedHeaders> nesteds = new List<NestedHeaders>();
foreach (var item in AccountDic)
{
NestedHeaders nested = new NestedHeaders(item.Value, 1);
nesteds.Add(nested);
}
handson.NestHeaders = new[] { nesteds };
var accountNurseList = _perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.SheetID == sheetId)?.OrderByDescending(t => t.AccountingUnit);
if (accountNurseList == null) return handson;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var item in accountNurseList)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var cells = (from conf in AccountDic
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
private HandsonTable CommonHands(int sheetId)
{
var headList = _perforImHeaderRepository.GetEntities(t => t.SheetID == sheetId)?.OrderBy(t => t.PointCell).ToList();
var dataList = _perforImDataRepository.GetEntities(t => t.SheetID == sheetId)?.OrderByDescending(t => t.AccountingUnit).ToList();
var sheet = _perforImSheetRepository.GetEntity(t => t.ID == sheetId);
Dictionary<int, string> clinicEmpDic = new Dictionary<int, string>();
foreach (var item in headList)
{
clinicEmpDic.Add(item.ID, item.CellValue);
}
var handson = new HandsonTable((int)SheetType.Unidentifiable, clinicEmpDic.Select(c => c.Value).ToArray(), clinicEmpDic.Select(t => new collect_permission
{
HeadName = t.Value,
Visible = 1,
Readnoly = 0
}).ToList());
//添加系数值
#region 添加系数值
int merge = 4;
if (sheet.SheetType == (int)SheetType.Income && !headList.Select(t => t.CellValue).Contains("核算单元(医技组)"))
merge = 3;
var factorhead = new Row(0);
List<NestedHeaders> nesteds = new List<NestedHeaders>();
List<NestedHeaders> nesteds1 = new List<NestedHeaders>();
List<NestedHeaders> nesteds2 = new List<NestedHeaders>();
if (sheet.SheetType == (int)SheetType.Workload)
{
SheetExportResponse response = new SheetExportResponse();
factorhead.Data.Add(new Cell(0, "单元工作量绩效标准:", 1, 2, false, false, cellType: "header"));
response = AddFactor(response, factorhead, headList.ToList(), dataList);
foreach (var item in response.Header[0].Data)
{
if (item.CellValue == null)
{
NestedHeaders nestHeader = new NestedHeaders("0", 1);
nesteds.Add(nestHeader);
}
else if (item.CellValue.ToString() == "单元工作量绩效标准:")
{
NestedHeaders nestHeader = new NestedHeaders(item.CellValue.ToString(), 2);
nesteds.Add(nestHeader);
}
else
{
NestedHeaders nestHeader = new NestedHeaders(item.CellValue.ToString(), 1);
nesteds.Add(nestHeader);
}
}
}
else if (sheet.SheetType == (int)SheetType.OtherIncome || sheet.SheetType == (int)SheetType.Income || sheet.SheetType == (int)SheetType.Expend)
{
SheetExportResponse response = new SheetExportResponse();
factorhead.Data.Add(new Cell(0, "护理组分割比例", 1, merge, false, false, cellType: "header"));
response = AddFactor(response, factorhead, headList.ToList(), dataList, UnitType.护理组);
foreach (var item in response.Header[0].Data)
{
if (item.CellValue == null)
{
NestedHeaders nestHeader = new NestedHeaders("0.00%", 1);
nesteds.Add(nestHeader);
}
else if (item.CellValue.ToString() == "护理组分割比例")
{
NestedHeaders nestHeader = new NestedHeaders(item.CellValue.ToString(), 4);
nesteds.Add(nestHeader);
}
else
{
NestedHeaders nestHeader = new NestedHeaders(Math.Round(Convert.ToDecimal(item.CellValue) * 100, 2) + "%", 1);
nesteds.Add(nestHeader);
}
}
var factorhead1 = new Row(1);
SheetExportResponse response1 = new SheetExportResponse();
factorhead1.Data.Add(new Cell(0, "医生组分割比例", 1, merge, false, false, cellType: "header"));
response1 = AddFactor(response1, factorhead1, headList.ToList(), dataList, UnitType.医生组);
foreach (var item in response1.Header[0].Data)
{
if (item.CellValue == null)
{
NestedHeaders nestHeader = new NestedHeaders("0.00%", 1);
nesteds1.Add(nestHeader);
}
else if (item.CellValue.ToString() == "医生组分割比例")
{
NestedHeaders nestHeader = new NestedHeaders(item.CellValue.ToString(), 4);
nesteds1.Add(nestHeader);
}
else
{
NestedHeaders nestHeader = new NestedHeaders(Math.Round(Convert.ToDecimal(item.CellValue) * 100, 2) + "%", 1);
nesteds1.Add(nestHeader);
}
}
SheetExportResponse response2 = new SheetExportResponse();
var factorhead2 = new Row(2);
factorhead2.Data.Add(new Cell(0, "医技组分割比例", 1, merge, false, false, cellType: "header"));
response2 = AddFactor(response2, factorhead2, headList.ToList(), dataList, UnitType.医技组);
foreach (var item in response2.Header[0].Data)
{
if (item.CellValue == null)
{
NestedHeaders nestHeader = new NestedHeaders("0.00%", 1);
nesteds2.Add(nestHeader);
}
else if (item.CellValue.ToString() == "医技组分割比例")
{
NestedHeaders nestHeader = new NestedHeaders(item.CellValue.ToString(), 4);
nesteds2.Add(nestHeader);
}
else
{
NestedHeaders nestHeader = new NestedHeaders(Math.Round(Convert.ToDecimal(item.CellValue) * 100, 2) + "%", 1);
nesteds2.Add(nestHeader);
}
}
}
#endregion
//创建列头行
#region 创建列头行
List<NestedHeaders> nesteds3 = new List<NestedHeaders>();
foreach (var header in headList.Where(t => !t.ParentID.HasValue || t.ParentID.Value == 0))
{
var ss = header.CellValue;
if (sheet.SheetType == (int)SheetType.ComputeEconomic)
{
if (header.CellValue == "收入")
{
NestedHeaders item = new NestedHeaders(header.CellValue, 24);
nesteds3.Add(item);
}
else if (new[] { "收入合计", "其他收入", "其他收入合计", "支出", "支出合计", "科室可核算业绩收入" }.Contains(header.CellValue.Trim()))
{
NestedHeaders item = new NestedHeaders(header.CellValue, 3);
nesteds3.Add(item);
}
else if (header.CellValue == "核算单元")
{
NestedHeaders item = new NestedHeaders("", 1);
nesteds3.Add(item);
}
}
else
{
NestedHeaders item = new NestedHeaders(header.CellValue, 1);
nesteds3.Add(item);
}
}
List<NestedHeaders> nesteds4 = new List<NestedHeaders>();
if (headList.Any(t => t.ParentID.HasValue && t.ParentID.Value > 0))
{
List<string> heards = new List<string>();
NestedHeaders unit = new NestedHeaders("核算单元", 1);
nesteds4.Add(unit);
foreach (var header in headList.Where(t => t.ParentID.HasValue && t.ParentID.Value > 0))
{
NestedHeaders item = new NestedHeaders(header.CellValue, 1);
heards.Add(header.CellValue);
nesteds4.Add(item);
}
}
if (nesteds3.Count!=0 && nesteds4.Count==0 && nesteds.Count==0 && nesteds1.Count==0 && nesteds2.Count==0)
handson.NestHeaders = new[] { nesteds3};
else if (nesteds.Count == 0 && nesteds1.Count == 0 && nesteds2.Count == 0)
handson.NestHeaders = new[] { nesteds3, nesteds4 };
else if (nesteds1.Count == 0 && nesteds2.Count == 0 && nesteds4.Count == 0)
handson.NestHeaders = new[] { nesteds, nesteds3 };
else if (nesteds4.Count == 0)
handson.NestHeaders = new[] { nesteds, nesteds1, nesteds2, nesteds3 };
List<im_header> headers = new List<im_header>();
foreach (var head in headList)
{
if (!headList.Any(t => t.ParentID == head.ID))
headers.Add(head);
}
#endregion
if (handson.Columns != null && handson.Columns.Any())
{
foreach (var column in handson.Columns)
{
column.ReadOnly = true;
}
}
if (dataList == null || dataList.Count == 0) return handson;
Row rowbody = null;
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 0;
foreach (var rowNumber in dataList.Select(t => t.RowNumber).Distinct()) //.OrderBy(t => t)
{
Dictionary<int, string> firstDic = new Dictionary<int, string>();
foreach (var head in headers)
{
if (head.CellValue.Contains("核算单元类型"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber).UnitType;
var unitType = value.HasValue ? ((UnitType)value).ToString() : "";
firstDic.Add(head.ID, unitType);
}
else if (head.CellValue.Contains("核算单元人员数量"))
{
var data = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.SignID == head.SignID);
var value = data?.CellValue;
if (value.HasValue && value.Value > 0)
firstDic.Add(head.ID, value.ToString());
}
else if (head.CellValue.Contains("核算单元"))
{
if (head.CellValue.Contains("医生组"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.UnitType == 1);
firstDic.Add(head.ID, value?.AccountingUnit);
}
else if (head.CellValue.Contains("护理组"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.UnitType == 2);
firstDic.Add(head.ID, value?.AccountingUnit);
}
else if (head.CellValue.Contains("医技组"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.UnitType == 3);
firstDic.Add(head.ID, value?.AccountingUnit);
}
else
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber);
firstDic.Add(head.ID, value?.AccountingUnit);
}
}
else if (head.CellValue.Contains("科室名称"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber);
firstDic.Add(head.ID, value.Department);
}
else if (head.CellValue.Contains("备注"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber);
firstDic.Add(head.ID, value.Remark);
}
else if (head.CellValue.Contains("人员工号"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber).JobNumber;
firstDic.Add(head.ID, value);
}
else if (head.CellValue.Contains("医生姓名"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber).EmployeeName;
firstDic.Add(head.ID, value);
}
else if (!firstDic.Any(t=>t.Key==head.ID))
{
var data = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.SignID == head.SignID);
var value = data?.CellValue;
firstDic.Add(head.ID, value.ToString());
}
}
var cells = (from conf in clinicEmpDic
join fst in firstDic on conf.Key equals fst.Key
select new HandsonCellData(conf.Value, fst.Value)).ToList();
rowDatas.Add(new HandsonRowData(i, cells));
i++;
}
handson.SetRowData(rowDatas, rowDatas != null);
return handson;
}
public static Dictionary<string, string> AccountDic { get; } = new Dictionary<string, string>
{
{nameof(res_account.AccountingUnit),"核算单元"},
{nameof(res_account.Number),"核算单元医生数量"},
{nameof(res_account.BasicFactor),"医生基础系数"},
{nameof(res_account.SlopeFactor),"倾斜系数"},
{nameof(res_account.OtherPerfor1),"其他绩效1"},
{nameof(res_account.OtherPerfor2),"其他绩效2"},
{nameof(res_account.MedicineExtra),"药占比奖罚"},
{nameof(res_account.MaterialsExtra),"材料占比奖罚" },
{nameof(res_account.Extra),"医院奖罚"},
{nameof(res_account.ScoringAverage),"考核对分率"},
{nameof(res_account.AdjustFactor),"调节系数"},
{nameof(res_account.Income),"科室业绩"},
{nameof(res_account.PerforFee),"业绩绩效"},
{nameof(res_account.WorkloadFee),"工作量绩效"},
{nameof(res_account.PerforTotal),"绩效合计"},
{nameof(res_account.Avg),"人均绩效"},
{nameof(res_account.RealGiveFee),"实发绩效"}
};
#endregion
}
}
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