Prechádzať zdrojové kódy

添加华商龙自定义条码规则

章政 7 rokov pred
rodič
commit
ae7c952533

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

@@ -22,27 +22,27 @@ namespace UAS_LabelMachine
         ////需要显示的账套
         //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=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)));";
-        ////华商龙ERP地址
-        //public static readonly string ERPAddesss = "http://218.18.115.198:8888/ERP/";
-        ////华商龙FTP
-        //public static readonly string FTPAdress = "ftp://218.18.115.198:21|Print|Administrator1@#";
+        ////怡海能达外网地址
+        //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 = "1523";
+        //public static readonly string OraclePort = "1521";
         ////需要显示的账套
-        //public static readonly string Masters = "XSQ,N_YITOA_YWC,ZXN,N_YITOA_LHCT,N_YITOA_CT,N_CHL,N_YITOA_HK,N_HUASL_SHTL,N_WILICHK,N_WILIC,N_E_SHINE_SH,N_SHBJ,N_BJKG,N_HUASL,N_HUASL_QD,N_HUASL_XM,N_HUASL_SZ";
+        //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)));";
+        //华商龙ERP地址
+        public static readonly string ERPAddesss = "http://218.18.115.198:8888/ERP/";
+        //华商龙FTP
+        public static readonly string FTPAdress = "ftp://218.18.115.198:21|Print|Administrator1@#";
+        //Oracle端口
+        public static readonly string OraclePort = "1523";
+        //需要显示的账套
+        public static readonly string Masters = "XSQ,N_YITOA_YWC,ZXN,N_YITOA_LHCT,N_YITOA_CT,N_CHL,N_YITOA_HK,N_HUASL_SHTL,N_WILICHK,N_WILIC,N_E_SHINE_SH,N_SHBJ,N_BJKG,N_HUASL,N_HUASL_QD,N_HUASL_XM,N_HUASL_SZ";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 196 - 186
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -121,27 +121,6 @@
             this.sg_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_cusbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_cusoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ViVoPlate = new System.Windows.Forms.Button();
@@ -175,6 +154,28 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_cusbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_cusoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -1098,6 +1099,7 @@
             this.pib_datecode1,
             this.pib_qty,
             this.pib_barcode,
+            this.pib_custbarcode,
             this.pd_pocode,
             this.pd_custprodcode,
             this.pd_custprodspec,
@@ -1114,171 +1116,6 @@
             this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.Choose.Width = 55;
-            // 
-            // pib_ifpick
-            // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
-            // 
-            // pib_ifprint
-            // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Width = 60;
-            // 
-            // pib_id1
-            // 
-            this.pib_id1.DataPropertyName = "pib_id";
-            this.pib_id1.HeaderText = "pib_id";
-            this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Width = 66;
-            // 
-            // pib_pdno
-            // 
-            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_pdno.DataPropertyName = "pib_pdno";
-            this.pib_pdno.HeaderText = "明细序号";
-            this.pib_pdno.Name = "pib_pdno";
-            this.pib_pdno.ReadOnly = true;
-            this.pib_pdno.Width = 96;
-            // 
-            // pib_prodcode
-            // 
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
-            this.pib_prodcode.Width = 78;
-            // 
-            // pr_vendprodcode
-            // 
-            this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
-            this.pr_vendprodcode.HeaderText = "MPN";
-            this.pr_vendprodcode.Name = "pr_vendprodcode";
-            this.pr_vendprodcode.ReadOnly = true;
-            this.pr_vendprodcode.Width = 48;
-            // 
-            // pr_brand
-            // 
-            this.pr_brand.DataPropertyName = "pr_brand";
-            this.pr_brand.HeaderText = "品牌";
-            this.pr_brand.Name = "pr_brand";
-            this.pr_brand.ReadOnly = true;
-            this.pr_brand.Width = 54;
-            // 
-            // pib_madein
-            // 
-            this.pib_madein.DataPropertyName = "pib_madein";
-            this.pib_madein.HeaderText = "产地";
-            this.pib_madein.Name = "pib_madein";
-            this.pib_madein.Visible = false;
-            this.pib_madein.Width = 54;
-            // 
-            // pib_lotno
-            // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 60;
-            // 
-            // pib_datecode
-            // 
-            this.pib_datecode.DataPropertyName = "pib_datecode";
-            this.pib_datecode.HeaderText = "DateCode";
-            this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 78;
-            // 
-            // pib_cusbarcode
-            // 
-            this.pib_cusbarcode.DataPropertyName = "pib_cusbarcode";
-            this.pib_cusbarcode.HeaderText = "ViVo条码号";
-            this.pib_cusbarcode.Name = "pib_cusbarcode";
-            this.pib_cusbarcode.Width = 90;
-            // 
-            // pib_cusoutboxcode
-            // 
-            this.pib_cusoutboxcode.DataPropertyName = "pib_cusoutboxcode";
-            this.pib_cusoutboxcode.HeaderText = "ViVo外箱";
-            this.pib_cusoutboxcode.Name = "pib_cusoutboxcode";
-            this.pib_cusoutboxcode.Width = 78;
-            // 
-            // pib_datecode1
-            // 
-            this.pib_datecode1.DataPropertyName = "pib_datecode1";
-            this.pib_datecode1.HeaderText = "DateCode1";
-            this.pib_datecode1.Name = "pib_datecode1";
-            this.pib_datecode1.Visible = false;
-            this.pib_datecode1.Width = 84;
-            // 
-            // pib_qty
-            // 
-            this.pib_qty.DataPropertyName = "pib_qty";
-            this.pib_qty.HeaderText = "数量";
-            this.pib_qty.Name = "pib_qty";
-            this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 54;
-            // 
-            // pib_barcode
-            // 
-            this.pib_barcode.DataPropertyName = "pib_barcode";
-            this.pib_barcode.HeaderText = "唯一条码";
-            this.pib_barcode.Name = "pib_barcode";
-            this.pib_barcode.ReadOnly = true;
-            this.pib_barcode.Width = 78;
-            // 
-            // pd_pocode
-            // 
-            this.pd_pocode.DataPropertyName = "pd_pocode";
-            this.pd_pocode.HeaderText = "客户PO";
-            this.pd_pocode.Name = "pd_pocode";
-            this.pd_pocode.ReadOnly = true;
-            this.pd_pocode.Width = 66;
-            // 
-            // pd_custprodcode
-            // 
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "客户料号";
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.ReadOnly = true;
-            this.pd_custprodcode.Width = 78;
-            // 
-            // pd_custprodspec
-            // 
-            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
-            this.pd_custprodspec.HeaderText = "客户型号";
-            this.pd_custprodspec.Name = "pd_custprodspec";
-            this.pd_custprodspec.ReadOnly = true;
-            this.pd_custprodspec.Width = 78;
-            // 
-            // pib_outboxcode1
-            // 
-            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
-            this.pib_outboxcode1.HeaderText = "中盒号";
-            this.pib_outboxcode1.Name = "pib_outboxcode1";
-            this.pib_outboxcode1.Width = 90;
-            // 
-            // pib_outboxcode2
-            // 
-            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
-            this.pib_outboxcode2.HeaderText = "外箱号";
-            this.pib_outboxcode2.Name = "pib_outboxcode2";
-            this.pib_outboxcode2.Width = 90;
-            // 
             // pi_inoutno
             // 
             this.pi_inoutno.ID = null;
