Commit eef574ce by zry

绩效BUG修复

parent e61d2e75
...@@ -116,17 +116,17 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo ...@@ -116,17 +116,17 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
} }
/// <summary> ///// <summary>
/// 二次绩效录入页面配置信息 ///// 二次绩效录入页面配置信息
/// </summary> ///// </summary>
/// <returns></returns> ///// <returns></returns>
[Route("api/second/otherdetail/{secondid}")] //[Route("api/second/otherdetail/{secondid}")]
[HttpPost] //[HttpPost]
public ApiResponse SecondOtherDetail(int secondid) //public ApiResponse SecondOtherDetail(int secondid)
{ //{
var result = secondAllotService.GetSecondDetail(secondid); // var result = secondAllotService.GetSecondDetail(secondid);
return new ApiResponse(ResponseType.OK, result); // return new ApiResponse(ResponseType.OK, result);
} //}
#endregion #endregion
#region 模板使用 #region 模板使用
......
...@@ -797,12 +797,6 @@ ...@@ -797,12 +797,6 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.SecondAllotController.SecondOtherDetail(System.Int32)">
<summary>
二次绩效录入页面配置信息
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.SecondAllotController.Temp(Performance.DtoModels.AllotDeptRequest)"> <member name="M:Performance.Api.Controllers.SecondAllotController.Temp(Performance.DtoModels.AllotDeptRequest)">
<summary> <summary>
选择二次绩效模板 选择二次绩效模板
......
...@@ -614,27 +614,27 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy ...@@ -614,27 +614,27 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy
if (lastAllot != null) if (lastAllot != null)
allotDataList = perforImspecialunitRepository.GetEntities(t => t.AllotID == lastAllot.ID); allotDataList = perforImspecialunitRepository.GetEntities(t => t.AllotID == lastAllot.ID);
//查询数据 ////查询数据
var extractIdList = speaialList.Select(t => t.ExtractId).Distinct().ToList(); //var extractIdList = speaialList.Select(t => t.ExtractId).Distinct().ToList();
var extractList = extracts.Where(t => extractIdList.Contains(t.Id)).ToList(); //var extractList = extracts.Where(t => extractIdList.Contains(t.Id)).ToList();
List<ExtractDto> allExtract = new List<ExtractDto>(); //List<ExtractDto> allExtract = new List<ExtractDto>();
foreach (var item in extractList) //foreach (var item in extractList)
{ //{
var category = speaialList.Where(t => t.ExtractId == item.Id); // var category = speaialList.Where(t => t.ExtractId == item.Id);
if (category == null || category.Count() == 0) continue; // if (category == null || category.Count() == 0) continue;
foreach (var specialitem in category) // foreach (var specialitem in category)
{ // {
logManageService.WriteMsg("提取绩效数据", $"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表", 1, Allot.ID, "ReceiveMessage"); // logManageService.WriteMsg("提取绩效数据", $"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表", 1, Allot.ID, "ReceiveMessage");
LogHelper.Information($"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表,", "提取绩效数据"); // LogHelper.Information($"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表,", "提取绩效数据");
var config = configs.FirstOrDefault(t => t.Id == specialitem.ConfigId); // var config = configs.FirstOrDefault(t => t.Id == specialitem.ConfigId);
if (config == null) continue; // if (config == null) continue;
var result = QueryDatabase(config, item, Allot, specialitem.Target); // var result = QueryDatabase(config, item, Allot, specialitem.Target);
if (result != null) // if (result != null)
allExtract.AddRange(result); // allExtract.AddRange(result);
} // }
} //}
//取消合并单元格 //取消合并单元格
int mergedCount = sheet.NumMergedRegions; int mergedCount = sheet.NumMergedRegions;
...@@ -680,8 +680,18 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy ...@@ -680,8 +680,18 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy
mergedEnd = mergedBegin + count - 1; mergedEnd = mergedBegin + count - 1;
} }
} }
if (cell.StringCellValue == "数量") if (cell.StringCellValue == "数量" && speaialList[i]?.ExtractId > 0)
value = allExtract.FirstOrDefault(t => t.Category == speaialList[i].Target && t.Department == speaialList[i].Department)?.Value; {
logManageService.WriteMsg("提取绩效数据", $"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表", 1, Allot.ID, "ReceiveMessage");
LogHelper.Information($"执行SQL脚本获取数据 -- 特殊核算单元绩效测算表,", "提取绩效数据");
var config = configs.FirstOrDefault(t => t.Id == speaialList[i].ConfigId);
if (config == null) continue;
var ext = extracts.FirstOrDefault(w => w.Id == speaialList[i]?.ExtractId);
var result = QueryDatabase(config, ext, Allot);
value = result?.FirstOrDefault()?.Value;
}
if (!new List<string> { "量化指标", "数量", "量化指标绩效分值" }.Contains(cell.StringCellValue) && rowIndex == mergedBegin) if (!new List<string> { "量化指标", "数量", "量化指标绩效分值" }.Contains(cell.StringCellValue) && rowIndex == mergedBegin)
{ {
...@@ -840,6 +850,8 @@ private List<ExtractDto> QueryDatabase(sys_hospitalconfig config, mod_extract ex ...@@ -840,6 +850,8 @@ private List<ExtractDto> QueryDatabase(sys_hospitalconfig config, mod_extract ex
/// <param name="body"></param> /// <param name="body"></param>
private void SendEmail(string mail, string path, string subject, string body) private void SendEmail(string mail, string path, string subject, string body)
{ {
if (string.IsNullOrEmpty(mail)) return;
var message = new EmailMessage var message = new EmailMessage
{ {
To = new List<string> { mail }, To = new List<string> { mail },
......
...@@ -223,15 +223,15 @@ public SecondResponse GetSecondDetail(UseTempRequest request) ...@@ -223,15 +223,15 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
}; };
} }
/// <summary> ///// <summary>
/// 二次绩效详情 ///// 二次绩效详情
/// </summary> ///// </summary>
/// <returns></returns> ///// <returns></returns>
public List<ag_othersource> GetSecondDetail(int secondid) //public List<ag_othersource> GetSecondDetail(int secondid)
{ //{
var others = perforAgothersourceRepository.GetEntities(t => t.SecondId == secondid); // var others = perforAgothersourceRepository.GetEntities(t => t.SecondId == secondid);
return others; // return others;
} //}
/// <summary> /// <summary>
/// 二次绩效项录入保存 /// 二次绩效项录入保存
/// </summary> /// </summary>
...@@ -621,6 +621,10 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request) ...@@ -621,6 +621,10 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
if (result && request.IsPass == 1) if (result && request.IsPass == 1)
{ {
var histories = perforAgcomputeRepository.GetEntities(w => w.SecondId == request.SecondId);
if (histories != null && histories.Any())
perforAgcomputeRepository.RemoveRange(histories.ToArray());
var computes = new List<ag_compute>(); var computes = new List<ag_compute>();
if (second.SubmitType == 1) if (second.SubmitType == 1)
{ {
......
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