Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

caosy 6 years ago
parent
commit
3fbc0230df

+ 5 - 16
UAS-出货标签管理/App.config

@@ -18,26 +18,24 @@
         <binding name="Service1Soap2">
           <security mode="Transport" />
         </binding>
-        <binding name="Service1Soap3" />
-        <binding name="Service1Soap4">
+        <binding name="Service1Soap3" >
           <security mode="Transport" />
         </binding>
-        <binding name="Service1Soap5" />
       </basicHttpBinding>
       <customBinding>
         <binding name="Service1Soap">
           <textMessageEncoding messageVersion="Soap12" />
           <httpTransport />
         </binding>
-        <binding name="Service1Soap12">
+        <binding name="Service1Soap1">
           <textMessageEncoding messageVersion="Soap12" />
           <httpTransport />
         </binding>
-        <binding name="Service1Soap121">
+        <binding name="Service1Soap2">
           <textMessageEncoding messageVersion="Soap12" />
           <httpsTransport />
         </binding>
-        <binding name="Service1Soap122">
+        <binding name="Service1Soap3">
           <textMessageEncoding messageVersion="Soap12" />
           <httpsTransport />
         </binding>
@@ -50,21 +48,12 @@
       <endpoint address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx"
         binding="basicHttpBinding" bindingConfiguration="Service1Soap1"
         contract="Vivo_BoxReelRelation.Service1Soap" name="Service1Soap1" />
-      <endpoint address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx"
-        binding="customBinding" bindingConfiguration="Service1Soap12"
-        contract="Vivo_BoxReelRelation.Service1Soap" name="Service1Soap12" />
       <endpoint address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx"
         binding="basicHttpBinding" bindingConfiguration="Service1Soap2"
         contract="Vivo_New_GetPlateID.Service1Soap" name="Service1Soap2" />
       <endpoint address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx"
-        binding="customBinding" bindingConfiguration="Service1Soap121"
-        contract="Vivo_New_GetPlateID.Service1Soap" name="Service1Soap121" />
-      <endpoint address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx"
-        binding="basicHttpBinding" bindingConfiguration="Service1Soap4"
+        binding="basicHttpBinding" bindingConfiguration="Service1Soap3"
         contract="Vivo_New_BoxReelRelation.Service1Soap" name="Service1Soap3" />
-      <endpoint address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx"
-        binding="customBinding" bindingConfiguration="Service1Soap122"
-        contract="Vivo_New_BoxReelRelation.Service1Soap" name="Service1Soap122" />
     </client>
   </system.serviceModel>
   <userSettings>

+ 16 - 0
UAS-出货标签管理/PublicMethod/BaseUtil.cs

@@ -8,6 +8,7 @@ using UAS_LabelMachine.CustomControl;
 using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 using static System.Windows.Forms.Control;
 using System.Text.RegularExpressions;
+using System.Web.Script.Serialization;
 
 namespace UAS_LabelMachine
 {
@@ -722,6 +723,21 @@ namespace UAS_LabelMachine
             }
         }
 