@@ -1686,6 +1523,178 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.Choose.Width = 55;
+            // 
+            // pib_ifpick
+            // 
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
+            // 
+            // pib_ifprint
+            // 
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Width = 60;
+            // 
+            // pib_id1
+            // 
+            this.pib_id1.DataPropertyName = "pib_id";
+            this.pib_id1.HeaderText = "pib_id";
+            this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Width = 66;
+            // 
+            // pib_pdno
+            // 
+            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_pdno.DataPropertyName = "pib_pdno";
+            this.pib_pdno.HeaderText = "明细序号";
+            this.pib_pdno.Name = "pib_pdno";
+            this.pib_pdno.ReadOnly = true;
+            this.pib_pdno.Width = 96;
+            // 
+            // pib_prodcode
+            // 
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
+            this.pib_prodcode.Width = 78;
+            // 
+            // pr_vendprodcode
+            // 
+            this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
+            this.pr_vendprodcode.HeaderText = "MPN";
+            this.pr_vendprodcode.Name = "pr_vendprodcode";
+            this.pr_vendprodcode.ReadOnly = true;
+            this.pr_vendprodcode.Width = 48;
+            // 
+            // pr_brand
+            // 
+            this.pr_brand.DataPropertyName = "pr_brand";
+            this.pr_brand.HeaderText = "品牌";
+            this.pr_brand.Name = "pr_brand";
+            this.pr_brand.ReadOnly = true;
+            this.pr_brand.Width = 54;
+            // 
+            // pib_madein
+            // 
+            this.pib_madein.DataPropertyName = "pib_madein";
+            this.pib_madein.HeaderText = "产地";
+            this.pib_madein.Name = "pib_madein";
+            this.pib_madein.Visible = false;
+            this.pib_madein.Width = 54;
+            // 
+            // pib_lotno
+            // 
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.Width = 60;
+            // 
+            // pib_datecode
+            // 
+            this.pib_datecode.DataPropertyName = "pib_datecode";
+            this.pib_datecode.HeaderText = "DateCode";
+            this.pib_datecode.Name = "pib_datecode";
+            this.pib_datecode.Width = 78;
+            // 
+            // pib_cusbarcode
+            // 
+            this.pib_cusbarcode.DataPropertyName = "pib_cusbarcode";
+            this.pib_cusbarcode.HeaderText = "ViVo条码号";
+            this.pib_cusbarcode.Name = "pib_cusbarcode";
+            this.pib_cusbarcode.Width = 90;
+            // 
+            // pib_cusoutboxcode
+            // 
+            this.pib_cusoutboxcode.DataPropertyName = "pib_cusoutboxcode";
+            this.pib_cusoutboxcode.HeaderText = "ViVo外箱";
+            this.pib_cusoutboxcode.Name = "pib_cusoutboxcode";
+            this.pib_cusoutboxcode.Width = 78;
+            // 
+            // pib_datecode1
+            // 
+            this.pib_datecode1.DataPropertyName = "pib_datecode1";
+            this.pib_datecode1.HeaderText = "DateCode1";
+            this.pib_datecode1.Name = "pib_datecode1";
+            this.pib_datecode1.Visible = false;
+            this.pib_datecode1.Width = 84;
+            // 
+            // pib_qty
+            // 
+            this.pib_qty.DataPropertyName = "pib_qty";
+            this.pib_qty.HeaderText = "数量";
+            this.pib_qty.Name = "pib_qty";
+            this.pib_qty.ReadOnly = true;
+            this.pib_qty.Width = 54;
+            // 
+            // pib_barcode
+            // 
+            this.pib_barcode.DataPropertyName = "pib_barcode";
+            this.pib_barcode.HeaderText = "唯一条码";
+            this.pib_barcode.Name = "pib_barcode";
+            this.pib_barcode.ReadOnly = true;
+            this.pib_barcode.Width = 78;
+            // 
+            // pib_custbarcode
+            // 
+            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
+            this.pib_custbarcode.HeaderText = "客户条码";
+            this.pib_custbarcode.Name = "pib_custbarcode";
+            this.pib_custbarcode.Width = 78;
+            // 
+            // pd_pocode
+            // 
+            this.pd_pocode.DataPropertyName = "pd_pocode";
+            this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.Name = "pd_pocode";
+            this.pd_pocode.ReadOnly = true;
+            this.pd_pocode.Width = 66;
+            // 
+            // pd_custprodcode
+            // 
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "客户料号";
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.ReadOnly = true;
+            this.pd_custprodcode.Width = 78;
+            // 
+            // pd_custprodspec
+            // 
+            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
+            this.pd_custprodspec.HeaderText = "客户型号";
+            this.pd_custprodspec.Name = "pd_custprodspec";
+            this.pd_custprodspec.ReadOnly = true;
+            this.pd_custprodspec.Width = 78;
+            // 
+            // pib_outboxcode1
+            // 
+            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
+            this.pib_outboxcode1.HeaderText = "中盒号";
+            this.pib_outboxcode1.Name = "pib_outboxcode1";
+            this.pib_outboxcode1.Width = 90;
+            // 
+            // pib_outboxcode2
+            // 
+            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
+            this.pib_outboxcode2.HeaderText = "外箱号";
+            this.pib_outboxcode2.Name = "pib_outboxcode2";
+            this.pib_outboxcode2.Width = 90;
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1901,6 +1910,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_datecode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_qty;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pib_custbarcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_pocode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodspec;

