diff --git a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/BeltScaleIcon.prefab b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/BeltScaleIcon.prefab
index 5658e1ac..a68d76ab 100644
--- a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/BeltScaleIcon.prefab
+++ b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/BeltScaleIcon.prefab
@@ -66,7 +66,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
- m_text: New Text
+ m_text: "\u672A\u77E5\u8BA1\u91CF\u8BBE\u5907"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 39d48bca937920746ae0cfa602467f63, type: 2}
m_sharedMaterial: {fileID: 3298889249665915115, guid: 39d48bca937920746ae0cfa602467f63,
diff --git a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/YardNameIcon.prefab b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/YardNameIcon.prefab
index 26477ea0..98ca8a73 100644
--- a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/YardNameIcon.prefab
+++ b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/DeviceIcons/YardNameIcon.prefab
@@ -66,7 +66,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
- m_text: "\u554A\u5B9E\u6253\u5B9E\u7684\u6492\u554A\u5B9E\u6253\u5B9E\u7684"
+ m_text: "\u672A\u77E5\u5806\u573A"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 39d48bca937920746ae0cfa602467f63, type: 2}
m_sharedMaterial: {fileID: 3298889249665915115, guid: 39d48bca937920746ae0cfa602467f63,
diff --git a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/WebVideo/VideoWebPage.prefab b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/WebVideo/VideoWebPage.prefab
index 8225e661..4476035a 100644
--- a/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/WebVideo/VideoWebPage.prefab
+++ b/BulkCargo_UnityProject/Assets/Resources/Prefabs/UI/WebVideo/VideoWebPage.prefab
@@ -282,7 +282,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
- m_text: "\u7801\u5934XX\u4E00\u53F7\u6CCA\u4F4D"
+ m_text: "\u672A\u77E5\u76F8\u673A"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 7189cdc95f54eb84ba6a7b8655aebb40, type: 2}
m_sharedMaterial: {fileID: 1594732787684875815, guid: 7189cdc95f54eb84ba6a7b8655aebb40,
diff --git a/BulkCargo_UnityProject/Assets/Scripts/cxx/CallForTest.cs b/BulkCargo_UnityProject/Assets/Scripts/cxx/CallForTest.cs
index c8c2e34a..1d567a9c 100644
--- a/BulkCargo_UnityProject/Assets/Scripts/cxx/CallForTest.cs
+++ b/BulkCargo_UnityProject/Assets/Scripts/cxx/CallForTest.cs
@@ -1,52 +1,52 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
using System.Runtime.InteropServices;
-using UnityEngine;
-using UnityEngine.SceneManagement;
-using static UnityEditor.PlayerSettings;
-
-///
-/// 系统初始化
-///
-
-public class CallForTest : MonoBehaviour
-{
- public static CallForTest instance;
- ///
- /// 启动参数
- ///
- [HideInInspector]
- public List infos = null;
-
- ///
- /// 启动器传过来的关区编号
- ///
- public string customCode;
- ///
- /// 海关
- ///
- public CustomName customName;
- ///
- /// 启动器传过来的企业id
- ///
- public string MONITOR_ID;
-
- ///
- /// 启动器传过来的服务器IP
- ///
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using static UnityEditor.PlayerSettings;
+
+///
+/// 系统初始化
+///
+
+public class CallForTest : MonoBehaviour
+{
+ public static CallForTest instance;
+ ///
+ /// 启动参数
+ ///
+ [HideInInspector]
+ public List infos = null;
+
+ ///
+ /// 启动器传过来的关区编号
+ ///
+ public string customCode;
+ ///
+ /// 海关
+ ///
+ public CustomName customName;
+ ///
+ /// 启动器传过来的企业id
+ ///
+ public string MONITOR_ID;
+
+ ///
+ /// 启动器传过来的服务器IP
+ ///
public string ServerIP;
- [DllImport("user32.dll", EntryPoint = "FindWindow")]
+ [DllImport("user32.dll", EntryPoint = "FindWindow")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
- [DllImport("user32.dll")]
+ [DllImport("user32.dll")]
static extern IntPtr SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint wFlags);
const uint SWP_SHOWWINDOW = 0x0040;
- const int HWND_TOPMOST = -1;
- private void Awake()
- {
- instance = this;
+ const int HWND_TOPMOST = -1;
+ private void Awake()
+ {
+ instance = this;
DontDestroyOnLoad(gameObject);
//#if UNITY_EDITOR
@@ -56,79 +56,79 @@ public class CallForTest : MonoBehaviour
//#endif
Debug.Log(Application.productName);
- IntPtr ptr = FindWindow(null, Application.productName);
- SetWindowPos(ptr, (IntPtr)HWND_TOPMOST, 0, 0, Screen.width, Screen.height, SWP_SHOWWINDOW);
- }
-
- private void OnGUI()
- {
- GUI.Label(new Rect(20, Screen.height - 30, 200, 50), "v" + Application.version);
- }
-
- private void Start()
- {
- //获取启动参数
- infos = Environment.GetCommandLineArgs().ToList();
+ IntPtr ptr = FindWindow(null, Application.productName);
+ SetWindowPos(ptr, (IntPtr)HWND_TOPMOST, 0, 0, Screen.width, Screen.height, SWP_SHOWWINDOW);
+ }
+
+ private void OnGUI()
+ {
+ GUI.Label(new Rect(20, Screen.height - 30, 200, 50), "v" + Application.version);
+ }
+
+ private void Start()
+ {
+ //获取启动参数
+ infos = Environment.GetCommandLineArgs().ToList();
Debug.Log("启动参数--------------------------------------------");
infos.ForEach(info =>
{
Debug.Log(info);
});
- Debug.Log("启动参数--------------------------------------------");
- Debug.Log("");
-
- string code = infos.Find(a => a.StartsWith("code="));
- string enterprise_code = infos.Find(a => a.StartsWith("enterprise_code="));
- string config_value = infos.Find(a => a.StartsWith("config_value="));
- if (!string.IsNullOrEmpty(code))
- {
- customCode = code.Replace("code=", "");
- Debug.Log("启动参数关区:" + customCode);
- }
-
- if (!string.IsNullOrEmpty(enterprise_code))
- {
+ Debug.Log("启动参数--------------------------------------------");
+ Debug.Log("");
+
+ string code = infos.Find(a => a.StartsWith("code="));
+ string enterprise_code = infos.Find(a => a.StartsWith("enterprise_code="));
+ string config_value = infos.Find(a => a.StartsWith("config_value="));
+ if (!string.IsNullOrEmpty(code))
+ {
+ customCode = code.Replace("code=", "");
+ Debug.Log("启动参数关区:" + customCode);
+ }
+
+ if (!string.IsNullOrEmpty(enterprise_code))
+ {
MONITOR_ID = enterprise_code.Replace("enterprise_code=", "");
- Debug.Log("启动参数企业:" + MONITOR_ID);
- }
-
- if (!string.IsNullOrEmpty(config_value))
- {
+ Debug.Log("启动参数企业:" + MONITOR_ID);
+ }
+
+ if (!string.IsNullOrEmpty(config_value))
+ {
ServerIP = config_value.Replace("config_value=", "");
- Debug.Log("启动参数服务器:" + ServerIP);
- }
-
-
- if (customCode == "3501")
- {
- customName = CustomName.马尾海关;
- }
- else if (customCode == "3502" || customCode == "3505")
- {
- customName = CustomName.榕城海关;
- }
- else if (customCode == "3503")
- {
- customName = CustomName.宁德海关;
- }
- else if (customCode == "3506")
- {
- customName = CustomName.莆田海关;
- }
-
- //加载第二个场景,即企业场景
- Debug.Log("准备加载Mainscene");
- SceneManager.LoadScene(1);
- }
-}
-
-///
-/// 关区
-///
-public enum CustomName
-{
- 马尾海关,
- 榕城海关,
- 宁德海关,
- 莆田海关
-}
+ Debug.Log("启动参数服务器:" + ServerIP);
+ }
+
+
+ if (customCode == "3501")
+ {
+ customName = CustomName.马尾海关;
+ }
+ else if (customCode == "3502" || customCode == "3505")
+ {
+ customName = CustomName.榕城海关;
+ }
+ else if (customCode == "3503")
+ {
+ customName = CustomName.宁德海关;
+ }
+ else if (customCode == "3506")
+ {
+ customName = CustomName.莆田海关;
+ }
+
+ //加载第二个场景,即企业场景
+ Debug.Log("准备加载Mainscene");
+ SceneManager.LoadScene(1);
+ }
+}
+
+///
+/// 关区
+///
+public enum CustomName
+{
+ 马尾海关,
+ 榕城海关,
+ 宁德海关,
+ 莆田海关
+}
diff --git a/BulkCargo_UnityProject/Assets/Scripts/wj/Manager/ApiManager.cs b/BulkCargo_UnityProject/Assets/Scripts/wj/Manager/ApiManager.cs
index 6894798b..46dce501 100644
--- a/BulkCargo_UnityProject/Assets/Scripts/wj/Manager/ApiManager.cs
+++ b/BulkCargo_UnityProject/Assets/Scripts/wj/Manager/ApiManager.cs
@@ -12,7 +12,7 @@ public class Configure
{
public string MONITOR_ID { get; set; }
- public Dictionary DATA { get;set; }
+ public Dictionary DATA { get; set; }
}
public class ApiManager : Singleton
@@ -75,7 +75,6 @@ public class ApiManager : Singleton
{
base.Awake();
-
//var _ip_str_url = Path.Combine(Application.streamingAssetsPath, "configure.json");
//StartCoroutine(RequestBase.Get(_ip_str_url, (_data, _error) =>
//{
@@ -107,7 +106,7 @@ public class ApiManager : Singleton
{
if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"本地api配置错误: {_error} ");
}
else
{
@@ -119,9 +118,9 @@ public class ApiManager : Singleton
var _cam_dic_url = Path.Combine(Application.streamingAssetsPath, "configure_camera.json");
StartCoroutine(RequestBase.Get(_cam_dic_url, (_data, _error) =>
{
- if (_error != null)
+ if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"本地camera配置错误: {_error} ");
}
else
{
@@ -141,7 +140,7 @@ public class ApiManager : Singleton
{
if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"本地yard配置错误: {_error} ");
}
else
{
@@ -176,6 +175,7 @@ public class ApiManager : Singleton
///
IEnumerator GetCameraList()
{
+ Debug.Log("相机接口等待执行");
yield return new WaitUntil(() => { return !string.IsNullOrEmpty(IpAddress) && ApiDic.Count > 0; });
var _get_camera_list = IpAddress + ApiDic["GetCameraList"];
@@ -193,10 +193,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"相机接口错误: {_error} ");
}
else
{
+ Debug.Log($"相机数据:{_data}");
T_BAS_CAMERA_List = JsonConvert.DeserializeObject>>(_data).data;
}
}));
@@ -210,6 +211,7 @@ public class ApiManager : Singleton
///
IEnumerator GetYardInformation()
{
+ Debug.Log("堆场接口等待执行");
yield return new WaitUntil(() => { return !string.IsNullOrEmpty(IpAddress) && ApiDic.Count > 0; });
var _get_yard_information = IpAddress + ApiDic["GetYardList"];
@@ -228,10 +230,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"堆场接口错误: {_error} ");
}
else
{
+ Debug.Log($"堆场数据:{_data}");
T_BAS_YARD_List = JsonConvert.DeserializeObject>>(_data).data;
}
}));
@@ -250,11 +253,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"堆场库存信息接口错误: {_error} ");
}
else
{
- Debug.Log(_data);
+ Debug.Log("堆场库存信息数据:" + _data);
var _t_object = JsonConvert.DeserializeObject>>(_data).data;
_callback?.Invoke(_t_object);
}
@@ -270,9 +273,9 @@ public class ApiManager : Singleton
///
IEnumerator GetBeltScale()
{
+ Debug.Log("计量秤接口等待执行");
yield return new WaitUntil(() => { return !string.IsNullOrEmpty(IpAddress) && ApiDic.Count > 0; });
var _get_belt_scale = IpAddress + ApiDic["GetWeighterList"];
-
#if UNITY_EDITOR
if (CallForTest.instance != null)
{
@@ -288,10 +291,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
- Debug.Log($" {_error} ");
+ Debug.Log($"计量秤接口错误: {_error} ");
}
else
{
+ Debug.Log($"皮带秤数据:{_data}");
T_BAS_ELEC_WEIGHTER_List = JsonConvert.DeserializeObject>>(_data).data;
}
}));
@@ -313,11 +317,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"计量秤实时接口错误: {_error} ");
}
else
{
- Debug.Log(_data);
+ Debug.Log("皮带秤实时数据:" + _data);
var _t_object = JsonConvert.DeserializeObject>(_data).data;
_callback?.Invoke(_t_object);
}
@@ -355,11 +359,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"计量秤历史接口错误: {_error} ");
}
else
{
- Debug.Log(_data);
+ Debug.Log("计量秤历史数据:" + _data);
var _t_object = JsonConvert.DeserializeObject>>(_data).data;
_callback?.Invoke(_t_object);
}
@@ -380,10 +384,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"所有计量秤接口错误: {_error} ");
}
else
{
+ Debug.Log("所有计量秤实时数据:" + _data);
m_OnRtBeltUpdate?.Invoke(_data);
}
}));
@@ -402,10 +407,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"堆场最新库存接口错误: {_error} ");
}
else
{
+ Debug.Log("堆场最新库存数据:" + _data);
m_OnYardLastUpdate?.Invoke(_data);
}
}));
@@ -433,11 +439,11 @@ public class ApiManager : Singleton
{
if (_error != null)
{
-
+ Debug.Log($"模糊查询接口错误: {_error} ");
}
else
{
- Debug.Log(_data);
+ Debug.Log("模糊查询数据:" + _data);
var _t_object = JsonConvert.DeserializeObject>>(_data).data;
_callback?.Invoke(_t_object);
}