修改同步只讀取8段
This commit is contained in:
		
							parent
							
								
									01caf2df06
								
							
						
					
					
						commit
						f8160779a8
					
				@ -70,6 +70,8 @@ namespace Repository.BackendRepository.Implement
 | 
				
			|||||||
                            if (string.IsNullOrEmpty(row.tag_name)) continue;
 | 
					                            if (string.IsNullOrEmpty(row.tag_name)) continue;
 | 
				
			||||||
                            string[] arrTag = row.tag_name.Split('_');
 | 
					                            string[] arrTag = row.tag_name.Split('_');
 | 
				
			||||||
                            
 | 
					                            
 | 
				
			||||||
 | 
					                            if (arrTag.Length == 8)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
                                sb.Append($@" insert import_niagara_tag(niagara_tags, device_area_tag, device_building_tag, device_system_tag,
 | 
					                                sb.Append($@" insert import_niagara_tag(niagara_tags, device_area_tag, device_building_tag, device_system_tag,
 | 
				
			||||||
                                    device_name_tag, device_floor_tag, device_master_tag, device_last_name_tag, device_serial_tag, atDateTime) values('" +
 | 
					                                    device_name_tag, device_floor_tag, device_master_tag, device_last_name_tag, device_serial_tag, atDateTime) values('" +
 | 
				
			||||||
                                    row.tag_name + "', '" +
 | 
					                                    row.tag_name + "', '" +
 | 
				
			||||||
@ -83,6 +85,7 @@ namespace Repository.BackendRepository.Implement
 | 
				
			|||||||
                                    arrTag[7] + "',  " +
 | 
					                                    arrTag[7] + "',  " +
 | 
				
			||||||
                                    "now());");
 | 
					                                    "now());");
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                        if (sb.Length > 0)
 | 
					                        if (sb.Length > 0)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            await conn.ExecuteAsync(sb.ToString());
 | 
					                            await conn.ExecuteAsync(sb.ToString());
 | 
				
			||||||
@ -140,6 +143,8 @@ namespace Repository.BackendRepository.Implement
 | 
				
			|||||||
                            string[] arrTag = row.tag_name.Split('_');
 | 
					                            string[] arrTag = row.tag_name.Split('_');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            #region for item 
 | 
					                            #region for item 
 | 
				
			||||||
 | 
					                            if (arrTag.Length == 8)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
                                Device_item8 row_item = new Device_item8();
 | 
					                                Device_item8 row_item = new Device_item8();
 | 
				
			||||||
                                row_item.tag_name = row.tag_name;
 | 
					                                row_item.tag_name = row.tag_name;
 | 
				
			||||||
                                row_item.device_area_tag = arrTag[0];
 | 
					                                row_item.device_area_tag = arrTag[0];
 | 
				
			||||||
@ -152,6 +157,7 @@ namespace Repository.BackendRepository.Implement
 | 
				
			|||||||
                                row_item.device_serial_tag = arrTag[7];
 | 
					                                row_item.device_serial_tag = arrTag[7];
 | 
				
			||||||
                                row_item.point_name = row.point_name;
 | 
					                                row_item.point_name = row.point_name;
 | 
				
			||||||
                                dt_item.Add(row_item);
 | 
					                                dt_item.Add(row_item);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
                            #endregion
 | 
					                            #endregion
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user