增加日志记录功能以确定确认书生成流程出错位置
This commit is contained in:
@@ -304,10 +304,12 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule
|
||||
//WordHelper.GenerateFromTemplate(templatePath, modelDic, outputFilePath);
|
||||
var varDic = new JsonVarDic(modelDic);
|
||||
var _outputFilePath = outputFilePath.Replace(".pdf", ".docx");
|
||||
LogFactory.GetLogger("Word生成").Info($"生成Word文档:{_outputFilePath}");
|
||||
OfficeFileConverter.ConvertByUsingDocTemplate(templatePath, _outputFilePath, varDic, false);
|
||||
var toPDF = outputFilePath.EndsWith(".pdf", StringComparison.OrdinalIgnoreCase);
|
||||
if (genPdf && toPDF)
|
||||
{
|
||||
LogFactory.GetLogger("Word生成").Info($"转换Word文档为PDF:{_outputFilePath}");
|
||||
ConvertToPdfHelper.ConvertPDFByApi(HttpUtility.UrlEncode(_outputFilePath), HttpUtility.UrlEncode(outputFilePath));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user