[後台] 後端修改get menu 安全系統小類 人流計數類別的顯示輸出
[前台] 前端修改歷史資料查詢問題
This commit is contained in:
parent
8ce6316200
commit
1164388253
@ -362,8 +362,8 @@
|
|||||||
function searchDate() {
|
function searchDate() {
|
||||||
let start = new Date($('#his_startdate').val());
|
let start = new Date($('#his_startdate').val());
|
||||||
let end = new Date(new Date().setDate(new Date($('#his_enddate input').val()).getDate() + 1));
|
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));
|
end = new Date(new Date().setDate(start.getDate() + 1));
|
||||||
else if (pageAct.dateType == "month") {
|
else if (pageAct.dateType == "month") {
|
||||||
start = new Date($('#getmonth').val());
|
start = new Date($('#getmonth').val());
|
||||||
|
@ -236,18 +236,43 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
Sub_system = new List<Sub_systemGuid>()
|
Sub_system = new List<Sub_systemGuid>()
|
||||||
};
|
};
|
||||||
var subsystem = ma.GroupBy(a => a.sub_system_tag).ToList();
|
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)
|
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(),
|
Sub_systemGuid sub_System = new Sub_systemGuid()
|
||||||
full_name = sub.Select(a => a.subfull_name).FirstOrDefault(),
|
{
|
||||||
priority = sub.Select(a => a.subpriority).FirstOrDefault(),
|
sub_system_tag = sub.Select(a => a.sub_system_tag).FirstOrDefault(),
|
||||||
device_system_tag = sub.Select(a => a.device_system_tag).FirstOrDefault(),
|
full_name = sub.Select(a => a.subfull_name).FirstOrDefault(),
|
||||||
OpenTab = sub.Select(a => a.OpenTab).FirstOrDefault(),
|
priority = sub.Select(a => a.subpriority).FirstOrDefault(),
|
||||||
system_url = sub.Select(a => a.left_system_url).FirstOrDefault()
|
device_system_tag = sub.Select(a => a.device_system_tag).FirstOrDefault(),
|
||||||
};
|
OpenTab = sub.Select(a => a.OpenTab).FirstOrDefault(),
|
||||||
main_System.Sub_system.Add(sub_System);
|
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);
|
building1.main_system.Add(main_System);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user