diff --git a/Backend/Controllers/DeviceImportController.cs b/Backend/Controllers/DeviceImportController.cs index 1f2218b..fb0beb2 100644 --- a/Backend/Controllers/DeviceImportController.cs +++ b/Backend/Controllers/DeviceImportController.cs @@ -761,13 +761,42 @@ namespace Backend.Controllers { if (post.Count > 0) { + //清空device_node資料表 + //await backendRepository.TruncateTable("device_node"); + + //int node_priority = 1; foreach(var idfc in post) { - Dictionary device = new Dictionary(); - device.Add("@device_coordinate_3d", idfc.device_coordinate_3d); - device.Add("@forge_dbid", idfc.forge_dbid); + //if(idfc.device_number.IndexOf("_LT_L1") > -1) + //{ + // //取得device_guid + // var sWhere = $@"where deleted = 0 and device_number = " + idfc.device_number; + // var device_guid = await backendRepository.GetOneAsync("device_node", sWhere, "device_guid"); - await backendRepository.UpdateOneByCustomTable(device, "device", $@" device_number = '{idfc.device_number}'"); + // //燈具 + // Dictionary device = new Dictionary(); + // device.Add("@device_node_guid", Guid.NewGuid()); + // device.Add("@deleted", 0); + // device.Add("@device_guid", device_guid); + // device.Add("@device_node_coordinate_3d", idfc.device_coordinate_3d); + // device.Add("@forge_dbid", idfc.forge_dbid); + // device.Add("@priority", node_priority); + // device.Add("@created_by", myUserInfo.Userinfo_guid); + // device.Add("@created_at", DateTime.Now); + + // node_priority++; + // await backendRepository.AddOneByCustomTableReturnId(device, "device_node", false); + //} + //else + //{ + Dictionary device = new Dictionary(); + device.Add("@device_coordinate_3d", idfc.device_coordinate_3d); + device.Add("@forge_dbid", idfc.forge_dbid); + await backendRepository.UpdateOneByCustomTable(device, "device", $@" device_number = '{idfc.device_number}'"); + //} + + + } } apiResult.Code = "0000"; diff --git a/Backend/Views/Forge/index.html b/Backend/Views/Forge/index.html deleted file mode 100644 index 6671224..0000000 --- a/Backend/Views/Forge/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Autodesk Forge Tutorial - - - - - - - - - - - - - - - - - - - @{ - ViewData["MainNum"] = "1"; - ViewData["SubNum"] = "4"; - ViewData["Title"] = "forge管理"; - } - - - -
-
-
-
-
- Buckets & Objects - - -
-
- tree here -
-
-
-
-
-
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/Frontend/_graphManagement.html b/Frontend/_graphManagement.html index 7e7897a..55749cb 100644 --- a/Frontend/_graphManagement.html +++ b/Frontend/_graphManagement.html @@ -7,16 +7,20 @@
+
+ 按右鍵即可展開選單 +
-
+ @@ -42,7 +46,7 @@ + \ No newline at end of file diff --git a/Frontend/forgetTest2.html b/Frontend/forgetTest2.html index fe40614..b3d8d5e 100644 --- a/Frontend/forgetTest2.html +++ b/Frontend/forgetTest2.html @@ -17,20 +17,27 @@

Robot Controls

Selected_ID:

All_ID:

- - - + + + + + + + + @@ -184,6 +191,7 @@