+ 19 - 34
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1100,7 +1100,8 @@ namespace UAS_LabelMachine
                     CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
-                else MessageBox.Show("当前出入库单号不存在!");
+                else
+                    MessageBox.Show("当前出入库单号不存在!");
             }
         }
 
@@ -1163,7 +1164,6 @@ namespace UAS_LabelMachine
                 {
                     GetMidBoxData();
                 }
-                int LastCheckRowIndex = 0;
                 for (int i = 0; i < LabelInf.RowCount; i++)
                 {
                     if (i + 1 < LabelInf.RowCount)
@@ -1181,16 +1181,10 @@ namespace UAS_LabelMachine
                         if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
                             outboxcode1[LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()] = false;
                     }
-                    if (LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifprint"].FormattedValue.ToString() != "True")
-                    {
-                        LastCheckRowIndex = i;
-                    }
                 }
                 //用于判断用户是否勾选了行
                 int CheckedRowCount = 0;
                 string[] arg = SingleBoxArgument.ToArray();
-                //一盒打印的份数
-                List<string> PrintNums = new List<string>();
                 //打印所有的选中行
                 for (int i = 0; i < LabelInf.RowCount; i++)
                 {
@@ -1199,19 +1193,8 @@ namespace UAS_LabelMachine
                     {
                         CheckedRowCount = CheckedRowCount + 1;
                         CurrentRowIndex = i;
-                        if (i == 0)
-                        {
-                            PrintNums.Add(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                        }
-                        if (i > 0)
-                        {
-                            if (LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() == LabelInf.Rows[i - 1].Cells["pib_outboxcode1"].Value.ToString())
-                            {
-                                PrintNums.Add(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                            }
-                        }
-                        //如果包含
-                        if ((i + 1 < LabelInf.Rows.Count && LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() != LabelInf.Rows[i + 1].Cells["pib_outboxcode1"].Value.ToString()) || i == LastCheckRowIndex)
+                        //以标签模板的参数为基准,循环取数
+                        try
                         {
                             string pib_id = LabelInf.Rows[i].Cells["pib_id1"].Value.ToString();
                             DataRow[] dr = SingleBoxCacheData.Select("pib_id=" + pib_id);
@@ -1250,13 +1233,7 @@ namespace UAS_LabelMachine
                             LogManager.DoLog(ParamLog.ToString());
                             //保存参数打印
                             SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
-                            SingleDoc.PrintDocument(PrintNums.Count);
-                            PrintNums.Clear();
-                            PrintNums.Add(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                        }
-                        //以标签模板的参数为基准,循环取数
-                        try
-                        {
+                            SingleDoc.PrintDocument();
                             if (MidLabelAutoPrint.Checked)
                             {
                                 //判断当前行的盒号和下一行不相等或者已经是最后一行了
@@ -2044,7 +2021,7 @@ namespace UAS_LabelMachine
             else
             {
                 sql.Clear();
-                sql.Append("select pd_custprodcode,pd_custprodspec,pd_pocode,pib_madein,pib_id,pib_datecode1,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pr_brand,pr_vendprodcode,");
+                sql.Append("select pd_custprodcode,pd_custprodspec,pd_pocode,pib_madein,pib_custbarcode,pib_id,pib_datecode1,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pr_brand,pr_vendprodcode,");
                 sql.Append("pib_lotno,pib_datecode,pib_qty,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifpick,0)pib_ifpick,nvl(pib_ifprint,0)pib_ifprint");
                 sql.Append(",sa_pocode from prodiobarcode left join prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and ");
                 sql.Append(" pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join sale on sa_code=pib_ordercode ");
@@ -2052,7 +2029,6 @@ namespace UAS_LabelMachine
             }
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             MidSource.DataSource = dt;
-            AllChecked = false;
             BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);
             //有数据的话默认取第一条的品牌去取采集策略
             TotalCount.Text = LabelInf.RowCount.ToString();
@@ -2515,10 +2491,19 @@ namespace UAS_LabelMachine
             if (result == DialogResult.OK)
             {
                 ExcelHandler eh = new ExcelHandler();
-                eh.ExportExcel(BaseUtil.GetExportDataTable(LabelInf), ExportFileDialog.SelectedPath, pi_inoutno.Text);
-                string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
-                if (close.ToString() == "Yes")
-                    System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_inoutno.Text + ".xls");
+                DataTable dt = ((DataTable)MidSource.DataSource).Copy();
+                for (int i = 0; i < dt.Columns.Count; i++)
+                {
+                    for (int j = 0; j < LabelInf.Columns.Count; j++)
+                    {
+                        if (dt.Columns[i].ColumnName.ToLower() == LabelInf.Columns[j].DataPropertyName.ToLower())
+                        {
+                            dt.Columns[i].ColumnName = LabelInf.Columns[j].HeaderText;
+                        }
+                    }
+                }
+                eh.ExportExcel(dt, ExportFileDialog.SelectedPath, pi_inoutno.Text);
+                MessageBox.Show("导出成功");
             }
         }
     }

+ 3 - 0
UAS-出货标签管理/UAS_出货标签管理.resx

@@ -159,6 +159,9 @@
   <metadata name="pib_datecode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pib_custbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pd_custprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

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

@@ -41,7 +41,6 @@
             this.GenerateBarCode = new UAS_LabelMachine.CustomControl.NormalButton();
             this.Screen = new UAS_LabelMachine.CustomControl.NormalButton();
             this.ProdIoInfDGV = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pd_orderdetno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -59,6 +58,8 @@
             this.mid_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mid_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mid_remain = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.ResetSerialNum = new UAS_LabelMachine.CustomControl.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.ProdIoInfDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -66,10 +67,9 @@
             // 
             this.pi_inoutno_label.AutoSize = true;
             this.pi_inoutno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_inoutno_label.Location = new System.Drawing.Point(33, 36);
-            this.pi_inoutno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pi_inoutno_label.Location = new System.Drawing.Point(25, 29);
             this.pi_inoutno_label.Name = "pi_inoutno_label";
-            this.pi_inoutno_label.Size = new System.Drawing.Size(112, 27);
+            this.pi_inoutno_label.Size = new System.Drawing.Size(90, 21);
             this.pi_inoutno_label.TabIndex = 148;
             this.pi_inoutno_label.Text = "出入库单号";
             // 
@@ -77,10 +77,9 @@
             // 
             this.pi_class_label.AutoSize = true;
             this.pi_class_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_class_label.Location = new System.Drawing.Point(355, 36);
-            this.pi_class_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pi_class_label.Location = new System.Drawing.Point(266, 29);
             this.pi_class_label.Name = "pi_class_label";
-            this.pi_class_label.Size = new System.Drawing.Size(92, 27);
+            this.pi_class_label.Size = new System.Drawing.Size(74, 21);
             this.pi_class_label.TabIndex = 150;
             this.pi_class_label.Text = "单据类型";
             // 
@@ -88,20 +87,18 @@
             // 
             this.pi_class.AutoSize = true;
             this.pi_class.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_class.Location = new System.Drawing.Point(473, 36);
-            this.pi_class.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pi_class.Location = new System.Drawing.Point(355, 29);
             this.pi_class.Name = "pi_class";
-            this.pi_class.Size = new System.Drawing.Size(0, 27);
+            this.pi_class.Size = new System.Drawing.Size(0, 21);
             this.pi_class.TabIndex = 152;
             // 
             // pr_kind_label
             // 
             this.pr_kind_label.AutoSize = true;
             this.pr_kind_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_kind_label.Location = new System.Drawing.Point(635, 36);
-            this.pr_kind_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_kind_label.Location = new System.Drawing.Point(476, 29);
             this.pr_kind_label.Name = "pr_kind_label";
-            this.pr_kind_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_kind_label.Size = new System.Drawing.Size(74, 21);
             this.pr_kind_label.TabIndex = 156;
             this.pr_kind_label.Text = "物料类型";
             // 
@@ -113,30 +110,27 @@
             "单件管控",
             "批管控",
             "全部"});
-            this.pr_kind.Location = new System.Drawing.Point(751, 38);
-            this.pr_kind.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_kind.Location = new System.Drawing.Point(563, 30);
             this.pr_kind.Name = "pr_kind";
-            this.pr_kind.Size = new System.Drawing.Size(160, 23);
+            this.pr_kind.Size = new System.Drawing.Size(121, 20);
             this.pr_kind.TabIndex = 157;
             // 
             // MidCapacity_label
             // 
             this.MidCapacity_label.AutoSize = true;
             this.MidCapacity_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidCapacity_label.Location = new System.Drawing.Point(937, 36);
-            this.MidCapacity_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.MidCapacity_label.Location = new System.Drawing.Point(703, 29);
             this.MidCapacity_label.Name = "MidCapacity_label";
-            this.MidCapacity_label.Size = new System.Drawing.Size(92, 27);
+            this.MidCapacity_label.Size = new System.Drawing.Size(74, 21);
             this.MidCapacity_label.TabIndex = 158;
             this.MidCapacity_label.Text = "中盘容量";
             // 
             // SetMidCapacity
             // 
             this.SetMidCapacity.Image = ((System.Drawing.Image)(resources.GetObject("SetMidCapacity.Image")));
-            this.SetMidCapacity.Location = new System.Drawing.Point(1215, 35);
-            this.SetMidCapacity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.SetMidCapacity.Location = new System.Drawing.Point(911, 28);
             this.SetMidCapacity.Name = "SetMidCapacity";
-            this.SetMidCapacity.Size = new System.Drawing.Size(67, 29);
+            this.SetMidCapacity.Size = new System.Drawing.Size(50, 23);
             this.SetMidCapacity.TabIndex = 160;
             this.SetMidCapacity.Text = "刷新";
             this.SetMidCapacity.UseVisualStyleBackColor = true;
@@ -144,19 +138,17 @@
             // 
             // MidCapacity
             // 
-            this.MidCapacity.Location = new System.Drawing.Point(1049, 36);
-            this.MidCapacity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.MidCapacity.Location = new System.Drawing.Point(787, 29);
             this.MidCapacity.Name = "MidCapacity";
             this.MidCapacity.Negative = false;
-            this.MidCapacity.Size = new System.Drawing.Size(160, 25);
+            this.MidCapacity.Size = new System.Drawing.Size(121, 21);
             this.MidCapacity.TabIndex = 159;
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(1, 128);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ChooseAll.Location = new System.Drawing.Point(1, 102);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(61, 29);
+            this.ChooseAll.Size = new System.Drawing.Size(46, 23);
             this.ChooseAll.TabIndex = 155;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -164,10 +156,9 @@
             // GenerateBarCode
             // 
             this.GenerateBarCode.Image = ((System.Drawing.Image)(resources.GetObject("GenerateBarCode.Image")));
-            this.GenerateBarCode.Location = new System.Drawing.Point(659, 98);
-            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.GenerateBarCode.Location = new System.Drawing.Point(442, 78);
             this.GenerateBarCode.Name = "GenerateBarCode";
-            this.GenerateBarCode.Size = new System.Drawing.Size(85, 30);
+            this.GenerateBarCode.Size = new System.Drawing.Size(64, 24);
             this.GenerateBarCode.TabIndex = 154;
             this.GenerateBarCode.Text = "生成条码";
             this.GenerateBarCode.UseVisualStyleBackColor = true;
@@ -176,10 +167,9 @@
             // Screen
             // 
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
-            this.Screen.Location = new System.Drawing.Point(541, 98);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Screen.Location = new System.Drawing.Point(354, 78);
             this.Screen.Name = "Screen";
-            this.Screen.Size = new System.Drawing.Size(85, 30);
+            this.Screen.Size = new System.Drawing.Size(64, 24);
             this.Screen.TabIndex = 153;
             this.Screen.Text = "筛选";
             this.Screen.UseVisualStyleBackColor = true;
@@ -212,29 +202,14 @@
             this.mid_num,
             this.mid_remain});
             this.ProdIoInfDGV.GridColor = System.Drawing.SystemColors.ButtonFace;
