Commit b170715b by 李承祥

bug

parent 96f358ea
......@@ -50,10 +50,5 @@ public class log_check
///
/// </summary>
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)
result = false;
//匹配绩效参考标准
//空行数据警告
//空行数据校验
CheckData(excel, allot);
//科室收入项 总费用相等 校验(暂不处理)
......@@ -64,7 +64,7 @@ public PerExcel Classify(PerExcel excel, per_allot allot)
flag = false;
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;
}
......@@ -130,13 +130,13 @@ public bool Discern(PerExcel excel, per_allot allot)
if (!flag)
result = false;
}
InsertLog(allot.ID, (int)sheet.SheetType, 3, "列头识别", message, flag);
InsertLog(allot.ID, (int)sheet.SheetType, flag ? 1 : 3, "列头识别", message);
}
return result;
}
#endregion
#region 空行数据警告
#region 空行数据校验
public bool CheckData(PerExcel excel, per_allot allot)
{
var result = true;
......@@ -230,7 +230,7 @@ public bool CheckData(PerExcel excel, per_allot allot)
result = false;
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;
}
......@@ -245,8 +245,7 @@ public bool CheckData(PerExcel excel, per_allot allot)
/// <param name="level">错误等级</param>
/// <param name="title"></param>
/// <param name="message">描述</param>
/// <param name="istrue">校验结果</param>
public void InsertLog(int allotId, int type, int level, string title, string message, bool istrue)
public void InsertLog(int allotId, int type, int level, string title, string message)
{
log_check model = new log_check()
{
......@@ -255,8 +254,7 @@ public void InsertLog(int allotId, int type, int level, string title, string mes
Type = type,
Level = level,
Titile = title,
Message = message,
IsTrue = istrue ? 1 : 0
Message = message
};
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