Commit 448ab2e4 by lcx

修改日志方法参数

parent 56da633d
......@@ -237,7 +237,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
int userId = _claim.GetUserId();
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);
if (_evn.IsEnvironment("Localhost"))
{
......@@ -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);
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
return new ApiResponse(ResponseType.OK);
......
......@@ -312,20 +312,20 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
DateTime time = DateTime.Now;
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();
int generate = 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;
configService.ClearResData(allot.ID);
excel = queryDataService.QueryDataAndHeader(allot);
}
else
{
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效开始生成,数据来源:用户上传的Excel。");
notificationsService.SendGenerateMessage(userId, allot.ID, "绩效开始生成,数据来源:用户上传的Excel。");
configService.Clear(allot.ID);
// 关闭筛选功能
......@@ -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);
processComputService.Save(list, allot.ID);
......@@ -408,11 +408,11 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
#endregion 注释
//重新计算科室业绩(含所有提供保底金额)
notificationsService.SendGenerateMessage(userId, allot, uuid, $"计算科室业绩分值");
notificationsService.SendGenerateMessage(userId, allot.ID, $"计算科室业绩分值");
var sheetLast = processComputService.Compute(excel, mergeSheets, allot);
//保存计算过程数据
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存科室业绩结果及计算过程中产生的数据");
notificationsService.SendGenerateMessage(userId, allot.ID, "保存科室业绩结果及计算过程中产生的数据");
processComputService.Save(sheetLast, allot.ID);
////业务中层行政中高层医院奖罚
......@@ -420,23 +420,23 @@ public void Generate(per_allot allot, string mail, string uuid, int userId)
//var employeeExtra = processComputService.GetEmployeeExtra(excel);
// 计算最总数据
notificationsService.SendGenerateMessage(userId, allot, uuid, "计算并保存最终绩效数据");
notificationsService.SendGenerateMessage(userId, allot.ID, "计算并保存最终绩效数据");
var baiscnormList = resultComputeService.Compute(allot, sheetLast);
// 计算行政科室绩效
processComputService.ComputeOffice(allot, excel);
// 计算特殊科室
notificationsService.SendGenerateMessage(userId, allot, uuid, "计算最终特殊科室绩效数据");
notificationsService.SendGenerateMessage(userId, allot.ID, "计算最终特殊科室绩效数据");
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());
// 保存预留绩效
notificationsService.SendGenerateMessage(userId, allot, uuid, "保存预留绩效金额");
notificationsService.SendGenerateMessage(userId, allot.ID, "保存预留绩效金额");
resultComputeService.SaveReserved(allot);
// 科室下发
......@@ -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);
perforCofdirectorRepository.SupplementaryData(allot.ID);
notificationsService.SendGenerateMessage(userId, allot, uuid, "正在生成报表数据");
notificationsService.SendGenerateMessage(userId, allot.ID, "正在生成报表数据");
var res = reportService.ImportData(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);
//SendEmail(allot, mail, 1, time);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
notificationsService.SendGenerateMessage(userId, allot, uuid, "绩效生成成功", ComponentType.success);
notificationsService.SendGenerateMessage(userId, allot.ID, "绩效生成成功", ComponentType.success);
}
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);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
//SendEmail(allot, mail, 2, time);
......
......@@ -32,9 +32,9 @@ PerforLogdsignalrRepository 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);
}
......
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