Browse Source

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

Hcsy 7 years ago
parent
commit
b379ebcb94

+ 123 - 6
PLCDataReader/Main.Designer.cs

@@ -45,6 +45,7 @@ namespace UAS_PLCDataReader
             this.ButtonWorkCenterStatus = new DevExpress.XtraBars.BarButtonItem();
             this.ButtonDeviceRunLog = new DevExpress.XtraBars.BarButtonItem();
             this.ButtonClientParam = new DevExpress.XtraBars.BarButtonItem();
+            this.ButtonDeviceData = new DevExpress.XtraBars.BarButtonItem();
             this.DeviceInf = new DevExpress.XtraBars.Ribbon.RibbonPage();
             this.RibDeviceInf = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
             this.DeviceCommandSetting = new DevExpress.XtraBars.Ribbon.RibbonPage();
@@ -203,6 +204,14 @@ namespace UAS_PLCDataReader
             this.ButtonSaveClientParam = new DevExpress.XtraEditors.SimpleButton();
             this.UpdateTimeSpan = new System.Windows.Forms.NumericUpDown();
             this.label1 = new System.Windows.Forms.Label();
+            this.PageDeviceData = new DevExpress.XtraTab.XtraTabPage();
+            this.GridDeviceData = new UAS_PLCDataReader.CustomerControl.AutoDataGridControl.AutoDataGridControl();
+            this.GridViewDeviceData = new UAS_PLCDataReader.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
+            this.dr_decode = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dr_dename = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dr_runstatus = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dr_qty = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dr_inqty = new DevExpress.XtraGrid.Columns.GridColumn();
             this.TimerDeviceStatus = new System.Windows.Forms.Timer(this.components);
             this.CommonTipController = new DevExpress.Utils.ToolTipController(this.components);
             this.TimerUpdateDevice = new System.Windows.Forms.Timer(this.components);
@@ -258,6 +267,9 @@ namespace UAS_PLCDataReader
             ((System.ComponentModel.ISupportInitialize)(this.GirdViewDeviceRunLog)).BeginInit();
             this.PageClientParam.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.UpdateTimeSpan)).BeginInit();
+            this.PageDeviceData.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.GridDeviceData)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceData)).BeginInit();
             this.SuspendLayout();
             // 
             // RibbonNav
@@ -275,14 +287,15 @@ namespace UAS_PLCDataReader
             this.ButtonDeviceStatus,
             this.ButtonWorkCenterStatus,
             this.ButtonDeviceRunLog,
-            this.ButtonClientParam});
+            this.ButtonClientParam,
+            this.ButtonDeviceData});
             this.RibbonNav.Location = new System.Drawing.Point(0, 0);
-            this.RibbonNav.MaxItemId = 17;
+            this.RibbonNav.MaxItemId = 18;
             this.RibbonNav.Name = "RibbonNav";
             this.RibbonNav.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
             this.DeviceInf,
             this.DeviceCommandSetting});
-            this.RibbonNav.Size = new System.Drawing.Size(1040, 128);
+            this.RibbonNav.Size = new System.Drawing.Size(1040, 126);
             // 
             // ButtonDeviceList
             // 
@@ -373,6 +386,16 @@ namespace UAS_PLCDataReader
             this.ButtonClientParam.Tag = "PageClientParam";
             this.ButtonClientParam.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ButtonItem_ItemClick);
             // 
+            // ButtonDeviceData
+            // 
+            this.ButtonDeviceData.Caption = "设备运行数据查看";
+            this.ButtonDeviceData.Glyph = ((System.Drawing.Image)(resources.GetObject("ButtonDeviceData.Glyph")));
+            this.ButtonDeviceData.Id = 17;
+            this.ButtonDeviceData.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("ButtonDeviceData.LargeGlyph")));
+            this.ButtonDeviceData.Name = "ButtonDeviceData";
+            this.ButtonDeviceData.Tag = "PageDeviceData";
+            this.ButtonDeviceData.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ButtonItem_ItemClick);
+            // 
             // DeviceInf
             // 
             this.DeviceInf.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
@@ -401,6 +424,7 @@ namespace UAS_PLCDataReader
             // RibDeviceCommand
             // 
             this.RibDeviceCommand.ItemLinks.Add(this.ButtonDeviceStatus);
+            this.RibDeviceCommand.ItemLinks.Add(this.ButtonDeviceData);
             this.RibDeviceCommand.ItemLinks.Add(this.ButtonDeviceRunLog);
             this.RibDeviceCommand.Name = "RibDeviceCommand";
             this.RibDeviceCommand.Text = "ribbonPageGroup3";
@@ -408,11 +432,11 @@ namespace UAS_PLCDataReader
             // MainTabControl
             // 
             this.MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.MainTabControl.Location = new System.Drawing.Point(0, 128);
+            this.MainTabControl.Location = new System.Drawing.Point(0, 126);
             this.MainTabControl.Name = "MainTabControl";
             this.MainTabControl.SelectedTabPage = this.PageDeviceList;
             this.MainTabControl.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;
-            this.MainTabControl.Size = new System.Drawing.Size(1040, 584);
+            this.MainTabControl.Size = new System.Drawing.Size(1040, 586);
             this.MainTabControl.TabIndex = 3;
             this.MainTabControl.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
             this.PageDeviceList,
@@ -423,7 +447,8 @@ namespace UAS_PLCDataReader
             this.PageDeviceStatus,
             this.PageWorkCenterStatus,
             this.PageDeviceRunLog,
-            this.PageClientParam});
+            this.PageClientParam,
+            this.PageDeviceData});
             // 
             // PageDeviceList
             // 
@@ -2018,6 +2043,86 @@ namespace UAS_PLCDataReader
             this.label1.TabIndex = 0;
             this.label1.Text = "数据上传时间";
             // 
