输出日志调整

parent 8696386c
......@@ -483,6 +483,8 @@ public static string FileToString(string filePath, Encoding encoding)
/// <param name="filePath">文件的绝对路径</param>
public static string GetFileName(string filePath)
{
if (string.IsNullOrEmpty(filePath))
return string.Empty;
//获取文件的名称
FileInfo fi = new FileInfo(filePath);
return fi.Name;
......
......@@ -113,7 +113,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
var statesArray = new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var templateFilePath = ExtractHelper.GetExtractFile(hospitalId, allot, ref extractFilePath, filePath);
logService.ReturnTheLog(allotId, groupName, 2, "创建文件", $"模板文件: {templateFilePath}", 1, isSingle);
logService.ReturnTheLog(allotId, groupName, 2, "创建文件", $"模板文件: {FileHelper.GetFileName(templateFilePath)}", 1, isSingle);
if (!FileHelper.IsExistFile(templateFilePath)) throw new Exception("抽取文件创建失败");
......
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