doc不转成pdf和多空获取条件
This commit is contained in:
@@ -305,9 +305,9 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule
|
||||
var varDic = new JsonVarDic(modelDic);
|
||||
var _outputFilePath = outputFilePath.Replace(".pdf", ".docx");
|
||||
OfficeFileConverter.ConvertByUsingDocTemplate(templatePath, _outputFilePath, varDic, false);
|
||||
if (genPdf)
|
||||
var toPDF = outputFilePath.EndsWith(".pdf", StringComparison.OrdinalIgnoreCase);
|
||||
if (genPdf && toPDF)
|
||||
{
|
||||
LogFactory.GetLogger("PDF转换").Info("PDF转换开始" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
ConvertToPdfHelper.ConvertPDFByApi(HttpUtility.UrlEncode(_outputFilePath), HttpUtility.UrlEncode(outputFilePath));
|
||||
}
|
||||
}
|
||||
@@ -1326,7 +1326,7 @@ namespace YLErp.Modules.TradeModule.DocGenerateModule
|
||||
}
|
||||
if (Trade.TradeType == "收益互换")
|
||||
{
|
||||
var posi = GetSwapPositions(Trade.id, true).FirstOrDefault();
|
||||
var posi = GetSwapPositions(Trade.id, true).FirstOrDefault(p => p.PositionType > 0);
|
||||
var isLong = posi?.PositionType == (int)PositionTypeFlag.Short ? false : true;
|
||||
|
||||
return "ZSZQ-" + _client.Number + "-" + Trade.TradeDate?.ToString("yyyyMMdd") + (isLong ? "-L" : "-S");
|
||||
|
||||
Reference in New Issue
Block a user