zhou.xiaoning 4 năm trước cách đây
mục cha
commit
479f7a996a

+ 1 - 1
Muchinfo.MTPClient/Fx4.0/Main/03.UI/Muchinfo.TASClient.UI/ViewModels/HomeViewModel.cs

@@ -1419,7 +1419,7 @@ namespace Muchinfo.MTPClient.UI.ViewModels
             //_commonQueryService.QueryExtenalTradeRateTmpConfig(fundsAccountIDs, DateTime.Now.ToString("yyyyMMdd"), null, QueryErrorCallback);
 
             // 查询资金账户汇率
-            _commonQueryService.QueryTaAccountExchangeRate(fundsAccountIDs, null, QueryErrorCallback);
+            //_commonQueryService.QueryTaAccountExchangeRate(fundsAccountIDs, null, QueryErrorCallback);
 
             CacheManager.UpdateMarketRun(models);
         }

+ 2 - 2
Muchinfo.MTPClient/Fx4.0/Main/03.UI/Muchinfo.TASClient.UI/ViewModels/LoginViewModel.cs

@@ -784,8 +784,8 @@ namespace Muchinfo.MTPClient.UI.ViewModels
 
             ApplicationParameter.SetSystemTime(loginEntity.SystemTime);
             SetQueryTips(3);
-         //   //仅获取更新时间戳
-         //   _loginService.LoginQuerySearch(UserManager.CurrentTradeAccount.LoginID, LoginQueryType.ParamValues, QueryLastUpdateTimeSuccess, QueryError);
+            //仅获取更新时间戳
+            //_loginService.LoginQuerySearch(UserManager.CurrentTradeAccount.LoginID, LoginQueryType.ParamValues, QueryLastUpdateTimeSuccess, QueryError);
             //查询所有数据
             _loginService.LoginQuerySearch(UserManager.CurrentTradeAccount.LoginID, LoginQueryType.All, QueryLastUpdateTimeSuccess, QueryError);
 

+ 2 - 0
Muchinfo.MTPClient/Fx4.0/Main/03.UI/Muchinfo.TASClient/App.xaml.cs

@@ -81,6 +81,8 @@ namespace Muchinfo.MTPClient
             //读取系统配置
             ApplicationParameter.InitializeSystemConfig();
 
+            ApplicationParameter.UpdateErmcpParamete();
+
             base.OnStartup(e);
             ApplicationParameter.LoginGuid = System.Guid.NewGuid().ToString();
             ApplicationParameter.ShowChart = 1;

+ 9 - 3
Muchinfo.MTPClient/Fx4.0/Main/03.UI/Muchinfo.TASClient/Config/Config.xml

@@ -8,8 +8,8 @@
   <!--<BizAddress>192.168.20.152:32001</BizAddress>
   <QuoteAddress>192.168.20.152:32002</QuoteAddress>-->
     <!--uat外网环境-->
-  <BizAddress>103.40.249.124:6010</BizAddress>
-  <QuoteAddress>103.40.249.124:6020</QuoteAddress>
+  <!--<BizAddress>103.40.249.124:6010</BizAddress>
+  <QuoteAddress>103.40.249.124:6020</QuoteAddress>-->
     <!--
   <BizAddress>192.168.21.19:39001</BizAddress>
   <QuoteAddress>192.168.21.19:39002</QuoteAddress>-->
@@ -27,12 +27,18 @@
     <!--<BizAddress>103.40.249.124:6010</BizAddress>
     <QuoteAddress>103.40.249.124:6020</QuoteAddress>-->
 
+    <BizAddress></BizAddress>
+    <QuoteAddress></QuoteAddress>
+    
+    <!-- 风管云平台服务地址 -->
+    <ErmcpAddress>http://192.168.31.175:8080/cfg?key=test_175</ErmcpAddress>
+
     <!--应用程序升级地址-->
     <UpdateAddress></UpdateAddress>
     <!--界面提示-->
     <LoginRemark></LoginRemark>
     <!--交易系统名称-->
-    <TradeSystemName>交易平台2.0</TradeSystemName>
+    <TradeSystemName>风管云平台</TradeSystemName>
     <!--应用程序默认升级文件夹-->
     <UpdateFolderName>C:\NewFolder</UpdateFolderName>
     <!--游客行情地址-->

+ 1 - 0
Muchinfo.MTPClient/Fx4.0/Main/03.UI/Muchinfo.TASClient/Muchinfo.MTPClient.csproj

@@ -112,6 +112,7 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>

+ 29 - 1
Muchinfo.MTPClient/Fx4.0/Main/04.Infrastructure/Muchinfo.TASClient.Infrastructure/Utilities/ApplicationParameter.cs

@@ -454,6 +454,14 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
 
         #endregion
 
+        #region 风管云平台
+        /// <summary>
+        /// 风管云平台服务地址 
+        /// </summary>
+        public static string ErmcpAddress { get; set; }
+        #endregion
+
+
         #region 公有静态方法
         /// <summary>
         /// 从Config.xml读取系统配置
@@ -498,6 +506,7 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
                                   CanUseBackHandOpen = e.Element("CanUseBackHandOpen") != null && (bool)e.Element("CanUseBackHandOpen"),
                                   CanUseQuickLockOrder = e.Element("CanUseQuickLockOrder") != null && (bool)e.Element("CanUseQuickLockOrder"),
                                   PublishNetIpAddress = (string)e.Element("PublishNetIpAddress"),
