Commit 9f088395 by lcx

可是绩效详情带出药占比系数、cmi系数

parent 1373e6f2
...@@ -503,28 +503,28 @@ ...@@ -503,28 +503,28 @@
</member> </member>
<member name="M:Performance.Api.Controllers.ConfigController.GetHosCMIList(Performance.EntityModels.cof_cmi)"> <member name="M:Performance.Api.Controllers.ConfigController.GetHosCMIList(Performance.EntityModels.cof_cmi)">
<summary> <summary>
获取 药占比类型信息列表 获取 CMI配置信息
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ConfigController.HosCMIInsert(Performance.EntityModels.cof_cmi)"> <member name="M:Performance.Api.Controllers.ConfigController.HosCMIInsert(Performance.EntityModels.cof_cmi)">
<summary> <summary>
新增药占比类型 新增 CMI配置
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ConfigController.HosCMIUpdate(Performance.EntityModels.cof_cmi)"> <member name="M:Performance.Api.Controllers.ConfigController.HosCMIUpdate(Performance.EntityModels.cof_cmi)">
<summary> <summary>
修改药占比类型 修改 CMI配置
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ConfigController.HosCMIDelete(Performance.EntityModels.cof_cmi)"> <member name="M:Performance.Api.Controllers.ConfigController.HosCMIDelete(Performance.EntityModels.cof_cmi)">
<summary> <summary>
删除药占比类型 删除 CMI配置
</summary> </summary>
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
......
...@@ -29,6 +29,7 @@ public class ComputeService : IAutoInjection ...@@ -29,6 +29,7 @@ public class ComputeService : IAutoInjection
private readonly PerforHospitalRepository hospitalRepository; private readonly PerforHospitalRepository hospitalRepository;
private readonly PerforPerapramountRepository perapramountRepository; private readonly PerforPerapramountRepository perapramountRepository;
private readonly PerforCofcmiRepository cofcmiRepository; private readonly PerforCofcmiRepository cofcmiRepository;
private readonly PerforCofworkitemRepository cofworkitemRepository;
public ComputeService(PerforResaccountRepository perforResaccountRepository, public ComputeService(PerforResaccountRepository perforResaccountRepository,
PerforPersheetRepository perforPerSheetRepository, PerforPersheetRepository perforPerSheetRepository,
...@@ -44,7 +45,8 @@ public class ComputeService : IAutoInjection ...@@ -44,7 +45,8 @@ public class ComputeService : IAutoInjection
PerforPerallotRepository perforPerallotRepository, PerforPerallotRepository perforPerallotRepository,
PerforHospitalRepository hospitalRepository, PerforHospitalRepository hospitalRepository,
PerforPerapramountRepository perapramountRepository, PerforPerapramountRepository perapramountRepository,
PerforCofcmiRepository cofcmiRepository) PerforCofcmiRepository cofcmiRepository,
PerforCofworkitemRepository cofworkitemRepository)
{ {
this.perforResaccountRepository = perforResaccountRepository; this.perforResaccountRepository = perforResaccountRepository;
this._perforPerSheetRepository = perforPerSheetRepository; this._perforPerSheetRepository = perforPerSheetRepository;
...@@ -61,6 +63,7 @@ public class ComputeService : IAutoInjection ...@@ -61,6 +63,7 @@ public class ComputeService : IAutoInjection
this.hospitalRepository = hospitalRepository; this.hospitalRepository = hospitalRepository;
this.perapramountRepository = perapramountRepository; this.perapramountRepository = perapramountRepository;
this.cofcmiRepository = cofcmiRepository; this.cofcmiRepository = cofcmiRepository;
this.cofworkitemRepository = cofworkitemRepository;
} }
public int IsShowManage(int allotId) public int IsShowManage(int allotId)
...@@ -528,6 +531,9 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -528,6 +531,9 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
{ {
var doctor = perforResaccountRepository.GetEntity(t => t.ID == accountId); var doctor = perforResaccountRepository.GetEntity(t => t.ID == accountId);
var workitems = cofworkitemRepository.GetEntities(t => t.AllotID == doctor.AllotID);
var allotCmi = cofcmiRepository.GetEntity(t => t.AllotId == doctor.AllotID && t.UnitType == doctor.UnitType && t.AccountingUnit == doctor.AccountingUnit);
var allot = perforPerallotRepository.GetEntity(t => t.ID == doctor.AllotID); var allot = perforPerallotRepository.GetEntity(t => t.ID == doctor.AllotID);
DeptDataDetails deptDetails = new DeptDataDetails DeptDataDetails deptDetails = new DeptDataDetails
{ {
...@@ -610,17 +616,32 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -610,17 +616,32 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
ItemName = t.TypeName, ItemName = t.TypeName,
CellValue = t.CellValue, CellValue = t.CellValue,
Factor = sheet.SheetType == (int)SheetType.Workload ? t.FactorValue : t.FactorValue * 100, Factor = sheet.SheetType == (int)SheetType.Workload ? t.FactorValue : t.FactorValue * 100,
ItemValue = t.IsFactor == 1 ? (t.CellValue * (t.FactorValue ?? 0)) : t.CellValue ItemValue = t.IsFactor == 1 ? (t.CellValue * (t.FactorValue ?? 0)) : t.CellValue,
}).ToList(); }).ToList();
if (items != null && items.Any()) if (items != null && items.Any())
{ {
items = items.GroupBy(t => t.ItemName).Select(t => new DetailModule items = items.GroupBy(t => t.ItemName).Select(t =>
{
var dto = new DetailModule
{ {
ItemName = t.Key, ItemName = t.Key,
CellValue = t.Sum(group => group.CellValue), CellValue = t.Sum(group => group.CellValue),
Factor = t.FirstOrDefault().Factor, Factor = t.FirstOrDefault().Factor,
ItemValue = t.Sum(group => group.ItemValue), ItemValue = t.Sum(group => group.ItemValue),
};
if (sheet.SheetType == (int)SheetType.Workload)
{
if (workitems != null && workitems.Any(a => a.Type == 1 && a.Item == t.Key))
dto.MediFactor = doctor.MedicineFactor;
if (workitems != null && workitems.Any(a => a.Type == 2 && a.Item == t.Key) && allotCmi != null)
dto.CMIFactor = allotCmi.Value;
dto.ItemValue = dto.ItemValue * (dto.MediFactor ?? 1) * (dto.CMIFactor ?? 1);
}
return dto;
}).ToList(); }).ToList();
} }
...@@ -703,6 +724,8 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details ...@@ -703,6 +724,8 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
ItemValue = t.ItemValue, ItemValue = t.ItemValue,
CellValue = t.CellValue, CellValue = t.CellValue,
Factor = t.Factor, Factor = t.Factor,
MediFactor = t.MediFactor,
CMIFactor = t.CMIFactor,
}).ToList(); }).ToList();
} }
} }
......
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