Browse Source

Merge branch 'F/20240102_HotUpdate' of https://gogs.ghz-tech.com:8843/GHzGlass/MREdustryXR into F/20240102_HotUpdate

# Conflicts:
#	Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/CaoZuoLanManager.cs
胡佳骏 1 year ago
parent
commit
6dca1d6dff

+ 65 - 16
Assets/HotUpdate/Scripts/Scripts/JinRuRenwu.cs

@@ -112,7 +112,7 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
                     DianYunManager.Instance.startSaoMiao();
                 }
                 XRRGBCamera.Instance.playCamera(1280, 720);
-                XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
+               // XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
                 DownLoadXRManager.DownLoadForBytes(DownLoadXRManager.getTestData(XunJianDataManager.Instance.chooseXunJian.url), (byte[] bytes) => {
 
 
@@ -127,7 +127,7 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
                 saotuTip.GetComponent<SaoTuManager>().showSaoTu();
                 break;
            case RenWuModelType.None:
-                XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
+              //  XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
                 show();
                 break;
         }
@@ -137,7 +137,7 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
    
     public void GotoStart()
     {
-        XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
+       // XunJianDataManager.Instance.chooseXunJian.nowIndex = -1;
         switch (XunJianDataManager.Instance.chooseXunJian.renwuModelType)
         {
             case RenWuModelType.SaoTu:
@@ -161,7 +161,7 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
         Debug.Log("showshowshowshowshowshow");
         //updateListRef();
         // rwitem = XunJianDataManager.Instance.chooseXunJian.itemList[XunJianDataManager.Instance.chooseXunJian.nowIndex+1];
-        rwitem = XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1];
+        rwitem = XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex];
         rwitem.startTime = Time.time;
         if (XunJianDataManager.Instance.chooseXunJian.renwuModelType == RenWuModelType.DianYun)
         {
@@ -309,6 +309,65 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
         {
             WenJianLan.SetActive(false);
         }
+
+
+
+        //if (rwitem.data.Count > 0)
+        //{
+        //    int img = 0;
+        //    for (int i = 0; i < rwitem.data.Count; i++)
+        //    {
+        //        switch (rwitem.data[i].loadingMethod)
+        //        {
+        //            case 1:
+        //                if (img == 0)
+        //                {
+        //                    ImageBT.SetActive(true);
+        //                    Image.GetComponent<RenWuTypeWindow>().updateData(rwitem.resources[i]);
+        //                }
+        //                else
+        //                {
+
+        //                    Image2BT.SetActive(false);
+        //                    Image2.GetComponent<RenWuTypeWindow>().updateData(rwitem.resources[i]);
+        //                }
+        //                img++;
+        //                break;
+        //            case 2:
+        //                ModelBT.SetActive(true);
+        //                Model.GetComponent<RenWuTypeWindow>().updateData(rwitem.resources[i]);
+        //                break;
+        //            case -1:
+        //                TextBT.SetActive(true);
+        //                Text.GetComponent<RenWuTypeWindow>().updateData(rwitem.resources[i]);
+        //                break;
+        //            case 3:
+        //                VideoBT.SetActive(true);
+        //                Video.GetComponent<RenWuTypeWindow>().updateData(rwitem.resources[i]);
+        //                break;
+        //        }
+        //    }
+
+        //    //if (rwitem.typeList.Count < 2)
+        //    //{
+        //    //    AllBT.SetActive(false);
+        //    //}
+        //    if (rwitem.data.Count < 2)
+        //    {
+        //        AllBT.SetActive(false);
+        //    }
+        //    else
+        //    {
+
+        //        AllBT.SetActive(true);
+        //    }
+
+        //    WenJianLan.SetActive(true);
+        //}
+        //else
+        //{
+        //    WenJianLan.SetActive(false);
+        //}
     }
     private void OnDisable()
     {
@@ -615,18 +674,8 @@ public class JinRuRenwu : WindowSingleton<JinRuRenwu>
             {
                 Debug.Log(HttpEdustryAction.tasksReport + " HttpEdustryAction.tasksReport  " + msg);
                 JObject data = new JObject();
-
-
-
-                //if (data["code"].ToString() == "200")
-                //{
-
-                //    Debug.Log("Éϱ¨³É¹¦" + msg);
-                //}
-                //else
-                //{
-                //    Debug.LogError(" Éϱ¨Ê§°Ü" + msg);
-                //}
+                
+              
 
             }));
         }

