Commit e91e20ff by lcx

Merge tag '提取出现空行' into develop

# Conflicts:
#	performance/Performance.Api/wwwroot/Performance.Api.xml
parents d0766222 3b76ba1f
...@@ -369,11 +369,13 @@ public IActionResult WholeHospitalGrantSummaryDownload([FromBody] HospitalGrantS ...@@ -369,11 +369,13 @@ public IActionResult WholeHospitalGrantSummaryDownload([FromBody] HospitalGrantS
string.IsNullOrEmpty(request.EndTime) || !DateTime.TryParse(request.EndTime, out edate)) string.IsNullOrEmpty(request.EndTime) || !DateTime.TryParse(request.EndTime, out edate))
throw new PerformanceException("请输入正确的时间"); throw new PerformanceException("请输入正确的时间");
var resetGroupBy = request.GroupBy.Copy();
var list = _computeService.GetAllComputeViewByDateAndTotal("view_allot_sign_emp", request); var list = _computeService.GetAllComputeViewByDateAndTotal("view_allot_sign_emp", request);
if (null == list) if (null == list)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
request.GroupBy = resetGroupBy;
List<string> headlist = new List<string>(); List<string> headlist = new List<string>();
foreach (var item in request.GroupBy.Union(request.SumBy).ToList()) foreach (var item in request.GroupBy.Union(request.SumBy).ToList())
...@@ -596,7 +598,6 @@ public IActionResult AllComputeByPMViewDownLoad([FromBody] BeginEndTime request) ...@@ -596,7 +598,6 @@ public IActionResult AllComputeByPMViewDownLoad([FromBody] BeginEndTime request)
[HttpPost] [HttpPost]
public ApiResponse GetWholeHospitalFinanceGrantSummary([FromBody] HospitalGrantSummary request) public ApiResponse GetWholeHospitalFinanceGrantSummary([FromBody] HospitalGrantSummary request)
{ {
return new ApiResponse(ResponseType.OK, "ok", _computeService.GetPerformanceSummary(request, "view_allot_sign_emp_finance")); return new ApiResponse(ResponseType.OK, "ok", _computeService.GetPerformanceSummary(request, "view_allot_sign_emp_finance"));
} }
......
...@@ -1441,98 +1441,6 @@ ...@@ -1441,98 +1441,6 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetHospitalConfig(System.Int32)">
<summary>
医院数据库配置列表
</summary>
<param name="hospitalId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.CreateHospitalConfig(Performance.EntityModels.sys_hospitalconfig)">
<summary>
创建医院数据库配置
</summary>
<param name="hospitalconfig"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.UpdateHospitalConfig(Performance.EntityModels.sys_hospitalconfig)">
<summary>
修改医院数据库配置
</summary>
<param name="hospitalconfig"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.DeleteHospitalConfig(System.Int32)">
<summary>
删除医院数据库配置
</summary>
<param name="hospitalconfigId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.TestConnectionCleared(System.Int32)">
<summary>
测试连接
</summary>
<param name="hospitalconfigId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetExtractTypeAndScript(System.Int32)">
<summary>
数据提取信息列表
</summary>
<param name="hospitalId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetExtractTypeAndScriptById(System.Int32,System.Int32)">
<summary>
数据提取详情
</summary>
<param name="typeId"></param>
<param name="scriptId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.DeleteExtractTypeAndScript(System.Int32,System.Int32)">
<summary>
删除提取Sql
</summary>
<param name="typeId"></param>
<param name="scriptId"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.EditExtractTypeAndScript(System.Int32,Performance.DtoModels.ExtractConfigResponse)">
<summary>
保存数据
</summary>
<param name="hospitalId"></param>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.ExecsqlAndGetResult(Performance.DtoModels.ConsumeTimeRequest)">
<summary>
执行Sql
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetDatatypes">
<summary>
数据库类型
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetSheettypes">
<summary>
来源类型
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ModExtractController.GetConfigs(System.Int32)">
<summary>
医院数据库连接配置
</summary>
<param name="hospitalId"></param>
<returns></returns>
</member>
<member name="T:Performance.Api.Controllers.OriginalController"> <member name="T:Performance.Api.Controllers.OriginalController">
<summary> <summary>
原始数据修改 原始数据修改
...@@ -2148,12 +2056,6 @@ ...@@ -2148,12 +2056,6 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.SecondAllotController.RedistributionRollback(System.Int32)">
<summary>
二次绩效撤回提交
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.SecondEmployeeDto)"> <member name="M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.SecondEmployeeDto)">
<summary> <summary>
二次分配人员字典带出 二次分配人员字典带出
...@@ -2263,41 +2165,6 @@ ...@@ -2263,41 +2165,6 @@
<param name="query"></param> <param name="query"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.BackgroundJob.Execute_Allot_Generate(Performance.Services.TaskService,Performance.EntityModels.bg_task)">
<summary>
生成测算表
</summary>
<param name="service"></param>
<param name="task"></param>
</member>
<member name="M:Performance.Api.BackgroundJob.Execute_Allot_Generate_Report(Performance.Services.TaskService,Performance.EntityModels.bg_task)">
<summary>
生成报表
</summary>
<param name="service"></param>
<param name="task"></param>
</member>
<member name="M:Performance.Api.BackgroundJob.Execute_Allot_CustomExtract(Performance.Services.TaskService,Performance.EntityModels.bg_task)">
<summary>
提取绩效数据
</summary>
<param name="service"></param>
<param name="task"></param>
</member>
<member name="M:Performance.Api.BackgroundJob.Timeout(Performance.Services.TaskService,System.Collections.Generic.List{Performance.EntityModels.bg_task})">
<summary>
超时关闭
</summary>
<param name="service"></param>
<param name="tasks"></param>
</member>
<member name="M:Performance.Api.BackgroundJob.Repeat(Performance.Services.TaskService,System.Collections.Generic.List{Performance.EntityModels.bg_task})">
<summary>
重复任务仅执行最后异常
</summary>
<param name="service"></param>
<param name="tasks"></param>
</member>
<member name="T:Performance.Api.ClearLoggerJob"> <member name="T:Performance.Api.ClearLoggerJob">
<summary> <summary>
删除历史日志 删除历史日志
......
...@@ -432,17 +432,17 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu ...@@ -432,17 +432,17 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu
Dictionary<string, List<string>> dict = new Dictionary<string, List<string>> Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>
{ {
{ "view_allot_sign_emp_group", new List<string>{ "hospitalid", "year", "month", "source", "allotid", "secondid", "states", "unittype", "accountingunit", "isshowmanage", "employeename", "jobnumber", "jobtitle", "emp_unittype", "emp_accountingunit", "bankcard", "batch", "jobcategory", "duty", "titleposition" } }, { "view_allot_sign_emp_group", new List<string>{ /* "year", "month", "allotid", "secondid",*/ "hospitalid", "source", "states", "unittype", "accountingunit", "isshowmanage", "employeename", "jobnumber", "jobtitle", "emp_unittype", "emp_accountingunit", "bankcard", "batch", "jobcategory", "duty", "titleposition" } },
{ "view_allot_sign_emp_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } }, { "view_allot_sign_emp_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } },
{ "view_allot_sign_dept_group", new List<string>{ "hospitalid", "allotid", "year", "month", "unittype", "accountingunit" } }, { "view_allot_sign_dept_group", new List<string>{ "hospitalid",/* "allotid", "year", "month", */"unittype", "accountingunit" } },
{ "view_allot_sign_dept_sum", new List<string>{ "perforfee", "workloadfee", "assessbeforeotherfee", "perfortotal", "scoringaverage", "extra", "medicineextra", "materialsextra", "assesslaterotherfee", "assesslaterperfortotal", "adjustfactor", "adjustlaterotherfee", "aprperforamount", "hideaprotherperforamount", "assesslatermanagementfee", "realgivefee" } }, { "view_allot_sign_dept_sum", new List<string>{ "perforfee", "workloadfee", "assessbeforeotherfee", "perfortotal", "scoringaverage", "extra", "medicineextra", "materialsextra", "assesslaterotherfee", "assesslaterperfortotal", "adjustfactor", "adjustlaterotherfee", "aprperforamount", "hideaprotherperforamount", "assesslatermanagementfee", "realgivefee" } },
{ "view_allot_sign_emp_finance_group", new List<string>{ "hospitalid", "year", "month", "allotid", "jobnumber", "employeename", "jobtitle", "unittype", "accountingunit", "bankcard", "jobcategory", "duty", "titleposition" } }, { "view_allot_sign_emp_finance_group", new List<string>{ "hospitalid",/* "year", "month", "allotid",*/ "jobnumber", "employeename", "jobtitle", "unittype", "accountingunit", "bankcard", "jobcategory", "duty", "titleposition" } },
{ "view_allot_sign_emp_finance_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } }, { "view_allot_sign_emp_finance_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } },
}; };
if (request.GroupBy == null || !request.GroupBy.Any(t => !string.IsNullOrEmpty(t))) request.GroupBy = dict[viewName + "_group"];
request.GroupBy.Remove("");
if (request.SumBy == null || !request.SumBy.Any(t => !string.IsNullOrEmpty(t))) request.SumBy = dict[viewName + "_sum"]; if (request.SumBy == null || !request.SumBy.Any(t => !string.IsNullOrEmpty(t))) request.SumBy = dict[viewName + "_sum"];
if (request.Search != null && request.Search.Any(w => !string.IsNullOrEmpty(w.Title) && !string.IsNullOrEmpty(w.Value))) if (request.Search != null && request.Search.Any(w => !string.IsNullOrEmpty(w.Title) && !string.IsNullOrEmpty(w.Value)))
...@@ -454,8 +454,27 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu ...@@ -454,8 +454,27 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu
if (!string.IsNullOrEmpty(request.SortBy)) if (!string.IsNullOrEmpty(request.SortBy))
sql += $" order by {request.SortBy} "; sql += $" order by {request.SortBy} ";
if (request.GroupBy == null || !request.GroupBy.Any(t => !string.IsNullOrEmpty(t))) /*request.GroupBy = dict[viewName + "_group"];*/
sql = $"select {string.Join(",", request.GroupBy)}, {string.Join(",", request.SumBy.Select(t => $"sum({t}) {t}"))} from ({sql}) tab group by {string.Join(",", request.GroupBy)}"; {
switch (viewName)
{
case "view_allot_sign_emp":
request.GroupBy.AddRange(new[] { "Source", "UnitType", "AccountingUnit", "JobNumber", "EmployeeName", "JobCategory" });
break;
case "view_allot_sign_dept":
request.GroupBy.AddRange(new[] { "UnitType", "AccountingUnit" });
break;
case "view_allot_sign_emp_finance":
request.GroupBy.AddRange(new[] { "UnitType", "AccountingUnit", "JobNumber", "EmployeeName" });
break;
}
sql = $"select {string.Join(",", dict[viewName + "_group"])}, {string.Join(",", request.SumBy.Select(t => $"sum({t}) {t}"))} from ({sql}) tab group by {string.Join(",", request.GroupBy)}";
}
else
{
sql = $"select {string.Join(",", request.GroupBy)}, {string.Join(",", request.SumBy.Select(t => $"sum({t}) {t}"))} from ({sql}) tab group by {string.Join(",", request.GroupBy)}";
}
//sql = $"select {string.Join(",", request.GroupBy)}, {string.Join(",", request.SumBy.Select(t => $"sum({t}) {t}"))} from ({sql}) tab group by {string.Join(",", request.GroupBy)}";
return DapperQuery<dynamic>(sql, new { beginTime = request.BeginTime, endTime = request.EndTime }).ToList(); return DapperQuery<dynamic>(sql, new { beginTime = request.BeginTime, endTime = request.EndTime }).ToList();
} }
......
...@@ -2104,6 +2104,7 @@ public QueryComputeByDateGetPage GetPerformanceSummary(HospitalGrantSummary requ ...@@ -2104,6 +2104,7 @@ public QueryComputeByDateGetPage GetPerformanceSummary(HospitalGrantSummary requ
string.IsNullOrEmpty(request.EndTime) || !DateTime.TryParse(request.EndTime, out edate)) string.IsNullOrEmpty(request.EndTime) || !DateTime.TryParse(request.EndTime, out edate))
throw new PerformanceException("请输入正确的时间"); throw new PerformanceException("请输入正确的时间");
request.EndTime = Convert.ToDateTime(request.EndTime).AddMonths(1).ToString();
var datas = reportRepository.QueryComputeByDateAndTotal(ViewName, request); var datas = reportRepository.QueryComputeByDateAndTotal(ViewName, request);
if (null == datas) if (null == datas)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
......
...@@ -168,7 +168,8 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s ...@@ -168,7 +168,8 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s
if (sheetType == SheetType.Income) if (sheetType == SheetType.Income)
{ {
incomes.Add(GetIncomeRowMessage(row, dataFirstCellNum, department, rowIndex)); if (!incomes.Any(t => t.Department == department))
incomes.Add(GetIncomeRowMessage(row, dataFirstCellNum, department, rowIndex));
continue; continue;
} }
......
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