2023-11-16 11:32:32 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
2022-11-02 17:26:18 +08:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Repository.Models;
|
|
|
|
|
|
|
|
|
|
namespace Repository.BackendRepository.Interface
|
|
|
|
|
{
|
|
|
|
|
public interface INiagaraDataSynchronizeRepository : IBackendRepository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 同步N4至資料表 import_niagara_tag
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ds"></param>
|
|
|
|
|
/// <param name="building"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-05-10 15:14:46 +08:00
|
|
|
|
Task InsertNiagaraTagList(List<Device_value> ds, List<string> building, string tag_quantity);
|
2023-03-28 13:48:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 獲取照明開關 是否在 device_node 層
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<string> getLightSwitchLevel();
|
|
|
|
|
|
2022-11-02 17:26:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 同步N4至資料表 import_niagara_item
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ds"></param>
|
|
|
|
|
/// <param name="building"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-05-10 15:14:46 +08:00
|
|
|
|
Task InsertItemFromNiagara(List<ImpNiaItem> ds, List<string> building);
|
2022-11-02 17:26:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 比對 device
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2023-03-28 13:48:30 +08:00
|
|
|
|
Task DeviceComparison(string LightSwitchLevel);
|
2023-02-08 15:17:03 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///檢查Device與import_niagara_tag 的Full_Name是否相同 不同則Full_Name從import_niagara_tag 覆蓋至device
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task CheckDiffFullNameAndCover();
|
|
|
|
|
|
2023-02-09 12:07:17 +08:00
|
|
|
|
Task CheckItemIsShowHistory();
|
|
|
|
|
|
2023-08-09 12:15:39 +08:00
|
|
|
|
Task InsertItemFromNiagara_History(List<ImpNiaItem> ds, List<string> building);
|
2023-02-07 11:55:52 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 比對 device的FullName,若為空則以DeviceName取代
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task CheckFullNameEmptyReplaceByDeviceName();
|
2022-11-02 17:26:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 比對 device_item
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task DeviceItemComparison();
|
2023-02-08 15:17:03 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 比對 device_item full_name 與 import_niagara_item是否相同
|
|
|
|
|
/// 不同則覆蓋
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task CheckItemDiffFullNameAndCover();
|
2023-02-07 17:55:29 +08:00
|
|
|
|
|
|
|
|
|
Task ItemCheckFullNameEmptyReplaceByDeviceName();
|
2022-11-02 17:26:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 新增資料至 buildingMenu
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task InsertBuildingMenu();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 新增資料至 subSystemFloor
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task InsertSubSystemFloor();
|
2023-06-08 15:41:40 +08:00
|
|
|
|
Task DeviceDisasterAysnc(List<Device_value_disaster> dv);
|
2023-07-18 09:28:49 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// InsertFloor
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task InsertFloor();
|
2023-08-10 10:31:44 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Recover device_system_tag
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task RecoverSysTag(string tableName);
|
2023-10-04 14:41:52 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// record all device control point
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dcp"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task DeviceControlPoint(List<DeviceControlPoint> dcp);
|
2023-11-16 11:32:32 +08:00
|
|
|
|
|
|
|
|
|
Task KeepTimeLog(string functionName, long milliSecond, [CallerLineNumber] int line = 0, [CallerMemberName] string name = "");
|
2022-11-02 17:26:18 +08:00
|
|
|
|
}
|
|
|
|
|
}
|