Commit 712e3cc5 by 钟博

改正基础配置的一些问题

parent fb5ddc2c
......@@ -379,6 +379,19 @@ public HandsonTable GetDrugtypeHands(int allotId)
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;
column.Strict = true;
}
}
}
var list = _drugtypeRepository.GetEntities(t => t.AllotID == allotId);
if (list == null) return handson;
......@@ -416,14 +429,14 @@ public void SaveDrugtypeHands(int allotId, SaveConfigData request)
{
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_drugtype>(json);
if (!string.IsNullOrEmpty(data.Charge)|| !string.IsNullOrEmpty(data.ChargeType))
if (!string.IsNullOrEmpty(data.Charge) || !string.IsNullOrEmpty(data.ChargeType))
{
drugs.Add(data);
}
}
_drugtypeRepository.Execute("delete from cof_drugtype where allotid = @allotid", new{allotId});
_drugtypeRepository.Execute("delete from cof_drugtype where allotid = @allotid", new { allotId });
_drugtypeRepository.AddRange(drugs.ToArray());
}
......@@ -501,7 +514,7 @@ public HandsonTable GetWorkItemHands(int allotId, int type)
}).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)
......@@ -512,6 +525,13 @@ public HandsonTable GetWorkItemHands(int allotId, int type)
column.Source = headerArr;
column.Strict = true;
}
if (column.Data == "类型")
{
column.Type = "autocomplete";
column.Source = workType;
column.Strict = true;
}
}
}
......@@ -524,6 +544,7 @@ public HandsonTable GetWorkItemHands(int allotId, int type)
int i = 0;
foreach (var item in list)
{
var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
......@@ -531,7 +552,21 @@ public HandsonTable GetWorkItemHands(int allotId, int type)
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++;
}
......@@ -548,15 +583,35 @@ public void SaveWorkItemHands(int allotId, SaveConfigData request)
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.Execute("delete from cof_workitem where allotid = @allotid", new { allotId });
_workitemRepository.AddRange(works.ToArray());
}
......@@ -682,7 +737,7 @@ public void SaveDepttypeHands(int allotId, SaveConfigData request)
}
perforCofdepttypeRepository.Execute("delete from cof_depttype where allotid = @allotid", new{allotId});
perforCofdepttypeRepository.Execute("delete from cof_depttype where allotid = @allotid", new { allotId });
perforCofdepttypeRepository.AddRange(depts.ToArray());
}
......
......@@ -596,7 +596,7 @@ public HandsonTable GetDepartmentHands(int hospitalId)
column.Strict = true;
}
if (new[] { "住院·核算单元医生组", "住院·核算单元医生组", "住院·核算单元医技组", "门诊·核算单元医生组", "门诊·核算单元护理组", "门诊·核算单元医技组" }.Contains(column.Data))
if (new[] { "住院·核算单元医生组", "住院·核算单元护理组", "住院·核算单元医技组", "门诊·核算单元医生组", "门诊·核算单元护理组", "门诊·核算单元医技组" }.Contains(column.Data))
{
column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 3).Select(c => c.Value).ToArray();
......@@ -666,17 +666,17 @@ public void SaveDeptDicHands(int HospitalId, SaveConfigData request)
{
var json = JsonHelper.Serialize(dic);
var data = JsonHelper.Deserialize<DeptdicHands>(json);
var ss = "";
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.Execute("delete from per_dept_dic where HospitalId = @HospitalId", new { HospitalId });
perdeptdicRepository.AddRange(deptDics.ToArray());
}
}
private List<Dictionary<string, string>> CreateDataRow(int HospitalId, SaveConfigData request, Dictionary<string, string> config)
{
......@@ -718,21 +718,24 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan
if (data.InpatDoctorAccounting != "" || data.InpatNurseAccounting != "" || data.InpatTechnicAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "住院", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
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);
......@@ -745,21 +748,24 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan
if (data.OutDoctorAccounting != "" || data.OutNurseAccounting != "" || data.OutTechnicAccounting != "")
{
per_dept_dic deptDic = new per_dept_dic() { Source = "门诊", HospitalId = HospitalId, Department = data.Department, HISDeptName = data.HISDeptName, CreateTime = nowTime };
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);
......@@ -802,13 +808,13 @@ private void DeptDicList(int HospitalId, List<per_dept_dic> deptDics, DeptdicHan
{
{ 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.OutDoctorAccounting), "门诊·核算单元医生组" },
{ nameof(DeptdicResponse.OutNurseAccounting), "门诊·核算单元护理组" },
{ nameof(DeptdicResponse.OutTechnicAccounting), "门诊·核算单元医技组" },
{ nameof(DeptdicResponse.SpecialAccounting), "特殊核算组" }
};
}
......
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