[後端] 修改api條件, 修改同步問題
This commit is contained in:
		
							parent
							
								
									9ad73b749b
								
							
						
					
					
						commit
						3a0ead386b
					
				@ -207,6 +207,7 @@ namespace Backend.Controllers
 | 
			
		||||
						                            AND d.device_name_tag = @sub_system_tag
 | 
			
		||||
						                            AND d.device_floor_tag = @floor_tag
 | 
			
		||||
						                            AND d.deleted = 0
 | 
			
		||||
                                                    AND d.is_link = 1
 | 
			
		||||
                            ) d
 | 
			
		||||
                            JOIN building b ON d.device_building_tag = b.building_tag
 | 
			
		||||
                            JOIN variable mv ON d.device_system_tag = mv.system_value AND mv.system_type = @main_system_type and mv.deleted = 0
 | 
			
		||||
 | 
			
		||||
@ -290,6 +290,7 @@ namespace Repository.BackendRepository.Implement
 | 
			
		||||
                        {
 | 
			
		||||
                            await conn.ExecuteAsync(sb.ToString());
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    sb.Clear();
 | 
			
		||||
 | 
			
		||||
@ -343,7 +344,8 @@ namespace Repository.BackendRepository.Implement
 | 
			
		||||
                    {
 | 
			
		||||
                        await conn.ExecuteAsync(sb.ToString());
 | 
			
		||||
                    }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    await RecoverSysTag("import_niagara_item");
 | 
			
		||||
                    #endregion
 | 
			
		||||
                }
 | 
			
		||||
                catch (Exception exception)
 | 
			
		||||
@ -553,7 +555,7 @@ namespace Repository.BackendRepository.Implement
 | 
			
		||||
		                        FROM import_niagara_tag
 | 
			
		||||
		                        LIMIT 100000
 | 
			
		||||
                        ) i ON d.device_number = i.niagara_tags 
 | 
			
		||||
                        SET d.is_link = 1");
 | 
			
		||||
                        SET d.is_link = 1, d.deleted = 0");
 | 
			
		||||
                    using (TransactionScope scope = new TransactionScope((TransactionScopeOption)TransactionScopeAsyncFlowOption.Enabled))
 | 
			
		||||
                    {
 | 
			
		||||
                        await conn.ExecuteAsync(sb.ToString());
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user