Browse Source

富为对接OPPO功能调整

章政 6 years ago
parent
commit
d3d51ad96b

+ 20 - 20
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -11,16 +11,16 @@ namespace UAS_LabelMachine
     public class DataHelper
     {
 
-        ////富为外网地址
-        //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
-        ////富为ERP地址
-        //public static readonly string ERPAddesss = "http://richwellgroup.com.cn:8099/ERP/";
-        ////富为FTP
-        //public static readonly string FTPAdress = "ftp://richwellgroup.com.cn|printuser|printuser";
-        ////Oracle端口
-        //public static readonly string OraclePort = "1521";
-        ////需要显示的账套
-        //public static readonly string Masters = "JDTSY,FW_JDT,N_DATACENTER,FY_TEST,JD_TEST,XY_TEST,FW_TEST,DATACENTER,FW,XY,FY";
+        //富为外网地址
+        private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
+        //富为ERP地址
+        public static readonly string ERPAddesss = "http://richwellgroup.com.cn:8099/ERP/";
+        //富为FTP
+        public static readonly string FTPAdress = "ftp://richwellgroup.com.cn|printuser|printuser";
+        //Oracle端口
+        public static readonly string OraclePort = "1521";
+        //需要显示的账套
+        public static readonly string Masters = "JDTSY,FW_JDT,N_DATACENTER,FY_TEST,JD_TEST,XY_TEST,FW_TEST,DATACENTER,FW,XY,FY";
 
         ////高登地址
         //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.238.39.179)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
@@ -34,16 +34,16 @@ namespace UAS_LabelMachine
         //public static readonly string Masters = "GOLDEN";
 
 
-        //怡海能达外网地址
-        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-        //怡海能达ERP地址
-        public static readonly string ERPAddesss = "http://sz.hi-mantech.com:8099/ERP/";
-        //怡海能达FTP
-        public static readonly string FTPAdress = "ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8";
-        //Oracle端口
-        public static readonly string OraclePort = "1521";
-        //需要显示的账套
-        public static readonly string Masters = "YHND_SZ,YHND_HK,DATACENTER";
+        ////怡海能达外网地址
+        //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        ////怡海能达ERP地址
+        //public static readonly string ERPAddesss = "http://sz.hi-mantech.com:8099/ERP/";
+        ////怡海能达FTP
+        //public static readonly string FTPAdress = "ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "YHND_SZ,YHND_HK,DATACENTER";
 
         ////华商龙外网地址
         //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=YITOA_DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.18.115.198)(PORT=1523)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";

+ 14 - 3
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -2540,8 +2540,10 @@ namespace UAS_LabelMachine
             }
         }
         HttpCommand hc = new HttpCommand();
-        const string AppId = "OPPO_UPN";
-        const string Secret = "c9f2e3237b66415ead1df77e97abd72d";
+        //const string AppId = "OPPO_UPN";
+        //const string Secret = "c9f2e3237b66415ead1df77e97abd72d";
+        const string AppId = "SUP_JW959";
+        const string Secret = "fc6d3f1876f34810b6e61a8478441ccb";
         int PageCount = 100;
         private void OPPOPlate_Click(object sender, EventArgs e)
         {
@@ -2581,7 +2583,16 @@ namespace UAS_LabelMachine
                 if ((i != 0 && (i + 1) % PageCount == 0) || i == LabelInf.Rows.Count - 1)
                 {
                     strUpnList.Append("]");
-                    string strmsginsert = hc.insertUpnInfo("https://apitest.myoas.com", AppId, Secret, strUpnList.ToString(), (i + 1) % PageCount == 0 ? PageCount : (i + 1) % PageCount);
+                    string strmsginsert = hc.insertUpnInfo("https://api.myoas.com", AppId, Secret, strUpnList.ToString(), (i + 1) % PageCount == 0 ? PageCount : (i + 1) % PageCount);
+                    Dictionary<string, object> dic = BaseUtil.ToDictionary(strmsginsert);
+                    if (dic["code"].ToString().Replace("\"", "") != "200")
+                    {
+                        MessageLog.AppendText(dic["msg"] + "产地,LotNo,DateCode值不允许为空,请校验\n", Color.Red);
+                    }
+                    else
+                    {
+                        MessageLog.AppendText("上传成功", Color.Green);
+                    }
                     strUpnList.Clear();
                 }
             }