-            this.ProdIoInfDGV.Location = new System.Drawing.Point(0, 156);
-            this.ProdIoInfDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ProdIoInfDGV.Location = new System.Drawing.Point(0, 125);
             this.ProdIoInfDGV.Name = "ProdIoInfDGV";
             this.ProdIoInfDGV.RowTemplate.Height = 23;
-            this.ProdIoInfDGV.Size = new System.Drawing.Size(1285, 438);
+            this.ProdIoInfDGV.Size = new System.Drawing.Size(964, 350);
             this.ProdIoInfDGV.TabIndex = 151;
             this.ProdIoInfDGV.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.ProdIoInfDGV_CellEndEdit);
             this.ProdIoInfDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.ProdIoInfDGV_CellPainting);
             // 
-            // pi_inoutno
-            // 
-            this.pi_inoutno.ID = null;
-            this.pi_inoutno.Location = new System.Drawing.Point(171, 36);
-            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.pi_inoutno.Name = "pi_inoutno";
-            this.pi_inoutno.Size = new System.Drawing.Size(160, 25);
-            this.pi_inoutno.Str = null;
-            this.pi_inoutno.Str1 = null;
-            this.pi_inoutno.Str2 = null;
-            this.pi_inoutno.TabIndex = 149;
-            this.pi_inoutno.Tag = "cu_name";
-            this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bi_inoutno_KeyDown);
-            // 
             // Choose
             // 
             this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -351,11 +326,36 @@
             this.mid_remain.Name = "mid_remain";
             this.mid_remain.ReadOnly = true;
             // 