+        public static Dictionary<string, object> ToDictionary(string JsonData ,string Type) {
+
+            //实例化JavaScriptSerializer类的新实例
+            JavaScriptSerializer jss = new JavaScriptSerializer();
+            try
+            {
+                //将指定的 JSON 字符串转换为 Dictionary<string, object> 类型的对象
+                return jss.Deserialize<Dictionary<string, object>>(JsonData);
+            }
+            catch (Exception ex)
+            {
+                throw new Exception(ex.Message);
+            }
+        }
+
         public static Dictionary<string, object> ToDictionary(string JsonData)
         {
             object Data = null;

+ 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,YITOA_ZX,T_YHND_HK";
+        ////怡海能达外网地址
+        //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,YITOA_ZX,T_YHND_HK";
 
         ////华商龙外网地址
         //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)));";

+ 2 - 2
UAS-出货标签管理/Service References/Vivo_New_BoxReelRelation/configuration.svcinfo

@@ -4,10 +4,10 @@
   <bindings>
     <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap4&quot;&gt;&lt;security mode=&quot;Transport&quot; /&gt;&lt;/Data&gt;" bindingType="basicHttpBinding" name="Service1Soap4" />
     <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap5&quot; /&gt;" bindingType="basicHttpBinding" name="Service1Soap5" />
-    <binding digest="System.ServiceModel.Configuration.CustomBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap122&quot;&gt;&lt;httpsTransport /&gt;&lt;textMessageEncoding messageVersion=&quot;Soap12&quot; /&gt;&lt;/Data&gt;" bindingType="customBinding" name="Service1Soap122" />
+    <binding digest="System.ServiceModel.Configuration.CustomBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap12&quot;&gt;&lt;httpsTransport /&gt;&lt;textMessageEncoding messageVersion=&quot;Soap12&quot; /&gt;&lt;/Data&gt;" bindingType="customBinding" name="Service1Soap12" />
   </bindings>
   <endpoints>
     <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;Service1Soap4&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap3&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;Service1Soap4&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap3&quot; /&gt;" contractName="Vivo_New_BoxReelRelation.Service1Soap" name="Service1Soap3" />
-    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap122&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap122&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap122&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap122&quot; /&gt;" contractName="Vivo_New_BoxReelRelation.Service1Soap" name="Service1Soap122" />
+    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap12&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap12&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;https://middle-mes.vivo.xyz:401/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap12&quot; contract=&quot;Vivo_New_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap12&quot; /&gt;" contractName="Vivo_New_BoxReelRelation.Service1Soap" name="Service1Soap12" />
   </endpoints>
 </configurationSnapshot>

+ 6 - 6
UAS-出货标签管理/Service References/Vivo_New_BoxReelRelation/configuration91.svcinfo

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="OqAnz4evAu8PnSFGcpEQY66SDZ4=">
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="0ZHBmkkQMbzqsVFdCMGJsGqPLy8=">
   <bindingConfigurations>
     <bindingConfiguration bindingType="basicHttpBinding" name="Service1Soap4">
       <properties>
@@ -219,10 +219,10 @@
         </property>
       </properties>
     </bindingConfiguration>
-    <bindingConfiguration bindingType="customBinding" name="Service1Soap122">
+    <bindingConfiguration bindingType="customBinding" name="Service1Soap12">
       <properties>
         <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>Service1Soap122</serializedValue>
+          <serializedValue>Service1Soap12</serializedValue>
         </property>
         <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue />
@@ -460,7 +460,7 @@
         </property>
       </properties>
     </endpoint>
-    <endpoint name="Service1Soap122" contract="Vivo_New_BoxReelRelation.Service1Soap" bindingType="customBinding" address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx" bindingConfiguration="Service1Soap122">
+    <endpoint name="Service1Soap12" contract="Vivo_New_BoxReelRelation.Service1Soap" bindingType="customBinding" address="https://middle-mes.vivo.xyz:401/ReelAPI.asmx" bindingConfiguration="Service1Soap12">
       <properties>
         <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue>https://middle-mes.vivo.xyz:401/ReelAPI.asmx</serializedValue>
@@ -472,7 +472,7 @@
           <serializedValue>customBinding</serializedValue>
         </property>
         <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>Service1Soap122</serializedValue>
+          <serializedValue>Service1Soap12</serializedValue>
         </property>
         <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue>Vivo_New_BoxReelRelation.Service1Soap</serializedValue>
@@ -535,7 +535,7 @@
           <serializedValue>False</serializedValue>
         </property>
         <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>Service1Soap122</serializedValue>
+          <serializedValue>Service1Soap12</serializedValue>
         </property>
         <property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
           <serializedValue />

+ 17 - 18
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1127,7 +1127,7 @@ namespace UAS_LabelMachine
             }
             //缓存外箱参数
             ComBoxClickChangeLabelDoc = true;
-     
+
         }
         bool InitGetLabel = true;
         /// <summary>
@@ -1710,7 +1710,7 @@ namespace UAS_LabelMachine
                             {
                                 if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i])
                                 {
-                                    OutBoxCodePrint(la_id, h);
+                                    OutBoxCodePrint(h);
                                     break;
                                 }
                             }
@@ -1742,7 +1742,7 @@ namespace UAS_LabelMachine
                     }
                     //找到了指定的盒号
                     if (FindMidLabel)
