Răsfoiți Sursa

新增是否使用波兰接口、是否使用波兰NTF配置文件参数,修改了数据库配置

chenjiangqun 2 ani în urmă
părinte
comite
a0b8a52ab7

+ 5 - 5
FactoryTool_CShare/BLL/NTFBLL.cs

@@ -11,12 +11,12 @@ namespace MOKA_Factory_Tools.BLL
 {
     public partial class NTFBLL
     {
-        public NTFBLL(bool bMexican = false)
+        public NTFBLL(int NTFposion)
         {
-            dalAMResult = new DAL_AMResult(bMexican);
-            dalAMYields = new DAL_AMYields(bMexican);
-            dalAMResultTR = new DAL_AMResult_TR(bMexican);
-            dalAMYieldsTR = new DAL_AMYields_TR(bMexican);
+            dalAMResult = new DAL_AMResult(NTFposion);
+            dalAMYields = new DAL_AMYields(NTFposion);
+            dalAMResultTR = new DAL_AMResult_TR(NTFposion);
+            dalAMYieldsTR = new DAL_AMYields_TR(NTFposion);
         }
 
         /// <summary>

+ 11 - 5
FactoryTool_CShare/DAL/DAL_AMResult.cs

@@ -12,11 +12,15 @@ namespace MOKA_Factory_Tools.DAL
 {
     public class DAL_AMResult : BaseDAL
     {
-        public DAL_AMResult(bool bMexican=false)
+        public DAL_AMResult(int NTFposion)
         {
+            //Provider=SqlOLEDB;Data Source=10.146.0.52;initial catalog=AMAZON;user ID=amazon;password=Volvo120;connect timeout=30;
             this.TableFieldNameString = "";
-            if (bMexican)
+            if (NTFposion == 1)
                 this.cps.SetConnectParameters(databaseServer:"10.138.96.109", databaseName: "IDOtherData", databaseAccount: "usr_rd", databasePassword: "Pa55W0rd4TMSA@202207#");
+            else if(NTFposion == 2)
+                this.cps.SetConnectParameters(databaseServer: "10.146.0.52", databaseName: "AMAZON", databaseAccount: "amazon", databasePassword: "Volvo120");
+
         }
 
 
@@ -261,11 +265,13 @@ namespace MOKA_Factory_Tools.DAL
 
     public class DAL_AMResult_TR : BaseDAL
     {
-        public DAL_AMResult_TR(bool bMexican = false)
+        public DAL_AMResult_TR(int NTFposion)
         {
-            this.TableFieldNameString = "";
-            if (bMexican)
+            this.TableFieldNameString = "";           
+            if (NTFposion == 1)
                 this.cps.SetConnectParameters(databaseServer: "10.138.96.109", databaseName: "IDOtherData", databaseAccount: "usr_rd", databasePassword: "Pa55W0rd4TMSA@202207#");
+            else if (NTFposion == 2)
+                this.cps.SetConnectParameters(databaseServer: "10.146.0.52", databaseName: "AMAZON", databaseAccount: "amazon", databasePassword: "Volvo120");
         }
 
 

+ 8 - 4
FactoryTool_CShare/DAL/DAL_AMYields.cs

@@ -10,11 +10,13 @@ namespace MOKA_Factory_Tools.DAL
 {
     public class DAL_AMYields : BaseDAL
     {
-        public DAL_AMYields(bool bMexican = false)
+        public DAL_AMYields(int NTFposion)
         {
             this.TableFieldNameString = "";
-            if (bMexican)
+            if (NTFposion == 1)
                 this.cps.SetConnectParameters(databaseServer: "10.138.96.109", databaseName: "IDOtherData", databaseAccount: "usr_rd", databasePassword: "Pa55W0rd4TMSA@202207#");
+            else if (NTFposion == 2)
+                this.cps.SetConnectParameters(databaseServer: "10.146.0.52", databaseName: "AMAZON", databaseAccount: "amazon", databasePassword: "Volvo120");
         }
 
 
@@ -182,11 +184,13 @@ namespace MOKA_Factory_Tools.DAL
 
     public class DAL_AMYields_TR : BaseDAL
     {
-        public DAL_AMYields_TR(bool bMexican = false)
+        public DAL_AMYields_TR(int NTFposion)
         {
             this.TableFieldNameString = "";
-            if (bMexican)
+            if (NTFposion == 1)
                 this.cps.SetConnectParameters(databaseServer: "10.138.96.109", databaseName: "IDOtherData", databaseAccount: "usr_rd", databasePassword: "Pa55W0rd4TMSA@202207#");
+            else if (NTFposion == 2)
+                this.cps.SetConnectParameters(databaseServer: "10.146.0.52", databaseName: "AMAZON", databaseAccount: "amazon", databasePassword: "Volvo120");
         }
 
 

+ 8 - 0
FactoryTool_CShare/Models/StructList.cs

@@ -288,6 +288,14 @@ namespace MOKA_Factory_Tools
         ///
         public string IsSmt { get; set; } = "0";//默认整机
 
+        /// <summary>
+        /// 是否使用波兰G客户接口
+        /// </summary>
+        public bool UsePolandGInterface { get; set; } = false;
+        /// <summary>
+        /// 是否启用波兰NTF功能
+        /// </summary>
+        public bool Poland_NTF { get; set; } = false;
     }
 
     public enum KEY_FROM

+ 23 - 1
FactoryTool_CShare/Views/Main.cs

@@ -962,7 +962,7 @@ namespace MOKA_Factory_Tools
                     V2Method.SetGetMessageUrl("http://10.40.7.93:81/IDManage/v1/order/getMessage ");
                 }
                 #endregion
-
+              
                 #region 北美DSN的配置项使用SMES里面的
                 if (jObject["UserDSNFromSmes"] == null)
                 {
@@ -1004,7 +1004,29 @@ namespace MOKA_Factory_Tools
                 {
                     SaveJsonConfig("IsSmt", functionSetting1.IsSmt);
                 }
+                #endregion
 
+                #region 波兰G客户接口变更
+                if (jObject["UsePolandGInterface"] != null)
+                {
+                    functionSetting1.UsePolandGInterface = jObject["UsePolandGInterface"].Value<bool>();
+                }
+                else
+                {
+                    SaveJsonConfig("UsePolandGInterface", functionSetting1.UsePolandGInterface);
+                }
+                GMethod.SetPolandConfig(functionSetting1.UsePolandGInterface);
+                #endregion
+
+                #region
+                if (jObject["Poland_NTF"] != null)
+                {
+                    functionSetting1.Poland_NTF = jObject["Poland_NTF"].Value<bool>();
+                }
+                else
+                {
+                    SaveJsonConfig("Poland_NTF", functionSetting1.Poland_NTF);
+                }
                 #endregion
 
                 foreach (var ss in jObject["Channel"])  //遍历Channel

+ 15 - 1
FactoryTool_CShare/Views/OperationPanel.cs

@@ -155,7 +155,21 @@ namespace MOKA_Factory_Tools
             if (midListNow.rokuCustomer != null)
                 ProductMsg_Text.Text = "Roku:";
             if (functionSetting.NTF)
-                ntfBLL = new NTFBLL(functionSetting.Mexican_NTF);
+            {
+                //ntfBLL = new NTFBLL(functionSetting.Mexican_NTF);
+                if (functionSetting.Mexican_NTF)
+                {
+                    ntfBLL = new NTFBLL(1);
+                }
+                else if (functionSetting.Poland_NTF)
+                {
+                    ntfBLL = new NTFBLL(2);
+                }
+                else
+                {
+                    ntfBLL = new NTFBLL(0);
+                }
+            }
                           
             //修改界面颜色
             if (functionSetting.IsSmt == "1")