+            // pi_inoutno
+            // 
+            this.pi_inoutno.ID = null;
+            this.pi_inoutno.Location = new System.Drawing.Point(128, 29);
+            this.pi_inoutno.Name = "pi_inoutno";
+            this.pi_inoutno.Size = new System.Drawing.Size(121, 21);
+            this.pi_inoutno.Str = null;
+            this.pi_inoutno.Str1 = null;
+            this.pi_inoutno.Str2 = null;
+            this.pi_inoutno.TabIndex = 149;
+            this.pi_inoutno.Tag = "cu_name";
+            this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bi_inoutno_KeyDown);
+            // 
+            // ResetSerialNum
+            // 
+            this.ResetSerialNum.Image = ((System.Drawing.Image)(resources.GetObject("ResetSerialNum.Image")));
+            this.ResetSerialNum.Location = new System.Drawing.Point(529, 78);
+            this.ResetSerialNum.Name = "ResetSerialNum";
+            this.ResetSerialNum.Size = new System.Drawing.Size(64, 24);
+            this.ResetSerialNum.TabIndex = 161;
+            this.ResetSerialNum.Text = "流水重置";
+            this.ResetSerialNum.UseVisualStyleBackColor = true;
+            this.ResetSerialNum.Click += new System.EventHandler(this.ResetSerialNum_Click);
+            // 
             // 生成条码
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1287, 596);
+            this.ClientSize = new System.Drawing.Size(965, 477);
+            this.Controls.Add(this.ResetSerialNum);
             this.Controls.Add(this.SetMidCapacity);
             this.Controls.Add(this.MidCapacity);
             this.Controls.Add(this.MidCapacity_label);
@@ -369,7 +369,6 @@
             this.Controls.Add(this.pi_class_label);
             this.Controls.Add(this.pi_inoutno);
             this.Controls.Add(this.pi_inoutno_label);
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "生成条码";
             this.Text = "生成条码";
             this.Load += new System.EventHandler(this.生成条码_Load);
