|
@@ -13,7 +13,7 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
{
|
|
{
|
|
public static class StudyService
|
|
public static class StudyService
|
|
{
|
|
{
|
|
- public static async Task<string> GenPdf(string tId,string areaId, string cname,string sname,string gname,string details, IConverter _converter, AzureStorageFactory _azureStorage)
|
|
|
|
|
|
+ public static async Task GenPdf(string tId,string areaId, string cname,string sname,string gname,string details, IConverter _converter, AzureStorageFactory _azureStorage,DingDing _dingDing)
|
|
{
|
|
{
|
|
//https://article.itxueyuan.com/JAxOnG
|
|
//https://article.itxueyuan.com/JAxOnG
|
|
//http://t.zoukankan.com/hsiang-p-14608694.html
|
|
//http://t.zoukankan.com/hsiang-p-14608694.html
|
|
@@ -54,11 +54,9 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
Objects = { objectSettings },
|
|
Objects = { objectSettings },
|
|
};
|
|
};
|
|
var a = _converter.Convert(htmlToPdfDocument);
|
|
var a = _converter.Convert(htmlToPdfDocument);
|
|
- MemoryStream m = new MemoryStream(a);
|
|
|
|
|
|
+ MemoryStream m = new(a);
|
|
tasks.Add(_azureStorage.UploadFileByContainer("teammodelos", m, $"{areaId}", $"{tId}/offline-report.pdf", false));
|
|
tasks.Add(_azureStorage.UploadFileByContainer("teammodelos", m, $"{areaId}", $"{tId}/offline-report.pdf", false));
|
|
await Task.WhenAll(tasks);
|
|
await Task.WhenAll(tasks);
|
|
- string aa = "";
|
|
|
|
- return aa;
|
|
|
|
/* FileStream fs = new FileStream("F:\\1111111111111\\SimplePdf1.pdf", FileMode.Create, FileAccess.Write, FileShare.Read);
|
|
/* FileStream fs = new FileStream("F:\\1111111111111\\SimplePdf1.pdf", FileMode.Create, FileAccess.Write, FileShare.Read);
|
|
m.WriteTo(fs);
|
|
m.WriteTo(fs);
|
|
m.Close();
|
|
m.Close();
|
|
@@ -85,7 +83,7 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
- return "";
|
|
|
|
|
|
+ await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-StudyService,GenPdf()\n{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|