Commit 1c3bd83d by lcx

获取科室来源为4.1核算,二次绩效补充弄年资/工作量占比,特殊科室绩效详情修改bug-null取值,其他模板返回数据格式修改,附带列头

parent 380c1de1
...@@ -33,12 +33,12 @@ public class ReportController : Controller ...@@ -33,12 +33,12 @@ public class ReportController : Controller
[Route("rank")] [Route("rank")]
[HttpPost] [HttpPost]
public ApiResponse Rank([FromBody]HospitalIdRequest request) public ApiResponse Rank([FromBody] HospitalIdRequest request)
{ {
var allots = allotService.GetAllotList(request.HospitalId); var allots = allotService.GetAllotList(request.HospitalId);
int[] states = new int[] { 6, 8 }; int[] states = new int[] { 6, 8 };
var result = allots.Where(w => states.Contains(w.States)) var result = allots?.Where(w => states.Contains(w.States))
.Select(w => new { w.Year, w.Month }) .Select(w => new { w.Year, w.Month })
.OrderByDescending(w => w.Year) .OrderByDescending(w => w.Year)
.ThenByDescending(w => w.Month); .ThenByDescending(w => w.Month);
...@@ -48,7 +48,7 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request) ...@@ -48,7 +48,7 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request)
[Route("selection")] [Route("selection")]
[HttpPost] [HttpPost]
public ApiResponse Selection([FromBody]SelectionRequest report) public ApiResponse Selection([FromBody] SelectionRequest report)
{ {
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var result = reportDataService.GetReportSelection(report.GroupId, userId); var result = reportDataService.GetReportSelection(report.GroupId, userId);
...@@ -57,7 +57,7 @@ public ApiResponse Selection([FromBody]SelectionRequest report) ...@@ -57,7 +57,7 @@ public ApiResponse Selection([FromBody]SelectionRequest report)
[Route("info")] [Route("info")]
[HttpPost] [HttpPost]
public ApiResponse Info([FromBody]SelectionRequest report) public ApiResponse Info([FromBody] SelectionRequest report)
{ {
var result = reportDataService.GetReportInfo(report.GroupId); var result = reportDataService.GetReportInfo(report.GroupId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -65,7 +65,7 @@ public ApiResponse Info([FromBody]SelectionRequest report) ...@@ -65,7 +65,7 @@ public ApiResponse Info([FromBody]SelectionRequest report)
[Route("search")] [Route("search")]
[HttpPost] [HttpPost]
public ApiResponse Search([FromBody]SearchReportRequest report) public ApiResponse Search([FromBody] SearchReportRequest report)
{ {
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId); var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId);
...@@ -78,7 +78,7 @@ public ApiResponse Search([FromBody]SearchReportRequest report) ...@@ -78,7 +78,7 @@ public ApiResponse Search([FromBody]SearchReportRequest report)
/// <returns></returns> /// <returns></returns>
[Route("survey")] [Route("survey")]
[HttpPost] [HttpPost]
public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.Survey(request.HospitalId); var result = reportService.Survey(request.HospitalId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -90,7 +90,7 @@ public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]Repor ...@@ -90,7 +90,7 @@ public ApiResponse Survey([CustomizeValidator(RuleSet = "Query"), FromBody]Repor
/// <returns></returns> /// <returns></returns>
[Route("doctoravg")] [Route("doctoravg")]
[HttpPost] [HttpPost]
public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.DoctorAvg(request.HospitalId, request.IsIndex); var result = reportService.DoctorAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -102,7 +102,7 @@ public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -102,7 +102,7 @@ public ApiResponse DoctorAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("nurseavg")] [Route("nurseavg")]
[HttpPost] [HttpPost]
public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var result = reportService.NurseAvg(request.HospitalId, request.IsIndex); var result = reportService.NurseAvg(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -114,7 +114,7 @@ public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -114,7 +114,7 @@ public ApiResponse NurseAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("outfeeavg")] [Route("outfeeavg")]
[HttpPost] [HttpPost]
public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.OutFeeAvg(request.HospitalId); var list = reportService.OutFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -126,7 +126,7 @@ public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -126,7 +126,7 @@ public ApiResponse OutFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("inpatfeeavg")] [Route("inpatfeeavg")]
[HttpPost] [HttpPost]
public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.InpatFeeAvg(request.HospitalId); var list = reportService.InpatFeeAvg(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -138,7 +138,7 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody] ...@@ -138,7 +138,7 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
/// <returns></returns> /// <returns></returns>
[Route("medicine")] [Route("medicine")]
[HttpPost] [HttpPost]
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.Medicine(request.HospitalId, request.IsIndex); var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -150,7 +150,7 @@ public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -150,7 +150,7 @@ public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("income")] [Route("income")]
[HttpPost] [HttpPost]
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.Income(request.HospitalId, request.IsIndex); var list = reportService.Income(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -163,7 +163,7 @@ public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]Repor ...@@ -163,7 +163,7 @@ public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody]Repor
/// <returns></returns> /// <returns></returns>
[Route("getperforavg")] [Route("getperforavg")]
[HttpPost] [HttpPost]
public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.GetAvgPerfor(request.HospitalId); var list = reportService.GetAvgPerfor(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -177,7 +177,7 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re ...@@ -177,7 +177,7 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re
/// <returns></returns> /// <returns></returns>
[Route("avgratio")] [Route("avgratio")]
[HttpPost] [HttpPost]
public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]ReportRequest request) public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{ {
var list = reportService.AvgRatio(request.HospitalId); var list = reportService.AvgRatio(request.HospitalId);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -190,7 +190,7 @@ public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]Rep ...@@ -190,7 +190,7 @@ public ApiResponse AvgRatio([CustomizeValidator(RuleSet = "Query"), FromBody]Rep
/// <returns></returns> /// <returns></returns>
[Route("index")] [Route("index")]
[HttpPost] [HttpPost]
public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody]ReportRequest request) public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody] ReportRequest request)
{ {
var list = reportService.IndexReport(request.HospitalId, request.Source); var list = reportService.IndexReport(request.HospitalId, request.Source);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
...@@ -203,7 +203,7 @@ public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody] ...@@ -203,7 +203,7 @@ public ApiResponse IndexReport([CustomizeValidator(RuleSet = "Index"), FromBody]
/// <returns></returns> /// <returns></returns>
[Route("menu")] [Route("menu")]
[HttpPost] [HttpPost]
public ApiResponse MenuReport([CustomizeValidator(RuleSet = "Menu"), FromBody]ReportRequest request) public ApiResponse MenuReport([CustomizeValidator(RuleSet = "Menu"), FromBody] ReportRequest request)
{ {
var list = reportService.MenuReport(request); var list = reportService.MenuReport(request);
return new ApiResponse(ResponseType.OK, "", list); return new ApiResponse(ResponseType.OK, "", list);
......
...@@ -329,7 +329,12 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request) ...@@ -329,7 +329,12 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
public ApiResponse OtherList([FromBody] AgOtherRequest request) public ApiResponse OtherList([FromBody] AgOtherRequest request)
{ {
var result = secondAllotService.OtherList(request.SecondId); var result = secondAllotService.OtherList(request.SecondId);
return new ApiResponse(ResponseType.OK, result); var obj = new
{
header = secondAllotService.OtherListHeader(request.SecondId, result?.Sum(t => t.Amount)),
body = result,
};
return new ApiResponse(ResponseType.OK, obj);
} }
/// <summary> /// <summary>
......
...@@ -686,12 +686,12 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second) ...@@ -686,12 +686,12 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
ScoringAverage = special.First().ScoringAverage.Value, ScoringAverage = special.First().ScoringAverage.Value,
OtherPerfor1 = special.First().OtherPerfor.Value, OtherPerfor1 = special.First().OtherPerfor.Value,
AdjustFactor = special.First().Adjust.Value, AdjustFactor = special.First().Adjust.Value,
Avg = special.First().Avg.Value, Avg = special.First().Avg,
RealGiveFee = special.First().RealGiveFee.Value, RealGiveFee = special.First().RealGiveFee,
Number = special.First().Number.Value, Number = special.First().Number.Value,
PerforFee = special.First().GiveFee.Value, PerforFee = special.First().GiveFee,
PerforTotal = special.First().ResultsTotalFee.Value, PerforTotal = special.First().ResultsTotalFee,
Income = special.First().ResultsTotalFee.Value, Income = special.First().ResultsTotalFee,
Extra = special.First().Punishment.Value, Extra = special.First().Punishment.Value,
}, },
Detail = new List<DetailDtos>(), Detail = new List<DetailDtos>(),
...@@ -700,7 +700,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second) ...@@ -700,7 +700,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
{ {
ItemName = "特殊核算单元绩效测算表", ItemName = "特殊核算单元绩效测算表",
IncomeType = 4, IncomeType = 4,
Amount = special.First().ResultsTotalFee.Value, Amount = special.First().ResultsTotalFee ?? 0,
Items = new List<DetailModule>(), Items = new List<DetailModule>(),
GroupBasis = 1, GroupBasis = 1,
}; };
......
...@@ -426,11 +426,18 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems) ...@@ -426,11 +426,18 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems)
{"绩效合计(考核后)", second.RealGiveFee.ToString()}, {"绩效合计(考核后)", second.RealGiveFee.ToString()},
{"主任基础绩效", account?.Avg?.ToString()} {"主任基础绩效", account?.Avg?.ToString()}
}; };
var pairs = new Dictionary<string, string>
{
{ "职称绩效", "年资职称绩效占比" },
{ "工作量绩效", "工作量绩效占比" },
};
var config = perforCofagainRepository.GetEntities(t => t.AllotID == second.AllotId); var config = perforCofagainRepository.GetEntities(t => t.AllotID == second.AllotId);
if (config != null && config.Any()) if (config != null && config.Any())
config.ForEach(t => config.ForEach(t =>
{ {
keyValue.Add(t.TypeName, t.Value.ToString()); var key = pairs.ContainsKey(t.TypeName) ? pairs[t.TypeName] : t.TypeName;
if (!keyValue.Keys.Contains(key))
keyValue.Add(key, t.Value.ToString());
}); });
foreach (var item in keyValue) foreach (var item in keyValue)
...@@ -1154,7 +1161,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request) ...@@ -1154,7 +1161,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
{ {
AllotId = second.AllotId, AllotId = second.AllotId,
SecondId = second.Id, SecondId = second.Id,
Department = item.Department, Department = second.Department,
WorkPost = item.WorkPost, WorkPost = item.WorkPost,
JobNumber = item.WorkNumber, JobNumber = item.WorkNumber,
PersonName = item.Name, PersonName = item.Name,
...@@ -1250,6 +1257,21 @@ public List<ag_othersource> OtherList(int secondId) ...@@ -1250,6 +1257,21 @@ public List<ag_othersource> OtherList(int secondId)
return otherSecondList?.OrderBy(t => t.Id).ToList(); return otherSecondList?.OrderBy(t => t.Id).ToList();
} }
public Dictionary<string, string> OtherListHeader(int secondId, decimal? amount)
{
var second = perforAgsecondallotRepository.GetEntity(t => t.Id == secondId);
if (second == null) return new Dictionary<string, string>();
var keyValue = new Dictionary<string, string>
{
{"发放月份", $"{second.Year}{second.Month.ToString().PadLeft(2, '0')}月"},
{"绩效合计(考核后)", second.RealGiveFee.ToString()},
{"业绩分配绩效总额", (second.RealGiveFee - (amount ?? 0)).ToString()},
};
return keyValue;
}
public List<ag_othersource> OtherSave(int secondId, List<ag_othersource> request) public List<ag_othersource> OtherSave(int secondId, List<ag_othersource> request)
{ {
var existEntities = perforAgothersourceRepository.GetEntities(t => t.SecondId == secondId); var existEntities = perforAgothersourceRepository.GetEntities(t => t.SecondId == secondId);
......
...@@ -25,7 +25,7 @@ public class UserService : IAutoInjection ...@@ -25,7 +25,7 @@ public class UserService : IAutoInjection
private PerforUserroleRepository _userroleRepository; private PerforUserroleRepository _userroleRepository;
private PerforImemployeeRepository _employeeRepository; private PerforImemployeeRepository _employeeRepository;
private PerforPerallotRepository _perforPerallotRepository; private PerforPerallotRepository _perforPerallotRepository;
private PerforImaccountbasicRepository _perforImaccountbasicRepository; private PerforImaccountbasicRepository _imaccountbasicRepository;
private PerforImspecialunitRepository _imspecialunitRepository; private PerforImspecialunitRepository _imspecialunitRepository;
public UserService(IOptions<Application> application, public UserService(IOptions<Application> application,
PerforSmsRepository smsRepository, PerforSmsRepository smsRepository,
...@@ -36,7 +36,7 @@ public class UserService : IAutoInjection ...@@ -36,7 +36,7 @@ public class UserService : IAutoInjection
PerforUserroleRepository userroleRepository, PerforUserroleRepository userroleRepository,
PerforImemployeeRepository employeeRepository, PerforImemployeeRepository employeeRepository,
PerforPerallotRepository perforPerallotRepository, PerforPerallotRepository perforPerallotRepository,
PerforImaccountbasicRepository perforImaccountbasicRepository, PerforImaccountbasicRepository imaccountbasicRepository,
PerforImspecialunitRepository imspecialunitRepository) PerforImspecialunitRepository imspecialunitRepository)
{ {
this.application = application.Value; this.application = application.Value;
...@@ -48,7 +48,7 @@ public class UserService : IAutoInjection ...@@ -48,7 +48,7 @@ public class UserService : IAutoInjection
this._userroleRepository = userroleRepository; this._userroleRepository = userroleRepository;
this._employeeRepository = employeeRepository; this._employeeRepository = employeeRepository;
this._perforPerallotRepository = perforPerallotRepository; this._perforPerallotRepository = perforPerallotRepository;
this._perforImaccountbasicRepository = perforImaccountbasicRepository; this._imaccountbasicRepository = imaccountbasicRepository;
this._imspecialunitRepository = imspecialunitRepository; this._imspecialunitRepository = imspecialunitRepository;
} }
...@@ -341,12 +341,12 @@ public List<TitleValue> Department(int hospitalID) ...@@ -341,12 +341,12 @@ public List<TitleValue> Department(int hospitalID)
//if (department != null && department.Count() > 0) //if (department != null && department.Count() > 0)
// result.AddRange(department); // result.AddRange(department);
var department = _perforImaccountbasicRepository.GetEntities(t => !string.IsNullOrEmpty(t.DoctorAccountingUnit) && idList.Contains(t.AllotID.Value)).Select(t => t.DoctorAccountingUnit); var department = _imaccountbasicRepository.GetEntities(t => !string.IsNullOrEmpty(t.DoctorAccountingUnit) && idList.Contains(t.AllotID.Value))?.Select(t => t.DoctorAccountingUnit);
if (department != null && department.Count() > 0) if (department != null && department.Count() > 0)
result.AddRange(department); result.AddRange(department);
// 特殊科室 // 特殊科室
department = _imspecialunitRepository.GetEntities(t => !string.IsNullOrEmpty(t.AccountingUnit) && idList.Contains(t.AllotID.Value)).Select(t => t.AccountingUnit); department = _imspecialunitRepository.GetEntities(t => !string.IsNullOrEmpty(t.AccountingUnit) && idList.Contains(t.AllotID.Value))?.Select(t => t.AccountingUnit);
if (department != null && department.Count() > 0) if (department != null && department.Count() > 0)
result.AddRange(department); result.AddRange(department);
......
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