+            // PageDeviceData
+            // 
+            this.PageDeviceData.Controls.Add(this.GridDeviceData);
+            this.PageDeviceData.Name = "PageDeviceData";
+            this.PageDeviceData.PageVisible = false;
+            this.PageDeviceData.Size = new System.Drawing.Size(1034, 580);
+            // 
+            // GridDeviceData
+            // 
+            this.GridDeviceData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.GridDeviceData.Condition = null;
+            this.GridDeviceData.GetDataSQL = null;
+            this.GridDeviceData.ID = null;
+            this.GridDeviceData.InsertSQL = null;
+            this.GridDeviceData.Location = new System.Drawing.Point(0, 0);
+            this.GridDeviceData.MainView = this.GridViewDeviceData;
+            this.GridDeviceData.MenuManager = this.RibbonNav;
+            this.GridDeviceData.Name = "GridDeviceData";
+            this.GridDeviceData.RowCount = 0;
+            this.GridDeviceData.Size = new System.Drawing.Size(1034, 580);
+            this.GridDeviceData.TabIndex = 0;
+            this.GridDeviceData.TableName = null;
+            this.GridDeviceData.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.GridViewDeviceData});
+            // 
+            // GridViewDeviceData
+            // 
+            this.GridViewDeviceData.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+            this.dr_decode,
+            this.dr_dename,
+            this.dr_runstatus,
+            this.dr_qty,
+            this.dr_inqty});
+            this.GridViewDeviceData.GridControl = this.GridDeviceData;
+            this.GridViewDeviceData.IndicatorWidth = 30;
+            this.GridViewDeviceData.Name = "GridViewDeviceData";
+            this.GridViewDeviceData.OptionsView.ShowGroupPanel = false;
+            // 
+            // dr_decode
+            // 
+            this.dr_decode.Caption = "设备编号";
+            this.dr_decode.FieldName = "DR_DECODE";
+            this.dr_decode.Name = "dr_decode";
+            this.dr_decode.Visible = true;
+            this.dr_decode.VisibleIndex = 0;
+            // 
+            // dr_dename
+            // 
+            this.dr_dename.Caption = "设备名称";
+            this.dr_dename.FieldName = "DR_DENAME";
+            this.dr_dename.Name = "dr_dename";
+            this.dr_dename.Visible = true;
+            this.dr_dename.VisibleIndex = 1;
+            // 
+            // dr_runstatus
+            // 
+            this.dr_runstatus.Caption = "运行状态";
+            this.dr_runstatus.FieldName = "DR_RUNSTATUS";
+            this.dr_runstatus.Name = "dr_runstatus";
+            this.dr_runstatus.Visible = true;
+            this.dr_runstatus.VisibleIndex = 2;
+            // 
+            // dr_qty
+            // 
+            this.dr_qty.Caption = "投入";
+            this.dr_qty.FieldName = "DR_QTY";
+            this.dr_qty.Name = "dr_qty";
+            this.dr_qty.Visible = true;
+            this.dr_qty.VisibleIndex = 3;
+            // 
+            // dr_inqty
+            // 
+            this.dr_inqty.Caption = "产出";
+            this.dr_inqty.FieldName = "DR_OKQTY";
+            this.dr_inqty.Name = "dr_inqty";
+            this.dr_inqty.Visible = true;
+            this.dr_inqty.VisibleIndex = 4;
+            // 
             // TimerDeviceStatus
             // 
             this.TimerDeviceStatus.Interval = 10000;
@@ -2110,6 +2215,9 @@ namespace UAS_PLCDataReader
             this.PageClientParam.ResumeLayout(false);
             this.PageClientParam.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.UpdateTimeSpan)).EndInit();
+            this.PageDeviceData.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.GridDeviceData)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceData)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -2289,5 +2397,14 @@ namespace UAS_PLCDataReader
         private DevExpress.XtraGrid.Columns.GridColumn de_currentcentername;
         private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
         private DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit DeviceItemSearchLookUpEdit;
+        private DevExpress.XtraBars.BarButtonItem ButtonDeviceData;
+        private DevExpress.XtraTab.XtraTabPage PageDeviceData;
+        private UAS_PLCDataReader.CustomerControl.AutoDataGridControl.AutoDataGridControl GridDeviceData;
+        private UAS_PLCDataReader.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum GridViewDeviceData;
+        private DevExpress.XtraGrid.Columns.GridColumn dr_decode;
+        private DevExpress.XtraGrid.Columns.GridColumn dr_dename;
+        private DevExpress.XtraGrid.Columns.GridColumn dr_runstatus;
+        private DevExpress.XtraGrid.Columns.GridColumn dr_qty;
+        private DevExpress.XtraGrid.Columns.GridColumn dr_inqty;
     }
 }

+ 2 - 0
PLCDataReader/Main.cs

@@ -170,6 +170,8 @@ namespace UAS_PLCDataReader
             ButtonAddNetConfig.Grid = GridDeviceNetSetting;
             ButtonSaveNetConfig.Grid = GridDeviceNetSetting;
 
+            GridDeviceData.GetDataSQL = "select dr_decode,dr_dename,case when dr_runstatus='disconnected' then '无法连接' when dr_runstatus='stopped' then '未运行' when dr_runstatus='running' then '运行中' when dr_runstatus='noanswer' then '无应答' end dr_runstatus,dr_qty,dr_okqty from devicerunstatus";
+
             GridDeviceRunLog.GetDataSQL = "SELECT * FROM DEVICERUNRECORD";
             GridDeviceRunLog.ID = "drr_id";
             GridDeviceRunLog.TableName = "DEVICERUNRECORD";

+ 52 - 0
PLCDataReader/Main.resx

@@ -532,6 +532,58 @@
         I9M4Aw4+Oa+92wX02/DWMzArKr2ACH4RSS8jCR5UvBsM/dZjAr1AR72Oqo27UWDHJRdlha1HFmzJSiKD
         LsiANV1k7Z4O62uEWzqs3NJwmXElFKm45JoKS6rMRZf7ElfvwcKZSYEF9ReoCpxScJ5xVApOWcVUUbZ4
         G/J/zfnTiP9N8qpk2OxN+O0b8DuC/w6Fb9v+H0+umAM8Wne/AAAAAElFTkSuQmCC
