diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html
index 8c23cb7..a8e0325 100644
--- a/Frontend/_historyData.html
+++ b/Frontend/_historyData.html
@@ -362,8 +362,8 @@
function searchDate() {
let start = new Date($('#his_startdate').val());
let end = new Date(new Date().setDate(new Date($('#his_enddate input').val()).getDate() + 1));
-
- if (pageAct.dateType == "today")
+
+ if (pageAct.dateType == "today" || pageAct.dateType == "day" || pageAct.dateType == "ytd")
end = new Date(new Date().setDate(start.getDate() + 1));
else if (pageAct.dateType == "month") {
start = new Date($('#getmonth').val());
diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs
index 5bb4334..af2e0d7 100644
--- a/FrontendWebApi/ApiControllers/BuildController.cs
+++ b/FrontendWebApi/ApiControllers/BuildController.cs
@@ -236,18 +236,43 @@ namespace FrontendWebApi.ApiControllers
Sub_system = new List()
};
var subsystem = ma.GroupBy(a => a.sub_system_tag).ToList();
+ string mainSystemTag = ma.Select(m => m.main_system_tag).FirstOrDefault();
foreach (var sub in subsystem)
{
- Sub_systemGuid sub_System = new Sub_systemGuid()
+ if (mainSystemTag != "S") //normal
{
- sub_system_tag = sub.Select(a => a.sub_system_tag).FirstOrDefault(),
- full_name = sub.Select(a => a.subfull_name).FirstOrDefault(),
- priority = sub.Select(a => a.subpriority).FirstOrDefault(),
- device_system_tag = sub.Select(a => a.device_system_tag).FirstOrDefault(),
- OpenTab = sub.Select(a => a.OpenTab).FirstOrDefault(),
- system_url = sub.Select(a => a.left_system_url).FirstOrDefault()
- };
- main_System.Sub_system.Add(sub_System);
+ Sub_systemGuid sub_System = new Sub_systemGuid()
+ {
+ sub_system_tag = sub.Select(a => a.sub_system_tag).FirstOrDefault(),
+ full_name = sub.Select(a => a.subfull_name).FirstOrDefault(),
+ priority = sub.Select(a => a.subpriority).FirstOrDefault(),
+ device_system_tag = sub.Select(a => a.device_system_tag).FirstOrDefault(),
+ OpenTab = sub.Select(a => a.OpenTab).FirstOrDefault(),
+ system_url = sub.Select(a => a.left_system_url).FirstOrDefault()
+ };
+ main_System.Sub_system.Add(sub_System);
+ }
+ else // 人流計數處理
+ {
+ string name = sub.Select(s => s.subfull_name).FirstOrDefault();
+ bool check = true;
+ if (name == "人流計數")
+ check = sub.Select(s => s.sub_system_tag).FirstOrDefault().StartsWith(menu.Select(m => m.device_building_tag).FirstOrDefault());
+
+ if (check)
+ {
+ Sub_systemGuid sub_System = new Sub_systemGuid()
+ {
+ sub_system_tag = sub.Select(a => a.sub_system_tag).FirstOrDefault(),
+ full_name = sub.Select(a => a.subfull_name).FirstOrDefault(),
+ priority = sub.Select(a => a.subpriority).FirstOrDefault(),
+ device_system_tag = sub.Select(a => a.device_system_tag).FirstOrDefault(),
+ OpenTab = sub.Select(a => a.OpenTab).FirstOrDefault(),
+ system_url = sub.Select(a => a.left_system_url).FirstOrDefault()
+ };
+ main_System.Sub_system.Add(sub_System);
+ }
+ }
}
building1.main_system.Add(main_System);
}