验证环境发布
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a031752d33
commit
de1d971e44
|
@ -22,6 +22,31 @@
|
||||||
"Region": "oss-cn-shanghai"
|
"Region": "oss-cn-shanghai"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
|
|
||||||
|
"AliyunOSS": {
|
||||||
|
"regionId": "cn-shanghai",
|
||||||
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
"bucketName": "zy-irc-uat-store",
|
||||||
|
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
|
||||||
|
"viewEndpoint": "https://zy-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"region": "oss-cn-shanghai"
|
||||||
|
},
|
||||||
|
|
||||||
|
"MinIO": {
|
||||||
|
"endpoint": "http://192.168.3.68",
|
||||||
|
"port": "8001",
|
||||||
|
"useSSL": false,
|
||||||
|
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
||||||
|
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
||||||
|
"bucketName": "test"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"BasicSystemConfig": {
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
"OpenUserComplexPassword": true,
|
"OpenUserComplexPassword": true,
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Helper
|
||||||
|
{
|
||||||
|
public class FileConvertHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ using System.Linq;
|
||||||
using Spire.Doc;
|
using Spire.Doc;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -662,13 +663,23 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
MemoryStream wordMemoryStream = new MemoryStream();
|
MemoryStream wordMemoryStream = new MemoryStream();
|
||||||
|
|
||||||
Document document = new Document();
|
|
||||||
|
|
||||||
MiniSoftware.MiniWord.SaveAsByTemplate(wordMemoryStream, path, value);
|
MiniSoftware.MiniWord.SaveAsByTemplate(wordMemoryStream, path, value);
|
||||||
|
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Document document = new Document();
|
||||||
|
|
||||||
document.LoadFromStream(wordMemoryStream, FileFormat.Docx);
|
document.LoadFromStream(wordMemoryStream, FileFormat.Docx);
|
||||||
|
|
||||||
document.SaveToFile(serverFilePath, FileFormat.PDF);
|
document.SaveToFile(serverFilePath, FileFormat.PDF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -691,10 +702,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, path, value);
|
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, path, value);
|
||||||
Document document = new Document();
|
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Document document = new Document();
|
||||||
document.LoadFromStream(memoryStream, FileFormat.Docx);
|
document.LoadFromStream(memoryStream, FileFormat.Docx);
|
||||||
document.SaveToStream(pdfMemoryStream, FileFormat.PDF);
|
document.SaveToStream(pdfMemoryStream, FileFormat.PDF);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
pdfMemoryStream.Seek(0, SeekOrigin.Begin);
|
pdfMemoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||||
|
|
Loading…
Reference in New Issue