+</value>
+  </data>
+  <data name="ButtonDeviceData.Glyph" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAZdEVYdFRpdGxlAFVubWVyZ2VDZWxscztNZXJnZTuJ
+        vne9AAACWElEQVQ4T6XTa0vTUQAG8ANZFFTfYyUmi66fo1TKWXl7oc6FWc3StG2mabqtiEqTYkXOuzNx
+        MyK31JSEosTLG9PXme6u2wyennM2qSAiaPDjOfdz/pwzwd8OSqOd/2hXiiynCYvN7a23v8I2i03mKPMn
+        s+KB2cq0umFq9ZAbtc0vfaKendHYFiUQYUY2tjD+fhlRZmQzhWXf9BIzgSjrsk9m3Z0RCJPVw0EJ+MMx
+        rIdiCEbiGPUuIsTB4WgCoRSPd0G1bdc3Yt/R0TkFcZNHGXu3BEfPDBy9M2pg8X0tiu8dRtFdLWWikFlo
+        16LAnol82yHlvFXKgKhtGUGYK6+F4kowkuCETEysGH9z6clJTCwbMS6tXFWZ18IFbjQNq6Ou8fhrQfkJ
+        CbWDHORaLIBrIR9DdLHjhCoPkmvhAt4uX0FuExeobhzmsRf5PdPK8Os55LVmcMJxxfA4qbxdOgY9U9/G
+        pDON6RBVDUMIRuP4FohhNXUCXXMGfNxhYP4c+ud16JvToaztKHqZUt9cLnxfKpHTcBDCWO9CgJNW5QKB
+        TQTCcZy9na4GbPNSyYMjKn912qKBuGwewKBnFo+eTeKhYxKu0Vm1snLrALIpx8KkLE7INmtwyqRBFskU
+        laZ+tetX/6Yi38KA+zP8vBGFfVK/+5N6K+q9sC7fgr39DURFXS8nxVXjejDJOfQxVU4+Lnk7LwY/MJNX
+        LVP2l11zQpQan48ZanpgqOmGobob5aSXrnelODmwK6nKiVJOKq3qRInRiaKKp17+ocRu2kv7/mL/H8j2
+        PQLAf4D4AeNopdzgNcC/AAAAAElFTkSuQmCC
+</value>
+  </data>
+  <data name="ButtonDeviceData.LargeGlyph" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
 </value>
   </data>
   <metadata name="TimerDeviceStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

+ 2 - 2
UAS-出货标签管理(吉利通)/PublicMethod/LogicHandler.cs

@@ -40,9 +40,9 @@ namespace UAS_LabelMachine.PublicMethod
         /// 检测数据库未上传的数据,根据设置的上传条数上传数据
         /// </summary>
         /// <param name="iInoutno"></param>
