bug修复

parent fb1d4b62
...@@ -1604,6 +1604,11 @@ ...@@ -1604,6 +1604,11 @@
科室 科室
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.DeptResponse.ManagerNumber">
<summary>
科主任/护士长数量
</summary>
</member>
<member name="P:Performance.DtoModels.DeptResponse.Number"> <member name="P:Performance.DtoModels.DeptResponse.Number">
<summary> <summary>
核算单元医生数量 核算单元医生数量
......
...@@ -146,8 +146,10 @@ public AutoMapperConfigs() ...@@ -146,8 +146,10 @@ public AutoMapperConfigs()
//CreateMap<PerDataAccountDoctor, res_accountdoctor>(); //CreateMap<PerDataAccountDoctor, res_accountdoctor>();
//CreateMap<PerDataAccountNurse, res_accountnurse>(); //CreateMap<PerDataAccountNurse, res_accountnurse>();
//CreateMap<res_accountdoctor, PerDataAccountBaisc>(); //CreateMap<res_accountdoctor, PerDataAccountBaisc>();
CreateMap<res_account, PerDataAccountBaisc>(); CreateMap<res_account, PerDataAccountBaisc>()
CreateMap<PerDataAccountBaisc, res_account>(); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString()));
CreateMap<PerDataAccountBaisc, res_account>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value));
//CreateMap<PerDataAccountBaisc, res_accountnurse>(); //CreateMap<PerDataAccountBaisc, res_accountnurse>();
//CreateMap<res_accountdoctor, ComputeSource>(); //CreateMap<res_accountdoctor, ComputeSource>();
......
...@@ -21,7 +21,7 @@ public class PerDataAccountBaisc : IPerData ...@@ -21,7 +21,7 @@ public class PerDataAccountBaisc : IPerData
/// <summary> /// <summary>
/// 核算单元类别 1 医生组 2护理组 3医技组 /// 核算单元类别 1 医生组 2护理组 3医技组
/// </summary> /// </summary>
public Nullable<int> UnitType { get; set; } public string UnitType { get; set; }
/// <summary> /// <summary>
/// 核算单元 /// 核算单元
......
...@@ -39,6 +39,11 @@ public class DeptResponse ...@@ -39,6 +39,11 @@ public class DeptResponse
public string Department { get; set; } public string Department { get; set; }
/// <summary> /// <summary>
/// 科主任/护士长数量
/// </summary>
public Nullable<int> ManagerNumber { get; set; }
/// <summary>
/// 核算单元医生数量 /// 核算单元医生数量
/// </summary> /// </summary>
public Nullable<decimal> Number { get; set; } public Nullable<decimal> Number { get; set; }
......
...@@ -121,7 +121,7 @@ public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormLis ...@@ -121,7 +121,7 @@ public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormLis
var sheet = list.FirstOrDefault(t => t.SheetType == info.SheetType); var sheet = list.FirstOrDefault(t => t.SheetType == info.SheetType);
var perData = sheet.PerData.Select(t => (PerDataAccountBaisc)t); var perData = sheet.PerData.Select(t => (PerDataAccountBaisc)t);
//剔除不同科室相同核算单元 //剔除不同科室相同核算单元
var groupData = perData.Where(t => t.UnitType == (int)info.UnitType) var groupData = perData.Where(t => t.UnitType == info.UnitType.ToString())
.GroupBy(t => t.AccountingUnit) .GroupBy(t => t.AccountingUnit)
.Select(t => new { AccountingUnit = t.Key, Number = t.Sum(p => p.ManagerNumber + p.Number), PerforTotal = t.Max(p => p.PerforTotal) }); .Select(t => new { AccountingUnit = t.Key, Number = t.Sum(p => p.ManagerNumber + p.Number), PerforTotal = t.Max(p => p.PerforTotal) });
......
...@@ -252,8 +252,8 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -252,8 +252,8 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
PerSheet sheet = new PerSheet(info.Name, info.Name, info.SheetType, new List<PerHeader>(), new List<IPerData>()); PerSheet sheet = new PerSheet(info.Name, info.Name, info.SheetType, new List<PerHeader>(), new List<IPerData>());
foreach (var unitType in info.UnitTypes) foreach (var unitType in info.UnitTypes)
{ {
var atDataList = dataList.Where(t => t.UnitType == (int)unitType); var atDataList = dataList.Where(t => t.UnitType == unitType.ToString());
foreach (var dept in dataList.Where(t => t.UnitType == (int)unitType)) foreach (var dept in dataList.Where(t => t.UnitType == unitType.ToString()))
{ {
if (string.IsNullOrEmpty(dept.AccountingUnit)) if (string.IsNullOrEmpty(dept.AccountingUnit))
continue; continue;
...@@ -325,7 +325,7 @@ public List<res_baiscnorm> ComputeMinimum(IEnumerable<PerDataAccountBaisc> accou ...@@ -325,7 +325,7 @@ public List<res_baiscnorm> ComputeMinimum(IEnumerable<PerDataAccountBaisc> accou
foreach (var rule in basicRuleList) foreach (var rule in basicRuleList)
{ {
var dataList = accountList.Where(t => t.UnitType == (int)rule.UnitType); var dataList = accountList.Where(t => t.UnitType == rule.UnitType.ToString());
var count = dataList.Sum(t => t.ManagerNumber + t.Number); var count = dataList.Sum(t => t.ManagerNumber + t.Number);
decimal totalValue = 0m; decimal totalValue = 0m;
foreach (var dept in dataList) foreach (var dept in dataList)
......
...@@ -333,7 +333,7 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee ...@@ -333,7 +333,7 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee
var importRow = importSheet.CreateRow(maxHeaderRowNumber + i + 1); var importRow = importSheet.CreateRow(maxHeaderRowNumber + i + 1);
Dictionary<string, Func<PerDataAccountBaisc, object>> keyValues = new Dictionary<string, Func<PerDataAccountBaisc, object>> Dictionary<string, Func<PerDataAccountBaisc, object>> keyValues = new Dictionary<string, Func<PerDataAccountBaisc, object>>
{ {
{ "核算单元类型", (t) => EnumHelper.GetDescription((UnitType)t.UnitType) }, { "核算单元类型", (t) => t.UnitType },
{ "核算单元", (t) => t.AccountingUnit }, { "核算单元", (t) => t.AccountingUnit },
{ "科室名称", (t) => t.Department }, { "科室名称", (t) => t.Department },
{ "医生组核算单元医生数量", (t) => t.Number }, { "医生组核算单元医生数量", (t) => t.Number },
......
...@@ -102,7 +102,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null) ...@@ -102,7 +102,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
{ {
//获取最大列坐标位置 //获取最大列坐标位置
int thiscell = sheet.PerHeader.OrderByDescending(t => t.PointCell).FirstOrDefault().PointCell + 1; int thiscell = sheet.PerHeader.OrderByDescending(t => t.PointCell).FirstOrDefault().PointCell + 1;
PerHeader perHead = new PerHeader(0, thiscell, "工作量绩效合计", 0, 2, 1, new List<PerHeader>(), 1); PerHeader perHead = new PerHeader(0, thiscell, "工作量绩效合计", 0, 1, 1, new List<PerHeader>(), 1);
var dataList = sheet.PerData.Select(t => (PerData)t); var dataList = sheet.PerData.Select(t => (PerData)t);
......
...@@ -32,7 +32,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -32,7 +32,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc(); PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc();
unifyUnit.RowNumber = r; unifyUnit.RowNumber = r;
unifyUnit.UnitType = UnitType(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.ToString()); unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.ToString();
unifyUnit.AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString(); unifyUnit.AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString();
unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell)?.ToString(); unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell)?.ToString();
unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.ToString()); unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.ToString());
......
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