-                        OutBoxCodePrint(la_id, OutBoxLabelRowIndex);
+                        OutBoxCodePrint(OutBoxLabelRowIndex);
                     else
                         MessageBox.Show("该出入库单未找到该外箱号!");
                 }
@@ -1897,9 +1897,8 @@ namespace UAS_LabelMachine
         /// <summary>
         /// 执行打印外箱号
         /// </summary>
-        private void OutBoxCodePrint(string la_id, int rowindex)
+        private void OutBoxCodePrint(int rowindex)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql,lp_valuetype from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
             try
             {
                 for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
@@ -2038,7 +2037,7 @@ namespace UAS_LabelMachine
             if (DataHelper.DBConnectionString.Contains("richwell") || DataHelper.DBConnectionString.Contains("192.168.0.88"))
             {
                 sql.Clear();
-                sql.Append("select pd_custprodcode,pd_pocode,pd_inoutno,pib_madein,pib_custbarcode,pib_brand,pib_cusbarcode,pib_cusoutboxcode,pib_id,pib_pdid,pib_piid,pib_pdno,pib_prodcode,");
+                sql.Append("select pd_custprodcode,pd_pocode,pd_inoutno,pib_datecode1,pib_madein,pib_custbarcode,pib_brand,pib_cusbarcode,pib_cusoutboxcode,pib_id,pib_pdid,pib_piid,pib_pdno,pib_prodcode,");
                 sql.Append("pr_brand,pr_vendprodcode,pib_lotno,pib_datecode,pib_qty,pib_barcode,pib_outboxcode1,pib_outboxcode2,pib_ifpick,pib_ifprint,");
                 sql.Append("pr_spec,pd_prodcode,pd_pocode,pr_code from prodiobarcode  left join prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno ");
                 sql.Append("and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join (select pd_prodcode ");
@@ -2152,12 +2151,11 @@ namespace UAS_LabelMachine
                 }
             }
             //打印外箱号
-            string la_id = OutBoxCombox.SelectedValue.ToString().Split('#')[0];
             for (int i = 0; i < CusOutBoxCode.Count; i++)
             {
                 if (!PrintedVivoOutboxCode.Contains(CusOutBoxCode[i].ToString()))
                 {
-                    OutBoxCodePrint(la_id, CusOutBoxCode[i]);
+                    OutBoxCodePrint(CusOutBoxCode[i]);
                     PrintedVivoOutboxCode.Add(CusOutBoxCode[i].ToString());
                 }
             }