-        public static void CheckUoloadData(string iInoutno, int iUploadNum)
+        public static void CheckUploadData(string iInoutno, int iUploadNum)
         {
-            DataTable dt = (DataTable)adh.ExecuteSql("select pib_id,pib_lotno,pib_ifmodify,pib_datecode,pib_ifpick,-1 as pib_ifupload,pib_ifprint,pib_ifrecheck from prodiobarcode where pib_inoutno='" + iInoutno + "' and pib_ifmodify=-1 and pib_ifupload<>-1", "select");
+            DataTable dt = (DataTable)adh.ExecuteSql("select pib_id,pib_lotno,pib_ifmodify,pib_datecode,pib_ifpick,-1 as pib_ifupload,pib_ifprint,pib_ifrecheck from prodiobarcode where pib_inoutno='" + iInoutno + "'  and pib_ifupload<>-1", "select");
             //如果本地需要上传的数据已经达到了需要上传的条数
             if (iUploadNum <= dt.Rows.Count)
             {

+ 104 - 72
UAS-出货标签管理(吉利通)/UAS_出货标签管理.Designer.cs

@@ -85,12 +85,14 @@
             this.PLCStop = new System.Windows.Forms.Button();
             this.PLCStart = new System.Windows.Forms.Button();
             this.cu_print_regexpression = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.front_sg_separator = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.FrontCollect = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.CollectionProcess = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.DetailRange2 = new System.Windows.Forms.NumericUpDown();
             this.DetailRange1 = new System.Windows.Forms.NumericUpDown();
-            this.label26 = new System.Windows.Forms.Label();
-            this.label17 = new System.Windows.Forms.Label();
+            this.outboxProcess = new System.Windows.Forms.Label();
+            this.midboxProcess = new System.Windows.Forms.Label();
             this.label25 = new System.Windows.Forms.Label();
             this.label24 = new System.Windows.Forms.Label();
             this.button8 = new System.Windows.Forms.Button();
@@ -109,8 +111,8 @@
             this.radioButton5 = new System.Windows.Forms.RadioButton();
             this.radioButton6 = new System.Windows.Forms.RadioButton();
             this.label22 = new System.Windows.Forms.Label();
-            this.radioButton4 = new System.Windows.Forms.RadioButton();
-            this.radioButton3 = new System.Windows.Forms.RadioButton();
+            this.RecheckBarcode = new System.Windows.Forms.RadioButton();
+            this.RecheckCuprodcode = new System.Windows.Forms.RadioButton();
             this.DetailRange = new System.Windows.Forms.CheckBox();
             this.label21 = new System.Windows.Forms.Label();
             this.radioButton1 = new System.Windows.Forms.RadioButton();
@@ -121,7 +123,7 @@
             this.label14 = new System.Windows.Forms.Label();
             this.label11 = new System.Windows.Forms.Label();
             this.Process = new System.Windows.Forms.Label();
-            this.sg_separator = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.back_sg_separator = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.BackCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
@@ -594,13 +596,14 @@
             // 
             this.GetGridOnly.AutoSize = true;
             this.GetGridOnly.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetGridOnly.Location = new System.Drawing.Point(237, 38);
+            this.GetGridOnly.Location = new System.Drawing.Point(76, 38);
             this.GetGridOnly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.GetGridOnly.Name = "GetGridOnly";
             this.GetGridOnly.Size = new System.Drawing.Size(77, 20);
             this.GetGridOnly.TabIndex = 82;
             this.GetGridOnly.Text = "仅获取表格";
             this.GetGridOnly.UseVisualStyleBackColor = true;
+            this.GetGridOnly.Visible = false;
             // 
             // RefreshDBConnect
             // 
@@ -662,11 +665,11 @@
             // 
             this.sg_separator_label.AutoSize = true;
             this.sg_separator_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_separator_label.Location = new System.Drawing.Point(233, 66);
+            this.sg_separator_label.Location = new System.Drawing.Point(205, 65);
             this.sg_separator_label.Name = "sg_separator_label";
-            this.sg_separator_label.Size = new System.Drawing.Size(51, 20);
+            this.sg_separator_label.Size = new System.Drawing.Size(79, 20);
             this.sg_separator_label.TabIndex = 61;
-            this.sg_separator_label.Text = "分隔符";
+            this.sg_separator_label.Text = "后端分隔符";
             // 
             // 后端复核
             // 
@@ -698,6 +701,7 @@
             this.PLCStop.TabIndex = 92;
             this.PLCStop.Text = "暂停";
             this.PLCStop.UseVisualStyleBackColor = true;
+            this.PLCStop.Click += new System.EventHandler(this.PLCStop_Click);
             // 
             // PLCStart
             // 
@@ -709,6 +713,7 @@
             this.PLCStart.TabIndex = 93;
             this.PLCStart.Text = "启动";
             this.PLCStart.UseVisualStyleBackColor = true;
+            this.PLCStart.Click += new System.EventHandler(this.PLCStart_Click);
             // 
             // cu_print_regexpression
             // 
@@ -720,6 +725,29 @@
             this.cu_print_regexpression.TabIndex = 94;
             this.cu_print_regexpression.Text = "分隔符";
             // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label13.Location = new System.Drawing.Point(205, 38);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(79, 20);
+            this.label13.TabIndex = 95;
+            this.label13.Text = "前端分隔符";
+            // 
+            // front_sg_separator
+            // 
+            this.front_sg_separator.Enabled = false;
+            this.front_sg_separator.ID = null;
+            this.front_sg_separator.Location = new System.Drawing.Point(290, 38);
+            this.front_sg_separator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.front_sg_separator.Name = "front_sg_separator";
+            this.front_sg_separator.Size = new System.Drawing.Size(28, 21);
+            this.front_sg_separator.Str = null;
+            this.front_sg_separator.Str1 = null;
+            this.front_sg_separator.Str2 = null;
+            this.front_sg_separator.TabIndex = 96;
+            // 
             // FrontCollect
             // 
             this.FrontCollect.Enabled = false;
@@ -737,8 +765,8 @@
             // 
             this.CollectionProcess.Controls.Add(this.DetailRange2);
             this.CollectionProcess.Controls.Add(this.DetailRange1);
-            this.CollectionProcess.Controls.Add(this.label26);
-            this.CollectionProcess.Controls.Add(this.label17);
+            this.CollectionProcess.Controls.Add(this.outboxProcess);
+            this.CollectionProcess.Controls.Add(this.midboxProcess);
             this.CollectionProcess.Controls.Add(this.label25);
             this.CollectionProcess.Controls.Add(this.label24);
             this.CollectionProcess.Controls.Add(this.button8);
@@ -757,8 +785,8 @@
             this.CollectionProcess.Controls.Add(this.radioButton5);
             this.CollectionProcess.Controls.Add(this.radioButton6);
             this.CollectionProcess.Controls.Add(this.label22);
-            this.CollectionProcess.Controls.Add(this.radioButton4);
-            this.CollectionProcess.Controls.Add(this.radioButton3);
+            this.CollectionProcess.Controls.Add(this.RecheckBarcode);
+            this.CollectionProcess.Controls.Add(this.RecheckCuprodcode);
             this.CollectionProcess.Controls.Add(this.DetailRange);
             this.CollectionProcess.Controls.Add(this.label21);
             this.CollectionProcess.Controls.Add(this.radioButton1);
@@ -797,27 +825,27 @@
             this.DetailRange1.Size = new System.Drawing.Size(47, 23);
             this.DetailRange1.TabIndex = 100;
             // 
-            // label26
+            // outboxProcess
             // 
-            this.label26.AutoSize = true;
-            this.label26.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label26.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
-            this.label26.Location = new System.Drawing.Point(238, 86);
-            this.label26.Name = "label26";
-            this.label26.Size = new System.Drawing.Size(35, 21);
-            this.label26.TabIndex = 114;
-            this.label26.Text = "0/0";
+            this.outboxProcess.AutoSize = true;
+            this.outboxProcess.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.outboxProcess.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
+            this.outboxProcess.Location = new System.Drawing.Point(238, 86);
+            this.outboxProcess.Name = "outboxProcess";
+            this.outboxProcess.Size = new System.Drawing.Size(35, 21);
+            this.outboxProcess.TabIndex = 114;
+            this.outboxProcess.Text = "0/0";
             // 
-            // label17
+            // midboxProcess
             // 
-            this.label17.AutoSize = true;
-            this.label17.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
-            this.label17.Location = new System.Drawing.Point(238, 38);
-            this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(35, 21);
-            this.label17.TabIndex = 113;
-            this.label17.Text = "0/0";
+            this.midboxProcess.AutoSize = true;
+            this.midboxProcess.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.midboxProcess.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
+            this.midboxProcess.Location = new System.Drawing.Point(238, 38);
+            this.midboxProcess.Name = "midboxProcess";
+            this.midboxProcess.Size = new System.Drawing.Size(35, 21);
+            this.midboxProcess.TabIndex = 113;
+            this.midboxProcess.Text = "0/0";
             // 
             // label25
             // 
@@ -1021,29 +1049,29 @@
             this.label22.TabIndex = 95;
             this.label22.Text = "复核数据";
             // 
-            // radioButton4
-            // 
-            this.radioButton4.AutoSize = true;
-            this.radioButton4.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.radioButton4.Location = new System.Drawing.Point(182, 237);
-            this.radioButton4.Name = "radioButton4";
-            this.radioButton4.Size = new System.Drawing.Size(95, 21);
-            this.radioButton4.TabIndex = 94;
-            this.radioButton4.TabStop = true;
-            this.radioButton4.Text = "唯一码+型号";
-            this.radioButton4.UseVisualStyleBackColor = true;
-            // 
-            // radioButton3
-            // 
-            this.radioButton3.AutoSize = true;
-            this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.radioButton3.Location = new System.Drawing.Point(70, 237);
-            this.radioButton3.Name = "radioButton3";
-            this.radioButton3.Size = new System.Drawing.Size(107, 21);
-            this.radioButton3.TabIndex = 93;
-            this.radioButton3.TabStop = true;
-            this.radioButton3.Text = "客户料号+型号";
-            this.radioButton3.UseVisualStyleBackColor = true;
+            // RecheckBarcode
+            // 
+            this.RecheckBarcode.AutoSize = true;
+            this.RecheckBarcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.RecheckBarcode.Location = new System.Drawing.Point(182, 237);
+            this.RecheckBarcode.Name = "RecheckBarcode";
+            this.RecheckBarcode.Size = new System.Drawing.Size(95, 21);
+            this.RecheckBarcode.TabIndex = 94;
+            this.RecheckBarcode.TabStop = true;
+            this.RecheckBarcode.Text = "唯一码+型号";
+            this.RecheckBarcode.UseVisualStyleBackColor = true;
+            // 
+            // RecheckCuprodcode
+            // 
+            this.RecheckCuprodcode.AutoSize = true;
+            this.RecheckCuprodcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.RecheckCuprodcode.Location = new System.Drawing.Point(70, 237);
+            this.RecheckCuprodcode.Name = "RecheckCuprodcode";
+            this.RecheckCuprodcode.Size = new System.Drawing.Size(107, 21);
+            this.RecheckCuprodcode.TabIndex = 93;
+            this.RecheckCuprodcode.TabStop = true;
+            this.RecheckCuprodcode.Text = "客户料号+型号";
+            this.RecheckCuprodcode.UseVisualStyleBackColor = true;
             // 
             // DetailRange
             // 
@@ -1155,18 +1183,18 @@
             this.Process.TabIndex = 65;
             this.Process.Text = "总进度";
             // 
-            // sg_separator
+            // back_sg_separator
             // 
-            this.sg_separator.Enabled = false;
-            this.sg_separator.ID = null;
-            this.sg_separator.Location = new System.Drawing.Point(290, 66);
-            this.sg_separator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.sg_separator.Name = "sg_separator";
-            this.sg_separator.Size = new System.Drawing.Size(28, 21);
-            this.sg_separator.Str = null;
-            this.sg_separator.Str1 = null;
-            this.sg_separator.Str2 = null;
-            this.sg_separator.TabIndex = 62;
+            this.back_sg_separator.Enabled = false;
+            this.back_sg_separator.ID = null;
+            this.back_sg_separator.Location = new System.Drawing.Point(290, 66);
+            this.back_sg_separator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.back_sg_separator.Name = "back_sg_separator";
+            this.back_sg_separator.Size = new System.Drawing.Size(28, 21);
+            this.back_sg_separator.Str = null;
+            this.back_sg_separator.Str1 = null;
+            this.back_sg_separator.Str2 = null;
+            this.back_sg_separator.TabIndex = 62;
             // 
             // BackCheck
             // 
@@ -2127,7 +2155,7 @@
             // 
             this.OutBoxLabelAutoPrint.AutoSize = true;
             this.OutBoxLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(8, 90);
+            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(9, 91);
             this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelAutoPrint.Name = "OutBoxLabelAutoPrint";
             this.OutBoxLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -2161,6 +2189,8 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1389, 729);
+            this.Controls.Add(this.front_sg_separator);
+            this.Controls.Add(this.label13);
             this.Controls.Add(this.cu_print_regexpression);
             this.Controls.Add(this.PLCStart);
             this.Controls.Add(this.PLCStop);
@@ -2177,7 +2207,7 @@
             this.Controls.Add(this.pi_cardcode_label);
             this.Controls.Add(this.pi_cardcode);
             this.Controls.Add(this.CollectionProcess);
-            this.Controls.Add(this.sg_separator);
+            this.Controls.Add(this.back_sg_separator);
             this.Controls.Add(this.sg_separator_label);
             this.Controls.Add(this.后端复核);
             this.Controls.Add(this.BackCheck);
@@ -2292,7 +2322,7 @@
         private CustomControl.DataGridViewWithSerialNum LabelInf;
         private CustomControl.RichText.RichTextAutoBottom MessageLog;
         private CustomControl.EnterTextBox BackCheck;
-        private CustomControl.EnterTextBox sg_separator;
+        private CustomControl.EnterTextBox back_sg_separator;
         private CustomControl.EnterTextBox FrontCollect;
         private System.Windows.Forms.Button ExportData;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn28;
@@ -2356,8 +2386,8 @@
         private System.Windows.Forms.RadioButton radioButton1;
         private System.Windows.Forms.Label label21;
         private System.Windows.Forms.CheckBox DetailRange;
-        private System.Windows.Forms.RadioButton radioButton3;
-        private System.Windows.Forms.RadioButton radioButton4;
+        private System.Windows.Forms.RadioButton RecheckCuprodcode;
+        private System.Windows.Forms.RadioButton RecheckBarcode;
         private System.Windows.Forms.Label label22;
         private System.Windows.Forms.RadioButton radioButton6;
         private System.Windows.Forms.RadioButton radioButton5;
@@ -2376,8 +2406,8 @@
         private System.Windows.Forms.Button button8;
         private System.Windows.Forms.Label label24;
         private System.Windows.Forms.Label label25;
-        private System.Windows.Forms.Label label17;
-        private System.Windows.Forms.Label label26;
+        private System.Windows.Forms.Label midboxProcess;
+        private System.Windows.Forms.Label outboxProcess;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder CollectionProcess;
         private System.Windows.Forms.Button PLCStop;
         private System.Windows.Forms.Button PLCStart;
@@ -2410,5 +2440,7 @@
         private System.Windows.Forms.Label cu_print_regexpression;
         private System.Windows.Forms.NumericUpDown DetailRange2;
         private System.Windows.Forms.NumericUpDown DetailRange1;
+        private CustomControl.EnterTextBox front_sg_separator;
+        private System.Windows.Forms.Label label13;
     }
 }

