Merge branch 'master' of https://gitea.mjm-staging.developers-homelab.net/mjm-group/ibms
This commit is contained in:
commit
1f52b754c7
@ -314,11 +314,11 @@ namespace Backend.Controllers
|
|||||||
stopwatchSection.Stop();
|
stopwatchSection.Stop();
|
||||||
await niagaraDataSynchronizeRepository.KeepTimeLog("ItemCheckFullNameEmptyReplaceByDeviceName", stopwatchSection.ElapsedMilliseconds);
|
await niagaraDataSynchronizeRepository.KeepTimeLog("ItemCheckFullNameEmptyReplaceByDeviceName", stopwatchSection.ElapsedMilliseconds);
|
||||||
|
|
||||||
stopwatchSection = new Stopwatch();
|
//stopwatchSection = new Stopwatch();
|
||||||
stopwatchSection.Start();
|
//stopwatchSection.Start();
|
||||||
await niagaraDataSynchronizeRepository.CheckItemIsShowHistory();
|
//await niagaraDataSynchronizeRepository.CheckItemIsShowHistory();
|
||||||
stopwatchSection.Stop();
|
//stopwatchSection.Stop();
|
||||||
await niagaraDataSynchronizeRepository.KeepTimeLog("CheckItemIsShowHistory", stopwatchSection.ElapsedMilliseconds);
|
//await niagaraDataSynchronizeRepository.KeepTimeLog("CheckItemIsShowHistory", stopwatchSection.ElapsedMilliseconds);
|
||||||
|
|
||||||
if (isFirstAsync)
|
if (isFirstAsync)
|
||||||
isFirstAsync = false;
|
isFirstAsync = false;
|
||||||
|
@ -941,16 +941,17 @@ namespace Repository.BackendRepository.Implement
|
|||||||
sb.Append($@" SET SQL_SAFE_UPDATES = 0;
|
sb.Append($@" SET SQL_SAFE_UPDATES = 0;
|
||||||
UPDATE device_item d
|
UPDATE device_item d
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT m.device_system_tag, m.device_name_tag, m.device_point_name, m.full_name, device_building_tag
|
SELECT m.device_system_tag, m.device_name_tag, m.device_point_name, m.full_name, device_building_tag, date(created_at) as created_at
|
||||||
FROM import_niagara_item m
|
FROM import_niagara_item m
|
||||||
WHERE (m.is_history = 1)
|
WHERE m.is_history = 1
|
||||||
LIMIT 100000 -- Specify your desired limit here
|
LIMIT 100000 -- Specify your desired limit here
|
||||||
) AS subquery
|
) AS subquery
|
||||||
ON d.device_system_tag = subquery.device_system_tag
|
ON d.device_system_tag = subquery.device_system_tag
|
||||||
AND d.device_name_tag = subquery.device_name_tag
|
AND d.device_name_tag = subquery.device_name_tag
|
||||||
AND d.points = subquery.device_point_name
|
AND d.points = subquery.device_point_name
|
||||||
AND d.device_building_tag = subquery.device_building_tag
|
AND d.device_building_tag = subquery.device_building_tag
|
||||||
SET d.is_show_history = CASE WHEN subquery.device_point_name IS NULL THEN 0 ELSE 1 END;");
|
SET d.is_show_history = CASE WHEN subquery.device_point_name IS NULL THEN 0 ELSE 1 END
|
||||||
|
where date(d.created_at) = subquery.created_at;");
|
||||||
|
|
||||||
using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
|
using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user