增加日志记录功能以确定确认书生成流程出错位置
This commit is contained in:
@@ -212,6 +212,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
List<string> file = new List<string>();
|
||||
if (PS.Config.Company == CompanyEnum.浙商)
|
||||
{
|
||||
LogFactory.GetLogger("生成确认书").Error("浙商生成确认书");
|
||||
var TradeQuery = new TradeDalService(this).GetTradeOrEodTradeOfTidASid(tradeIds, SystemValueDate).Where(c => (c.TradeType != "结构化交易" || c.IsGroup == 1) && tradeIds.Contains(c.id));
|
||||
if (TradeQuery.Any())
|
||||
{
|
||||
@@ -237,6 +238,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
if (query.Any())
|
||||
{
|
||||
// 使用现有的 groupGenerateHandle 方法来处理每组交易
|
||||
|
||||
groupGenerateHandle(query.Select(l => l.id).Distinct().ToList(), docType, startDate, endDate, results, error, file);
|
||||
}
|
||||
}
|
||||
@@ -244,6 +246,7 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
}
|
||||
if (results.Count == 0)
|
||||
{
|
||||
LogFactory.GetLogger("生成确认书").Error("浙商生成确认书" + tradeIds.Count());
|
||||
results = new ConfirmationGenerateService(this).Generate(tradeIds, docType);
|
||||
}
|
||||
errors = results.Where(n => !string.IsNullOrWhiteSpace(n.ErrorMessage)).Select(n => n.ErrorMessage).ToList();
|
||||
|
||||
Reference in New Issue
Block a user