+ 118 - 51
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

@@ -224,9 +224,6 @@ namespace UAS_LabelMachine
                 switch (port.Tag)
                 {
                     case "FrontendCheck":
-                        //获取当前最大的箱号
-                        string boxcode = adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
-                        int outboxcode1 = int.Parse(boxcode == "" ? "1" : boxcode);
                         //比对当前箱数量和容量
                         FrontCollect.Text = msg;
                         for (int i = 0; i < ScanGroup.Rows.Count; i++)
@@ -285,51 +282,98 @@ namespace UAS_LabelMachine
                                     }
                                     index = index + 1;
                                 }
-                                if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + outboxcode1) >= MidBoxCapacity.Value)
-                                {
-                                    outboxcode1 = outboxcode1 + 1;
-                                }
-                                else if (CurrentRowIndex - 1 >= 0)
-                                {
-                                    if (cu_print_midlotno.Checked)
-                                    {
-                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pib_lotno"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value.ToString())
-                                            outboxcode1 = outboxcode1 + 1;
-                                    }
-                                    else if (cu_print_midpo.Checked)
-                                    {
-                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_pocode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_pocode"].Value.ToString())
-                                            outboxcode1 = outboxcode1 + 1;
-                                    }
-                                    else if (cu_print_midprod.Checked)
-                                    {
-                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodcode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodcode"].Value.ToString())
-                                            outboxcode1 = outboxcode1 + 1;
-                                    }
-                                    else if (cu_print_midspec.Checked)
-                                    {
-                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodspec"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodspec"].Value.ToString())
-                                            outboxcode1 = outboxcode1 + 1;
-                                    }
-                                }
-                                LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value = outboxcode1;
-                                LabelInf.Rows[CurrentRowIndex].Cells["pib_ifpick"].Value = true;
-                                adh.ExecuteSql("update prodiobarcode set pib_outboxcode1=" + outboxcode1 + ",pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
                                 LabelInf.Refresh();
                             }
                         }
