[後端] 修改同步問題, 新增彈出url功能
[前端] 調整彈出url功能
This commit is contained in:
parent
e83d1822ee
commit
6beb12d8a0
@ -191,6 +191,10 @@ namespace Backend.Controllers
|
|||||||
{
|
{
|
||||||
dictionary.Add("@planimetric_floor_guid", buildMenu.left_planimetric_floor_guid);
|
dictionary.Add("@planimetric_floor_guid", buildMenu.left_planimetric_floor_guid);
|
||||||
}
|
}
|
||||||
|
else if (buildMenu.left_drawing == 5)
|
||||||
|
{
|
||||||
|
dictionary.Add("left_build_menu_blankurl_modal", buildMenu.left_build_menu_blankurl_modal);
|
||||||
|
}
|
||||||
|
|
||||||
if (buildMenu.right_drawing == 2)
|
if (buildMenu.right_drawing == 2)
|
||||||
{
|
{
|
||||||
@ -313,6 +317,10 @@ namespace Backend.Controllers
|
|||||||
{
|
{
|
||||||
dictionary.Add("@left_planimetric_floor_guid", buildMenu.left_planimetric_floor_guid);
|
dictionary.Add("@left_planimetric_floor_guid", buildMenu.left_planimetric_floor_guid);
|
||||||
}
|
}
|
||||||
|
else if (buildMenu.left_drawing == 5)
|
||||||
|
{
|
||||||
|
dictionary.Add("@left_build_menu_blankurl_modal", buildMenu.left_build_menu_blankurl_modal);
|
||||||
|
}
|
||||||
|
|
||||||
if (buildMenu.right_drawing == 2)
|
if (buildMenu.right_drawing == 2)
|
||||||
{
|
{
|
||||||
|
@ -210,34 +210,34 @@ namespace Backend.Controllers
|
|||||||
{
|
{
|
||||||
//string ss = ds.Where(x => x.tag_name != "").FirstOrDefault().tag_name;
|
//string ss = ds.Where(x => x.tag_name != "").FirstOrDefault().tag_name;
|
||||||
//var building = ss.Split("_")[0];
|
//var building = ss.Split("_")[0];
|
||||||
//var building = ds.GroupBy(x => x.device_building_tag).Select(x => x.Key).ToList();
|
var building = ds.GroupBy(x => x.device_building_tag).Select(x => x.Key).ToList();
|
||||||
//#region 歷史資料處理
|
#region 歷史資料處理
|
||||||
//ds.Clear();
|
ds.Clear();
|
||||||
//var isDome = await backendRepository.GetOneAsync<string>("select system_value from variable where deleted = 0 and system_type = 'project_name';");
|
var isDome = await backendRepository.GetOneAsync<string>("select system_value from variable where deleted = 0 and system_type = 'project_name';");
|
||||||
//var sqlObix = $@"SELECT system_value as Value, system_key as Name FROM variable WHERE deleted = 0 AND system_type = 'obixConfig'";
|
var sqlObix = $@"SELECT system_value as Value, system_key as Name FROM variable WHERE deleted = 0 AND system_type = 'obixConfig'";
|
||||||
//var variableObix = backendRepository.GetAllAsync<Backend.Models.KeyValue>(sqlObix).Result;
|
var variableObix = backendRepository.GetAllAsync<Backend.Models.KeyValue>(sqlObix).Result;
|
||||||
//var obixApiConfig = new Backend.Models.ObixApiConfig();
|
var obixApiConfig = new Backend.Models.ObixApiConfig();
|
||||||
//EDFunction ed = new EDFunction();
|
EDFunction ed = new EDFunction();
|
||||||
//obixApiConfig.ApiBase = variableObix.Where(x => x.Name == "ApiBase").Select(x => x.Value).FirstOrDefault();
|
obixApiConfig.ApiBase = variableObix.Where(x => x.Name == "ApiBase").Select(x => x.Value).FirstOrDefault();
|
||||||
//obixApiConfig.UserName = variableObix.Where(x => x.Name == "UserName").Select(x => x.Value).FirstOrDefault();
|
obixApiConfig.UserName = variableObix.Where(x => x.Name == "UserName").Select(x => x.Value).FirstOrDefault();
|
||||||
//obixApiConfig.Password = variableObix.Where(x => x.Name == "Password").Select(x => x.Value).FirstOrDefault();
|
obixApiConfig.Password = variableObix.Where(x => x.Name == "Password").Select(x => x.Value).FirstOrDefault();
|
||||||
////obixApiConfig.UrlSlot = variableObix.Where(x => x.Name == "url_slot").Select(x => x.Value).FirstOrDefault();
|
//obixApiConfig.UrlSlot = variableObix.Where(x => x.Name == "url_slot").Select(x => x.Value).FirstOrDefault();
|
||||||
//webRequestService svc = new webRequestService();
|
webRequestService svc = new webRequestService();
|
||||||
//var data = svc.obixHisQuery_v2(obixApiConfig.ApiBase + "obix/config/Program/ObixQuery/query/", obixApiConfig.ApiBase + "obix/histories", "",
|
var data = svc.obixHisQuery_v2(obixApiConfig.ApiBase + "obix/config/Program/ObixQuery/query/", obixApiConfig.ApiBase + "obix/histories", "",
|
||||||
// obixApiConfig.UserName, obixApiConfig.Password);
|
obixApiConfig.UserName, obixApiConfig.Password);
|
||||||
//ds.AddRange(data);
|
ds.AddRange(data);
|
||||||
|
|
||||||
//// save to history
|
// save to history
|
||||||
//await niagaraDataSynchronizeRepository.InsertItemFromNiagara_History(ds, building); // insert 暫存table import_niagara_item_history
|
await niagaraDataSynchronizeRepository.InsertItemFromNiagara_History(ds, building); // insert 暫存table import_niagara_item_history
|
||||||
//if (!string.IsNullOrEmpty(isDome) && isDome.Contains("ibms_dome"))
|
if (!string.IsNullOrEmpty(isDome) && isDome.Contains("ibms_dome"))
|
||||||
// await niagaraDataSynchronizeRepository.RecoverSysTag("import_niagara_item_history"); // recover missing deivce_system_tag
|
await niagaraDataSynchronizeRepository.RecoverSysTag("import_niagara_item_history"); // recover missing deivce_system_tag
|
||||||
//#endregion
|
#endregion
|
||||||
|
|
||||||
//await niagaraDataSynchronizeRepository.InsertItemFromNiagara(oldDs, building); // insert 暫存table import_niagara_item
|
await niagaraDataSynchronizeRepository.InsertItemFromNiagara(oldDs, building); // insert 暫存table import_niagara_item
|
||||||
//await niagaraDataSynchronizeRepository.DeviceItemComparison(); //insert device_item
|
await niagaraDataSynchronizeRepository.DeviceItemComparison(); //insert device_item
|
||||||
//await niagaraDataSynchronizeRepository.CheckItemDiffFullNameAndCover(); // update device_item.fullname
|
await niagaraDataSynchronizeRepository.CheckItemDiffFullNameAndCover(); // update device_item.fullname
|
||||||
//await niagaraDataSynchronizeRepository.ItemCheckFullNameEmptyReplaceByDeviceName(); // 檢查device_item內FullName為空的值,以points取代
|
await niagaraDataSynchronizeRepository.ItemCheckFullNameEmptyReplaceByDeviceName(); // 檢查device_item內FullName為空的值,以points取代
|
||||||
//await niagaraDataSynchronizeRepository.CheckItemIsShowHistory();
|
await niagaraDataSynchronizeRepository.CheckItemIsShowHistory();
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ namespace Backend.Models
|
|||||||
public string left_riser_diagram_url { get; set; }
|
public string left_riser_diagram_url { get; set; }
|
||||||
public byte left_planimetric_click { get; set; }
|
public byte left_planimetric_click { get; set; }
|
||||||
public string left_planimetric_floor_guid { get; set; }
|
public string left_planimetric_floor_guid { get; set; }
|
||||||
|
public string left_build_menu_blankurl_modal { get; set; }
|
||||||
public byte right_drawing { get; set; }
|
public byte right_drawing { get; set; }
|
||||||
public byte right_icon_click { get; set; }
|
public byte right_icon_click { get; set; }
|
||||||
public string right_icon_click_url { get; set; }
|
public string right_icon_click_url { get; set; }
|
||||||
|
@ -938,6 +938,7 @@
|
|||||||
left_drawing: $('input[name="drawing"]:checked').val(),
|
left_drawing: $('input[name="drawing"]:checked').val(),
|
||||||
left_system_url: $('#build_menu_systemurl_modal').val(),
|
left_system_url: $('#build_menu_systemurl_modal').val(),
|
||||||
left_icon_click: left_icon_click,
|
left_icon_click: left_icon_click,
|
||||||
|
left_build_menu_blankurl_modal: $("#build_menu_blankurl_modal").val(),
|
||||||
left_icon_click_url: $('#build_menu_icon_click_url_modal').val(),
|
left_icon_click_url: $('#build_menu_icon_click_url_modal').val(),
|
||||||
left_icon_click_url_width: $('#build_menu_icon_click_url_width_modal').val(),
|
left_icon_click_url_width: $('#build_menu_icon_click_url_width_modal').val(),
|
||||||
left_icon_click_url_height: $('#build_menu_icon_click_url_height_modal').val(),
|
left_icon_click_url_height: $('#build_menu_icon_click_url_height_modal').val(),
|
||||||
@ -990,6 +991,7 @@
|
|||||||
$('#build_menu_sub_modal').val(rel.data.sub_system_tag);
|
$('#build_menu_sub_modal').val(rel.data.sub_system_tag);
|
||||||
|
|
||||||
//left
|
//left
|
||||||
|
$('#build_menu_blankurl_modal').val(rel.data.left_build_menu_blankurl_modal);
|
||||||
$("input[name='drawing'][value='" + rel.data.left_drawing + "']").prop("checked", true);
|
$("input[name='drawing'][value='" + rel.data.left_drawing + "']").prop("checked", true);
|
||||||
if (rel.data.left_planimetric_click == 1) {
|
if (rel.data.left_planimetric_click == 1) {
|
||||||
$('input[name="planimetric_click"]').prop("checked", true)
|
$('input[name="planimetric_click"]').prop("checked", true)
|
||||||
|
@ -14,17 +14,18 @@
|
|||||||
},
|
},
|
||||||
"DBConfig": {
|
"DBConfig": {
|
||||||
"MySqlDBConfig": {
|
"MySqlDBConfig": {
|
||||||
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
|
"Server": "jbgI3Q4uFL4Kd9bbvToklA==", //0.201
|
||||||
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
"Port": "mkF51jVbg40V5K5eTh2Ckw==",
|
||||||
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
|
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
|
||||||
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
||||||
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
||||||
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
||||||
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
||||||
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut
|
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut
|
||||||
"Database": "+5RAiFLJVU+LRyDxF1K/pcLZaoZa4k/thZqF6xKoCag=", //dome_online_0821
|
//"Database": "+5RAiFLJVU+LRyDxF1K/pcLZaoZa4k/thZqF6xKoCag=", //dome_online_0821
|
||||||
//"Database": "2U+9jYGy0dCbMzLaguBXow==", //tpe_dome_mall
|
//"Database": "2U+9jYGy0dCbMzLaguBXow==", //tpe_dome_mall
|
||||||
//"Database": "FbHCCU4CapG9UryANXC1W+iMe403Bd82RnA7bCNVbL0=", //ibms_dome_cinema,
|
//"Database": "FbHCCU4CapG9UryANXC1W+iMe403Bd82RnA7bCNVbL0=", //ibms_dome_cinema,
|
||||||
|
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //ibms_dome_dome
|
||||||
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
||||||
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
|
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
|
||||||
},
|
},
|
||||||
|
@ -143,10 +143,10 @@ namespace BackendWorkerService
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 定時取得氣象API
|
#region 定時取得氣象API
|
||||||
//services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
|
services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
|
||||||
//services.AddSingleton(
|
services.AddSingleton(
|
||||||
//new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
|
new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
|
||||||
//);
|
);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}).ConfigureLogging((hostContext, logFactory) => {
|
}).ConfigureLogging((hostContext, logFactory) => {
|
||||||
|
@ -345,6 +345,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
left_planimetric_click = sub_system.left_planimetric_click,
|
left_planimetric_click = sub_system.left_planimetric_click,
|
||||||
left_planimetric_floor_guid = sub_system.left_planimetric_floor_guid,
|
left_planimetric_floor_guid = sub_system.left_planimetric_floor_guid,
|
||||||
left_riser_diagram_url = sub_system.left_riser_diagram_url,
|
left_riser_diagram_url = sub_system.left_riser_diagram_url,
|
||||||
|
left_build_menu_blankurl_modal = sub_system.left_build_menu_blankurl_modal,
|
||||||
priority = sub_system.subpriority
|
priority = sub_system.subpriority
|
||||||
};
|
};
|
||||||
foreach (var floor in floorsql)
|
foreach (var floor in floorsql)
|
||||||
|
@ -45,6 +45,7 @@ namespace FrontendWebApi.Models
|
|||||||
public string device_building_tag { get; set; }
|
public string device_building_tag { get; set; }
|
||||||
public string device_system_tag { get; set; }
|
public string device_system_tag { get; set; }
|
||||||
public byte OpenTab { get; set; }
|
public byte OpenTab { get; set; }
|
||||||
|
public string left_build_menu_blankurl_modal { get; set; }
|
||||||
}
|
}
|
||||||
public class Floorsql : Floor
|
public class Floorsql : Floor
|
||||||
{
|
{
|
||||||
@ -108,6 +109,7 @@ namespace FrontendWebApi.Models
|
|||||||
public byte left_planimetric_click { get; set; }
|
public byte left_planimetric_click { get; set; }
|
||||||
public string left_planimetric_floor_guid { get; set; }
|
public string left_planimetric_floor_guid { get; set; }
|
||||||
public string left_riser_diagram_url { get; set; }
|
public string left_riser_diagram_url { get; set; }
|
||||||
|
public string left_build_menu_blankurl_modal { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
public class Floor
|
public class Floor
|
||||||
|
@ -588,11 +588,16 @@ namespace Repository.BackendRepository.Implement
|
|||||||
{
|
{
|
||||||
List<NiagaraTagsForItem> result;
|
List<NiagaraTagsForItem> result;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append($@" SELECT m.*
|
sb.Append($@" SELECT m.device_point_name, m.is_history, m.device_building_tag, m.device_system_tag, m.device_name_tag, m.parent_path, m.full_name
|
||||||
FROM import_niagara_item m
|
FROM import_niagara_item m
|
||||||
LEFT JOIN device_item d
|
left JOIN (
|
||||||
ON m.device_system_tag = d.device_system_tag and m.device_name_tag = d.device_name_tag and m.device_point_name = d.points and m.device_building_tag collate utf8mb4_0900_ai_ci = d.device_building_tag
|
select device_building_tag, device_system_tag, device_name_tag, points from device_item where deleted = 0
|
||||||
WHERE d.points IS NULL and d.deleted = 0;");
|
) d
|
||||||
|
ON m.device_system_tag = d.device_system_tag
|
||||||
|
and m.device_name_tag = d.device_name_tag
|
||||||
|
and m.device_point_name = d.points
|
||||||
|
and m.device_building_tag = d.device_building_tag
|
||||||
|
where d.points is null;");
|
||||||
result = (await conn.QueryAsync<NiagaraTagsForItem>(sb.ToString())).ToList<NiagaraTagsForItem>();
|
result = (await conn.QueryAsync<NiagaraTagsForItem>(sb.ToString())).ToList<NiagaraTagsForItem>();
|
||||||
|
|
||||||
sb.Clear();
|
sb.Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user