Commit 093c48d7 by lcx

Merge branch 'v2020morge-graphql' into v2020morge-reportdate

parents 3a18022c 4591d836
...@@ -290,7 +290,7 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request) ...@@ -290,7 +290,7 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
var isShowManage = _computeService.IsShowManage(request.AllotId); var isShowManage = _computeService.IsShowManage(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, isShowManage); var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, isShowManage, true);
if (list == null || !list.Any()) if (list == null || !list.Any())
return new ApiResponse(ResponseType.OK, "ok", list); return new ApiResponse(ResponseType.OK, "ok", list);
......
...@@ -718,7 +718,7 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty ...@@ -718,7 +718,7 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
/// <param name="hospitalId"></param> /// <param name="hospitalId"></param>
/// <param name="isShowManage"> 仅显示管理绩效 isShowManage == 1 </param> /// <param name="isShowManage"> 仅显示管理绩效 isShowManage == 1 </param>
/// <returns></returns> /// <returns></returns>
public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowManage) public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowManage, bool isEmpDic = false)
{ {
// 获取一次次绩效结果 // 获取一次次绩效结果
var list = GetAllotPerformance(allotId, hospitalId, isShowManage); var list = GetAllotPerformance(allotId, hospitalId, isShowManage);
...@@ -762,9 +762,12 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM ...@@ -762,9 +762,12 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero); item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero); item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero);
// 人员信息使用人员字典中数据 // 人员信息使用人员字典中数据
item.AccountingUnit = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.AccountingUnit ?? ""; if (isEmpDic)
item.UnitType = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.UnitType ?? ""; {
item.EmployeeName = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.DoctorName ?? ""; item.AccountingUnit = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.AccountingUnit ?? "";
item.UnitType = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.UnitType ?? "";
item.EmployeeName = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.DoctorName ?? "";
}
} }
} }
......
...@@ -139,7 +139,7 @@ private void WriteDataToFile(IWorkbook workbook, per_allot allot, Dictionary<ExD ...@@ -139,7 +139,7 @@ private void WriteDataToFile(IWorkbook workbook, per_allot allot, Dictionary<ExD
logger.LogInformation($"allotId: {allot.ID}: 总金额 - {extractDto?.Sum(s => s.Value ?? 0)}"); logger.LogInformation($"allotId: {allot.ID}: 总金额 - {extractDto?.Sum(s => s.Value ?? 0)}");
WriteDataFactory factory = new WriteDataFactory(); WriteDataFactory factory = new WriteDataFactory();
var types = new List<SheetType> { SheetType.OtherIncome, SheetType.Income, SheetType.Expend, SheetType.Workload, SheetType.OtherWorkload, SheetType.AccountBasic }; var types = new List<SheetType> { SheetType.OtherIncome, SheetType.Income, SheetType.Expend, SheetType.Workload, SheetType.OtherWorkload/*, SheetType.AccountBasic*/ };
decimal ratio = 60m; decimal ratio = 60m;
for (int sheetIndex = 0; sheetIndex < workbook.NumberOfSheets; sheetIndex++) for (int sheetIndex = 0; sheetIndex < workbook.NumberOfSheets; sheetIndex++)
{ {
...@@ -242,7 +242,7 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re ...@@ -242,7 +242,7 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatTechnicAccounting = t.inner.FirstOrDefault(f => f.Department == dept)?.InpatTechnicAccounting?.AccountingUnit, InpatTechnicAccounting = t.inner.FirstOrDefault(f => f.Department == dept)?.InpatTechnicAccounting?.AccountingUnit,
}; };
}); });
logger.LogInformation("************抽取结果1***************: " + JsonHelper.Serialize(data.Where(t => t.Department == "一病区(外科一)" && t.Category == "CT费")));
var groupdata = data.GroupBy(t => new { t.Department, t.Category, t.SheetName }).Select(t => new ExtractTransDto var groupdata = data.GroupBy(t => new { t.Department, t.Category, t.SheetName }).Select(t => new ExtractTransDto
{ {
SheetName = t.Key.SheetName, SheetName = t.Key.SheetName,
...@@ -256,7 +256,6 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re ...@@ -256,7 +256,6 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatNurseAccounting = t.First().InpatNurseAccounting, InpatNurseAccounting = t.First().InpatNurseAccounting,
InpatTechnicAccounting = t.First().InpatTechnicAccounting, InpatTechnicAccounting = t.First().InpatTechnicAccounting,
}); });
logger.LogInformation("************抽取结果2***************: " + JsonHelper.Serialize(groupdata.Where(t => t.Department == "一病区(外科一)" && t.Category == "CT费")));
return groupdata.ToList(); return groupdata.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