+                        LabelInf.Rows[CurrentRowIndex].Cells["pib_ifpick"].Value = true;
+                        LabelInf.Refresh();
                         break;
                     case "BackendCheck":
                         BackCheck.Text = msg;
+                        string[] msgArr = BackCheck.Text.Split('@');
+                        //需要校验2项数据,完成校验后此项的值需要为2则表示校验成功
+                        int checkItemCount = 0;
+                        for (int i = 0; i < msgArr.Length; i++)
+                        {
+                            if (RecheckCuprodcode.Checked)
+                            {
+                                if (Equal.Checked)
+                                {
+                                    if (msgArr[i] == LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodcode"].Value.ToString())
+                                    {
+                                        checkItemCount = checkItemCount + 1;
+                                    }
+                                }
+                                else if (Expression.Checked)
+                                {
+                                    
+                                }
+                                if (msgArr[i] == LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodspec"].Value.ToString())
+                                {
+                                    checkItemCount = checkItemCount + 1;
+                                }
+                            }
+                            else if (RecheckBarcode.Checked)
+                            {
+                                if (msgArr[i] == LabelInf.Rows[CurrentRowIndex].Cells["pib_custbarcode"].Value.ToString())
+                                {
+                                    checkItemCount = checkItemCount + 1;
+                                }
+                                if (msgArr[i] == LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodspec"].Value.ToString())
+                                {
+                                    checkItemCount = checkItemCount + 1;
+                                }
+                            }
+                        }
+                        if (checkItemCount != 2)
+                        {
+                            MessageBox.Show("复核不通过");
+                            return;
+                        }
                         LabelInf.Rows[CurrentRowIndex].Cells["pib_ifrecheck"].Value = true;
                         adh.ExecuteSql("update prodiobarcode set pib_ifrecheck=-1 where pib_id=" + pib_id, "update");
                         LabelInf.Refresh();
+                        //获取当前最大的箱号
+                        string boxcode = adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
+                        int outboxcode1 = int.Parse(boxcode == "" ? "1" : boxcode);
+                        if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + outboxcode1) >= MidBoxCapacity.Value)
+                        {
+                            outboxcode1 = outboxcode1 + 1;
+                        }
+                        else if (CurrentRowIndex - 1 >= 0)
+                        {
+                            if (cu_print_midlotno.Checked)
+                            {
+                                if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pib_lotno"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value.ToString())
+                                    outboxcode1 = outboxcode1 + 1;
+                            }
+                            else if (cu_print_midpo.Checked)
+                            {
+                                if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_pocode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_pocode"].Value.ToString())
+                                    outboxcode1 = outboxcode1 + 1;
+                            }
+                            else if (cu_print_midprod.Checked)
+                            {
+                                if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodcode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodcode"].Value.ToString())
+                                    outboxcode1 = outboxcode1 + 1;
+                            }
+                            else if (cu_print_midspec.Checked)
+                            {
+                                if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodspec"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodspec"].Value.ToString())
+                                    outboxcode1 = outboxcode1 + 1;
+                            }
+                        }
+                        LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value = outboxcode1;
+                        adh.ExecuteSql("update prodiobarcode set pib_outboxcode1=" + outboxcode1 + ",pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
+                        LabelInf.Refresh();
                         if (CurrentRowIndex + 1 < LabelInf.Rows.Count)
                             CurrentRowIndex = CurrentRowIndex + 1;
+                        RefreshProcessData();
                         break;
                     default:
                         break;
                 }
