appsetting新增圖片位置
This commit is contained in:
parent
34635571a9
commit
3de2b9da17
@ -29,8 +29,8 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
//[Route("api/[controller]")]
|
//[Route("api/[controller]")]
|
||||||
//[ApiController]
|
//[ApiController]
|
||||||
public class TenantBillController
|
//public class TenantBillController
|
||||||
//public class TenantBillController : MyBaseApiController<TenantBillController>
|
public class TenantBillController : MyBaseApiController<TenantBillController>
|
||||||
{
|
{
|
||||||
private readonly IBackendRepository backendRepository;
|
private readonly IBackendRepository backendRepository;
|
||||||
private readonly ILogger<TenantBillController> _logger;
|
private readonly ILogger<TenantBillController> _logger;
|
||||||
@ -76,7 +76,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Code = "9999";
|
apiResult.Code = "9999";
|
||||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -111,7 +111,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Msg = "已有相同使用者。";
|
apiResult.Msg = "已有相同使用者。";
|
||||||
}
|
}
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -145,7 +145,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Msg = "水電報表仍有該用戶,無法修改名稱。";
|
apiResult.Msg = "水電報表仍有該用戶,無法修改名稱。";
|
||||||
}
|
}
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -172,7 +172,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Msg = "水電報表仍有該用戶,無法刪除。";
|
apiResult.Msg = "水電報表仍有該用戶,無法刪除。";
|
||||||
}
|
}
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -223,7 +223,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Code = "9999";
|
apiResult.Code = "9999";
|
||||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -310,7 +310,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
apiResult.Code = "9999";
|
apiResult.Code = "9999";
|
||||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
@ -350,7 +350,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
//Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||||
}
|
}
|
||||||
return new FileContentResult(new byte[0], "application/pdf")
|
return new FileContentResult(new byte[0], "application/pdf")
|
||||||
{
|
{
|
||||||
@ -432,6 +432,8 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
string path = Configuration.GetValue<string>("FilePath:OutputFormTemplate");
|
string path = Configuration.GetValue<string>("FilePath:OutputFormTemplate");
|
||||||
|
string image = Configuration.GetValue<string>("FilePath:Image");
|
||||||
|
|
||||||
//string path = _webHostEnvironment.ContentRootPath + "\\StaticFiles\\import.html";
|
//string path = _webHostEnvironment.ContentRootPath + "\\StaticFiles\\import.html";
|
||||||
if (!System.IO.File.Exists(path))
|
if (!System.IO.File.Exists(path))
|
||||||
{
|
{
|
||||||
@ -447,7 +449,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
{
|
{
|
||||||
bill += $" <div class=\"container a4-page\"> " +
|
bill += $" <div class=\"container a4-page\"> " +
|
||||||
$" <div class=\"header\"> " +
|
$" <div class=\"header\"> " +
|
||||||
$" <img src=\"C:\\jay.chang\\ibms\\FrontendWebApi\\wwwroot\\img\\dome.png\" alt=\"Taipei Dome Logo\" width=\"200\"> " +
|
$" <img src=\"{image}\" alt=\"Taipei Dome Logo\" width=\"150\"> " +
|
||||||
$" <h2>水電費用明細</h2> " +
|
$" <h2>水電費用明細</h2> " +
|
||||||
$" </div> " +
|
$" </div> " +
|
||||||
$" <div class=\"statistics\"> " +
|
$" <div class=\"statistics\"> " +
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
"JwtLifeSeconds": 3600
|
"JwtLifeSeconds": 3600
|
||||||
},
|
},
|
||||||
"FilePath": {
|
"FilePath": {
|
||||||
"OutputForm": "C:\\jay.chang\\ibms\\FrontendWebApi\\wwwroot\\upload\\OutputForm\\", //水電報表 檔案儲存位置
|
"OutputForm": "D:\\jay.chang\\dome\\FrontendWebApi\\wwwroot\\upload\\OutputForm\\", //水電報表 檔案儲存位置
|
||||||
"OutputFormTemplate": "C:\\jay.chang\\ibms\\FrontendWebApi\\wwwroot\\upload\\OutputFormTemplate\\import.html" // 水電報表範本檔位置
|
"OutputFormTemplate": "D:\\jay.chang\\dome\\FrontendWebApi\\wwwroot\\upload\\OutputFormTemplate\\import.html", // 水電報表範本檔位置
|
||||||
|
"Image": "D:\\jay.chang\\dome\\FrontendWebApi\\wwwroot\\upload\\OutputFormTemplate\\dome.png" // 明細的圖片
|
||||||
},
|
},
|
||||||
"DBConfig": {
|
"DBConfig": {
|
||||||
"MySqlDBConfig": {
|
"MySqlDBConfig": {
|
||||||
|
Loading…
Reference in New Issue
Block a user