@@ -412,5 +411,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mid_qty;
         private System.Windows.Forms.DataGridViewTextBoxColumn mid_num;
         private System.Windows.Forms.DataGridViewTextBoxColumn mid_remain;
+        private CustomControl.NormalButton ResetSerialNum;
     }
 }

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

@@ -4,6 +4,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using UAS_LabelMachine.PublicMethod;
 
@@ -22,12 +23,20 @@ namespace UAS_LabelMachine
         string pi_id;
         //用于提示超出数量的物料
         Dictionary<string, string> NotPass = new Dictionary<string, string>();
+        //前缀条件
+        string Prefix = "";
 
         string Condition = "";
         //生成条码的流水号
         int serialnum = 0;
+        //客户的流水号
+        int custserialnum = 0;
         //是否生成过条码
         bool FirstCode = false;
+        //客户编号
+        string CustCode = "";
+        //编码规则编号
+        string NrCode = "";
 
         public 生成条码(string PI_INOUTNO)
         {
@@ -95,6 +104,94 @@ namespace UAS_LabelMachine
         /// <param name="e"></param>
         private void GenerateBarCode_Click(object sender, EventArgs e)
         {
+            //获取编码规则
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + CustCode + "' order by nrd_detno", "select");
+            //用于过滤参数的正则表达式
+            Regex match = new Regex("{\\w+}");
+            //用于存放每一项的明细的数据
+            string[] NrData = new string[Nr.Rows.Count];
+            //流水号的索引
+            int SerialNumIndex = 0;
+            //流水长度
+            int SerialNumLength = 0;
+            //存放键值对
+            Dictionary<int, string> NrDic = new Dictionary<int, string>();
+            for (int m = 0; m < Nr.Rows.Count; m++)
+            {
+                switch (Nr.Rows[m]["nrd_type"].ToString())
+                {
+                    //常量直接进行拼接
+                    case "常量":
+                        NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                        NrDic.Add(m, NrData[m]);
+                        break;
+                    case "SQL":
+                        string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                        DataTable Temp;
+                        //如果不包含参数替换
+                        if (SQL.IndexOf("{") == 0)
+                        {
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        else
+                        {
+                            //替换参数后重新执行SQL
+                            foreach (Match mch in match.Matches(SQL))
+                            {
+                                SQL = SQL.Replace(mch.Value.Trim(), "'" + pi_inoutno.Text + "'");
+                            }
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        if (Temp.Rows.Count > 0)
+                        {
+                            NrData[m] = Temp.Rows[0][0].ToString();
+                            NrDic.Add(m, NrData[m]);
+                        }
+                        else
+                        {
+                            NrData[m] = "";
+                            NrDic.Add(m, NrData[m]);
+                        }
+                        break;
+                    //流水需要通过MaxNumber去取
+                    case "流水":
+                        NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + CustCode + "'").ToString();
+                        NrDic.Add(m, NrData[m]);
+                        //设置当前流水
+                        custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                        SerialNumIndex = m;
+                        SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                        break;
+                    default:
+                        break;
+                }
+            }
+            Prefix = "";
+            for (int i = 0; i < NrDic.Count; i++)
+            {
+                //如果不是流水则正常添加
+                if (i != SerialNumIndex)
+                {
+                    Prefix += NrDic[i];
+                }
+                else
+                {
+                    //获取最大的流水号
+                    string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'").ToString();
+                    //如果流水号为空则插入一条新记录,从1开始取
+                    if (maxnum == "")
+                    {
+                        dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + NrCode + "','" + Prefix + "','1')", "insert");
+                        custserialnum = 1;
+                    }
+                    //如果流水号不为空则取当前流水
+                    else
+                    {
+                        custserialnum = int.Parse(maxnum);
+                    }
+                    break;
+                }
+            }
             //有错误需要提醒的内容
             int CheckedRowCount = 0;
             //遍历整个Grid,勾选的项目全部进行条码生成
@@ -122,31 +219,11 @@ namespace UAS_LabelMachine
                     int mid_num = int.Parse(ProdIoInfDGV.Rows[i].Cells["mid_num"].FormattedValue.ToString());
                     //中盒尾数
                     int mid_remain = int.Parse(ProdIoInfDGV.Rows[i].Cells["mid_remain"].FormattedValue.ToString());
-                    //本次数量不能大于总数
-                    //if (pd_qty > pd_totalqty)
-                    //{
-                    //    if (!NotPass.ContainsKey(pd_pdno + pd_prodcode))
-                    //    {
-                    //        NotPass.Add(pd_pdno + pd_prodcode, pd_prodcode + "本次数量不能大于总数");
-                    //    }
-                    //    CheckedRowCount--;
-                    //    continue;
-                    //}
-                    ////后台查询已生成数量,本次数量不能大于已生成数量
-                    //int qty = int.Parse(dh.getFieldDataByCondition("PRODIOBARCODE left join prodiodetail on  pib_pdid=pd_id and pib_prodcode=pd_prodcode", "nvl(sum(nvl(pib_qty,0)),0)", "  PIB_PIID='" + pi_id + "' and pd_pdno='" + pd_pdno + "' and pib_pdid=pd_id and pib_prodcode=pd_prodcode and pd_prodcode='" + pd_prodcode + "'").ToString());
-                    //if (pd_qty > pd_totalqty - qty || pd_qty == 0)
-                    //{
-                    //    if (!NotPass.ContainsKey(pd_pdno + pd_prodcode))
-                    //    {
-                    //        NotPass.Add(pd_pdno + pd_prodcode, "行号" + pd_pdno + ",物料号" + pd_prodcode + "已生成数量" + qty + ",剩余可以用数量" + (pd_totalqty - qty));
-                    //    }
-                    //    CheckedRowCount--;
-                    //    continue;
-                    //}
                     string pib_barcode = dh.getFieldDataByCondition("prodiobarcode", "max(pib_barcode)", "PIB_INOUTNO='" + pi_inoutno.Text + "'").ToString();
                     //中盒数量*中盒容量=需要打印的单盘标签
                     ArrayList<string> midcode = new ArrayList<string>();
                     ArrayList<string> barcode = new ArrayList<string>();
+                    ArrayList<string> custbarcode = new ArrayList<string>();
                     //循环中盒号的个数,取当前出入库单最大 的中盒号+1
                     for (int j = 0; j < mid_num; j++)
                     {
@@ -168,22 +245,26 @@ namespace UAS_LabelMachine
                         {
                             //将箱号添加进List
                             barcode.Add(BarcodeMethod1(pd_id, pr_id, pib_barcode));
+                            custbarcode.Add(BarcodeMethod1(NrDic, SerialNumIndex, SerialNumLength));
                             midcode.Add(mid_code);
                             pib_inqty.Add(pr_zxbzs.ToString());
                         }
                     }
+                    //插入条码
                     sql.Clear();
-                    sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_BARCODE,PIB_PDNO,");
+                    sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_BARCODE,PIB_CUSTBARCODE,PIB_PDNO,");
                     sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO,pib_orderdetno)");