@@ -2444,12 +2442,15 @@ namespace UAS_LabelMachine
             {
                 if (LabelInf.Rows[0].Cells["pib_outboxcode2"].Value != null)
                 {
-                    Vivo_GetPlateID.Service1SoapClient getPlateID = new Vivo_GetPlateID.Service1SoapClient();
-                    Vivo_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_BoxReelRelation.Service1SoapClient();
+                    //Vivo_GetPlateID.Service1SoapClient getPlateID = new Vivo_GetPlateID.Service1SoapClient();
+                    Vivo_New_GetPlateID.Service1SoapClient getPlateID = new Vivo_New_GetPlateID.Service1SoapClient();
+                    //Vivo_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_BoxReelRelation.Service1SoapClient();
+                    Vivo_New_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_New_BoxReelRelation.Service1SoapClient();
                     string VenderCode = dh.GetConfig("VivoCode", "ProdInOut!Sale").ToString();
                     string CurrentTime = System.DateTime.Now.ToString("yyyyMM");
                     string Createcode = VenderCode + CurrentTime;
                     string outboxcode = "";
+                    string pwd = "9G69NHy5";
                     //装入箱内的数量统计,用于判断是否达到容量
                     decimal InBoxCount = OutboxCapacity.Value;
                     for (int i = 0; i < LabelInf.Rows.Count; i++)
@@ -2457,13 +2458,14 @@ namespace UAS_LabelMachine
                         //勾选了的内容才进行料盘的获取和箱号的维护
                         if (LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
                         {
-                            int amount = int.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
+                            double amount = double.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
                             string DateCode = LabelInf.Rows[i].Cells["pib_datecode"].Value.ToString();
                             string LotNo = LabelInf.Rows[i].Cells["pib_lotno"].Value.ToString();
                             string OrderCode = LabelInf.Rows[i].Cells["pr_vendprodcode"].Value.ToString();
                             string custprodcode = LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString();
                             //通过接口获取Vivo料盘号
-                            string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
+                            //string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
+                            string custbarcode = BaseUtil.ToDictionary(getPlateID.getCompID_20190403("", custprodcode, VenderCode, "", amount, "新条码", OrderCode, LotNo, DateCode, VenderCode, pwd),"")["return_result"].ToString();
                             LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode;
                             //如果下一行的外箱号和当前行不一致
                             bool NextBoxDiff = false;
@@ -2481,18 +2483,15 @@ namespace UAS_LabelMachine
                             }
                             if (InBoxCount == OutboxCapacity.Value || NextBoxDiff)
                             {
-                                outboxcode = VenderCode + "-" + CurrentTime + "-" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString();
                                 InBoxCount = 1;
                                 NextBoxDiff = false;
+                                outboxcode = BaseUtil.ToDictionary(getOutBox.getBoxID_20190403(VenderCode, custprodcode, amount.ToString(), OrderCode, "", VenderCode, pwd), "")["return_result"].ToString();
                             }
                             else
                                 InBoxCount = InBoxCount + 1;
                             //获取信息为T-表示成功获取了信息
-                            string Message = getOutBox.insertBoxReelRelation(Createcode, VenderCode, outboxcode, custbarcode, "", "");
-                            if (Message.Substring(0, 1) == "T")
-                                LabelInf.Rows[i].Cells["pib_cusoutboxcode"].Value = outboxcode;
-                            else
-                                LabelInf.Rows[i].Cells["pib_cusoutboxcode"].Value = Message;
+                            string Message = getOutBox.BindReelToBox(outboxcode, custbarcode, VenderCode, pwd);
+                            LabelInf.Rows[i].Cells["pib_cusoutboxcode"].Value = outboxcode;
                         }
                     }
                 }

+ 8 - 8
UAS-出货标签管理/生成条码.cs

@@ -455,15 +455,15 @@ namespace UAS_LabelMachine
                 switch (pi_class.Text)
                 {
                     case "出货单":
-                        //sql.Clear();
-                        //sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_ordercode,pd_orderdetno,pd_pdno,pd_prodcode,");
-                        //sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_ordercode,pd_orderdetno,pd_pdno,");
-                        //sql.Append("pd_prodcode,pd_piclass,outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_pdno=pd_pdno ),0)pd_qty ");
-                        //sql.Append("from (select pd_piid,min(pd_id) pd_id,sum(pd_outqty)outqty,pd_ordercode,pd_orderdetno,pd_pdno,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
-                        //sql.Append("from prodiodetail  group by pd_piid,pd_ordercode, pd_orderdetno,pd_pdno)T left join product ");
-                        //sql.Append("on pr_code=pd_prodcode where nvl(pr_zxbzs,0)>0)  where  pd_piid='" + pi_id + "'");
                         sql.Clear();
-                        sql.Append("select * from prodiobarcode_view where pd_piid='" + pi_id + "'");
+                        sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_ordercode,pd_orderdetno,pd_pdno,pd_prodcode,");
+                        sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_ordercode,pd_orderdetno,pd_pdno,");
+                        sql.Append("pd_prodcode,pd_piclass,outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_pdno=pd_pdno ),0)pd_qty ");
+                        sql.Append("from (select pd_piid,min(pd_id) pd_id,sum(pd_outqty)outqty,pd_ordercode,pd_orderdetno,pd_pdno,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
+                        sql.Append("from prodiodetail  group by pd_piid,pd_ordercode, pd_orderdetno,pd_pdno)T left join product ");
+                        sql.Append("on pr_code=pd_prodcode where nvl(pr_zxbzs,0)>0)  where  pd_piid='" + pi_id + "'");
+                        //sql.Clear();
+                        //sql.Append("select * from prodiobarcode_view where pd_piid='" + pi_id + "'");
                         break;
                     case "完工入库单":
                         sql.Clear();