diff --git a/Frontend/js/init.js b/Frontend/js/init.js index d80c521..4bc4955 100644 --- a/Frontend/js/init.js +++ b/Frontend/js/init.js @@ -1,14 +1,14 @@ var ytAjax = typeof YourTeam !== "undefined" ? new YourTeam.Ajax() : null; //公用AJAX初始化 -//var baseApiUrl = "http://localhost:3604"; // 本地開發用 -//var baseImgUrl = "https://localhost:44376"; // 本地開發用 +var baseApiUrl = "http://localhost:3604"; // 本地開發用 +var baseImgUrl = "https://localhost:44376"; // 本地開發用 // Mitsubishi //var baseApiUrl = "http://220.132.206.5"; // production 用 //var baseImgUrl = "http://220.132.206.5:8848"; // production 用 // WSP -var baseApiUrl = "http://220.132.206.5:8001"; // production 用 -var baseImgUrl = "http://220.132.206.5:8849"; // production 用 +//var baseApiUrl = "http://220.132.206.5:8001"; // production 用 +//var baseImgUrl = "http://220.132.206.5:8849"; // production 用 //var baseApiUrl = "http://localhost"; //var baseImgUrl = "http://localhost:8848"; diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index 81b5f50..62213d2 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -983,8 +983,8 @@ namespace FrontendWebApi.ApiControllers var device_item_infos = await frontendRepository.GetAllAsync(sqlDeviceItemInfo, new { Device_number = device_numbers }); //轉換日期格式 - var start = string.Format("{0}T00:00:00.000+08:00", post.Start_timstamp); - var end = string.Format("{0}T23:59:59.000+08:00", post.End_timstamp); + var start = string.Format("{0}T00:00:00.000+08:00", post.Start_timestamp); + var end = string.Format("{0}T23:59:59.000+08:00", post.End_timestamp); var historyQueryFilter = $@" @@ -1115,16 +1115,16 @@ namespace FrontendWebApi.ApiControllers List tableName = new List(); foreach (var dn in input.tableDeviceName) { - tableName.AddRange(await backgroundServiceMsSqlRepository.GetAllAsync($"select table_name from INFORMATION_SCHEMA.TABLES where table_name like '{dn}%'")); + tableName.AddRange(await backgroundServiceMsSqlRepository.GetAllAsync($"select table_name from INFORMATION_SCHEMA.TABLES where table_name like '%{dn}%'")); } if (tableName.Count > 0) { foreach (var tn in tableName) { - var data = new HistoryRealTimeOutput(); + var data = new HistoryRealTimeOutput() { HistoryRealTime = new List()}; data.deviceNumber = tn; - var sql = $@"select timestamp as timeStamp, round(value, 2) as value from {tn} where replace(convert(varchar, [timestamp], 111), '/', '-') >= @startTime and replace(convert(varchar, [timestamp], 111), '/', '-') <= @endTime ordr by timestamp"; + var sql = $@"select timestamp as timeStamp, round(value, 2) as value from {tn} where replace(convert(varchar, [timestamp], 111), '/', '-') >= @startTime and replace(convert(varchar, [timestamp], 111), '/', '-') <= @endTime order by timestamp"; data.HistoryRealTime.AddRange( await backgroundServiceMsSqlRepository.GetAllAsync(sql, new { startTime = input.startTime, endTime = input.endTime }) ); diff --git a/FrontendWebApi/Models/HistoryClass.cs b/FrontendWebApi/Models/HistoryClass.cs index 37032a9..3483188 100644 --- a/FrontendWebApi/Models/HistoryClass.cs +++ b/FrontendWebApi/Models/HistoryClass.cs @@ -256,8 +256,8 @@ namespace FrontendWebApi.Models public class PostHistoryRawDataFilter { - public string Start_timstamp { get; set; } - public string End_timstamp { get; set; } + public string Start_timestamp { get; set; } + public string End_timestamp { get; set; } public List HistoryItems { get; set; } } diff --git a/FrontendWebApi/wwwroot/upload/graph_manage/58bc1a71-2e2a-4244-8f34-94f3c4735f3d.dwg b/FrontendWebApi/wwwroot/upload/graph_manage/58bc1a71-2e2a-4244-8f34-94f3c4735f3d.dwg new file mode 100644 index 0000000..02e4a84 --- /dev/null +++ b/FrontendWebApi/wwwroot/upload/graph_manage/58bc1a71-2e2a-4244-8f34-94f3c4735f3d.dwg @@ -0,0 +1 @@ +false \ No newline at end of file