57 lines
1.2 KiB
C#
57 lines
1.2 KiB
C#
namespace YLErp.Modules.EodModule.SettlementModule
|
|
{
|
|
/// <summary>
|
|
/// 结算检查结果
|
|
/// </summary>
|
|
public class EodCheckResult
|
|
{
|
|
List<string> _errorList;
|
|
|
|
public string Step { get; set; }
|
|
|
|
public IEnumerable<string> ErrorMessages
|
|
{
|
|
get { return _errorList; }
|
|
}
|
|
|
|
public void AppendError(string errorMsg)
|
|
{
|
|
if (_errorList == null)
|
|
{
|
|
_errorList = new List<string>();
|
|
}
|
|
|
|
_errorList.Add(errorMsg);
|
|
}
|
|
|
|
public void AppendError(string action, string errorMsg)
|
|
{
|
|
if (_errorList == null)
|
|
{
|
|
_errorList = new List<string>();
|
|
}
|
|
|
|
_errorList.Add(action + "出错," + errorMsg);
|
|
}
|
|
|
|
public EodCheckResult AppendErrors(IEnumerable<string> errors)
|
|
{
|
|
if (errors is null || !errors.Any())
|
|
{
|
|
return this;
|
|
}
|
|
|
|
if (_errorList == null)
|
|
{
|
|
_errorList = new List<string>(errors);
|
|
}
|
|
else
|
|
{
|
|
_errorList.AddRange(errors);
|
|
}
|
|
|
|
return this;
|
|
}
|
|
}
|
|
}
|