Commit b170715b by 李承祥

bug

parent 96f358ea
...@@ -50,10 +50,5 @@ public class log_check ...@@ -50,10 +50,5 @@ public class log_check
/// ///
/// </summary> /// </summary>
public string Message { get; set; } public string Message { get; set; }
/// <summary>
/// 检验结果是否正确
/// </summary>
public Nullable<int> IsTrue { get; set; }
} }
} }
...@@ -34,7 +34,7 @@ internal bool Check(PerExcel excel, per_allot allot) ...@@ -34,7 +34,7 @@ internal bool Check(PerExcel excel, per_allot allot)
result = false; result = false;
//匹配绩效参考标准 //匹配绩效参考标准
//空行数据警告 //空行数据校验
CheckData(excel, allot); CheckData(excel, allot);
//科室收入项 总费用相等 校验(暂不处理) //科室收入项 总费用相等 校验(暂不处理)
...@@ -64,7 +64,7 @@ public PerExcel Classify(PerExcel excel, per_allot allot) ...@@ -64,7 +64,7 @@ public PerExcel Classify(PerExcel excel, per_allot allot)
flag = false; flag = false;
message = $"{sheet.SheetName} -- 未识别,请检测sheet页名称是否正确;"; message = $"{sheet.SheetName} -- 未识别,请检测sheet页名称是否正确;";
} }
InsertLog(allot.ID, (int)sheetType, 1, "sheet页名称分类", message, flag); InsertLog(allot.ID, (int)sheetType, flag ? 1 : 3, "sheet页名称分类", message);
} }
return excel; return excel;
} }
...@@ -130,13 +130,13 @@ public bool Discern(PerExcel excel, per_allot allot) ...@@ -130,13 +130,13 @@ public bool Discern(PerExcel excel, per_allot allot)
if (!flag) if (!flag)
result = false; result = false;
} }
InsertLog(allot.ID, (int)sheet.SheetType, 3, "列头识别", message, flag); InsertLog(allot.ID, (int)sheet.SheetType, flag ? 1 : 3, "列头识别", message);
} }
return result; return result;
} }
#endregion #endregion
#region 空行数据警告 #region 空行数据校验
public bool CheckData(PerExcel excel, per_allot allot) public bool CheckData(PerExcel excel, per_allot allot)
{ {
var result = true; var result = true;
...@@ -230,7 +230,7 @@ public bool CheckData(PerExcel excel, per_allot allot) ...@@ -230,7 +230,7 @@ public bool CheckData(PerExcel excel, per_allot allot)
result = false; result = false;
message = $"{sheet.SheetName} -- 有{count}行数据不合规范,行号是{String.Join("、", rowNumber.ToArray())};"; message = $"{sheet.SheetName} -- 有{count}行数据不合规范,行号是{String.Join("、", rowNumber.ToArray())};";
} }
InsertLog(allot.ID, (int)sheet.SheetType, 2, "空行数据警告", message.ToString(), flag); InsertLog(allot.ID, (int)sheet.SheetType, flag ? 1 : 2, "空行数据校验", message.ToString());
} }
return result; return result;
} }
...@@ -245,8 +245,7 @@ public bool CheckData(PerExcel excel, per_allot allot) ...@@ -245,8 +245,7 @@ public bool CheckData(PerExcel excel, per_allot allot)
/// <param name="level">错误等级</param> /// <param name="level">错误等级</param>
/// <param name="title"></param> /// <param name="title"></param>
/// <param name="message">描述</param> /// <param name="message">描述</param>
/// <param name="istrue">校验结果</param> public void InsertLog(int allotId, int type, int level, string title, string message)
public void InsertLog(int allotId, int type, int level, string title, string message, bool istrue)
{ {
log_check model = new log_check() log_check model = new log_check()
{ {
...@@ -255,8 +254,7 @@ public void InsertLog(int allotId, int type, int level, string title, string mes ...@@ -255,8 +254,7 @@ public void InsertLog(int allotId, int type, int level, string title, string mes
Type = type, Type = type,
Level = level, Level = level,
Titile = title, Titile = title,
Message = message, Message = message
IsTrue = istrue ? 1 : 0
}; };
perforLogcheckRepository.Add(model); perforLogcheckRepository.Add(model);
} }
......
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