-                    sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",:barcode,'" + pd_pdno + "','" + pd_id + "',");
+                    sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",:barcode,:custbarcode,'" + pd_pdno + "','" + pd_id + "',");
                     sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','','" + pd_orderdetno + "')");
-                    dh.BatchInsert(sql.ToString(), new string[] { "barcode", "pib_inqty", "midcode" }, barcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
+                    dh.BatchInsert(sql.ToString(), new string[] { "barcode", "custbarcode", "pib_inqty", "midcode" }, barcode.ToArray(), custbarcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
+                    //更新最大流水号
+                    dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
                 }
             }
             if (CheckedRowCount > 0)
             {
                 LoadData();
-                MessageBox.Show("生成箱号成功!");
+                MessageBox.Show("生成条码成功!");
             }
             else
             {
@@ -199,7 +280,7 @@ namespace UAS_LabelMachine
                 MessageBox.Show(str);
         }
 
-        //新的生成箱号的方法
+        //生成唯一条码
         public string BarcodeMethod1(string pd_id, string pr_id, string pib_barcode)
         {
             if (pib_barcode != "")
@@ -227,48 +308,34 @@ namespace UAS_LabelMachine
             return pd_id + "-" + pr_id + "-" + serialcode;
         }
 
-        //生成箱号的方法
-        public string BarcodeMethod(string pr_code, string ve_id, string pr_id)
+        //生成客户条码
+        public string BarcodeMethod1(Dictionary<int, string> Dic, int Index, int Length)
         {
-            StringBuilder code = new StringBuilder();
-            DataTable dt1 = new DataTable();
-            string date = "0";
-            string[] field = { "bs_lenprid", "bs_datestr", "bs_lennum", "bs_maxnum", "bs_maxdate", "bs_lenveid" };
-            dt1 = dh.getFieldsDataByCondition("barcodeSet", field, "bs_type='BATCH'");
-            code.Append(lpad(int.Parse(dt1.Rows[0]["bs_lenprid"].ToString()), pr_id));
-            code.Append(lpad(int.Parse(dt1.Rows[0]["bs_lenveid"].ToString()), ve_id));
-            switch (dt1.Rows[0]["bs_datestr"].ToString())
-            {
-                case "YYMMDD":
-                    SimpleDateFormat YMD = new SimpleDateFormat("yyMMdd");
-                    date = YMD.Format(new DateTime());
-                    break;
-                case "YYMM":
-                    SimpleDateFormat YM = new SimpleDateFormat("yyMM");
-                    date = YM.Format(new DateTime());
-                    break;
-                case "MMDD":
-                    SimpleDateFormat MD = new SimpleDateFormat("MMdd");
-                    date = MD.Format(new DateTime());
-                    break;
-                default:
-                    break;
-            }
-            code.Append(date);
-            dh.UpdateByCondition("barcodeSet", "bs_maxdate='" + date + "'", "bs_type='BATCH'");
-            if (!("").Equals(dt1.Rows[0]["bs_maxdate"]) && null != dt1.Rows[0]["bs_maxdate"] && (!date.Equals("0")) && (int.Parse(dt1.Rows[0]["bs_maxdate"].ToString()) > int.Parse(date)))
-            {
-                code.Append(lpad(int.Parse(dt1.Rows[0]["bs_lennum"].ToString()), "1"));// 流水重新开始
-                dh.UpdateByCondition("barcodeSet", "bs_maxnum=2", "bs_type='BATCH'");
-            }
-            else
+            string str = "";
+            for (int i = 0; i < Dic.Count; i++)
             {
-                code.Append(lpad(int.Parse(dt1.Rows[0]["bs_lennum"].ToString()), dt1.Rows[0]["bs_maxnum"].ToString()));// 当前流水号
-                dh.UpdateByCondition("barcodeSet", "bs_maxnum=bs_maxnum+1", "bs_type='BATCH'");// 流水号增加1
+                //如果不是流水则正常添加
+                if (i != Index)
+                {
+                    str += Dic[i];
+                }
+                else
+                {
+                    //如果是流水则需要在前面加0
+                    string serialcode = custserialnum.ToString();
+                    for (int j = serialcode.ToString().Length; j < Length; j++)
+                    {
+                        serialcode = "0" + serialcode;
+                    }
+                    str += serialcode;
+                }
             }
-            return code.ToString();
+            custserialnum = custserialnum + 1;
+            return str;
         }
 