+                LogicHandler.CheckUploadData(pi_inoutno.Text, UploadNum);
             }
             catch (Exception ex)
             {
@@ -576,7 +620,6 @@ namespace UAS_LabelMachine
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {
-
                     pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
                     pi_date.Text = dt.Rows[0]["pi_date"].ToString();
                     PI_ID = dt.Rows[0]["pi_id"].ToString();
@@ -997,6 +1040,14 @@ namespace UAS_LabelMachine
             //获取对应行的pib_id
             string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
             string pib_outboxcode1 = LabelInf.Rows[rowindex].Cells["pib_outboxcode1"].Value.ToString();
+            //设置最少打印盘数
+            if (OnlyPrint.Checked)
+            {
+                if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + pib_outboxcode1) < LeastPrintNum.Value)
+                {
+                    return;
+                }
+            }
             for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
             {
                 DataRow[] dr1 = MidLabelParam.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower() + "'");
@@ -1083,26 +1134,26 @@ namespace UAS_LabelMachine
             {
                 //设置初始化的采集进度
                 int Count = 0;
-                int CurrentMidBoxCollectedCount = 0;
-                //当前盒号的总盘数
-                int CurrentMidBoxTotalCount = 0;
+                string midboxcode = "";
+                string outboxcode = "";
+                if (CurrentRowIndex - 1 >= 0)
+                {
+                    outboxcode = LabelInf.Rows[CurrentRowIndex - 1].Cells["pib_outboxcode2"].Value.ToString();
+                    midboxcode = LabelInf.Rows[CurrentRowIndex - 1].Cells["pib_outboxcode1"].Value.ToString();
+                }
                 //未超出当前范围的时候
                 for (int i = 0; i < LabelInf.RowCount; i++)
                 {
-                    if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True")
+                    if (LabelInf.Rows[i].Cells["pib_ifrecheck"].FormattedValue.ToString() == "True")
                         Count++;
-                    //和当前编辑箱号相等行
-                    if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True" && LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value.ToString() == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
-                        CurrentMidBoxCollectedCount++;
-                    //当前盒号一共有几盘
-                    if (LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value.ToString() == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
-                        CurrentMidBoxTotalCount++;
                 }
+                int midboxcount = adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + (midboxcode == "" ? "0" : midboxcode));
+                midboxProcess.Text = midboxcount + "/" + MidBoxCapacity.Value;
                 //设置当前的箱号和盒号
-                Process_outboxcode.Text = LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode2"].Value.ToString();
-                Process_midboxcode.Text = LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value.ToString();
+                Process_midboxcode.Text = midboxcode;
+                Process_outboxcode.Text = outboxcode;
                 //设置当前总数和已采集数量
-                CollectedCount.Text = Count.ToString();
+                CollectedCount.Text = Count.ToString() + "/" + LabelInf.Rows.Count;
             }
         }
 
@@ -1133,13 +1184,19 @@ namespace UAS_LabelMachine
                 //将数据保存在本地数据库
                 adh.SaveDataTable(dt, "prodiobarcode");
             }
+            MidSource.DataSource = dt;
+            BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);
             //获取系统设置的上传数量,如参数异常则默认为100
-            if (!int.TryParse(adh.getFieldDataByCondition("dataextra", "uploadnum", "id=1").ToString(), out UploadNum))
+            dt = (DataTable)adh.ExecuteSql("select uploadnum,splitback,splitfront from dataextra", "select");
+            if (dt.Rows.Count > 0)
             {
-                UploadNum = 100;
+                if (!int.TryParse(dt.Rows[0]["uploadnum"].ToString(), out UploadNum))
+                {
+                    UploadNum = 100;
+                }
+                front_sg_separator.Text = dt.Rows[0]["splitback"].ToString();
+                back_sg_separator.Text = dt.Rows[0]["splitfront"].ToString();
             }
-            MidSource.DataSource = dt;
-            BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);
             //获取所有的匹配脚本
             ScanGroup = (DataTable)dh.ExecuteSql("select distinct sg_script,sg_name from prodiobarcode left join scangroup on pib_brand=sg_brand where pib_inoutno='" + pi_inoutno.Text + "' and sg_id is not null", "select");
             //绑定数据之后往下找到未采集的数据显示在当前采集的栏目
@@ -1530,5 +1587,15 @@ namespace UAS_LabelMachine
                 DetailRange2.Enabled = true;
             }
         }
+
+        private void PLCStart_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void PLCStop_Click(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 43 - 28
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -165,6 +165,7 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             this.Reset = new System.Windows.Forms.Button();
+            this.GetPDdata = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
@@ -466,7 +467,7 @@
             // ChooseAll
             // 
             this.ChooseAll.Location = new System.Drawing.Point(0, 379);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(38, 22);
             this.ChooseAll.TabIndex = 84;
@@ -564,7 +565,7 @@
             // PackOutBox
             // 
             this.PackOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PackOutBox.Location = new System.Drawing.Point(485, 72);
+            this.PackOutBox.Location = new System.Drawing.Point(485, 128);
             this.PackOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PackOutBox.Name = "PackOutBox";
             this.PackOutBox.Size = new System.Drawing.Size(64, 26);
@@ -627,7 +628,7 @@
             // PackMidBox
             // 
             this.PackMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PackMidBox.Location = new System.Drawing.Point(485, 99);
+            this.PackMidBox.Location = new System.Drawing.Point(485, 155);
             this.PackMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PackMidBox.Name = "PackMidBox";
             this.PackMidBox.Size = new System.Drawing.Size(64, 26);
@@ -655,7 +656,7 @@
             this.Combindetail.AutoSize = true;
             this.Combindetail.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Combindetail.Location = new System.Drawing.Point(296, 102);
-            this.Combindetail.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Combindetail.Margin = new System.Windows.Forms.Padding(2);
             this.Combindetail.Name = "Combindetail";
             this.Combindetail.Size = new System.Drawing.Size(82, 21);
             this.Combindetail.TabIndex = 104;
@@ -707,7 +708,7 @@
             this.CombindetailTwo.AutoSize = true;
             this.CombindetailTwo.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.CombindetailTwo.Location = new System.Drawing.Point(296, 130);
-            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CombindetailTwo.Margin = new System.Windows.Forms.Padding(2);
             this.CombindetailTwo.Name = "CombindetailTwo";
             this.CombindetailTwo.Size = new System.Drawing.Size(119, 21);
             this.CombindetailTwo.TabIndex = 109;
@@ -915,9 +916,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.label12);
             this.groupBoxWithBorder1.Controls.Add(this.label7);
             this.groupBoxWithBorder1.Location = new System.Drawing.Point(583, 6);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Size = new System.Drawing.Size(140, 211);
             this.groupBoxWithBorder1.TabIndex = 81;
             this.groupBoxWithBorder1.TabStop = false;