+                                  ErmcpAddress = (string)e.Element("ErmcpAddress"),
                               }).FirstOrDefault();
 
                 if (config == null) return;
@@ -532,7 +541,8 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
                 CanUseBackHandOpen = config.CanUseBackHandOpen;
                 CanUseQuickLockOrder = config.CanUseQuickLockOrder;
                 PublishNetIpAddress = config.PublishNetIpAddress;
-
+                ErmcpAddress = config.ErmcpAddress;
+            
                 ////初始化链路
                 InitializeLink();
             }
@@ -676,6 +686,23 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
         }
         #endregion
 
+#region 风管云平台
+        /// <summary>
+        /// 风管云平台参数更新方法,主要是通过GO服务更新相关配置信息
+        /// </summary>
+        public static void UpdateErmcpParamete()
+        {
+            // 获取交易与行情 Host
+            String jsonString = HttpUtility.HttpGet(ErmcpAddress);
+            Dictionary<String, Object> dicJson = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<String, Object>>(jsonString);
+            Dictionary<String, String> dataJson = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<String, String>>(dicJson["data"].ToString());
+
+            LinkManager.Instance.Parameters.TradeHost = dataJson["tradeHost"];
+            LinkManager.Instance.Parameters.TradePort = int.Parse(dataJson["tradePort"]);
+            LinkManager.Instance.Parameters.QuotationHost = dataJson["quoteHost"];
+            LinkManager.Instance.Parameters.QuotationPort = int.Parse(dataJson["quotePort"]);
+        }
+#endregion
 
         public static LockType _LockType = LockType.UnLock;// 锁定商品
 
@@ -909,5 +936,6 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
 
 
 
+
     }
 }

+ 1 - 1
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.Adapter/ProtoBuf/AccountProtobufAdapter.cs

@@ -418,7 +418,7 @@ namespace Muchinfo.MTPClient.Adapter.ProtoBuf
             var baseQueryReq = new ConfigQueryReq()
             {
                 Header = new MessageHead() { },
-                ConfigUTime = ConfigUTime,
+                // ConfigUTime = ConfigUTime,
             };
             return ProtoBufHelper.EntitySerialize(baseQueryReq);
         }

+ 11 - 0
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.IService/IErmcpService.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Muchinfo.MTPClient.IService
+{
+    interface IErmcpService
+    {
+    }
+}

+ 1 - 0
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.IService/Muchinfo.MTPClient.IService.csproj

@@ -58,6 +58,7 @@
     <Compile Include="IDBTableMsgService.cs" />
     <Compile Include="IDeliveryManageService.cs" />
     <Compile Include="IDeliveryService.cs" />
+    <Compile Include="IErmcpService.cs" />
     <Compile Include="IFavoriteService.cs" />
     <Compile Include="IGoodsService.cs" />
     <Compile Include="IListingService.cs" />

+ 13 - 0
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.Service/ErmcpService.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Muchinfo.MTPClient.Service
+{
+    class ErmcpService
+    {
+        
+
+    }
+}

+ 6 - 3
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.Service/LoginService.cs

@@ -274,11 +274,13 @@ namespace Muchinfo.MTPClient.Service
                     SystemParamManager.ParamConfigs = responeEntrity.Entity;
                     UserManager.CurrentTradeAccount.RiskRatioCalcMode = SystemParamManager.RiskRatioCalcMode;
                     //更新系统参数浮动盈利是否可用
-                    foreach (var fundsAccount in UserManager.CurrentTradeAccount.FundsAccounts)
+                    if (UserManager.CurrentTradeAccount.FundsAccounts != null)
                     {
-                        fundsAccount.FloatAvaliabelFlag = SystemParamManager.IsFloatPLAvaliabled;
+                        foreach (var fundsAccount in UserManager.CurrentTradeAccount.FundsAccounts)
+                        {
+                            fundsAccount.FloatAvaliabelFlag = SystemParamManager.IsFloatPLAvaliabled;
+                        }
                     }
-                    
                     successAction(responeEntrity.Entity, ConfigUTime, true);
                 }
                 else
@@ -528,6 +530,7 @@ namespace Muchinfo.MTPClient.Service
                 }
             }), new Action<int, string>((errorCode, errorDesc) =>
             {     ////通信错误
+                
                 if (errorAction != null)
                 {
                     errorAction(new ErrorEntity() { ReturnCode = errorCode, ReturnDesc = errorDesc, RequestFunc = "登录查询" });

+ 1 - 0
Muchinfo.MTPClient/Fx4.0/Main/05.Services/Muchinfo.TASClient.Service/Muchinfo.MTPClient.Service.csproj

@@ -69,6 +69,7 @@
     <Compile Include="DeliveryManageService.cs" />
     <Compile Include="DeliveryService.cs" />
     <Compile Include="DepositService.cs" />
+    <Compile Include="ErmcpService.cs" />
     <Compile Include="FavoriteService.cs" />
     <Compile Include="GetLastInputInfoHelp.cs" />
     <Compile Include="GoodsService.cs" />