[後台] Niagara 資料同步功能成功
把資料表的編碼全部改成 utf8mb4_unicode_ci 將 ibms_dome_dome.import_niagara_tag.niagara_tags 跟 ibms_dome_dome.device.device_number 改成索引
This commit is contained in:
		
							parent
							
								
									2cd214f545
								
							
						
					
					
						commit
						cf23000450
					
				@ -164,7 +164,7 @@ namespace Backend.Controllers
 | 
			
		||||
                var urlSlots = backendRepository.GetAllAsync<string>("select obixSlot from building where deleted = 0").Result;
 | 
			
		||||
                //foreach(var us in urlSlots)
 | 
			
		||||
                //{
 | 
			
		||||
                    var data = svc.obixHisQuery(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);
 | 
			
		||||
                    ds.AddRange(data);
 | 
			
		||||
               // }
 | 
			
		||||
 | 
			
		||||
@ -130,7 +130,10 @@
 | 
			
		||||
                            {
 | 
			
		||||
                                v.value = v.value.replace("$3", "");
 | 
			
		||||
                                v.tag_name = v.tag_name.replace("$3", "");
 | 
			
		||||
                                v.point_name = v.point_name.replace("$3", "");
 | 
			
		||||
                                if (v.point_name != null) 
 | 
			
		||||
                                {
 | 
			
		||||
                                    v.point_name = v.point_name.replace("$3", "");
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        })
 | 
			
		||||
                        //console.log(ds)
 | 
			
		||||
 | 
			
		||||
@ -132,7 +132,7 @@ namespace Repository.BackendRepository.Implement
 | 
			
		||||
                                    where (device_system_tag <> 'S' and device_system_tag <> 'CWB');  
 | 
			
		||||
 | 
			
		||||
                                    update import_niagara_tag a join dic_system b 
 | 
			
		||||
				                                    on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code
 | 
			
		||||
				                                    on a.device_name_tag COLLATE utf8mb4_unicode_ci = b.s2_code COLLATE utf8mb4_unicode_ci
 | 
			
		||||
                                    set device_system_tag = b.s1_code -- tag 第二碼為小類(除了安全系統之外)
 | 
			
		||||
                                    where (device_system_tag <> 'S' and device_system_tag <> 'CWB');  -- 安全系統 第二段大類 第四段小類");
 | 
			
		||||
                                await conn.ExecuteAsync(sb.ToString());
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user