@@ -927,7 +928,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(64, 122);
+            this.label18.Location = new System.Drawing.Point(63, 121);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -961,7 +962,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(62, 58);
+            this.label16.Location = new System.Drawing.Point(61, 57);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -995,7 +996,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(6, 88);
+            this.label12.Location = new System.Drawing.Point(5, 87);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -1005,7 +1006,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(4, 26);
+            this.label7.Location = new System.Drawing.Point(3, 25);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1268,7 +1269,7 @@
             this.SingleLabel.Location = new System.Drawing.Point(726, 6);
             this.SingleLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabel.Name = "SingleLabel";
-            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2);
             this.SingleLabel.Size = new System.Drawing.Size(170, 211);
             this.SingleLabel.TabIndex = 77;
             this.SingleLabel.TabStop = false;
@@ -1287,7 +1288,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(80, 178);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(51, 177);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1302,7 +1303,7 @@
             this.SingleLabelAutoPrint.Checked = true;
             this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(10, 94);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(9, 93);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1336,7 +1337,7 @@
             this.MidLabel.Location = new System.Drawing.Point(898, 6);
             this.MidLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabel.Name = "MidLabel";
-            this.MidLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MidLabel.Padding = new System.Windows.Forms.Padding(2);
             this.MidLabel.Size = new System.Drawing.Size(172, 211);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
@@ -1360,7 +1361,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(6, 122);
+            this.label2.Location = new System.Drawing.Point(5, 121);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 92;
@@ -1383,7 +1384,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(6, 154);
+            this.label5.Location = new System.Drawing.Point(5, 153);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1416,7 +1417,7 @@
             this.MidLabelAutoPrint.Checked = true;
             this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(10, 94);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(9, 93);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1449,9 +1450,9 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabel.Location = new System.Drawing.Point(1075, 6);
-            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Name = "OutBoxLabel";
-            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Size = new System.Drawing.Size(175, 211);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
@@ -1472,7 +1473,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(100, 6);
+            this.LogingOut.Location = new System.Drawing.Point(99, 5);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1499,7 +1500,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(8, 148);
+            this.label10.Location = new System.Drawing.Point(7, 147);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1509,7 +1510,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(8, 114);
+            this.label6.Location = new System.Drawing.Point(7, 113);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1575,12 +1576,25 @@
             this.Reset.UseVisualStyleBackColor = true;
             this.Reset.Click += new System.EventHandler(this.Reset_Click);
             // 
+            // GetPDdata
+            // 
+            this.GetPDdata.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.GetPDdata.Location = new System.Drawing.Point(475, 72);
+            this.GetPDdata.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.GetPDdata.Name = "GetPDdata";
+            this.GetPDdata.Size = new System.Drawing.Size(93, 26);
+            this.GetPDdata.TabIndex = 111;
+            this.GetPDdata.Text = "同步出货数据";
+            this.GetPDdata.UseVisualStyleBackColor = true;
+            this.GetPDdata.Click += new System.EventHandler(this.GetPDdata_Click);
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1254, 730);
+            this.Controls.Add(this.GetPDdata);
             this.Controls.Add(this.Reset);
             this.Controls.Add(this.CombindetailTwo);
             this.Controls.Add(this.ProcessCount);
@@ -1633,18 +1647,18 @@
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
-            this.SingleLabel.ResumeLayout(true);
+            this.SingleLabel.ResumeLayout(false);
             this.SingleLabel.PerformLayout();
-            this.MidLabel.ResumeLayout(true);
+            this.MidLabel.ResumeLayout(false);
             this.MidLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidboxCapacity)).EndInit();
-            this.OutBoxLabel.ResumeLayout(true);
+            this.OutBoxLabel.ResumeLayout(false);
             this.OutBoxLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1785,5 +1799,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
         private System.Windows.Forms.Button Reset;
         private System.Windows.Forms.Button AddNewOutBox;
+        private System.Windows.Forms.Button GetPDdata;
     }
 }

+ 8 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -1868,5 +1868,13 @@ namespace UAS_LabelMachine
         {
             OutBoxNum.Text = "新增";
         }
+
+        private void GetPDdata_Click(object sender, EventArgs e)
+        {
+            dh.ExecuteSql("delete from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "'", "delete");
+            LoadPrcodeData();
+            dh.UpdateByCondition("CS$InoutPrcode", "collectednum=(select nvl(sum(pib_qty),0) from prodiobarcode where pib_inoutno=pd_inoutno and pib_pdno=pd_pdno)", "pd_inoutno='" + pi_inoutno.Text + "'");
+            MessageBox.Show("同步出货单明细数据成功","提示");
+        }
     }
 }

+ 0 - 8
UAS_DeviceMonitor/Properties/licenses.licx

@@ -1,8 +0,0 @@
-DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit, DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a