public static void Log(int siteId, int channelId, int contentID, string logType, string administratorName, int departmentId) { var logInfo = new LogInfo(0, siteId, channelId, contentID, departmentId, administratorName, logType, Utils.GetIpAddress(), DateTime.Now, string.Empty); var departmentName = DepartmentManager.GetDepartmentName(departmentId); ELogType eLogType = ELogTypeUtils.GetEnumType(logType); if (eLogType == ELogType.Accept) { logInfo.Summary = $"{departmentName}({administratorName})受理办件"; } else if (eLogType == ELogType.Deny) { logInfo.Summary = $"{departmentName}({administratorName})拒绝受理办件"; } else if (eLogType == ELogType.Reply) { logInfo.Summary = $"{departmentName}({administratorName})回复办件"; } else if (eLogType == ELogType.Comment) { logInfo.Summary = $"{departmentName}({administratorName})批示办件"; } else if (eLogType == ELogType.Redo) { logInfo.Summary = $"{departmentName}({administratorName})要求返工"; } else if (eLogType == ELogType.Check) { logInfo.Summary = $"{departmentName}({administratorName})审核通过"; } LogDao.Insert(logInfo); }
public static void LogTranslate(int siteId, int channelId, int contentID, string nodeName, string administratorName, int departmentId) { var logInfo = new LogInfo(0, siteId, channelId, contentID, departmentId, administratorName, ELogTypeUtils.GetValue(ELogType.Translate), Utils.GetIpAddress(), DateTime.Now, $"{DepartmentManager.GetDepartmentName(departmentId)}({administratorName})从分类“{nodeName}”转移办件至此 "); LogDao.Insert(logInfo); }
public static void LogSwitchTo(int siteId, int channelId, int contentID, string switchToDepartmentName, string administratorName, int departmentId) { var logInfo = new LogInfo(0, siteId, channelId, contentID, departmentId, administratorName, ELogTypeUtils.GetValue(ELogType.SwitchTo), Utils.GetIpAddress(), DateTime.Now, $"{DepartmentManager.GetDepartmentName(departmentId)}({administratorName})转办办件至{switchToDepartmentName} "); LogDao.Insert(logInfo); }
public static void Translate(int siteId, int dataId, int userId, int departmentId) { var adminInfo = Context.AdminApi.GetAdminInfoByUserId(userId); var summary = adminInfo.DisplayName == adminInfo.UserName ? $"{adminInfo.UserName}转办信件至{DepartmentManager.GetDepartmentName(siteId, departmentId)}" : $"{adminInfo.DisplayName}({adminInfo.UserName})转办信件至{DepartmentManager.GetDepartmentName(siteId, departmentId)}"; Main.LogRepository.Insert(new LogInfo { Id = 0, SiteId = siteId, DataId = dataId, UserId = adminInfo.Id, AddDate = DateTime.Now, Summary = summary }); }
public static void Accept(int siteId, int dataId, int userId, int departmentId) { var adminInfo = Context.AdminApi.GetAdminInfoByUserId(userId); var summary = adminInfo.DisplayName == adminInfo.UserName ? $"{adminInfo.UserName}受理信件" : $"{adminInfo.DisplayName}({adminInfo.UserName})受理信件"; if (departmentId > 0) { summary += $",转办至 {DepartmentManager.GetDepartmentName(siteId, departmentId)}"; } Main.LogRepository.Insert(new LogInfo { Id = 0, SiteId = siteId, DataId = dataId, UserId = adminInfo.Id, AddDate = DateTime.Now, Summary = summary }); }