Commit e63d247c by 钟博

成本支出除工作量其他都改为百分比显示,保存修改

parent 90fb7684
...@@ -356,6 +356,8 @@ public ApiResponse GetItemHands([FromBody] ModModuleRequest request) ...@@ -356,6 +356,8 @@ public ApiResponse GetItemHands([FromBody] ModModuleRequest request)
logger.LogInformation($"绩效收入模板配置项列表在{DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss完成请求")}"); logger.LogInformation($"绩效收入模板配置项列表在{DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss完成请求")}");
} }
} }
request.SheetType = sheetType;
var list = configService.GetQueryItemHands(request); var list = configService.GetQueryItemHands(request);
return new ApiResponse(ResponseType.OK, list); return new ApiResponse(ResponseType.OK, list);
} }
......
...@@ -388,7 +388,6 @@ public HandsonTable GetDrugtypeHands(int allotId) ...@@ -388,7 +388,6 @@ public HandsonTable GetDrugtypeHands(int allotId)
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = costType; column.Source = costType;
column.Strict = true;
} }
} }
} }
...@@ -523,14 +522,12 @@ public HandsonTable GetWorkItemHands(int allotId, int type) ...@@ -523,14 +522,12 @@ public HandsonTable GetWorkItemHands(int allotId, int type)
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = headerArr; column.Source = headerArr;
column.Strict = true;
} }
if (column.Data == "类型") if (column.Data == "类型")
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = workType; column.Source = workType;
column.Strict = true;
} }
} }
} }
......
...@@ -293,14 +293,20 @@ public void DelItem(int itemId) ...@@ -293,14 +293,20 @@ public void DelItem(int itemId)
public HandsonTable GetQueryItemHands(ModModuleRequest request) public HandsonTable GetQueryItemHands(ModModuleRequest request)
{ {
HandsonTable handson = new HandsonTable((int)SheetType.Unidentifiable, CostDic.Select(c => c.Value).ToArray(), CostDic.Select(t => new collect_permission var DicType = new Dictionary<string, string>();
if (request.SheetType == (int)SheetType.Workload)
DicType = WorkLoadDic;
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, HeadName = t.Value,
Visible = 1, Visible = 1,
Readnoly = 0 Readnoly = 0
}).ToList()); }).ToList());
var scheme=ExtractScheme(Convert.ToInt32(request.HospitalId), request.ExecuteType, request.SheetType); var scheme = ExtractScheme(Convert.ToInt32(request.HospitalId), request.ExecuteType, 0);
if (handson.Columns != null && handson.Columns.Any()) if (handson.Columns != null && handson.Columns.Any())
{ {
foreach (var column in handson.Columns) foreach (var column in handson.Columns)
...@@ -309,7 +315,7 @@ public HandsonTable GetQueryItemHands(ModModuleRequest request) ...@@ -309,7 +315,7 @@ public HandsonTable GetQueryItemHands(ModModuleRequest request)
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = scheme.Select(c => c.Title).ToArray(); column.Source = scheme.Select(c => c.Title).ToArray();
column.Strict = true; column.Strict = false;
} }
} }
} }
...@@ -321,16 +327,24 @@ public HandsonTable GetQueryItemHands(ModModuleRequest request) ...@@ -321,16 +327,24 @@ public HandsonTable GetQueryItemHands(ModModuleRequest request)
int i = 0; int i = 0;
foreach (var item in list) foreach (var item in list)
{ {
var json = JsonHelper.Serialize(item); var json = JsonHelper.Serialize(item);
var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json); var firstDic = JsonHelper.Deserialize<Dictionary<string, string>>(json);
var typeId= scheme.Where(c => c.Value == item.TypeId.ToString()); var typeId = scheme.Where(c => c.Value == item.TypeId.ToString());
if (typeId.Any()) if (typeId.Any())
firstDic["TypeId"] = typeId.First().Title; firstDic["typeid"] = typeId.First().Title;
else else
firstDic["TypeId"] = ""; firstDic["typeid"] = "";
if (request.SheetType != (int)SheetType.Workload)
var cells = (from conf in CostDic {
var FactorValue1 = (item.FactorValue1 * 100).ToString();
var FactorValue2 = (item.FactorValue2 * 100).ToString();
var FactorValue3 = (item.FactorValue3 * 100).ToString();
firstDic["factorvalue1"] = FactorValue1.Remove(FactorValue1.IndexOf('.')) + "%";
firstDic["factorvalue2"] = FactorValue2.Remove(FactorValue2.IndexOf('.')) + "%";
firstDic["factorvalue3"] = FactorValue3.Remove(FactorValue3.IndexOf('.')) + "%";
}
var cells = (from conf in DicType
join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper() join fst in firstDic on conf.Key.ToUpper() equals fst.Key.ToUpper()
select new HandsonCellData(conf.Value, fst.Value)).ToList(); select new HandsonCellData(conf.Value, fst.Value)).ToList();
...@@ -358,14 +372,42 @@ public void SaveItemHands(int ModuleId, SaveItemData request) ...@@ -358,14 +372,42 @@ public void SaveItemHands(int ModuleId, SaveItemData request)
.Where(t => t.Title == item["TypeId"]); .Where(t => t.Title == item["TypeId"]);
if (dicValue.Any()) if (dicValue.Any())
item["TypeId"] = dicValue.First().Value; item["TypeId"] = dicValue.First().Value;
else
item["TypeId"] = null; if (entity.SheetType!=(int)SheetType.Workload)
{
if (item["FactorValue1"]!=null)
{
item["FactorValue1"] = (Convert.ToInt32(item["FactorValue1"].TrimEnd('%')) * 0.01).ToString();
}
if (item["FactorValue2"] != null)
{
item["FactorValue2"] = (Convert.ToInt32(item["FactorValue2"].TrimEnd('%')) * 0.01).ToString();
}
if (item["FactorValue3"] != null)
{
item["FactorValue3"] = (Convert.ToInt32(item["FactorValue3"].TrimEnd('%')) * 0.01).ToString();
}
}
var json = JsonHelper.Serialize(item); var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<ex_item>(json); var data = JsonHelper.Deserialize<ex_item>(json);
if (!string.IsNullOrEmpty(data.ItemName) || !string.IsNullOrEmpty(data.TypeId.ToString())) if (!string.IsNullOrEmpty(data.ItemName) || !string.IsNullOrEmpty(data.TypeId.ToString()))
{ {
data.ModuleId = ModuleId; 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); exItems.Add(data);
} }
} }
...@@ -414,9 +456,16 @@ public void SaveItemHands(int ModuleId, SaveItemData request) ...@@ -414,9 +456,16 @@ public void SaveItemHands(int ModuleId, SaveItemData request)
{ nameof(ex_item.FactorValue1), "医生系数" }, { nameof(ex_item.FactorValue1), "医生系数" },
{ nameof(ex_item.FactorValue2), "护理系数" }, { nameof(ex_item.FactorValue2), "护理系数" },
{ nameof(ex_item.FactorValue3), "医技系数" }, { nameof(ex_item.FactorValue3), "医技系数" },
{ nameof(ex_item.TypeId), "自动提取规则(无法提取的考核项请勿填写)" }, { nameof(ex_item.TypeId), "自动提取规则(无法提取的考核项请勿填写)" }
{ nameof(ex_item.ReadOnly), "是否只读" }
}; };
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 #endregion Items
#region 特殊科室 #region 特殊科室
......
...@@ -586,35 +586,30 @@ public HandsonTable GetDepartmentHands(int hospitalId) ...@@ -586,35 +586,30 @@ public HandsonTable GetDepartmentHands(int hospitalId)
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 2).Select(c => c.Value).ToArray(); column.Source = DeptDics(hospitalId, 2).Select(c => c.Value).ToArray();
column.Strict = true;
} }
if (column.Data == "系统科室") if (column.Data == "系统科室")
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 1).Select(c => c.Value).ToArray(); column.Source = DeptDics(hospitalId, 1).Select(c => c.Value).ToArray();
column.Strict = true;
} }
if (new[] { "住院·核算单元医生组", "住院·核算单元护理组", "住院·核算单元医技组", "门诊·核算单元医生组", "门诊·核算单元护理组", "门诊·核算单元医技组" }.Contains(column.Data)) if (new[] { "住院·核算单元医生组", "住院·核算单元护理组", "住院·核算单元医技组", "门诊·核算单元医生组", "门诊·核算单元护理组", "门诊·核算单元医技组" }.Contains(column.Data))
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 3).Select(c => c.Value).ToArray(); column.Source = DeptDics(hospitalId, 3).Select(c => c.Value).ToArray();
column.Strict = true;
} }
if (column.Data == "行政后勤") if (column.Data == "行政后勤")
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 4).Select(c => c.Value).ToArray(); column.Source = DeptDics(hospitalId, 4).Select(c => c.Value).ToArray();
column.Strict = true;
} }
if (column.Data == "特殊核算组") if (column.Data == "特殊核算组")
{ {
column.Type = "autocomplete"; column.Type = "autocomplete";
column.Source = DeptDics(hospitalId, 5).Select(c => c.Value).ToArray(); column.Source = DeptDics(hospitalId, 5).Select(c => c.Value).ToArray();
column.Strict = true;
} }
} }
} }
......
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