Commit 448ab2e4 by lcx

修改日志方法参数

parent 56da633d
...@@ -237,7 +237,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A ...@@ -237,7 +237,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
int userId = _claim.GetUserId(); int userId = _claim.GetUserId();
var uuid = Guid.NewGuid().ToString("N"); var uuid = Guid.NewGuid().ToString("N");
_notificationsService.SendGenerateMessage(userId, allot, uuid, $"准备生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效,请稍等!"); _notificationsService.SendGenerateMessage(userId, allot.ID, $"准备生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效,请稍等!");
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.Wait, EnumHelper.GetDescription(AllotStates.Wait), allot.Generate); _allotService.UpdateAllotStates(allot.ID, (int)AllotStates.Wait, EnumHelper.GetDescription(AllotStates.Wait), allot.Generate);
if (_evn.IsEnvironment("Localhost")) if (_evn.IsEnvironment("Localhost"))
{ {
...@@ -258,7 +258,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A ...@@ -258,7 +258,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
}); });
} }
_notificationsService.SendGenerateMessage(userId, allot, uuid, $"等待绩效生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效,请稍等!"); _notificationsService.SendGenerateMessage(userId, allot.ID, $"等待绩效生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效,请稍等!");
//_allotService.Generate(allot, email); //_allotService.Generate(allot, email);
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email)); ////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
......
...@@ -312,20 +312,20 @@ public void Generate(per_allot allot, string mail, string uuid, int userId) ...@@ -312,20 +312,20 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
DateTime time = DateTime.Now; DateTime time = DateTime.Now;
try try
{ {
notificationsService.SendGenerateMessage(userId, allot, uuid, $"正在生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效!"); notificationsService.SendGenerateMessage(userId, allot.ID, $"正在生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效!");
var excel = new PerExcel(); var excel = new PerExcel();
int generate = allot.Generate; int generate = allot.Generate;
if (new int[] { (int)AllotGenerate.OriginalDataEdited, (int)AllotGenerate.PersonnelOffice }.Contains(allot.Generate)) if (new int[] { (int)AllotGenerate.OriginalDataEdited, (int)AllotGenerate.PersonnelOffice }.Contains(allot.Generate))
{ {
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效开始生成,数据来源:生成成功后被修改的原数据。"); notificationsService.SendGenerateMessage(userId, allot.ID, "绩效开始生成,数据来源:生成成功后被修改的原数据。");
generate = (int)AllotGenerate.Success; generate = (int)AllotGenerate.Success;
configService.ClearResData(allot.ID); configService.ClearResData(allot.ID);
excel = queryDataService.QueryDataAndHeader(allot); excel = queryDataService.QueryDataAndHeader(allot);
} }
else else
{ {
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效开始生成,数据来源:用户上传的Excel。"); notificationsService.SendGenerateMessage(userId, allot.ID, "绩效开始生成,数据来源:用户上传的Excel。");
configService.Clear(allot.ID); configService.Clear(allot.ID);
// 关闭筛选功能 // 关闭筛选功能
...@@ -352,7 +352,7 @@ public void Generate(per_allot allot, string mail, string uuid, int userId) ...@@ -352,7 +352,7 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
//根据当前业绩绩效核算出最终绩效结果 //根据当前业绩绩效核算出最终绩效结果
//科室经济核算汇总、工作量汇总 //科室经济核算汇总、工作量汇总
notificationsService.SendGenerateMessage(userId, allot, uuid, "科室业绩汇总,正在生成科室收入支出汇总、工作量汇总"); notificationsService.SendGenerateMessage(userId, allot.ID, "科室业绩汇总,正在生成科室收入支出汇总、工作量汇总");
var (list, mergeSheets) = processComputService.MergeCompute(excel, allot.ID); var (list, mergeSheets) = processComputService.MergeCompute(excel, allot.ID);
processComputService.Save(list, allot.ID); processComputService.Save(list, allot.ID);
...@@ -408,11 +408,11 @@ public void Generate(per_allot allot, string mail, string uuid, int userId) ...@@ -408,11 +408,11 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
#endregion 注释 #endregion 注释
//重新计算科室业绩(含所有提供保底金额) //重新计算科室业绩(含所有提供保底金额)
notificationsService.SendGenerateMessage(userId, allot, uuid, $"计算科室业绩分值"); notificationsService.SendGenerateMessage(userId, allot.ID, $"计算科室业绩分值");
var sheetLast = processComputService.Compute(excel, mergeSheets, allot); var sheetLast = processComputService.Compute(excel, mergeSheets, allot);
//保存计算过程数据 //保存计算过程数据
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存科室业绩结果及计算过程中产生的数据"); notificationsService.SendGenerateMessage(userId, allot.ID, "保存科室业绩结果及计算过程中产生的数据");
processComputService.Save(sheetLast, allot.ID); processComputService.Save(sheetLast, allot.ID);
////业务中层行政中高层医院奖罚 ////业务中层行政中高层医院奖罚
...@@ -420,23 +420,23 @@ public void Generate(per_allot allot, string mail, string uuid, int userId) ...@@ -420,23 +420,23 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
//var employeeExtra = processComputService.GetEmployeeExtra(excel); //var employeeExtra = processComputService.GetEmployeeExtra(excel);
// 计算最总数据 // 计算最总数据
notificationsService.SendGenerateMessage(userId, allot, uuid, "计算并保存最终绩效数据"); notificationsService.SendGenerateMessage(userId, allot.ID, "计算并保存最终绩效数据");
var baiscnormList = resultComputeService.Compute(allot, sheetLast); var baiscnormList = resultComputeService.Compute(allot, sheetLast);
// 计算行政科室绩效 // 计算行政科室绩效
processComputService.ComputeOffice(allot, excel); processComputService.ComputeOffice(allot, excel);
// 计算特殊科室 // 计算特殊科室
notificationsService.SendGenerateMessage(userId, allot, uuid, "计算最终特殊科室绩效数据"); notificationsService.SendGenerateMessage(userId, allot.ID, "计算最终特殊科室绩效数据");
resultComputeService.SpecialUnitCompute(excel, allot, baiscnormList); resultComputeService.SpecialUnitCompute(excel, allot, baiscnormList);
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存最终特殊科室绩效数据"); notificationsService.SendGenerateMessage(userId, allot.ID, "保存最终特殊科室绩效数据");
//保存 绩效人均参考标准 //保存 绩效人均参考标准
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存绩效人均参考标准"); notificationsService.SendGenerateMessage(userId, allot.ID, "保存绩效人均参考标准");
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray()); perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
// 保存预留绩效 // 保存预留绩效
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存预留绩效金额"); notificationsService.SendGenerateMessage(userId, allot.ID, "保存预留绩效金额");
resultComputeService.SaveReserved(allot); resultComputeService.SaveReserved(allot);
// 科室下发 // 科室下发
...@@ -445,20 +445,20 @@ public void Generate(per_allot allot, string mail, string uuid, int userId) ...@@ -445,20 +445,20 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID); perforCofdirectorRepository.SupplementaryData(allot.ID);
notificationsService.SendGenerateMessage(userId, allot, uuid, "正在生成报表数据"); notificationsService.SendGenerateMessage(userId, allot.ID, "正在生成报表数据");
var res = reportService.ImportData(allot); var res = reportService.ImportData(allot);
var flag = reportService.UpdateData(allot); var flag = reportService.UpdateData(allot);
notificationsService.SendGenerateMessage(userId, allot, uuid, "报表数据生成完成,受影响:{res}行"); notificationsService.SendGenerateMessage(userId, allot.ID, "报表数据生成完成,受影响:{res}行");
////发送邮件 ////发送邮件
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time); //SendEmail(allot, mail, 1, time);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功"); //logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效生成成功", ComponentType.success); notificationsService.SendGenerateMessage(userId, allot.ID, "绩效生成成功", ComponentType.success);
} }
catch (Exception ex) catch (Exception ex)
{ {
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效生成失败", ComponentType.error); notificationsService.SendGenerateMessage(userId, allot.ID, "绩效生成失败", ComponentType.error);
logdbug.Add(allot.ID, "绩效生成失败", ex.ToString(), 4, 1); logdbug.Add(allot.ID, "绩效生成失败", ex.ToString(), 4, 1);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail)); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
//SendEmail(allot, mail, 2, time); //SendEmail(allot, mail, 2, time);
......
...@@ -32,9 +32,9 @@ PerforLogdsignalrRepository repository ...@@ -32,9 +32,9 @@ PerforLogdsignalrRepository repository
this.repository = repository; this.repository = repository;
} }
public void SendGenerateMessage(int userId, string uuid, int allotId, string message, ComponentType type = ComponentType.info) public void SendGenerateMessage(int userId, int allotId, string message, ComponentType type = ComponentType.info)
{ {
var info = new MessageInfo(uuid, allotId, "生成绩效", message, Component.Notification, type); var info = new MessageInfo("", allotId, "生成绩效", message, Component.Notification, type);
SendMessage(userId, info); SendMessage(userId, info);
} }
......
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