Commit c0e36e2c by 李承祥

核算单元数据类型修改,核算单元类型字典

parent 62cac2f9
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -89,5 +90,18 @@ public ApiResponse<List<TitleValue>> Accounting([CustomizeValidator(RuleSet = "S ...@@ -89,5 +90,18 @@ public ApiResponse<List<TitleValue>> Accounting([CustomizeValidator(RuleSet = "S
return new ApiResponse<List<TitleValue>>(ResponseType.OK, "医院核算单元列表", result); return new ApiResponse<List<TitleValue>>(ResponseType.OK, "医院核算单元列表", result);
} }
#endregion #endregion
/// <summary>
/// 医院核算单元
/// </summary>
/// <returns></returns>
[Route("unittype")]
[HttpPost]
public ApiResponse<List<EnumItem>> UnitType()
{
var result = guaranteeService.UnitType();
return new ApiResponse<List<EnumItem>>(ResponseType.OK, "核算单元类型", result);
}
} }
} }
...@@ -19,7 +19,7 @@ public class GuaranteeResponse ...@@ -19,7 +19,7 @@ public class GuaranteeResponse
/// <summary> /// <summary>
/// 核算单元类型 1 医生组 2 护理组 3 医技组 /// 核算单元类型 1 医生组 2 护理组 3 医技组
/// </summary> /// </summary>
public string UnitType { get; set; } public Nullable<int> UnitType { get; set; }
/// <summary> /// <summary>
/// 保底科室 /// 保底科室
......
using AutoMapper; using AutoMapper;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository; using Performance.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -55,7 +56,7 @@ public List<GuaranteeResponse> GuaranTree(int allotId) ...@@ -55,7 +56,7 @@ public List<GuaranteeResponse> GuaranTree(int allotId)
Target = g.Key.Target, Target = g.Key.Target,
Source = g.Select(t => new GuaranItems { GId = t.Id, GValue = t.Source }).ToList(), Source = g.Select(t => new GuaranItems { GId = t.Id, GValue = t.Source }).ToList(),
Priority = g.Min(m => m.Priority.Value), Priority = g.Min(m => m.Priority.Value),
UnitType = ((UnitType)g.Key.UnitType.Value).ToString() UnitType = g.Key.UnitType
}).OrderBy(t => t.UnitType).ThenBy(t => t.Priority).ToList(); }).OrderBy(t => t.UnitType).ThenBy(t => t.Priority).ToList();
return group; return group;
} }
...@@ -154,16 +155,16 @@ public List<TitleValue> Accounting(int allotId) ...@@ -154,16 +155,16 @@ public List<TitleValue> Accounting(int allotId)
} }
return result; return result;
} }
#endregion
/// <summary> /// <summary>
/// 获取优先级 /// 医院核算单元
/// </summary> /// </summary>
/// <param name="allotId"></param> /// <param name="allotId"></param>
/// <returns></returns> /// <returns></returns>
public int Priority(int allotId, int unitType, string target) public List<EnumItem> UnitType()
{ {
return perforCofguaranteeRepository.GetEntity(t => t.AllotId == allotId && t.UnitType == unitType && t.Target == target)?.Priority ?? 0; return EnumHelper.GetItems<UnitType>();
} }
#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