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