+ 11 - 2
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/XunJianDataManager.cs

@@ -719,6 +719,11 @@ public class XunJianDataManager : Singleton<XunJianDataManager>
         public string url;
         public string people = "未知员工";
         public List<Wall> listWall;
+
+        /// <summary>
+        /// 当前未完成任务的开始下标
+        /// </summary>
+        public int rwIndex = 0;
     }
 
     public class XunJianData
@@ -773,10 +778,11 @@ public class XunJianDataManager : Singleton<XunJianDataManager>
 
     public void gotoNext()
     {
+        Debug.Log("DGj ===>gotoNext " + chooseXunJian.nowIndex);
         // if(chooseXunJian.itemList.Count-1 > chooseXunJian.nowIndex)
-        if (chooseXunJian.tasksList.Count - 1 > chooseXunJian.nowIndex)
+        if (chooseXunJian.tasksList.Count > chooseXunJian.nowIndex)
         {
-            chooseXunJian.nowIndex++;
+            
             if (JinRuRenwu.Instance != null)
             {
                 JinRuRenwu.Instance.UpdateData();
@@ -799,6 +805,8 @@ public class XunJianDataManager : Singleton<XunJianDataManager>
             WindowsManager.Instance.show(WindowConfig.windowType.Error, false, WindowsManager.Instance.getErrorData("提示", "已经是最后一步了!", Color.gray, "icon", backTip, false, "自动退出", 5,"","退出巡检","返回").ToJson());
 
         }
+
+        chooseXunJian.nowIndex++;
     }
 
     public void chooseItem(int i)
@@ -907,6 +915,7 @@ public class XunJianDataManager : Singleton<XunJianDataManager>
         /// 任务开始时间
         /// </summary>
         public float startTime { get; set; }
+      
     }
 
     public class MinioResources

+ 2 - 2
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/ARSaoTuManager.cs

@@ -23,7 +23,7 @@ public class ARSaoTuManager : MonoSingleton<ARSaoTuManager>
         // °´KÌø¹ýɨͼ
         if (Input.GetKeyDown(KeyCode.K))
         {
-            if (XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1].imageData != null)
+            if (XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex].imageData != null)
             {
                 Debug.Log("showshowshowshowshowshow");
                 JinRuRenwu.Instance.show();
@@ -58,7 +58,7 @@ public class ARSaoTuManager : MonoSingleton<ARSaoTuManager>
                 //}
 
 
-                if (XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1].imageData != null && arg1.name == "TargetImage_" + XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1].imageData.Name)
+                if (XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex ].imageData != null && arg1.name == "TargetImage_" + XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex ].imageData.Name)
                 {
                     Debug.Log("showshowshowshowshowshow");
                     JinRuRenwu.Instance.show();

+ 3 - 3
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/CaoZuoLanManager.cs

@@ -39,7 +39,6 @@ public class CaoZuoLanManager : MonoSingleton<CaoZuoLanManager>
         //            break;
         //    }
         //}
-
     }
     public void failItem()
     {
@@ -83,12 +82,13 @@ public class CaoZuoLanManager : MonoSingleton<CaoZuoLanManager>
                 case RenWuModelType.SaoTu:
                     JinRuRenwu.Instance.closeAll();
                     ChangeCameraSaoMiao.Instance.showsaomiao(XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1]);
+
                     break;
                 case RenWuModelType.DianYun:
-                    LineManager.Instance.setRoad(XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1].roadList);
+                    LineManager.Instance.setRoad(XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex].roadList);
                     break;
                 case RenWuModelType.DingWeiBan:
