Commit 3ec3b2ce by 钟博

材料考核显示,其他绩效统计

parent 44ed50f0
......@@ -22,12 +22,15 @@ public class ComputeController : Controller
private ComputeService _computeService;
private AllotService _allotService;
private ClaimService _claim;
private EmployeeService _employeeService;
public ComputeController(AllotService allotService,
ComputeService computeService,
EmployeeService employeeService,
ClaimService claim)
{
_allotService = allotService;
_computeService = computeService;
_employeeService = employeeService;
_claim = claim;
}
......@@ -375,5 +378,25 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
}
#endregion
#region 其他绩效统计
/// <summary>
/// 其他医院绩效统计
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("OtherPerStats/{allotId}")]
[HttpPost]
public ApiResponse OtherPerStats(int allotId)
{
var employee = _employeeService.GetAprList(allotId, _claim.GetUserId());
if (employee==null)
return new ApiResponse(ResponseType.OK,null);
_computeService.GetOtherPerStats(employee);
return new ApiResponse();
}
#endregion
}
}
\ No newline at end of file
......@@ -467,15 +467,15 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
/// 材料科室考核
/// </summary>
/// <returns></returns>
[Route("deptAssessment")]
[Route("deptAssessment/{allotId}")]
[HttpPost]
public ApiResponse GetDeptAssessment(int allotId)
{
if (allotId<=0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
employeeService.GetDeptAssessment(allotId);
return new ApiResponse();
var result=employeeService.GetDeptAssessment(allotId);
return new ApiResponse(ResponseType.OK,result);
}
}
}
......@@ -1446,5 +1446,12 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
return Mapper.Map<res_baiscnorm>(baiscnorm);
}
}
public List<string> GetOtherPerStats(List<per_apr_amount> employees)
{
var emp = employees.Select(t => t.PerforType).Distinct();
return new List<string>();
}
}
}
......@@ -643,13 +643,58 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
#region 科室考核
public List<Row> GetDeptAssessment(int allotId)
public List<string[]> GetDeptAssessment(int allotId)
{
var sheet = perforPersheetRepository.GetEntity(t => t.AllotID == allotId && t.SheetName == "5.4 科室材料考核2");
var data = perforImdataRepository.GetEntities(t => t.AllotID == allotId && t.SheetID == sheet.ID);
var rowData = new List<Row>();
if (sheet == null)
return new List<string[]>();
return new List<Row>();
var data = perforImdataRepository.GetEntities(t => t.AllotID == allotId && t.SheetID == sheet.ID);
var dataNum = data?.Select(t => t.RowNumber)?.OrderBy(c=>c.Value).Distinct();
var rowData = new List<string[]>();
if (dataNum != null)
foreach (var num in dataNum)
{
var deptData = new string[7];
var row = data.Where(t => t.RowNumber == num);
deptData[2] = row.First()?.AccountingUnit;
if((int)row.First()?.UnitType==(int)UnitType.医生组)
deptData[1] = "医生组";
else if((int)row.First()?.UnitType==(int)UnitType.医技组)
deptData[1] = "医技组";
else if ((int)row.First()?.UnitType == (int)UnitType.护理组)
deptData[1] = "护理组";
foreach (var imData in row)
{
if (imData.TypeName == "考核得分合计")
{
if (imData.CellValue != null)
deptData[0] = Math.Round((decimal) imData.CellValue * 100) + "%";
}
else if(imData.TypeName == "考核1")
{
if (imData.CellValue != null)
deptData[3] = Math.Round((decimal) imData.CellValue * 100) + "%";
}
else if (imData.TypeName == "考核2")
{
if (imData.CellValue != null)
deptData[4] = Math.Round((decimal) imData.CellValue * 100) + "%";
}
else if (imData.TypeName == "考核三")
{
if (imData.CellValue != null)
deptData[5] = Math.Round((decimal) imData.CellValue * 100) + "%";
}
else if (imData.TypeName == "考核四")
if (imData.CellValue != null)
deptData[6] = Math.Round((decimal) imData.CellValue * 100) + "%";
}
rowData.Add(deptData);
}
return rowData;
}
#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