Commit 3c4292a9 by 纪旭 韦

医生组和医技组分开

parent 10e4a442
...@@ -74,6 +74,22 @@ public ApiResponse<List<res_specialunit>> GetSpecial([FromBody] ComputerRequest ...@@ -74,6 +74,22 @@ public ApiResponse<List<res_specialunit>> GetSpecial([FromBody] ComputerRequest
} }
/// <summary> /// <summary>
/// 医技组科室绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getmedicaldata")]
[HttpPost]
public ApiResponse<List<DeptResponse>> GetMedicalTechnician([FromBody] ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetMedicalPerformance(request.AllotId);
return new ApiResponse<List<DeptResponse>>(ResponseType.OK, "ok", list);
}
/// <summary>
/// 医生组科室绩效列表 /// 医生组科室绩效列表
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
"AppConnection": { "AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", //"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance_screen;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", "PerformanceConnectionString": "server=192.168.18.166;database=db_test_liangzhou;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;", "HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2" "RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
}, },
......
...@@ -440,6 +440,13 @@ ...@@ -440,6 +440,13 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ComputeController.GetMedicalTechnician(Performance.DtoModels.ComputerRequest)">
<summary>
医技组科室绩效列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.GetDoctor(Performance.DtoModels.ComputerRequest)"> <member name="M:Performance.Api.Controllers.ComputeController.GetDoctor(Performance.DtoModels.ComputerRequest)">
<summary> <summary>
医生组科室绩效列表 医生组科室绩效列表
......
...@@ -272,17 +272,24 @@ public List<res_specialunit> GetSpecial(int allotId) ...@@ -272,17 +272,24 @@ public List<res_specialunit> GetSpecial(int allotId)
} }
/// <summary> /// <summary>
/// 返回医技组科室绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public List<DeptResponse> GetMedicalPerformance(int allotId)
{
return GetGroupPerformance(allotId, new List<int> { (int)UnitType.医技组 });
}
/// <summary>
/// 返回医生组科室绩效 /// 返回医生组科室绩效
/// </summary> /// </summary>
/// <param name="allotId">绩效ID</param> /// <param name="allotId">绩效ID</param>
/// <returns></returns> /// <returns></returns>
public List<DeptResponse> GetDoctorPerformance(int allotId) public List<DeptResponse> GetDoctorPerformance(int allotId)
{ {
List<int> types = new List<int> { (int)UnitType.医生组, (int)UnitType.医技组 }; return GetGroupPerformance(allotId, new List<int> { (int)UnitType.医生组 });
var list = perforResaccountRepository.GetEntities(t => types.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> doctor = _mapper.Map<List<DeptResponse>>(list);
doctor?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return doctor;
} }
/// <summary> /// <summary>
...@@ -292,10 +299,7 @@ public List<DeptResponse> GetDoctorPerformance(int allotId) ...@@ -292,10 +299,7 @@ public List<DeptResponse> GetDoctorPerformance(int allotId)
/// <returns></returns> /// <returns></returns>
public List<DeptResponse> GetNursePerformance(int allotId) public List<DeptResponse> GetNursePerformance(int allotId)
{ {
var list = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit); return GetGroupPerformance(allotId, new List<int> { (int)UnitType.护理组 });
List<DeptResponse> nurse = _mapper.Map<List<DeptResponse>>(list);
nurse?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return nurse;
} }
/// <summary> /// <summary>
...@@ -305,13 +309,16 @@ public List<DeptResponse> GetNursePerformance(int allotId) ...@@ -305,13 +309,16 @@ public List<DeptResponse> GetNursePerformance(int allotId)
/// <returns></returns> /// <returns></returns>
public List<DeptResponse> GetOtherPerformance(int allotId) public List<DeptResponse> GetOtherPerformance(int allotId)
{ {
var unitType = new List<int> { (int)UnitType.其他医技组, (int)UnitType.其他医生组, (int)UnitType.其他护理组, (int)UnitType.专家组 }; return GetGroupPerformance(allotId, new List<int> { (int)UnitType.其他医技组, (int)UnitType.其他医生组, (int)UnitType.其他护理组, (int)UnitType.专家组 });
}
public List<DeptResponse> GetGroupPerformance(int allotId, List<int> 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)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> other = _mapper.Map<List<DeptResponse>>(list); List<DeptResponse> Performance = _mapper.Map<List<DeptResponse>>(list);
other?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString()); Performance?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return other; return Performance;
} }
/// <summary> /// <summary>
/// 返回行政科室绩效列表 /// 返回行政科室绩效列表
/// </summary> /// </summary>
......
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