Commit b8844059 by ruyun.zhang

打印版功能微调

parent ea53e5ef
...@@ -3232,6 +3232,11 @@ ...@@ -3232,6 +3232,11 @@
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.DeptResponse.Code">
<summary>
组别编码
</summary>
</member>
<member name="P:Performance.DtoModels.DeptResponse.UnitName"> <member name="P:Performance.DtoModels.DeptResponse.UnitName">
<summary> <summary>
分组名称(医生、护士) 分组名称(医生、护士)
......
...@@ -20,7 +20,10 @@ public class DeptResponse ...@@ -20,7 +20,10 @@ public class DeptResponse
/// ///
/// </summary> /// </summary>
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
/// <summary>
/// 组别编码
/// </summary>
public string Code { get; set; }
public int UnitType { get; set; } public int UnitType { get; set; }
/// <summary> /// <summary>
......
...@@ -75,7 +75,7 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari ...@@ -75,7 +75,7 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari
"; ";
var queryCount = @" var queryCount = @"
SELECT COUNT(DISTINCT HospitalId,Year,Month,AllotID,ComputeId,UnitType,AccountingUnit,JobNumber) FROM ( SELECT COUNT(0) FROM (
SELECT * FROM view_check_emp WHERE AllotId = @allotId SELECT * FROM view_check_emp WHERE AllotId = @allotId
) TAB ) TAB
WHERE if(@searchQuery='','',AccountingUnit) LIKE @parm OR if(@searchQuery='','',JobNumber) LIKE @parm OR if(@searchQuery='','',EmployeeName) LIKE @parm WHERE if(@searchQuery='','',AccountingUnit) LIKE @parm OR if(@searchQuery='','',JobNumber) LIKE @parm OR if(@searchQuery='','',EmployeeName) LIKE @parm
......
...@@ -36,6 +36,7 @@ public class ComputeService : IAutoInjection ...@@ -36,6 +36,7 @@ public class ComputeService : IAutoInjection
private readonly PerforPeremployeeRepository perforPeremployeeRepository; private readonly PerforPeremployeeRepository perforPeremployeeRepository;
private readonly PerforPerapramounthideRepository _hideRepository; private readonly PerforPerapramounthideRepository _hideRepository;
private readonly PerforCofworkitemRepository cofworkitemRepository; private readonly PerforCofworkitemRepository cofworkitemRepository;
private readonly PerforCofaccountingRepository _cofaccountingRepository;
private readonly PerforCofaliasRepository cofaliasRepository; private readonly PerforCofaliasRepository cofaliasRepository;
private readonly PerforReportRepository reportRepository; private readonly PerforReportRepository reportRepository;
...@@ -59,6 +60,7 @@ public class ComputeService : IAutoInjection ...@@ -59,6 +60,7 @@ public class ComputeService : IAutoInjection
PerforPeremployeeRepository perforPeremployeeRepository, PerforPeremployeeRepository perforPeremployeeRepository,
PerforPerapramounthideRepository hideRepository, PerforPerapramounthideRepository hideRepository,
PerforCofworkitemRepository cofworkitemRepository, PerforCofworkitemRepository cofworkitemRepository,
PerforCofaccountingRepository cofaccountingRepository,
PerforCofaliasRepository cofaliasRepository, PerforCofaliasRepository cofaliasRepository,
PerforReportRepository reportRepository) PerforReportRepository reportRepository)
{ {
...@@ -81,6 +83,7 @@ public class ComputeService : IAutoInjection ...@@ -81,6 +83,7 @@ public class ComputeService : IAutoInjection
this.perforPeremployeeRepository = perforPeremployeeRepository; this.perforPeremployeeRepository = perforPeremployeeRepository;
_hideRepository = hideRepository; _hideRepository = hideRepository;
this.cofworkitemRepository = cofworkitemRepository; this.cofworkitemRepository = cofworkitemRepository;
_cofaccountingRepository = cofaccountingRepository;
this.cofaliasRepository = cofaliasRepository; this.cofaliasRepository = cofaliasRepository;
this.reportRepository = reportRepository; this.reportRepository = reportRepository;
} }
...@@ -314,10 +317,18 @@ public List<DeptResponse> GetOtherPerformance(int allotId) ...@@ -314,10 +317,18 @@ public List<DeptResponse> GetOtherPerformance(int allotId)
public List<DeptResponse> GetGroupPerformance(int allotId, List<int> group) public List<DeptResponse> GetGroupPerformance(int allotId, List<int> group)
{ {
var unitType = group; var unitType = group;
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit); var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId);
List<DeptResponse> Performance = _mapper.Map<List<DeptResponse>>(list); if (list?.Any() != true) return new List<DeptResponse>();
Performance?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return Performance; var cofaccounting = _cofaccountingRepository.GetEntities(g => g.AllotId == allotId);
List<DeptResponse> performance = _mapper.Map<List<DeptResponse>>(list);
performance?.ForEach(t =>
{
t.UnitName = ((UnitType)t.UnitType).ToString();
t.Code = cofaccounting.FirstOrDefault(w => w.UnitType == t.UnitName && w.AccountingUnit == t.AccountingUnit)?.Code ?? "";
});
performance = performance?.OrderBy(t => t.Code).ThenBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit).ToList();
return performance;
} }
/// <summary> /// <summary>
/// 返回行政科室绩效列表 /// 返回行政科室绩效列表
......
...@@ -460,7 +460,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -460,7 +460,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
#region 添加参考人均 lcr:参考人均那里直接取4.1的人均绩效 #region 添加参考人均 lcr:参考人均那里直接取4.1的人均绩效
// 添加参考人均(二次分配审核时,提示业务中层测算表的基础绩效或实际人均) // 添加参考人均(二次分配审核时,提示业务中层测算表的基础绩效或实际人均)
var refAvg = 0m; decimal refAvg = 0m, refNum = 0m;
if (Enum.TryParse(typeof(UnitType), second.UnitType, true, out object unittype)) if (Enum.TryParse(typeof(UnitType), second.UnitType, true, out object unittype))
{ {
// 优先取 业务中层实际人均绩效 否则 取 科室人均 // 优先取 业务中层实际人均绩效 否则 取 科室人均
...@@ -469,8 +469,10 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -469,8 +469,10 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var rescompute = _resaccountRepository.GetEntity(w => w.AllotID == allot.ID && w.AccountingUnit == second.Department && w.UnitType == (int)unittype); var rescompute = _resaccountRepository.GetEntity(w => w.AllotID == allot.ID && w.AccountingUnit == second.Department && w.UnitType == (int)unittype);
var avg = (empolyee != null && empolyee.FitPeopleValue.HasValue) ? empolyee.FitPeopleValue : rescompute?.Avg ?? 0; var avg = (empolyee != null && empolyee.FitPeopleValue.HasValue) ? empolyee.FitPeopleValue : rescompute?.Avg ?? 0;
refAvg = avg ?? 0; refAvg = avg ?? 0;
refNum = rescompute?.Number ?? 0;
} }
head.AddOrUpdate("RefAvg", Math.Round(refAvg, 0, MidpointRounding.AwayFromZero)); head.AddOrUpdate("RefAvg", Math.Round(refAvg, 0, MidpointRounding.AwayFromZero));
head.AddOrUpdate("RefNum", refNum);
#endregion #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