-                    ChangeCameraSaoMiao.Instance.showsaomiao(XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex + 1]);
+                    ChangeCameraSaoMiao.Instance.showsaomiao(XunJianDataManager.Instance.chooseXunJian.tasksList[XunJianDataManager.Instance.chooseXunJian.nowIndex]);
                     break;
                 case RenWuModelType.None:
                     JinRuRenwu.Instance.gotoNextItem();

+ 10 - 0
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/PaiZhaoDataManager.cs

@@ -187,6 +187,16 @@ public class PaiZhaoDataManager : Singleton<PaiZhaoDataManager>
             }
 
         }
+
+        paizhaoData pzData = null;
+
+        for (int i = 0; i < paizhaoList.Count/2; i++)
+        {
+            pzData = paizhaoList[i];
+            paizhaoList[i] = paizhaoList[paizhaoList.Count - 1];
+            paizhaoList[paizhaoList.Count - 1] = pzData;
+        }
+
         return paizhaoList;
     }
 

+ 44 - 16
Assets/HotUpdate/Scripts/Scripts/Project/XunJianLieBiaoItem.cs

@@ -31,27 +31,55 @@ public class XunJianLieBiaoItem : MonoBehaviour
 
     public void gotoXunJian()
     {
-        // »ñȡѲ¼ìÈÎÎñ   
-        JsonData jsonData = new JsonData();
 
-        jsonData["projectInspectionId"] = int.Parse(data.id);
-        HttpTool.Instance.Post(HttpEdustryAction.projectTasks, jsonData.ToJson(), (string msg) => {
+       
+        {
+            // »ñȡѲ¼ìÈÎÎñ   
+            JsonData jsonData = new JsonData();
 
-            Debug.Log(msg);
-            JObject jObject = JObject.Parse(msg);
-            if (jObject["code"].ToString() == "200")
-            {
-                data.tasksList = JsonConvert.DeserializeObject<List<XunJianTasks>>(jObject["data"]["tasks"].ToString());
+            jsonData["projectInspectionId"] = int.Parse(data.id);
+            HttpTool.Instance.Post(HttpEdustryAction.projectTasks, jsonData.ToJson(), (string msg) => {
+
+                Debug.Log(msg);
+                JObject jObject = JObject.Parse(msg);
+                if (jObject["code"].ToString() == "200")
+                {
+                    data.tasksList = JsonConvert.DeserializeObject<List<XunJianTasks>>(jObject["data"]["tasks"].ToString());
 
-                XunJianDataManager.Instance.GotoXunJian(data);
-            }
-            else
-            {
-                data.tasksList = new List<XunJianTasks>();
-            }
-        });
+
+                    if (!IsXunJianOver(data))
+                        XunJianDataManager.Instance.GotoXunJian(data);
+                }
+                else
+                {
+                    data.tasksList = new List<XunJianTasks>();
+                }
+            });
+        }
+
+        
 
 
       
+    }
+
+    private bool IsXunJianOver(XunJianListData data)
+    {
+
+        for (int i = 0; i < data.tasksList.Count; i++)
+        {
+            if (data.tasksList[i].completionTime == 0)
+            {
+                data.rwIndex = i;
+                data.nowIndex = i;
+
+                Debug.Log("DGJ ====>" + data.nowIndex);
+                return false;
+            }
+        }
+
+        return true;
     }
 }
+
+

+ 2 - 2
Packages/manifest.json

