Browse Source

数据库地址修改

callm 9 months ago
parent
commit
626e262788

+ 1 - 1
UAS_MES_LGDZ/CustomControl/HeadBar/HeadBar.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.CustomControl
                 if (logout_confirm == "Yes")
                 {
                     //注销的时候切换回默认数据库
-                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.64.168.92)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     DataHelper.DBConnectionString = SystemInf.ConnectionString;
                     //清除上个用户的权限信息
                     SystemInf.Caller.Clear();

+ 2 - 2
UAS_MES_LGDZ/DataOperate/DataHelper.cs

@@ -10,11 +10,11 @@ namespace UAS_MES_NEW.DataOperate
     class DataHelper
     {
         //系统默认的的连接字符串 
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.64.168.92)(PORT=61521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
 
         //public static readonly string ERPAddesss = "http://218.64.89.153:8099/mes/";
 
-        public static readonly string ERPAddesss = "http://10.98.0.21:8099/mes/";
+        public static readonly string ERPAddesss = "http://218.64.168.92:8099/mes/";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -167,7 +167,7 @@ namespace UAS_MES_NEW.Make
                                             string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                             fp_name = label.Rows[0]["fp_name"].ToString();
                                             WebClient wc = new WebClient();
-                                            wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                            wc.DownloadFile("http://218.64.168.92:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                                         }
                                     }
                                 }

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.cs

@@ -87,7 +87,7 @@ namespace UAS_MES_NEW.Special
                     sql.Clear();
                     sql.Append("update makeserial set ms_nextmacode='' where ms_sncode=:barcode and ms_nextmacode='" + ms_makecode + "'");
                     dh.BatchInsert(sql.GetString(), new string[] { "barcode" }, barcode.ToArray());
-                    sqls.Add("delete from craftmaterial where cm_sncode='" + sn_code.Text + "' and cm_makecode='" + ms_makecode + "'");
+                    sqls.Add("update  craftmaterial set cm_status=-1 where cm_sncode='" + sn_code.Text + "' and cm_makecode='" + ms_makecode + "'");
                 }
                 sqls.Add("delete from sninfo where si_sn='" + sn_code.Text + "'");
                 //sqls.Add("update makeaddresslist set mal_sncode='',mal_status=0 where mal_sncode='" + sn_code.Text + "'");

+ 2 - 2
UAS_MES_LGDZ/Login.cs

