change:
1.修改歷史紀錄左方下拉選單判斷 device visible = 1 2.後端同步判斷table Device fullName為空,以device_number替代
This commit is contained in:
parent
addc1ac851
commit
f6dffd0ef3
@ -82,6 +82,7 @@ namespace Backend.Controllers
|
|||||||
var building = ds.FirstOrDefault().building;
|
var building = ds.FirstOrDefault().building;
|
||||||
await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building);
|
await niagaraDataSynchronizeRepository.InsertNiagaraTagList(ds, building);
|
||||||
await niagaraDataSynchronizeRepository.DeviceComparison();
|
await niagaraDataSynchronizeRepository.DeviceComparison();
|
||||||
|
await niagaraDataSynchronizeRepository.CheckFullNameEmptyReplaceByDeviceName();
|
||||||
await niagaraDataSynchronizeRepository.InsertBuildingMenu();
|
await niagaraDataSynchronizeRepository.InsertBuildingMenu();
|
||||||
await niagaraDataSynchronizeRepository.InsertSubSystemFloor();
|
await niagaraDataSynchronizeRepository.InsertSubSystemFloor();
|
||||||
result = true;
|
result = true;
|
||||||
|
@ -204,7 +204,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
join userinfo c on c.role_guid = a.role_guid
|
join userinfo c on c.role_guid = a.role_guid
|
||||||
join variable v2 on b.ShowView = v2.id and v2.system_type = @sub_system_type
|
join variable v2 on b.ShowView = v2.id and v2.system_type = @sub_system_type
|
||||||
join variable v1 on v1.id = v2.system_parent_id and v1.system_type = @main_system_type
|
join variable v1 on v1.id = v2.system_parent_id and v1.system_type = @main_system_type
|
||||||
join device d on v1.system_value = d.device_system_tag and v2.system_value = d.device_name_tag and d.deleted = 0
|
join device d on v1.system_value = d.device_system_tag and v2.system_value = d.device_name_tag and d.deleted = 0 and d.visible = 1
|
||||||
where c.account = @account
|
where c.account = @account
|
||||||
order by v1.system_priority, v2.system_priority", new { @account = myUser.account, @sub_system_type = sub_system_type, @main_system_type = main_system_type });
|
order by v1.system_priority, v2.system_priority", new { @account = myUser.account, @sub_system_type = sub_system_type, @main_system_type = main_system_type });
|
||||||
var dbbuilding = await frontendRepository.GetAllAsync<History_Build>(
|
var dbbuilding = await frontendRepository.GetAllAsync<History_Build>(
|
||||||
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Transactions;
|
using System.Transactions;
|
||||||
using Repository.Models;
|
using Repository.Models;
|
||||||
using System.Data.SqlTypes;
|
using System.Data.SqlTypes;
|
||||||
|
using Microsoft.Extensions.Primitives;
|
||||||
|
|
||||||
namespace Repository.BackendRepository.Implement
|
namespace Repository.BackendRepository.Implement
|
||||||
{
|
{
|
||||||
@ -505,6 +506,34 @@ namespace Repository.BackendRepository.Implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 檢查device內FullName為空的值,以device_Name取代
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task CheckFullNameEmptyReplaceByDeviceName()
|
||||||
|
{
|
||||||
|
using (IDbConnection conn = GetDbConnection())
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append("update bims_mitsubishi.device set full_name=device_number where full_Name='';");
|
||||||
|
await conn.ExecuteAsync(sb.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
conn.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,12 @@ namespace Repository.BackendRepository.Interface
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task DeviceComparison();
|
Task DeviceComparison();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 比對 device的FullName,若為空則以DeviceName取代
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task CheckFullNameEmptyReplaceByDeviceName();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 比對 device_item
|
/// 比對 device_item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user