@@ -1,7 +1,7 @@
 {
   "dependencies": {
     "com.code-philosophy.hybridclr": "https://gogs.ghz-tech.com:8843/GHzGlass/HYBRIDCLR.git",
-    "com.cysharp.unitask": "https://gogs.ghz-tech.com:8843/GHzGlass/UniTaskXR.git",
+    "com.cysharp.unitask": "file:D:/JiHe/New/UniTaskXR",
     "com.easyar.sense": "file:com.easyar.sense-4.6.0+3015.3acb5241.tgz",
     "com.ghz.avideoplayer": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git#EasyMovieTexture",
     "com.ghz.login": "https://gogs.ghz-tech.com:8843/GHzGlass/LoginXR.git",
@@ -18,7 +18,7 @@
     "com.unity.visualscripting": "1.7.8",
     "com.unity.webrtc": "https://gogs.ghz-tech.com:8843/GHzGlass/WebRtcXR.git",
     "com.unity.xr.arfoundation": "4.2.9",
-    "com.ximmerse.xr": "https://gogs.ghz-tech.com:8843/GHzGlass/GHZSDKXR.git#XRSDK_Rhinox",
+    "com.ximmerse.xr": "file:D:/JiHe/GHZSDKXR",
     "jh.immersalsdk.engine": "https://gogs.ghz-tech.com:8843/GHzGlass/ImmersalSDK.git#ImmersalSDK_Phone",
     "jh.opencvforunity.engine": "https://gogs.ghz-tech.com:8843/GHzGlass/OpenCVForUnity.git",
     "jh.trilib.engine": "https://gogs.ghz-tech.com:8843/GHzGlass/TriLibXR.git",

+ 7 - 9
Packages/packages-lock.json

@@ -8,11 +8,10 @@
       "hash": "a774bfd53315a737da668dd15702e2e8b53d8fcf"
     },
     "com.cysharp.unitask": {
-      "version": "https://gogs.ghz-tech.com:8843/GHzGlass/UniTaskXR.git",
+      "version": "file:D:/JiHe/New/UniTaskXR",
       "depth": 0,
-      "source": "git",
-      "dependencies": {},
-      "hash": "808e4b7c6a70f8780c33d2a9db6e9c5283ee98bf"
+      "source": "local",
+      "dependencies": {}
     },
     "com.easyar.sense": {
       "version": "file:com.easyar.sense-4.6.0+3015.3acb5241.tgz",
@@ -256,9 +255,9 @@
       "url": "https://packages.unity.cn"
     },
     "com.ximmerse.xr": {
-      "version": "https://gogs.ghz-tech.com:8843/GHzGlass/GHZSDKXR.git#XRSDK_Rhinox",
+      "version": "file:D:/JiHe/GHZSDKXR",
       "depth": 0,
-      "source": "git",
+      "source": "local",
       "dependencies": {
         "com.unity.xr.management": "3.2.9",
         "com.unity.xr.legacyinputhelpers": "2.1.4",
@@ -266,8 +265,7 @@
         "com.unity.xr.interaction.toolkit": "2.0.0",
         "com.unity.inputsystem": "1.3.0",
         "com.unity.xr.openxr": "1.5.3"
-      },
-      "hash": "ac3a89017d18e480548dc0923368f703640f5cfb"
+      }
     },
     "jh.immersalsdk.engine": {
       "version": "https://gogs.ghz-tech.com:8843/GHzGlass/ImmersalSDK.git#ImmersalSDK_Phone",
@@ -289,7 +287,7 @@
         "com.unity.xr.legacyinputhelpers": "2.1.2",
         "com.unity.inputsystem": "1.4.2"
       },