+      
+
         private static string lpad(int length, string number)
         {
             while (number.Length < length)
@@ -374,6 +441,94 @@ namespace UAS_LabelMachine
 
         private void LoadData()
         {
+            //获取客户编号
+            CustCode = dh.getFieldDataByCondition("ProdInOut", "pi_cardcode", "pi_inoutno='" + pi_inoutno.Text + "'").ToString();
+            //获取编码规则编号
+            NrCode = dh.getFieldDataByCondition("NoRule", "nr_code", "nr_custcode='" + CustCode + "'").ToString();
+            //获取编码规则
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + CustCode + "' order by nrd_detno", "select");
+            //用于过滤参数的正则表达式
+            Regex match = new Regex("{\\w+}");
+            //用于存放每一项的明细的数据
+            string[] NrData = new string[Nr.Rows.Count];
+            //流水号的索引
+            int SerialNumIndex = 0;
+            //流水长度
+            int SerialNumLength = 0;
+            //存放键值对
+            Dictionary<int, string> NrDic = new Dictionary<int, string>();
+            for (int m = 0; m < Nr.Rows.Count; m++)
+            {
+                switch (Nr.Rows[m]["nrd_type"].ToString())
+                {
+                    //常量直接进行拼接
+                    case "常量":
+                        NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                        NrDic.Add(m, NrData[m]);
+                        break;
+                    case "SQL":
+                        string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                        DataTable Temp;
+                        //如果不包含参数替换
+                        if (SQL.IndexOf("{") == 0)
+                        {
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        else
+                        {
+                            //替换参数后重新执行SQL
+                            foreach (Match mch in match.Matches(SQL))
+                            {
+                                SQL = SQL.Replace(mch.Value.Trim(), "'" + pi_inoutno.Text + "'");
+                            }
+                            Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                        }
+                        if (Temp.Rows.Count > 0)
+                        {
+                            NrData[m] = Temp.Rows[0][0].ToString();
+                            NrDic.Add(m, NrData[m]);
+                        }
+                        break;
+                    //流水需要通过MaxNumber去取
+                    case "流水":
+                        NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + CustCode + "'").ToString();
+                        NrDic.Add(m, NrData[m]);
+                        //设置当前流水
+                        custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                        SerialNumIndex = m;
+                        SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                        break;
+                    default:
+                        break;
+                }
+            }
+            //流水前的前缀,查询RuleMaxNum表看是否有对应的MaxNumber记录,如果有则取MaxNumber,没有的话则进行插入
+            Prefix = "";
+            for (int i = 0; i < NrDic.Count; i++)
+            {
+                //如果不是流水则正常添加
+                if (i != SerialNumIndex)
+                {
+                    Prefix += NrDic[i];
+                }
+                else
+                {
+                    //获取最大的流水号
+                    string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'").ToString();
+                    //如果流水号为空则插入一条新记录,从1开始取
+                    if (maxnum == "")
+                    {
+                        dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + NrCode + "','" + Prefix + "','1')", "insert");
+                        custserialnum = 1;
+                    }
+                    //如果流水号不为空则取当前流水
+                    else
+                    {
+                        custserialnum = int.Parse(maxnum);
+                    }
+                    break;
+                }
+            }
             dt = (DataTable)dh.ExecuteSql("select pi_class,pi_id from prodinout where pi_inoutno='" + pi_inoutno.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
@@ -405,5 +560,25 @@ namespace UAS_LabelMachine
                 pi_inoutno.Text = "";
             }
         }
+
+        private void ResetSerialNum_Click(object sender, EventArgs e)
+        {
+            dt = (DataTable)dh.ExecuteSql("select pi_class,pi_id from prodinout where pi_inoutno='" + pi_inoutno.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (NrCode != "")
+                {
+                    dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber=1", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
+                    MessageBox.Show("流水重置成功");
+                }
+                else
+                    MessageBox.Show("请先获取单据信息");
+            }
+            else
+            {
+                MessageBox.Show("当前单据不存在");
+                pi_inoutno.Text = "";
+            }
+        }
     }
 }

+ 63 - 0
UAS-出货标签管理/生成条码.resx

@@ -205,4 +205,67 @@
   <metadata name="mid_remain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_orderdetno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_pdno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_ordercode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_brand.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_totalqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_zxbzs.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mid_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mid_num.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mid_remain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="ResetSerialNum.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhUgAXAIQAAK/G1qjB1dzn6bTK2MfZ46rE1arD1/D4+/n//d/o7/X6/ez1/K7D1tLj6+Pt9ubx
+        877S3fT09DxZeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
+        Mi4wAwEBAAAh+QQAAAAAACwAAAAAUgAXAAAI/wAlCBxIsKDBgwgTKlzIsGCEhxAjSpxIsaLFixgzPhQY
+        AYHHjyBDihxJsqTJkygjcFTAsqXLlzBjypxJs6ZNlRIiHNjJs6fPn0CDCh1KtCjOCAuSKl3KtKnTp1Cj
+        Sp169IHVq1izat3KtavXr2Crgh1LtqzZrUcdqF3Ltq3bt3Djyp1L92iCu3jz6t3Lt6/fv4ADHxVAuLDh
+        w4gTK17MuLHjow0iS55MubLly5gza958lIHnz6BDix5NurTp06iPGljNurXr17Bjy55Nu/bRALhz697N
+        u7fv38CDCz9aoLjx48iTK1/OvLnz50cBSJ9Ovbr169iza9/O/eiA7+DDi0EfT768+fPo0x+FwL69+/fw
+        48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
+</value>
+  </data>
 </root>