@@ -47,7 +47,7 @@ namespace UAS_MES_NEW
         {
             BaseUtil.FormStepInOrOut(this, true);
             //设置默认数据库
-            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.98.0.21)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            SystemInf.DefaultDB = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.64.168.92)(PORT=61521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.ProcessesID = System.Diagnostics.Process.GetCurrentProcess().Id;
             CheckForIllegalCrossThreadCalls = false;
             LoadMasterInf = new Thread(LoadMaster);
@@ -94,7 +94,7 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.64.168.92)(PORT=61521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 0 - 10
UAS_MES_LGDZ/Properties/Resources.Designer.cs

@@ -157,16 +157,6 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
-        /// <summary>
-        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
-        /// </summary>
-        internal static System.Drawing.Bitmap _5600c803afc2d {
-            get {
-                object obj = ResourceManager.GetObject("_5600c803afc2d", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 1 - 3
UAS_MES_LGDZ/Properties/Resources.resx

@@ -382,9 +382,7 @@
   <data name="_46" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\46.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="_5600c803afc2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\5600c803afc2d.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
+ 
   <data name="_83" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\83.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>

+ 2 - 2
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -285,7 +285,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://218.64.168.92:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                         }
                     }
@@ -314,7 +314,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://10.98.0.21:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("http://218.64.168.92:8099/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }

BIN
UAS_MES_LGDZ/Resources/5600c803afc2d.png


+ 0 - 16
UAS_MES_LGDZ/UAS_MES_LGDZ.csproj

@@ -1951,8 +1951,6 @@
     <EmbeddedResource Include="PublicForm\SetLoadingWindow.resx">
       <DependentUpon>SetLoadingWindow.cs</DependentUpon>
     </EmbeddedResource>
-    <None Include="adbtool\mke2fs.conf" />
-    <None Include="adbtool\source.properties" />
     <None Include="App.config">
       <SubType>Designer</SubType>
     </None>
@@ -1963,19 +1961,6 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <Content Include="adbtool\adb.exe" />
-    <Content Include="adbtool\AdbWinApi.dll" />
-    <Content Include="adbtool\AdbWinUsbApi.dll" />
-    <Content Include="adbtool\dmtracedump.exe" />
-    <Content Include="adbtool\etc1tool.exe" />
-    <Content Include="adbtool\fastboot.exe" />
-    <Content Include="adbtool\hprof-conv.exe" />
-    <Content Include="adbtool\libwinpthread-1.dll" />
-    <Content Include="adbtool\make_f2fs.exe" />
-    <Content Include="adbtool\make_f2fs_casefold.exe" />
-    <Content Include="adbtool\mke2fs.exe" />
-    <Content Include="adbtool\NOTICE.txt" />
-    <Content Include="adbtool\sqlite3.exe" />
     <Content Include="Resources\07.gif" />
     <Content Include="Resources\0802192135.png" />
     <None Include="Resources\15aedb5b-a345-48b6-8b81-784e410d7fd1.png" />
@@ -1986,7 +1971,6 @@
     <None Include="Resources\20167c1d-d027-4366-95fb-6733ecc9dd80.png" />
     <Content Include="Resources\20170322091001575_easyicon_net_64.ico" />
     <Content Include="Resources\46.gif" />
-    <Content Include="Resources\5600c803afc2d.png" />
     <Content Include="Resources\83.gif" />
     <None Include="Resources\b171f6bb-7e96-43f5-afa4-894151fa85b7.png" />
     <None Include="Resources\b473847f-a85b-400e-807a-4875c4c07ff1.png" />

BIN
UAS_MES_LGDZ/adbtool/adb.exe


BIN
UAS_MES_LGDZ/adbtool/fastboot.exe


BIN
UAS_MES_LGDZ/adbtool/sqlite3.exe


+ 1 - 1
UAS_MES_ODLF/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>

+ 1 - 1
UAS_MES_ODLF/Login.cs

@@ -87,7 +87,7 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 3 - 33
UAS_MES_ODLF/Properties/Resources.Designer.cs

@@ -19,7 +19,7 @@ namespace UAS_MES_NEW.Properties {
     // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
     // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
     // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     internal class Resources {
@@ -47,8 +47,8 @@ namespace UAS_MES_NEW.Properties {
         }
         
         /// <summary>
-        ///   使用此强类型资源类,为所有资源查找
-        ///   重写当前线程的 CurrentUICulture 属性
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
         internal static global::System.Globalization.CultureInfo Culture {
@@ -157,26 +157,6 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
-        /// <summary>
-        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
-        /// </summary>
-        internal static System.Drawing.Bitmap _5600c803afc2d {
-            get {
-                object obj = ResourceManager.GetObject("_5600c803afc2d", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        /// <summary>
-        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
-        /// </summary>
-        internal static System.Drawing.Bitmap _83 {
-            get {
-                object obj = ResourceManager.GetObject("_83", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
         /// <summary>
         ///   查找类似于 System.IO.MemoryStream 的 System.IO.UnmanagedMemoryStream 类型的本地化资源。
         /// </summary>
@@ -466,16 +446,6 @@ namespace UAS_MES_NEW.Properties {
             }
         }
         
-        /// <summary>
-        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
-        /// </summary>
-        internal static System.Drawing.Bitmap defaulticon {
-            get {
-                object obj = ResourceManager.GetObject("defaulticon", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 0 - 9
UAS_MES_ODLF/Properties/Resources.resx

@@ -382,15 +382,6 @@
   <data name="_46" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\46.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="_5600c803afc2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\5600c803afc2d.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
-  <data name="_83" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\83.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
-  <data name="defaulticon" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\defaulticon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
   <data name="OQC作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\OQC作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>

+ 2 - 2
UAS_MES_ODLF/Properties/Settings.Designer.cs

@@ -122,8 +122,8 @@ namespace UAS_MES_NEW.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
-            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100" +
-            ".23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.2" +
+            "3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 1 - 1
UAS_MES_ODLF/Properties/Settings.settings

@@ -27,7 +27,7 @@
       <Value Profile="(Default)">\\172.16.66.51\lable</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

BIN
UAS_MES_ODLF/Resources/5600c803afc2d.png


+ 0 - 1
UAS_MES_ODLF/UAS_MES_ODLF.csproj

@@ -1680,7 +1680,6 @@
     <Content Include="Resources\20130711113247276.png" />
     <Content Include="Resources\20170322091001575_easyicon_net_64.ico" />
     <Content Include="Resources\46.gif" />
-    <Content Include="Resources\5600c803afc2d.png" />
     <Content Include="Resources\83.gif" />
     <Content Include="Resources\Barcode_48px_1072745_easyicon.net.png" />
     <Content Include="Resources\bindingNavigatorAddNewItem.Image.png" />

+ 44 - 38
UAS_MesInterface(ODLF)/MesHelper.cs

@@ -25,7 +25,7 @@ namespace UMESDLLService
         bool SetAddressInfo(string iSN, string iMac, string iBT, string iCode1, string iCode2, string iCode3, out string oErrorMessage);
         bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[,] iTestDetail, out string oErrMessage);
         bool GetMEIOrNetCodeRange(string iSnCode, string iIMEI1, string iNetCode, out string oInfo, out string oErrMessage);
-        bool SetIMEIInfo(string iSN, string iIMEI1, string iIMEI2, string iIMEI3, string iMEID, string iNETCODE, string iID1, string iID2, string iID3, out string oErrMessage);
+        bool SetIMEIInfo(string iSN, string iIMEI1, string iIMEI2, string iIMEI3, string iMEID, string iPSN, string iNETCODE, string iID1, string iID2, string iID3, out string oErrMessage);
         bool GetMobileAllInfo(string iSnCode, out string oInfo, out string oErrorMessage);
         bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iOperator, string iResult, string iErrCode, string flag, out string oErrorMessage);
         bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage);
@@ -48,7 +48,7 @@ namespace UMESDLLService
 
         string Master = "N_MES";
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.30.80.23)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
         private OracleConnection connection;
         //用户选择的数据库的连接字符串
@@ -124,9 +124,10 @@ namespace UMESDLLService
                 return false;
             }
             string SNcode = iSN;
-            if (!GetInfoByMaterial(iSN, out iSN, out oErrMessage))
+            DataTable dt = (DataTable)ExecuteSql("select ms_sncode from makeserial where ms_sncode='" + iSN + "' or ms_imei1='" + iSN + "' or ms_imei2='" + iSN + "' order by ms_id desc", "select");
+            if (dt.Rows.Count > 0)
             {
-                oErrMessage = "";
+                iSN = dt.Rows[0]["ms_sncode"].ToString();
             }
             if (iSN == "")
             {
@@ -137,7 +138,7 @@ namespace UMESDLLService
             string[] ParamName = new string[] { "v_i_macode", "v_i_sourcecode", "v_i_sncode", "v_i_usercode", "v_o_macode", "v_o_msid", "v_o_errmsg" };
             CallProcedure("CS_CHECKSTEPSNANDMACODE", ParamName, ref param);
             oErrMessage = param[6];
-            DataTable dt = (DataTable)ExecuteSql("select ms_status,ms_stepcode,ms_nextstepcode from makeserial where ms_id=(  select max(ms_id) from makeserial where ms_sncode  in ( select '" + iSN + "' from dual union select sn from makesnrelation where beforesn='" + iSN + "' and sn<>' '  union select beforesn from makesnrelation where sn='" + iSN + "' and beforesn<>' '))", "select");
+            dt = (DataTable)ExecuteSql("select ms_status,ms_stepcode,ms_nextstepcode from makeserial where ms_id=(  select max(ms_id) from makeserial where ms_sncode  in ( select '" + iSN + "' from dual union select sn from makesnrelation where beforesn='" + iSN + "' and sn<>' '  union select beforesn from makesnrelation where sn='" + iSN + "' and beforesn<>' '))", "select");
             string ms_status = "";
             string ms_stepcode = "";
             string ms_nextstepcode = "";
@@ -210,7 +211,7 @@ namespace UMESDLLService
                 oErrMessage = "用户名,密码,岗位资源必须填写";
                 return false;
             }
-            if (CheckUserLogin(iUserCode, iPassWord, "N_MES", out oErrMessage))
+            if (CheckUserLogin(iUserCode, iPassWord, out oErrMessage))
             {
                 string SQL = "select em_code,em_type,em_name from employee where em_code=:UserName ";
                 DataTable dt;
@@ -393,7 +394,7 @@ namespace UMESDLLService
             }
         }
 
-        /// <summary>
+        /// <summary> 
         /// 获取序列号的所有串号信息
         /// </summary>
         /// <param name="iSN"></param>
@@ -427,6 +428,11 @@ namespace UMESDLLService
                 oErrMessage = "SN不能为空";
                 return false;
             }
+            DataTable dt = (DataTable)ExecuteSql("select ms_sncode from makeserial where ms_sncode='" + iSN + "' or ms_firstsn='" + iSN + "' or ms_imei1='" + iSN + "' or ms_imei2='" + iSN + "' order by ms_id desc", "select");
+            if (dt.Rows.Count > 0)
+            {
+                iSN = dt.Rows[0]["ms_sncode"].ToString();
+            }
             string MacInfo;
             //if (!GetAddressRangeByMO(iSN, out MacInfo, out oErrMessage))
             //{
@@ -447,34 +453,34 @@ namespace UMESDLLService
             //    else
             //        return false;
             //}
-            //string ImeiInfo;
-            //if (!GetMEIOrNetCodeRange(iSN, "", "", out ImeiInfo, out oErrMessage))
-            //{
-            //    if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
-            //        return true;
-            //    else
-            //        return false;
-            //}
-            //string IMEI1 = ImeiInfo.Split('^')[0].Replace("IMEI1:", "");
-            //string IMEI2 = ImeiInfo.Split('^')[1].Replace("IMEI2:", "");
-            //string MEID = ImeiInfo.Split('^')[2].Replace("MEID:", "");
-            //string NETCODE = ImeiInfo.Split('^')[3].Replace("NETCODE:", "");
-            //string PSN = ImeiInfo.Split('^')[4].Replace("PSN:", "");
-            //string ID1 = ImeiInfo.Split('^')[5].Replace("ID1:", "");
-            //string ID2 = ImeiInfo.Split('^')[6].Replace("ID2:", "");
-            //string ID3 = ImeiInfo.Split('^')[7].Replace("ID3:", "");
-            //if (!SetIMEIInfo(iSN, IMEI1 == "null" ? "" : IMEI1, IMEI2 == "null" ? "" : IMEI2, "", MEID == "null" ? "" : MEID, NETCODE == "null" ? "" : NETCODE, ID1 == "null" ? "" : ID1, ID2 == "null" ? "" : ID2, ID3 == "null" ? "" : ID3, out oErrMessage))
-            //{
-            //    if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
-            //        return true;
-            //    else
-            //        return false;
-            //}
+            string ImeiInfo;
+            if (!GetMEIOrNetCodeRange(iSN, "", "", out ImeiInfo, out oErrMessage))
+            {
+                if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
+                    return true;
+                else
+                    return false;
+            }
+            string IMEI1 = ImeiInfo.Split('^')[0].Replace("IMEI1:", "");
+            string IMEI2 = ImeiInfo.Split('^')[1].Replace("IMEI2:", "");
+            string MEID = ImeiInfo.Split('^')[2].Replace("MEID:", "");
+            string NETCODE = ImeiInfo.Split('^')[3].Replace("NETCODE:", "");
+            string PSN = ImeiInfo.Split('^')[4].Replace("PSN:", "");
+            string ID1 = ImeiInfo.Split('^')[5].Replace("ID1:", "");
+            string ID2 = ImeiInfo.Split('^')[6].Replace("ID2:", "");
+            string ID3 = ImeiInfo.Split('^')[7].Replace("ID3:", "");
+            if (!SetIMEIInfo(iSN, IMEI1 == "null" ? "" : IMEI1, IMEI2 == "null" ? "" : IMEI2, "", MEID == "null" ? "" : MEID, PSN == "null" ? "" : PSN, NETCODE == "null" ? "" : NETCODE, ID1 == "null" ? "" : ID1, ID2 == "null" ? "" : ID2, ID3 == "null" ? "" : ID3, out oErrMessage))
+            {
+                if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
+                    return true;
+                else
+                    return false;
+            }
             //通过序列号获取最近操作的工单号
             string ms_id = getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode='" + iSN + "' or ms_firstsn='" + iSN + "'").ToString();
             if (ms_id != "")
             {
-                DataTable dt = getFieldsDataByCondition("MakeSerial", new string[] { "ms_id", "ms_mac", "ms_bt", "ms_meid", "ms_netcode", "ms_psn", "ms_imei1", "ms_imei2", "ms_imei3", "ms_othcode1", "ms_othcode2", "ms_othcode3", "ms_othid1", "ms_othid2", "ms_othid3" }, "ms_id='" + ms_id + "'");
+                dt = getFieldsDataByCondition("MakeSerial", new string[] { "ms_id", "ms_mac", "ms_bt", "ms_meid", "ms_netcode", "ms_psn", "ms_imei1", "ms_imei2", "ms_imei3", "ms_othcode1", "ms_othcode2", "ms_othcode3", "ms_othid1", "ms_othid2", "ms_othid3" }, "ms_id='" + ms_id + "'");
                 if (dt.Rows.Count > 0)
                 {
                     string Code1 = "";
@@ -504,7 +510,7 @@ namespace UMESDLLService
                     string Code25 = "";
                     string[] param = new string[] { ms_id, Code1, Code2, Code3, Code4, Code5, Code6, Code7, Code8, Code9, Code10, Code11, Code12, Code13, Code14, Code15, Code16, Code17, Code18, Code19, Code20, Code21, Code22, Code23, Code24, Code25 };
                     string[] ParamName = new string[] { "v_ms_id", "v_i_code1", "v_i_code2", "v_i_code3", "v_i_code4", "v_i_code5", "v_i_code6", "v_i_code7", "v_i_code8", "v_i_code9", "v_i_code10", "v_i_code11", "v_i_code12", "v_i_code13", "v_i_code14", "v_i_code15", "v_i_code16", "v_i_code17", "v_i_code18", "v_i_code19", "v_i_code20", "v_i_code21", "v_i_code22", "v_i_code23", "v_i_code24", "v_i_code25" };
-                    CallProcedure("GetMobileAllInfo_NEW", ParamName, ref param);
+                    CallProcedure("GetMobileAllInfo_NEW_TOOL", ParamName, ref param);
                     for (int i = 1; i < param.Length; i++)
                     {
                         //获取出来的参数使用^分割
@@ -777,7 +783,7 @@ namespace UMESDLLService
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
         [Description("设置IMEI信息")]
-        public bool SetIMEIInfo(string iSN, string iIMEI1, string iIMEI2, string iIMEI3, string iMEID, string iNETCODE, string iID1, string iID2, string iID3, out string oErrMessage)
+        public bool SetIMEIInfo(string iSN, string iIMEI1, string iIMEI2, string iIMEI3, string iMEID, string iPSN, string iNETCODE, string iID1, string iID2, string iID3, out string oErrMessage)
         {
             if (iSN == "")
             {
@@ -785,7 +791,7 @@ namespace UMESDLLService
                 return false;
             }
             oErrMessage = "";
-            string[] param = new string[] { iSN, iIMEI1, iIMEI2, iIMEI3, iMEID, iNETCODE, "", iID1, iID2, iID3, oErrMessage };
+            string[] param = new string[] { iSN, iIMEI1, iIMEI2, iIMEI3, iMEID, iNETCODE, iPSN, iID1, iID2, iID3, oErrMessage };
             string[] ParamName = new string[] { "v_i_sncode", "v_i_imei1", "v_i_imei2", "v_i_imei3", "v_i_meid", "v_i_netcode", "v_i_psn", "v_i_id1", "v_i_id2", "v_i_id3", "v_o_errmsg" };
             CallProcedure("CS_SETIMEIINFO", ParamName, ref param);
             oErrMessage = param[10];
@@ -814,10 +820,10 @@ namespace UMESDLLService
                 return false;
             }
             string SNcode = iSN;
-            if (!GetInfoByMaterial(iSN, out iSN, out oErrMessage))
-            {
-                oErrMessage = "";
-            }
+            //if (!GetInfoByMaterial(iSN, out iSN, out oErrMessage))
+            //{
+            //    oErrMessage = "";
+            //}
             if (iSN == "")
             {
                 iSN = SNcode;

+ 2 - 2
UAS_MesInterface(ODLF)/UAS_MesInterface(ODLF).csproj

@@ -7,8 +7,8 @@
     <ProjectGuid>{7FA72759-6D1C-484E-8C00-5AD2620B3C43}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>UMES.DLLService</RootNamespace>
-    <AssemblyName>UMES.DLLService</AssemblyName>
+    <RootNamespace>UMESDLLService</RootNamespace>
+    <AssemblyName>UMESDLLService</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <TargetFrameworkProfile />