-      "hash": "056c1b881caeda82917d40fe97818f50a6d30b59"
+      "hash": "4b6e86cb0045aef590181084754ef60d112498ac"
     },
     "jh.trilib.engine": {
       "version": "https://gogs.ghz-tech.com:8843/GHzGlass/TriLibXR.git",

+ 19 - 5
ProjectSettings/EditorSettings.asset

@@ -4,27 +4,41 @@
 EditorSettings:
   m_ObjectHideFlags: 0
   serializedVersion: 11
-  m_ExternalVersionControlSupport: Visible Meta Files
   m_SerializationMode: 2
   m_LineEndingsForNewScripts: 0
   m_DefaultBehaviorMode: 0
   m_PrefabRegularEnvironment: {fileID: 0}
   m_PrefabUIEnvironment: {fileID: 0}
-  m_SpritePackerMode: 0
+  m_SpritePackerMode: 3
   m_SpritePackerPaddingPower: 1
+  m_Bc7TextureCompressor: 0
   m_EtcTextureCompressorBehavior: 1
   m_EtcTextureFastCompressor: 1
   m_EtcTextureNormalCompressor: 2
   m_EtcTextureBestCompressor: 4
   m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
   m_ProjectGenerationRootNamespace: 
-  m_CollabEditorSettings:
-    inProgressEnabled: 1
   m_EnableTextureStreamingInEditMode: 1
   m_EnableTextureStreamingInPlayMode: 1
   m_AsyncShaderCompilation: 1
+  m_CachingShaderPreprocessor: 1
+  m_PrefabModeAllowAutoSave: 1
   m_EnterPlayModeOptionsEnabled: 0
   m_EnterPlayModeOptions: 3
-  m_ShowLightmapResolutionOverlay: 1
+  m_GameObjectNamingDigits: 1
+  m_GameObjectNamingScheme: 0
+  m_AssetNamingUsesSpace: 1
   m_UseLegacyProbeSampleCount: 0
   m_SerializeInlineMappingsOnOneLine: 1
+  m_DisableCookiesInLightmapper: 0
+  m_AssetPipelineMode: 1
+  m_RefreshImportMode: 0
+  m_CacheServerMode: 0
+  m_CacheServerEndpoint: 
+  m_CacheServerNamespacePrefix: default
+  m_CacheServerEnableDownload: 1
+  m_CacheServerEnableUpload: 1
+  m_CacheServerEnableAuth: 0
+  m_CacheServerEnableTls: 0
+  m_CacheServerValidationMode: 2
+  m_CacheServerDownloadBatchSize: 128

+ 9 - 1
ProjectSettings/HybridCLRSettings.asset

@@ -23,7 +23,15 @@ MonoBehaviour:
   hotUpdateDllCompileOutputRootDir: HybridCLRData/HotUpdateDlls
   externalHotUpdateAssembliyDirs: []
   strippedAOTDllOutputRootDir: HybridCLRData/AssembliesPostIl2CppStrip
-  patchAOTAssemblies: []
+  patchAOTAssemblies:
+  - mscorlib.dll
+  - System.dll
+  - System.Core.dll
+  - UniTask.dll
+  - Minio.dll
+  - System.Runtime.CompilerServices.Unsafe.dll
+  - netstandard.dll
+  - COSXML.dll
   outputLinkFile: HybridCLRGenerate/link.xml
   outputAOTGenericReferenceFile: HybridCLRGenerate/AOTGenericReferences.cs
   maxGenericReferenceIteration: 10

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -147,8 +147,6 @@ PlayerSettings:
     Others: 1
   bundleVersion: 0.5.0
   preloadedAssets:
-  - {fileID: 2720162604194769745, guid: 6f45d16099e3af24c9d1814902f6c1cd, type: 2}
-  - {fileID: -1976151159784538485, guid: 2fc93d2ce72dd364f968f3400a68213b, type: 2}
   - {fileID: 4800000, guid: ea9a295053a0dc440b9698a7f41d9741, type: 3}
   - {fileID: 4800000, guid: 1499e61b3897c4a4b9318a56ca931b8a, type: 3}
   - {fileID: 4800000, guid: 798d6e253a35a144d94205b80c8fd48b, type: 3}
@@ -156,6 +154,8 @@ PlayerSettings:
   - {fileID: 4800000, guid: 58841e6e22debfc43ba09a0cf58cd92d, type: 3}
   - {fileID: 4800000, guid: a336f422ffebbec4c89b4dac26022d5f, type: 3}
   - {fileID: 11400000, guid: 852e6bd112d2b174996470390b08d3a7, type: 2}
+  - {fileID: 2720162604194769745, guid: 6f45d16099e3af24c9d1814902f6c1cd, type: 2}
+  - {fileID: -1976151159784538485, guid: 2fc93d2ce72dd364f968f3400a68213b, type: 2}
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1