Selaa lähdekoodia

产成品交接报工解耦

fubin 2 vuotta sitten
vanhempi
commit
69cc99bc45
33 muutettua tiedostoa jossa 4304 lisäystä ja 701 poistoa
  1. 20 0
      DK.Basics/BaseControls/DataGridView/C_DataGridView.cs
  2. 1 1
      DK.Basics/Library/Library.csproj
  3. 160 171
      DK.Client/PMModule/F_PM_2302.Designer.cs
  4. 162 99
      DK.Client/PMModule/F_PM_2302.cs
  5. 442 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.Designer.cs
  6. 232 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.cs
  7. 153 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.resx
  8. 121 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.Designer.cs
  9. 86 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.cs
  10. 137 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.resx
  11. 470 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.Designer.cs
  12. 232 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.cs
  13. 162 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.resx
  14. 121 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.Designer.cs
  15. 86 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.cs
  16. 137 0
      DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.resx
  17. 36 0
      DK.Client/SAPDataModule/SAPDataModule.csproj
  18. 583 385
      DK.Service/PMModuleLogic/PMModuleLogicDAL.cs
  19. 26 16
      DK.Service/PMModuleLogic/PMModuleLogicPartial.cs
  20. 256 0
      DK.Service/SAPDataService/SAPDataLogicPartial.cs
  21. 4 0
      DK.Service/SAPDataService/SAPHegiiDataService.csproj
  22. 513 1
      DK.Service/WMSDataService/WMSDataLogic.cs
  23. 4 0
      DK.Service/WMSDataService/WMSDataService.csproj
  24. 6 0
      IBOSS.PRD/F_SYS_0202.cs
  25. 0 4
      IBOSS.PRD/IBOSS.PRD.csproj
  26. 30 0
      WCF.Service/WCF.DataModels/PMModule/OrderEntity.cs
  27. 8 0
      WCF.Service/WCF.Hosting/SAP_HEGII.ini
  28. 12 0
      WCF.Service/WCF.Services/PMModuleServiceNew.cs
  29. 51 14
      WCF.Service/WCF.Services/SAPDataService.cs
  30. 1 1
      WCF.Service/WCF.Services/WCF.Services.csproj
  31. 37 0
      WCF.Service/WCF.WebHosting/Global.asax.cs
  32. 11 5
      WCF.Service/WCF.WebHosting/SAP_HEGII.ini
  33. 4 4
      WCF.Service/WCF.WebHosting/Web.config

+ 20 - 0
DK.Basics/BaseControls/DataGridView/C_DataGridView.cs

@@ -176,6 +176,8 @@ namespace Dongke.IBOSS.PRD.Basics.BaseControls
         private DataTable dt;//绑定的表
         private string filter = "";//filter字符串
         private bool _isOpenTotalRow = false;
+        private bool _isHasNode = false;
+        private bool _virtualNodes = false;
         private DataGridViewColumnInfo[] _columnInfos = null;
 
         #endregion
@@ -197,6 +199,24 @@ namespace Dongke.IBOSS.PRD.Basics.BaseControls
             }
         }
 
+        public bool VirtualNodes
+        {
+            get { return _virtualNodes; }
+            set { _virtualNodes = value; }
+        }
+
+        public bool HasNode
+        {
+            get
+            {
+                return this._isHasNode;
+            }
+            set
+            {
+                this._isHasNode = value;
+            }
+        }
+
         [System.ComponentModel.DefaultValue(false)]
         [System.ComponentModel.Description("删除标识。")]
         public bool IsShowDelete

+ 1 - 1
DK.Basics/Library/Library.csproj

@@ -106,7 +106,7 @@
       <HintPath>..\..\DK.Client\Client.Controls\DLL\Interop.Excel.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.CSharp" />
-    <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\DLL\Newtonsoft.Json.dll</HintPath>
     </Reference>

+ 160 - 171
DK.Client/PMModule/F_PM_2302.Designer.cs

@@ -28,10 +28,6 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_PM_2302));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             this.lblOrganizationName = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
             this.txtOrderNo = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
             this.btnSave = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
@@ -40,16 +36,14 @@
             this.dtpOrderDateFrom = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DateTimePicker();
             this.lblRemarks = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
             this.txtRemarks = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
-            this.scbSAPCode1 = new Dongke.IBOSS.PRD.Client.Controls.SearchBox.ScbSAPCode();
-            this.lblLabel6 = new Dongke.WinForm.Controls.LblLabel();
-            this.dgvOrderDetail = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
-            this.MaterialCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.GoodsCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.LogoName = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.lbldis = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
             this.txtDisplayNo = new Dongke.WinForm.Controls.TxtNumerical();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvOrderDetail)).BeginInit();
+            this.txtVBELN = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TXT_Digital();
+            this.lblVBELN = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.lblPOSNR = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.txtPOSNR = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TXT_Digital();
+            this.txtSummary = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
+            this.lblSummary = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
             this.SuspendLayout();
             // 
             // lblOrganizationName
@@ -57,25 +51,24 @@
             this.lblOrganizationName.AutoSize = true;
             this.lblOrganizationName.BackColor = System.Drawing.Color.Transparent;
             this.lblOrganizationName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lblOrganizationName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
-            this.lblOrganizationName.IsMustInput = true;
-            this.lblOrganizationName.Location = new System.Drawing.Point(26, 15);
+            this.lblOrganizationName.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblOrganizationName.Location = new System.Drawing.Point(30, 66);
             this.lblOrganizationName.Name = "lblOrganizationName";
-            this.lblOrganizationName.Size = new System.Drawing.Size(41, 12);
-            this.lblOrganizationName.TabIndex = 0;
-            this.lblOrganizationName.Text = "订单号";
+            this.lblOrganizationName.Size = new System.Drawing.Size(65, 12);
+            this.lblOrganizationName.TabIndex = 6;
+            this.lblOrganizationName.Text = "生产订单号";
             // 
             // txtOrderNo
             // 
-            this.txtOrderNo.BackColor = System.Drawing.Color.Yellow;
+            this.txtOrderNo.BackColor = System.Drawing.SystemColors.Control;
             this.txtOrderNo.BackgroundColor = System.Drawing.SystemColors.Window;
             this.txtOrderNo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtOrderNo.IsMustInput = true;
-            this.txtOrderNo.Location = new System.Drawing.Point(71, 12);
+            this.txtOrderNo.Location = new System.Drawing.Point(101, 63);
             this.txtOrderNo.MaxLength = 100;
             this.txtOrderNo.Name = "txtOrderNo";
-            this.txtOrderNo.Size = new System.Drawing.Size(329, 21);
-            this.txtOrderNo.TabIndex = 1;
+            this.txtOrderNo.ReadOnly = true;
+            this.txtOrderNo.Size = new System.Drawing.Size(297, 21);
+            this.txtOrderNo.TabIndex = 7;
             // 
             // btnSave
             // 
@@ -84,10 +77,10 @@
             this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
             this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnSave.ForeColor = System.Drawing.Color.White;
-            this.btnSave.Location = new System.Drawing.Point(224, 391);
+            this.btnSave.Location = new System.Drawing.Point(224, 229);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(85, 30);
-            this.btnSave.TabIndex = 11;
+            this.btnSave.TabIndex = 14;
             this.btnSave.Text = "保存";
             this.btnSave.UseVisualStyleBackColor = true;
             this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
@@ -100,10 +93,10 @@
             this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnCancel.ForeColor = System.Drawing.Color.White;
-            this.btnCancel.Location = new System.Drawing.Point(315, 391);
+            this.btnCancel.Location = new System.Drawing.Point(315, 229);
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(85, 30);
-            this.btnCancel.TabIndex = 12;
+            this.btnCancel.TabIndex = 15;
             this.btnCancel.Text = "关闭";
             this.btnCancel.UseVisualStyleBackColor = false;
             this.btnCancel.Click += new System.EventHandler(this.btnClose_Click);
@@ -114,11 +107,11 @@
             this.lblOrderDate.BackColor = System.Drawing.Color.Transparent;
             this.lblOrderDate.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.lblOrderDate.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.lblOrderDate.Location = new System.Drawing.Point(13, 42);
+            this.lblOrderDate.Location = new System.Drawing.Point(42, 94);
             this.lblOrderDate.Name = "lblOrderDate";
             this.lblOrderDate.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
             this.lblOrderDate.Size = new System.Drawing.Size(53, 12);
-            this.lblOrderDate.TabIndex = 2;
+            this.lblOrderDate.TabIndex = 8;
             this.lblOrderDate.Text = "订单日期";
             // 
             // dtpOrderDateFrom
@@ -126,10 +119,10 @@
             this.dtpOrderDateFrom.CustomFormat = "yyyy-MM-dd";
             this.dtpOrderDateFrom.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dtpOrderDateFrom.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.dtpOrderDateFrom.Location = new System.Drawing.Point(71, 39);
+            this.dtpOrderDateFrom.Location = new System.Drawing.Point(101, 90);
             this.dtpOrderDateFrom.Name = "dtpOrderDateFrom";
-            this.dtpOrderDateFrom.Size = new System.Drawing.Size(127, 21);
-            this.dtpOrderDateFrom.TabIndex = 3;
+            this.dtpOrderDateFrom.Size = new System.Drawing.Size(138, 21);
+            this.dtpOrderDateFrom.TabIndex = 9;
             this.dtpOrderDateFrom.Value = new System.DateTime(2017, 2, 7, 0, 0, 0, 0);
             // 
             // lblRemarks
@@ -138,137 +131,23 @@
             this.lblRemarks.BackColor = System.Drawing.Color.Transparent;
             this.lblRemarks.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.lblRemarks.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.lblRemarks.Location = new System.Drawing.Point(34, 69);
+            this.lblRemarks.Location = new System.Drawing.Point(34, 120);
             this.lblRemarks.Name = "lblRemarks";
             this.lblRemarks.Size = new System.Drawing.Size(29, 12);
-            this.lblRemarks.TabIndex = 6;
+            this.lblRemarks.TabIndex = 12;
             this.lblRemarks.Text = "备注";
             // 
             // txtRemarks
             // 
             this.txtRemarks.BackgroundColor = System.Drawing.SystemColors.Window;
             this.txtRemarks.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtRemarks.Location = new System.Drawing.Point(69, 66);
+            this.txtRemarks.Location = new System.Drawing.Point(69, 117);
             this.txtRemarks.MaxLength = 500;
             this.txtRemarks.Multiline = true;
             this.txtRemarks.Name = "txtRemarks";
             this.txtRemarks.ScrollBars = System.Windows.Forms.ScrollBars.Both;
-            this.txtRemarks.Size = new System.Drawing.Size(331, 51);
-            this.txtRemarks.TabIndex = 7;
-            // 
-            // scbSAPCode1
-            // 
-            this.scbSAPCode1.CheckedData = null;
-            this.scbSAPCode1.Location = new System.Drawing.Point(71, 123);
-            this.scbSAPCode1.MultiSelect = true;
-            this.scbSAPCode1.Name = "scbSAPCode1";
-            this.scbSAPCode1.Size = new System.Drawing.Size(329, 21);
-            this.scbSAPCode1.TabIndex = 9;
-            this.scbSAPCode1.TextValueChanged += new Dongke.WinForm.Controls.ScbSearchBox.TextBoxChangedHandle(this.scbSAPCode1_TextValueChanged);
-            // 
-            // lblLabel6
-            // 
-            this.lblLabel6.Location = new System.Drawing.Point(14, 127);
-            this.lblLabel6.MustInput = true;
-            this.lblLabel6.Name = "lblLabel6";
-            this.lblLabel6.Size = new System.Drawing.Size(53, 12);
-            this.lblLabel6.TabIndex = 8;
-            this.lblLabel6.Text = "物料编码";
-            // 
-            // dgvOrderDetail
-            // 
-            this.dgvOrderDetail.AllowUserToModifyRows = true;
-            this.dgvOrderDetail.AllowUserToOrderColumns = true;
-            this.dgvOrderDetail.AllowUserToResizeRows = false;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvOrderDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
-            this.dgvOrderDetail.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.dgvOrderDetail.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
-            this.dgvOrderDetail.CellHeight = 23;
-            this.dgvOrderDetail.ChildNodeColumnName = null;
-            this.dgvOrderDetail.ChildNodeColumnText = null;
-            this.dgvOrderDetail.ColumnDeep = 1;
-            this.dgvOrderDetail.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F);
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvOrderDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
-            this.dgvOrderDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            this.dgvOrderDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.MaterialCode,
-            this.GoodsCode,
-            this.LogoName,
-            this.dataGridViewTextBoxColumn4});
-            this.dgvOrderDetail.ColumnTreeView = null;
-            this.dgvOrderDetail.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
-            this.dgvOrderDetail.DynamicColumnName = "";
-            this.dgvOrderDetail.EnableHeadersVisualStyles = false;
-            this.dgvOrderDetail.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvOrderDetail.FormatQuantityColumns = null;
-            this.dgvOrderDetail.HorizontalMergeColumn = null;
-            this.dgvOrderDetail.IsAutoCountSum = true;
-            this.dgvOrderDetail.IsAutoResizeColumns = false;
-            this.dgvOrderDetail.IsClickF12 = false;
-            this.dgvOrderDetail.IsOpenMergeCellFlag = false;
-            this.dgvOrderDetail.IsSubTotalFlag = false;
-            this.dgvOrderDetail.IsTopDeep = false;
-            this.dgvOrderDetail.Location = new System.Drawing.Point(10, 150);
-            this.dgvOrderDetail.MergeColumnNames = null;
-            this.dgvOrderDetail.MergeDetailColumnNames = null;
-            this.dgvOrderDetail.MergeDetailOnlyColumn = null;
-            this.dgvOrderDetail.MergeOnlyColumn = null;
-            this.dgvOrderDetail.MultiSelect = false;
-            this.dgvOrderDetail.Name = "dgvOrderDetail";
-            this.dgvOrderDetail.RefreshAtHscroll = false;
-            this.dgvOrderDetail.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            this.dgvOrderDetail.RowHeadersWidth = 50;
-            this.dgvOrderDetail.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
-            this.dgvOrderDetail.RowsDefaultCellStyle = dataGridViewCellStyle4;
-            this.dgvOrderDetail.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("宋体", 9F);
-            this.dgvOrderDetail.RowTemplate.Height = 21;
-            this.dgvOrderDetail.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvOrderDetail.Size = new System.Drawing.Size(388, 236);
-            this.dgvOrderDetail.SortOrderColumnName = null;
-            this.dgvOrderDetail.TabIndex = 10;
-            this.dgvOrderDetail.Tag = true;
-            this.dgvOrderDetail.TotalSumColumns = null;
-            this.dgvOrderDetail.ViewRowFilter = "";
-            // 
-            // MaterialCode
-            // 
-            this.MaterialCode.DataPropertyName = "MaterialCode";
-            this.MaterialCode.HeaderText = "物料编码";
-            this.MaterialCode.Name = "MaterialCode";
-            // 
-            // GoodsCode
-            // 
-            this.GoodsCode.DataPropertyName = "GoodsCode";
-            this.GoodsCode.HeaderText = "产品编码";
-            this.GoodsCode.Name = "GoodsCode";
-            this.GoodsCode.ReadOnly = true;
-            // 
-            // LogoName
-            // 
-            this.LogoName.DataPropertyName = "LogoName";
-            this.LogoName.HeaderText = "商标";
-            this.LogoName.Name = "LogoName";
-            this.LogoName.ReadOnly = true;
-            // 
-            // dataGridViewTextBoxColumn4
-            // 
-            this.dataGridViewTextBoxColumn4.DataPropertyName = "OrderID";
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle3;
-            this.dataGridViewTextBoxColumn4.HeaderText = "OrderID";
-            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
-            this.dataGridViewTextBoxColumn4.ReadOnly = true;
-            this.dataGridViewTextBoxColumn4.Visible = false;
+            this.txtRemarks.Size = new System.Drawing.Size(329, 102);
+            this.txtRemarks.TabIndex = 13;
             // 
             // lbldis
             // 
@@ -276,10 +155,10 @@
             this.lbldis.BackColor = System.Drawing.Color.Transparent;
             this.lbldis.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.lbldis.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.lbldis.Location = new System.Drawing.Point(289, 43);
+            this.lbldis.Location = new System.Drawing.Point(245, 94);
             this.lbldis.Name = "lbldis";
             this.lbldis.Size = new System.Drawing.Size(53, 12);
-            this.lbldis.TabIndex = 4;
+            this.lbldis.TabIndex = 10;
             this.lbldis.Text = "显示顺序";
             // 
             // txtDisplayNo
@@ -289,7 +168,7 @@
             0,
             0,
             0});
-            this.txtDisplayNo.Location = new System.Drawing.Point(348, 39);
+            this.txtDisplayNo.Location = new System.Drawing.Point(304, 90);
             this.txtDisplayNo.MaxValue = new decimal(new int[] {
             9999,
             0,
@@ -305,19 +184,128 @@
             this.txtDisplayNo.ShowBorderColor = false;
             this.txtDisplayNo.ShowDecimalPlaces = Dongke.WinForm.Controls.ShowDigitalKind.None;
             this.txtDisplayNo.ShowMustInputAlert = false;
-            this.txtDisplayNo.Size = new System.Drawing.Size(52, 21);
-            this.txtDisplayNo.TabIndex = 5;
+            this.txtDisplayNo.Size = new System.Drawing.Size(94, 21);
+            this.txtDisplayNo.TabIndex = 11;
+            // 
+            // txtVBELN
+            // 
+            this.txtVBELN.AllowNegative = false;
+            this.txtVBELN.BackColor = System.Drawing.Color.Yellow;
+            this.txtVBELN.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.txtVBELN.ErrorMessage = "必须输入项目";
+            this.txtVBELN.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtVBELN.HasComma = false;
+            this.txtVBELN.HasError = true;
+            this.txtVBELN.ImeMode = System.Windows.Forms.ImeMode.Off;
+            this.txtVBELN.IsMustInput = true;
+            this.txtVBELN.Location = new System.Drawing.Point(101, 9);
+            this.txtVBELN.MaxLength = 10;
+            this.txtVBELN.MaxValue = new decimal(new int[] {
+            1410065407,
+            2,
+            0,
+            0});
+            this.txtVBELN.MinValue = new decimal(new int[] {
+            0,
+            0,
+            0,
+            0});
+            this.txtVBELN.Name = "txtVBELN";
+            this.txtVBELN.Size = new System.Drawing.Size(162, 21);
+            this.txtVBELN.TabIndex = 1;
+            this.txtVBELN.TextChanged += new System.EventHandler(this.txtVBELN_TextChanged);
+            // 
+            // lblVBELN
+            // 
+            this.lblVBELN.AutoSize = true;
+            this.lblVBELN.BackColor = System.Drawing.Color.Transparent;
+            this.lblVBELN.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblVBELN.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
+            this.lblVBELN.IsMustInput = true;
+            this.lblVBELN.Location = new System.Drawing.Point(12, 12);
+            this.lblVBELN.Name = "lblVBELN";
+            this.lblVBELN.Size = new System.Drawing.Size(83, 12);
+            this.lblVBELN.TabIndex = 0;
+            this.lblVBELN.Text = "SAP销售订单号";
+            // 
+            // lblPOSNR
+            // 
+            this.lblPOSNR.AutoSize = true;
+            this.lblPOSNR.BackColor = System.Drawing.Color.Transparent;
+            this.lblPOSNR.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPOSNR.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
+            this.lblPOSNR.IsMustInput = true;
+            this.lblPOSNR.Location = new System.Drawing.Point(269, 12);
+            this.lblPOSNR.Name = "lblPOSNR";
+            this.lblPOSNR.Size = new System.Drawing.Size(29, 12);
+            this.lblPOSNR.TabIndex = 2;
+            this.lblPOSNR.Text = "行号";
+            // 
+            // txtPOSNR
+            // 
+            this.txtPOSNR.AllowNegative = false;
+            this.txtPOSNR.BackColor = System.Drawing.Color.Yellow;
+            this.txtPOSNR.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.txtPOSNR.ErrorMessage = "必须输入项目";
+            this.txtPOSNR.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtPOSNR.HasComma = false;
+            this.txtPOSNR.HasError = true;
+            this.txtPOSNR.ImeMode = System.Windows.Forms.ImeMode.Off;
+            this.txtPOSNR.IsMustInput = true;
+            this.txtPOSNR.Location = new System.Drawing.Point(304, 9);
+            this.txtPOSNR.MaxLength = 6;
+            this.txtPOSNR.MaxValue = new decimal(new int[] {
+            999999,
+            0,
+            0,
+            0});
+            this.txtPOSNR.MinValue = new decimal(new int[] {
+            0,
+            0,
+            0,
+            0});
+            this.txtPOSNR.Name = "txtPOSNR";
+            this.txtPOSNR.Size = new System.Drawing.Size(94, 21);
+            this.txtPOSNR.TabIndex = 3;
+            this.txtPOSNR.TextChanged += new System.EventHandler(this.txtVBELN_TextChanged);
+            // 
+            // txtSummary
+            // 
+            this.txtSummary.BackColor = System.Drawing.SystemColors.Window;
+            this.txtSummary.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.txtSummary.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtSummary.Location = new System.Drawing.Point(101, 36);
+            this.txtSummary.MaxLength = 100;
+            this.txtSummary.Name = "txtSummary";
+            this.txtSummary.Size = new System.Drawing.Size(297, 21);
+            this.txtSummary.TabIndex = 5;
+            this.txtSummary.TextChanged += new System.EventHandler(this.txtVBELN_TextChanged);
+            // 
+            // lblSummary
+            // 
+            this.lblSummary.AutoSize = true;
+            this.lblSummary.BackColor = System.Drawing.Color.Transparent;
+            this.lblSummary.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblSummary.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblSummary.Location = new System.Drawing.Point(42, 39);
+            this.lblSummary.Name = "lblSummary";
+            this.lblSummary.Size = new System.Drawing.Size(53, 12);
+            this.lblSummary.TabIndex = 4;
+            this.lblSummary.Text = "订单描述";
             // 
             // F_PM_2302
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(412, 446);
+            this.ClientSize = new System.Drawing.Size(412, 284);
+            this.Controls.Add(this.lblSummary);
+            this.Controls.Add(this.txtSummary);
+            this.Controls.Add(this.lblPOSNR);
+            this.Controls.Add(this.txtPOSNR);
+            this.Controls.Add(this.lblVBELN);
+            this.Controls.Add(this.txtVBELN);
             this.Controls.Add(this.txtDisplayNo);
-            this.Controls.Add(this.scbSAPCode1);
-            this.Controls.Add(this.lblLabel6);
-            this.Controls.Add(this.dgvOrderDetail);
             this.Controls.Add(this.lblOrderDate);
             this.Controls.Add(this.dtpOrderDateFrom);
             this.Controls.Add(this.btnSave);
@@ -346,11 +334,13 @@
             this.Controls.SetChildIndex(this.btnSave, 0);
             this.Controls.SetChildIndex(this.dtpOrderDateFrom, 0);
             this.Controls.SetChildIndex(this.lblOrderDate, 0);
-            this.Controls.SetChildIndex(this.dgvOrderDetail, 0);
-            this.Controls.SetChildIndex(this.lblLabel6, 0);
-            this.Controls.SetChildIndex(this.scbSAPCode1, 0);
             this.Controls.SetChildIndex(this.txtDisplayNo, 0);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvOrderDetail)).EndInit();
+            this.Controls.SetChildIndex(this.txtVBELN, 0);
+            this.Controls.SetChildIndex(this.lblVBELN, 0);
+            this.Controls.SetChildIndex(this.txtPOSNR, 0);
+            this.Controls.SetChildIndex(this.lblPOSNR, 0);
+            this.Controls.SetChildIndex(this.txtSummary, 0);
+            this.Controls.SetChildIndex(this.lblSummary, 0);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -366,14 +356,13 @@
         private Basics.BaseControls.C_DateTimePicker dtpOrderDateFrom;
         private Basics.BaseControls.C_Label lblRemarks;
         private Basics.BaseControls.C_TextBox txtRemarks;
-        private Controls.SearchBox.ScbSAPCode scbSAPCode1;
-        private WinForm.Controls.LblLabel lblLabel6;
-        private Basics.BaseControls.C_DataGridView dgvOrderDetail;
-        private System.Windows.Forms.DataGridViewTextBoxColumn MaterialCode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn GoodsCode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn LogoName;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
         private Basics.BaseControls.C_Label lbldis;
         private WinForm.Controls.TxtNumerical txtDisplayNo;
+        private Basics.BaseControls.C_TXT_Digital txtVBELN;
+        private Basics.BaseControls.C_Label lblVBELN;
+        private Basics.BaseControls.C_Label lblPOSNR;
+        private Basics.BaseControls.C_TXT_Digital txtPOSNR;
+        private Basics.BaseControls.C_TextBox txtSummary;
+        private Basics.BaseControls.C_Label lblSummary;
     }
 }

+ 162 - 99
DK.Client/PMModule/F_PM_2302.cs

@@ -10,6 +10,7 @@
 
 using Dongke.IBOSS.PRD.Basics.BaseControls;
 using Dongke.IBOSS.PRD.Basics.BaseResources;
+using Dongke.IBOSS.PRD.Basics.Library;
 using Dongke.IBOSS.PRD.Client.CommonModule;
 using Dongke.IBOSS.PRD.WCF.DataModels;
 using Dongke.IBOSS.PRD.WCF.Proxys;
@@ -75,15 +76,39 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
         #endregion
 
         #region 事件
-
         /// <summary>
-        /// 关闭按钮事件
+        /// 窗体加载事件
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void btnClose_Click(object sender, EventArgs e)
+        private void F_PM_2302_Load(object sender, EventArgs e)
         {
-            this.Close();
+            try
+            {
+                //this.dgvOrderDetail.AutoGenerateColumns = false;
+                //this.dgvOrderDetail.IsSetInputColumnsColor = true;
+
+                this.dtpOrderDateFrom.Value = DateTime.Now.Date;
+                // 若状态是添加,则有效标志为可用并且不显示
+                if (this._editStatus == Constant.FormMode.Edit)
+                {
+                    this.SetOrganizationData();
+                    //txtOrderNo.ReadOnly = true;
+                }
+                //else
+                //{
+                //    DataTable dt = new DataTable("OrderDetail");
+                //    dt.Columns.Add("materialcode");
+                //    //dgvOrderDetail.DataSource = dt;
+                //}
+                this.txtVBELN.Focus();
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
         }
 
         /// <summary>
@@ -101,22 +126,43 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
                 {
                     this.btnSave.Enabled = false;
                     this.btnCancel.Enabled = false;
-                    ServiceResultEntity result = (ServiceResultEntity)DoAsync(new BaseAsyncMethod(this.SaveOrder));//保存按钮方法 
+
+                    ClientRequestEntity cre = new ClientRequestEntity();
+                    cre.NameSpace = "F_PM_2302";
+                    cre.Name = "SaveOrder";
+
+                    OrderEntity order = GetOrderEntity();
+                    cre.Request = JsonHelper.ToJson(order);
+
+                    ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() =>
+                    {
+                        return PMModuleProxyNew.Service.HandleRequest(cre);
+                    });
+
                     this.btnSave.Enabled = true;
                     this.btnCancel.Enabled = true;
-                    if (Convert.ToInt32(result.Result) > Constant.INT_IS_ZERO)//保存成功
+
+                    if (Convert.ToInt32(sre.Result) > Constant.INT_IS_ZERO)
                     {
                         MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "生产订单", "保存"),
                             this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                         //this._organizationIDList.Add(Convert.ToInt32(result));
                         this.DialogResult = DialogResult.OK;
                     }
-                    else if (Convert.ToInt32(result.Result)==-1)
+                    else if (!string.IsNullOrEmpty(sre.Message))
+                    {
+                        MessageBox.Show(string.Format(Messages.MSG_CMN_W007, sre.Message),
+                            this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        return;
+                    }
+                    else
                     {
-                        MessageBox.Show(string.Format(Messages.MSG_CMN_W007, result.Message),
+                        MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "生产订单", "保存"),
                             this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                         return;
                     }
+
+
                     if (this._editStatus == Constant.FormMode.Edit)
                     {
                         this.Close();
@@ -139,79 +185,63 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
         }
 
         /// <summary>
-        /// 获取组织机构结果集
-        /// </summary>
-        /// <returns></returns>
-        private DataSet GetOrganizationDataSource()
-        {
-            try
-            {
-                OrganizationEntity organization = new OrganizationEntity();
-                //// 票号开头字母
-                //organization.LetterMarket = this.LetterMarket.Text.Trim();
-                //// 联系电话
-                //organization.Telephone = this.txtTelephone.Text.Trim();
-                //// 地址
-                //organization.Address = this.txtAddress.Text;
-                //// 备注
-                //organization.Remarks = this.txtRemarks.Text;
-                //// 正常标识
-                //organization.ValueFlags = null;
-                //organization.in_UserID = LogInUserInfo.CurrentUser.CurrentUserEntity.UserID;
-                //organization.in_AccountID = LogInUserInfo.CurrentUser.CurrentUserEntity.AccountID;
-                //this._organization = organization;
-                return SystemModuleProxy.Service.SelectOrganizationData(organization);
-            }
-            catch (Exception ex)
-            {
-                throw ex;
-            }
-        }
-
-        /// <summary>
-        /// 窗体加载事件
+        /// 关闭按钮事件
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void F_PM_2302_Load(object sender, EventArgs e)
+        private void btnClose_Click(object sender, EventArgs e)
         {
-            try
-            {
-                this.dgvOrderDetail.AutoGenerateColumns = false;
-                this.dgvOrderDetail.IsSetInputColumnsColor = true;
-
-                this.dtpOrderDateFrom.Value = DateTime.Now.Date;
-                // 若状态是添加,则有效标志为可用并且不显示
-                if (this._editStatus == Constant.FormMode.Edit)
-                {
-                    this.SetOrganizationData();
-                    txtOrderNo.ReadOnly = true;
-                }
-                else
-                {
-                    DataTable dt = new DataTable("OrderDetail");
-                    dt.Columns.Add("materialcode");
-                    dgvOrderDetail.DataSource = dt;
-                }
-                this.txtOrderNo.Focus();
-            }
-            catch (Exception ex)
-            {
-                // 对异常进行共通处理
-                ExceptionManager.HandleEventException(this.ToString(),
-                    System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
-            }
+            this.Close();
         }
 
         /// <summary>
-        /// 物料编码改变事件
+        /// 订单号拼接事件
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void scbSAPCode1_TextValueChanged(object sender, WinForm.Controls.ScbSearchBox.TextChangeEventArgs e)
+        private void txtVBELN_TextChanged(object sender, EventArgs e)
         {
-            dgvOrderDetail.DataSource = scbSAPCode1.CheckedData;
+            txtOrderNo.Text = txtVBELN.Text.Trim() + "/" + txtPOSNR.Text.Trim() + "#" + txtSummary.Text.Trim();
         }
+        ///// <summary>
+        ///// 获取组织机构结果集
+        ///// </summary>
+        ///// <returns></returns>
+        //private DataSet GetOrganizationDataSource()
+        //{
+        //    try
+        //    {
+        //        OrganizationEntity organization = new OrganizationEntity();
+        //        //// 票号开头字母
+        //        //organization.LetterMarket = this.LetterMarket.Text.Trim();
+        //        //// 联系电话
+        //        //organization.Telephone = this.txtTelephone.Text.Trim();
+        //        //// 地址
+        //        //organization.Address = this.txtAddress.Text;
+        //        //// 备注
+        //        //organization.Remarks = this.txtRemarks.Text;
+        //        //// 正常标识
+        //        //organization.ValueFlags = null;
+        //        //organization.in_UserID = LogInUserInfo.CurrentUser.CurrentUserEntity.UserID;
+        //        //organization.in_AccountID = LogInUserInfo.CurrentUser.CurrentUserEntity.AccountID;
+        //        //this._organization = organization;
+        //        return SystemModuleProxy.Service.SelectOrganizationData(organization);
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        throw ex;
+        //    }
+        //}
+
+        ///// <summary>
+        ///// 物料编码改变事件
+        ///// </summary>
+        ///// <param name="sender"></param>
+        ///// <param name="e"></param>
+        //private void scbSAPCode1_TextValueChanged(object sender, WinForm.Controls.ScbSearchBox.TextChangeEventArgs e)
+        //{
+        //    dgvOrderDetail.DataSource = scbSAPCode1.CheckedData;
+        //}
         #endregion
 
         #region 私有方法
@@ -237,6 +267,9 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
                     // 备注
                     this.txtRemarks.Text = orderRow["Remarks"].ToString();
                     this.txtDisplayNo.DataValue = Convert.ToInt32(orderRow["DisplayNo"]);
+                    txtVBELN.Text = orderRow["VBELN"].ToString();
+                    txtPOSNR.Text = orderRow["POSNR"].ToString();
+                    txtSummary.Text = orderRow["Summary"].ToString();
 
                     //// 条码串
                     //string[] arr = result.Tables[1].AsEnumerable().Select(d => d.Field<string>("guid")).ToArray();
@@ -246,8 +279,8 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
                     //string materialcodes = string.Join(",", arr);
                     //scbSAPCode1.Text = materialcodes;
 
-                    scbSAPCode1.CheckedData = result.Tables[1];
-                    dgvOrderDetail.DataSource = result.Tables[1];
+                    //scbSAPCode1.CheckedData = result.Tables[1];
+                    //dgvOrderDetail.DataSource = result.Tables[1];
                 }
             }
             catch (Exception ex)
@@ -272,7 +305,6 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
             }
         }
 
-
         /// <summary>
         /// 验证输入是否完整
         /// </summary>
@@ -281,14 +313,35 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
         {
             try
             {
-                // 订单号不能为空
+                // 生产订单号不能为空
                 if (string.IsNullOrEmpty(this.txtOrderNo.Text.Trim()))
                 {
-                    MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "订单号"),
+                    MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "生产订单号"),
                         this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                    this.txtOrderNo.Focus();
+                    this.txtVBELN.Focus();
                     return false;
                 }
+
+                // 如果不是hegii开头的订单,必须天订单号和行号
+                if (!txtOrderNo.Text.StartsWith("HEGII"))
+                {
+                    // SAP销售订单号不能为空
+                    if (string.IsNullOrEmpty(this.txtVBELN.Text.Trim()))
+                    {
+                        MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "SAP销售订单号"),
+                            this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        this.txtVBELN.Focus();
+                        return false;
+                    }
+                    // 行号不能为空
+                    if (string.IsNullOrEmpty(this.txtPOSNR.Text.Trim()))
+                    {
+                        MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "行号"),
+                            this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        this.txtPOSNR.Focus();
+                        return false;
+                    }
+                }
                 return true;
             }
             catch (Exception ex)
@@ -297,22 +350,22 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
             }
         }
 
-        /// <summary>
-        /// 保存组织机构
-        /// </summary>
-        /// <returns>影响的行数</returns>
-        private ServiceResultEntity SaveOrder()
-        {
-            try
-            {
-                OrderEntity order = GetOrderEntity();
-                return PMModuleProxy.Service.SaveOrder(order);
-            }
-            catch (Exception ex)
-            {
-                throw ex;
-            }
-        }
+        ///// <summary>
+        ///// 保存组织机构
+        ///// </summary>
+        ///// <returns>影响的行数</returns>
+        //private ServiceResultEntity SaveOrder()
+        //{
+        //    try
+        //    {
+        //        OrderEntity order = GetOrderEntity();
+        //        return PMModuleProxy.Service.SaveOrder(order);
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        throw ex;
+        //    }
+        //}
 
         /// <summary>
         /// 给订单体类传值
@@ -332,13 +385,20 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
             order.ValueFlag = 1;
             order.DisplayNo = (int)(this.txtDisplayNo.DataValue ?? 0);
 
-            DataTable dt = dgvOrderDetail.DataSource as DataTable;
-            if (dt != null)
-            {
-                dt.AcceptChanges();
-                DataView dv = new DataView(dt);
-                order.OrderDetail = dv.ToTable(true, new string[] { "materialcode" });
-            }
+            // sap销售订单号
+            order.VBELN = this.txtVBELN.Text.Trim();
+            // 行号
+            order.POSNR = this.txtPOSNR.Text.Trim();
+            // 描述
+            order.Summary = this.txtSummary.Text.Trim();
+
+            //DataTable dt = dgvOrderDetail.DataSource as DataTable;
+            //if (dt != null)
+            //{
+            //    dt.AcceptChanges();
+            //    DataView dv = new DataView(dt);
+            //    order.OrderDetail = dv.ToTable(true, new string[] { "materialcode" });
+            //}
             return order;
         }
 
@@ -348,10 +408,13 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
         private void ResetFormData()
         {
             this._orderID = Constant.INT_IS_ZERO;
+            txtVBELN.Text = string.Empty;
+            txtPOSNR.Text = string.Empty;
+            txtSummary.Text = string.Empty;
             this.txtOrderNo.Text = string.Empty;
             this.dtpOrderDateFrom.Value = DateTime.Now;
             this.txtRemarks.Text = string.Empty;
-            this.txtOrderNo.Focus();
+            this.txtVBELN.Focus();
         }
 
         #endregion

+ 442 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.Designer.cs

@@ -0,0 +1,442 @@
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    partial class F_SAP_HEGII_0112
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.grpCollapsible1 = new Dongke.WinForm.Controls.GrpCollapsible();
+            this.txtZhongTaiMsg = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
+            this.lblZhongTaiMsg = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.lblToZhongTaiFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.cmbToZhongTaiFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_ComboBox();
+            this.lblFhtimeEnd = new Dongke.WinForm.Controls.LblLabel();
+            this.lblFhtimeBegin = new Dongke.WinForm.Controls.LblLabel();
+            this.dtpFhtimeEnd = new Dongke.WinForm.Controls.DtpDate();
+            this.dtpFhtimeBegin = new Dongke.WinForm.Controls.DtpDate();
+            this.tsrToolStrip1 = new Dongke.WinForm.Controls.TsrToolStrip();
+            this.tsbtnSearch = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnSynLog = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnClearCondition = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+            this.tsbtnAdaptive = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnClose = new System.Windows.Forms.ToolStripButton();
+            this.dgvBarcode = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
+            this.BARCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.MATERIALCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OUTLABELCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.FHTIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TOZHONGTAITIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TOZHONGTAIFLAG = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.ZHONGTAIMSG = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.FIRSTFHDATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.FIRSTFHNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.grpCollapsible1.SuspendLayout();
+            this.tsrToolStrip1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvBarcode)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // grpCollapsible1
+            // 
+            this.grpCollapsible1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grpCollapsible1.Controls.Add(this.txtZhongTaiMsg);
+            this.grpCollapsible1.Controls.Add(this.lblZhongTaiMsg);
+            this.grpCollapsible1.Controls.Add(this.lblToZhongTaiFlag);
+            this.grpCollapsible1.Controls.Add(this.cmbToZhongTaiFlag);
+            this.grpCollapsible1.Controls.Add(this.lblFhtimeEnd);
+            this.grpCollapsible1.Controls.Add(this.lblFhtimeBegin);
+            this.grpCollapsible1.Controls.Add(this.dtpFhtimeEnd);
+            this.grpCollapsible1.Controls.Add(this.dtpFhtimeBegin);
+            this.grpCollapsible1.Location = new System.Drawing.Point(0, 38);
+            this.grpCollapsible1.Name = "grpCollapsible1";
+            this.grpCollapsible1.Size = new System.Drawing.Size(1154, 52);
+            this.grpCollapsible1.TabIndex = 1;
+            this.grpCollapsible1.TabStop = false;
+            this.grpCollapsible1.Text = "查询条件";
+            // 
+            // txtZhongTaiMsg
+            // 
+            this.txtZhongTaiMsg.BackColor = System.Drawing.SystemColors.Window;
+            this.txtZhongTaiMsg.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.txtZhongTaiMsg.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
+            this.txtZhongTaiMsg.ErrorMessage = "";
+            this.txtZhongTaiMsg.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtZhongTaiMsg.Location = new System.Drawing.Point(530, 20);
+            this.txtZhongTaiMsg.MaxLength = 20;
+            this.txtZhongTaiMsg.Name = "txtZhongTaiMsg";
+            this.txtZhongTaiMsg.Size = new System.Drawing.Size(120, 21);
+            this.txtZhongTaiMsg.TabIndex = 28;
+            // 
+            // lblZhongTaiMsg
+            // 
+            this.lblZhongTaiMsg.AutoSize = true;
+            this.lblZhongTaiMsg.BackColor = System.Drawing.Color.Transparent;
+            this.lblZhongTaiMsg.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblZhongTaiMsg.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblZhongTaiMsg.Location = new System.Drawing.Point(471, 24);
+            this.lblZhongTaiMsg.Name = "lblZhongTaiMsg";
+            this.lblZhongTaiMsg.Size = new System.Drawing.Size(53, 12);
+            this.lblZhongTaiMsg.TabIndex = 25;
+            this.lblZhongTaiMsg.Text = "同步结果";
+            // 
+            // lblToZhongTaiFlag
+            // 
+            this.lblToZhongTaiFlag.AutoSize = true;
+            this.lblToZhongTaiFlag.BackColor = System.Drawing.Color.Transparent;
+            this.lblToZhongTaiFlag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblToZhongTaiFlag.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblToZhongTaiFlag.Location = new System.Drawing.Point(306, 24);
+            this.lblToZhongTaiFlag.Name = "lblToZhongTaiFlag";
+            this.lblToZhongTaiFlag.Size = new System.Drawing.Size(53, 12);
+            this.lblToZhongTaiFlag.TabIndex = 24;
+            this.lblToZhongTaiFlag.Text = "同步状态";
+            // 
+            // cmbToZhongTaiFlag
+            // 
+            this.cmbToZhongTaiFlag.BackColor = System.Drawing.SystemColors.Window;
+            this.cmbToZhongTaiFlag.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.cmbToZhongTaiFlag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmbToZhongTaiFlag.FormattingEnabled = true;
+            this.cmbToZhongTaiFlag.Location = new System.Drawing.Point(365, 20);
+            this.cmbToZhongTaiFlag.Name = "cmbToZhongTaiFlag";
+            this.cmbToZhongTaiFlag.Size = new System.Drawing.Size(100, 20);
+            this.cmbToZhongTaiFlag.TabIndex = 23;
+            // 
+            // lblFhtimeEnd
+            // 
+            this.lblFhtimeEnd.Location = new System.Drawing.Point(177, 24);
+            this.lblFhtimeEnd.Name = "lblFhtimeEnd";
+            this.lblFhtimeEnd.Size = new System.Drawing.Size(17, 12);
+            this.lblFhtimeEnd.TabIndex = 2;
+            this.lblFhtimeEnd.Text = "至";
+            // 
+            // lblFhtimeBegin
+            // 
+            this.lblFhtimeBegin.Location = new System.Drawing.Point(12, 24);
+            this.lblFhtimeBegin.Name = "lblFhtimeBegin";
+            this.lblFhtimeBegin.Size = new System.Drawing.Size(53, 12);
+            this.lblFhtimeBegin.TabIndex = 0;
+            this.lblFhtimeBegin.Text = "交接日期";
+            // 
+            // dtpFhtimeEnd
+            // 
+            this.dtpFhtimeEnd.AllowNull = false;
+            this.dtpFhtimeEnd.Location = new System.Drawing.Point(200, 20);
+            this.dtpFhtimeEnd.Name = "dtpFhtimeEnd";
+            this.dtpFhtimeEnd.Size = new System.Drawing.Size(100, 21);
+            this.dtpFhtimeEnd.TabIndex = 3;
+            this.dtpFhtimeEnd.Value = new System.DateTime(2017, 12, 1, 0, 0, 0, 0);
+            // 
+            // dtpFhtimeBegin
+            // 
+            this.dtpFhtimeBegin.AllowNull = false;
+            this.dtpFhtimeBegin.Location = new System.Drawing.Point(71, 20);
+            this.dtpFhtimeBegin.Name = "dtpFhtimeBegin";
+            this.dtpFhtimeBegin.Size = new System.Drawing.Size(100, 21);
+            this.dtpFhtimeBegin.TabIndex = 1;
+            this.dtpFhtimeBegin.Value = new System.DateTime(2017, 12, 1, 0, 0, 0, 0);
+            // 
+            // tsrToolStrip1
+            // 
+            this.tsrToolStrip1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsrToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.tsbtnSearch,
+            this.tsbtnSynLog,
+            this.tsbtnClearCondition,
+            this.toolStripSeparator1,
+            this.tsbtnAdaptive,
+            this.tsbtnClose});
+            this.tsrToolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.tsrToolStrip1.Name = "tsrToolStrip1";
+            this.tsrToolStrip1.Size = new System.Drawing.Size(1166, 35);
+            this.tsrToolStrip1.TabIndex = 0;
+            // 
+            // tsbtnSearch
+            // 
+            this.tsbtnSearch.AutoSize = false;
+            this.tsbtnSearch.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnSearch.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnSearch.Name = "tsbtnSearch";
+            this.tsbtnSearch.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnSearch.Text = "查询(&Q)";
+            this.tsbtnSearch.Click += new System.EventHandler(this.tsbtnSearch_Click);
+            // 
+            // tsbtnSynLog
+            // 
+            this.tsbtnSynLog.AutoSize = false;
+            this.tsbtnSynLog.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnSynLog.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnSynLog.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnSynLog.Name = "tsbtnSynLog";
+            this.tsbtnSynLog.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnSynLog.Text = "同步(&L)";
+            this.tsbtnSynLog.Click += new System.EventHandler(this.tsbtnSynLog_Click);
+            // 
+            // tsbtnClearCondition
+            // 
+            this.tsbtnClearCondition.AutoSize = false;
+            this.tsbtnClearCondition.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnClearCondition.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnClearCondition.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnClearCondition.Name = "tsbtnClearCondition";
+            this.tsbtnClearCondition.Size = new System.Drawing.Size(80, 25);
+            this.tsbtnClearCondition.Text = "清空条件(&C)";
+            this.tsbtnClearCondition.Click += new System.EventHandler(this.tsbtnClearCondition_Click);
+            // 
+            // toolStripSeparator1
+            // 
+            this.toolStripSeparator1.AutoSize = false;
+            this.toolStripSeparator1.Name = "toolStripSeparator1";
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            // 
+            // tsbtnAdaptive
+            // 
+            this.tsbtnAdaptive.AutoSize = false;
+            this.tsbtnAdaptive.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnAdaptive.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnAdaptive.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnAdaptive.Name = "tsbtnAdaptive";
+            this.tsbtnAdaptive.Size = new System.Drawing.Size(90, 25);
+            this.tsbtnAdaptive.Text = "自适应列宽(&A)";
+            this.tsbtnAdaptive.Click += new System.EventHandler(this.tsbtnAdaptive_Click);
+            // 
+            // tsbtnClose
+            // 
+            this.tsbtnClose.AutoSize = false;
+            this.tsbtnClose.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnClose.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnClose.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnClose.Name = "tsbtnClose";
+            this.tsbtnClose.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnClose.Text = "关闭(&X)";
+            this.tsbtnClose.Click += new System.EventHandler(this.tsbtnClose_Click);
+            // 
+            // dgvBarcode
+            // 
+            this.dgvBarcode.AllowUserToAddRows = false;
+            this.dgvBarcode.AllowUserToDeleteRows = false;
+            this.dgvBarcode.AllowUserToModifyRows = true;
+            this.dgvBarcode.AllowUserToOrderColumns = true;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
+            this.dgvBarcode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvBarcode.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.dgvBarcode.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.dgvBarcode.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
+            this.dgvBarcode.CellHeight = 23;
+            this.dgvBarcode.ChildNodeColumnName = null;
+            this.dgvBarcode.ChildNodeColumnText = null;
+            this.dgvBarcode.ColumnDeep = 1;
+            this.dgvBarcode.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvBarcode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dgvBarcode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvBarcode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.BARCODE,
+            this.MATERIALCODE,
+            this.OUTLABELCODE,
+            this.FHTIME,
+            this.TOZHONGTAITIME,
+            this.TOZHONGTAIFLAG,
+            this.ZHONGTAIMSG,
+            this.FIRSTFHDATE,
+            this.FIRSTFHNO});
+            this.dgvBarcode.ColumnTreeView = new System.Windows.Forms.TreeView[0];
+            this.dgvBarcode.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
+            this.dgvBarcode.DynamicColumnName = "";
+            this.dgvBarcode.EnableHeadersVisualStyles = false;
+            this.dgvBarcode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvBarcode.FormatQuantityColumns = null;
+            this.dgvBarcode.HasNode = false;
+            this.dgvBarcode.HorizontalMergeColumn = null;
+            this.dgvBarcode.IsAutoCountSum = true;
+            this.dgvBarcode.IsAutoResizeColumns = false;
+            this.dgvBarcode.IsClickF12 = false;
+            this.dgvBarcode.IsOpenMergeCellFlag = false;
+            this.dgvBarcode.IsSubTotalFlag = false;
+            this.dgvBarcode.IsTopDeep = false;
+            this.dgvBarcode.Location = new System.Drawing.Point(0, 96);
+            this.dgvBarcode.MergeColumnNames = null;
+            this.dgvBarcode.MergeDetailColumnNames = null;
+            this.dgvBarcode.MergeDetailOnlyColumn = null;
+            this.dgvBarcode.MergeOnlyColumn = null;
+            this.dgvBarcode.MultiSelect = false;
+            this.dgvBarcode.Name = "dgvBarcode";
+            this.dgvBarcode.ReadOnly = true;
+            this.dgvBarcode.RefreshAtHscroll = false;
+            this.dgvBarcode.RowHeadersWidth = 50;
+            this.dgvBarcode.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
+            this.dgvBarcode.RowsDefaultCellStyle = dataGridViewCellStyle6;
+            this.dgvBarcode.RowTemplate.Height = 21;
+            this.dgvBarcode.Size = new System.Drawing.Size(1165, 514);
+            this.dgvBarcode.SortOrderColumnName = null;
+            this.dgvBarcode.TabIndex = 0;
+            this.dgvBarcode.Tag = "";
+            this.dgvBarcode.TotalSumColumns = null;
+            this.dgvBarcode.ViewRowFilter = "";
+            this.dgvBarcode.VirtualNodes = false;
+            // 
+            // BARCODE
+            // 
+            this.BARCODE.DataPropertyName = "BARCODE";
+            this.BARCODE.HeaderText = "产品条码";
+            this.BARCODE.Name = "BARCODE";
+            this.BARCODE.ReadOnly = true;
+            // 
+            // MATERIALCODE
+            // 
+            this.MATERIALCODE.DataPropertyName = "MATERIALCODE";
+            this.MATERIALCODE.HeaderText = "物料编码";
+            this.MATERIALCODE.Name = "MATERIALCODE";
+            this.MATERIALCODE.ReadOnly = true;
+            // 
+            // OUTLABELCODE
+            // 
+            this.OUTLABELCODE.DataPropertyName = "OUTLABELCODE";
+            this.OUTLABELCODE.HeaderText = "外箱码";
+            this.OUTLABELCODE.Name = "OUTLABELCODE";
+            this.OUTLABELCODE.ReadOnly = true;
+            // 
+            // FHTIME
+            // 
+            this.FHTIME.DataPropertyName = "FHTIME";
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.FHTIME.DefaultCellStyle = dataGridViewCellStyle3;
+            this.FHTIME.HeaderText = "交接时间";
+            this.FHTIME.Name = "FHTIME";
+            this.FHTIME.ReadOnly = true;
+            // 
+            // TOZHONGTAITIME
+            // 
+            this.TOZHONGTAITIME.DataPropertyName = "TOZHONGTAITIME";
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.Format = "yyyy-MM-dd HH:mm:ss";
+            this.TOZHONGTAITIME.DefaultCellStyle = dataGridViewCellStyle4;
+            this.TOZHONGTAITIME.HeaderText = "同步时间";
+            this.TOZHONGTAITIME.Name = "TOZHONGTAITIME";
+            this.TOZHONGTAITIME.ReadOnly = true;
+            // 
+            // TOZHONGTAIFLAG
+            // 
+            this.TOZHONGTAIFLAG.DataPropertyName = "TOZHONGTAIFLAG";
+            this.TOZHONGTAIFLAG.FalseValue = "0";
+            this.TOZHONGTAIFLAG.HeaderText = "同步标识";
+            this.TOZHONGTAIFLAG.IndeterminateValue = "0";
+            this.TOZHONGTAIFLAG.Name = "TOZHONGTAIFLAG";
+            this.TOZHONGTAIFLAG.ReadOnly = true;
+            this.TOZHONGTAIFLAG.TrueValue = "1";
+            // 
+            // ZHONGTAIMSG
+            // 
+            this.ZHONGTAIMSG.DataPropertyName = "ZHONGTAIMSG";
+            this.ZHONGTAIMSG.HeaderText = "同步结果";
+            this.ZHONGTAIMSG.Name = "ZHONGTAIMSG";
+            this.ZHONGTAIMSG.ReadOnly = true;
+            // 
+            // FIRSTFHDATE
+            // 
+            this.FIRSTFHDATE.DataPropertyName = "FIRSTFHDATE";
+            this.FIRSTFHDATE.HeaderText = "首次交接日期";
+            this.FIRSTFHDATE.Name = "FIRSTFHDATE";
+            this.FIRSTFHDATE.ReadOnly = true;
+            // 
+            // FIRSTFHNO
+            // 
+            this.FIRSTFHNO.DataPropertyName = "FIRSTFHNO";
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.FIRSTFHNO.DefaultCellStyle = dataGridViewCellStyle5;
+            this.FIRSTFHNO.HeaderText = "当日流水号";
+            this.FIRSTFHNO.Name = "FIRSTFHNO";
+            this.FIRSTFHNO.ReadOnly = true;
+            // 
+            // F_SAP_HEGII_0112
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1166, 622);
+            this.Controls.Add(this.dgvBarcode);
+            this.Controls.Add(this.grpCollapsible1);
+            this.Controls.Add(this.tsrToolStrip1);
+            this.Name = "F_SAP_HEGII_0112";
+            this.Text = "中台同步日志";
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.F_SAP_HEGII_0112_FormClosed);
+            this.Load += new System.EventHandler(this.F_SAP_HEGII_0112_Load);
+            this.grpCollapsible1.ResumeLayout(false);
+            this.grpCollapsible1.PerformLayout();
+            this.tsrToolStrip1.ResumeLayout(false);
+            this.tsrToolStrip1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvBarcode)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private Dongke.WinForm.Controls.TsrToolStrip tsrToolStrip1;
+        private System.Windows.Forms.ToolStripButton tsbtnSearch;
+        private System.Windows.Forms.ToolStripButton tsbtnAdaptive;
+        private System.Windows.Forms.ToolStripButton tsbtnClose;
+        private WinForm.Controls.GrpCollapsible grpCollapsible1;
+        private WinForm.Controls.LblLabel lblFhtimeBegin;
+        private WinForm.Controls.DtpDate dtpFhtimeBegin;
+        private System.Windows.Forms.ToolStripButton tsbtnClearCondition;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private WinForm.Controls.LblLabel lblFhtimeEnd;
+        private WinForm.Controls.DtpDate dtpFhtimeEnd;
+        private Basics.BaseControls.C_DataGridView dgvBarcode;
+        private System.Windows.Forms.ToolStripButton tsbtnSynLog;
+        private Basics.BaseControls.C_Label lblToZhongTaiFlag;
+        private Basics.BaseControls.C_ComboBox cmbToZhongTaiFlag;
+        private Basics.BaseControls.C_Label lblZhongTaiMsg;
+        private Basics.BaseControls.C_TextBox txtZhongTaiMsg;
+        private System.Windows.Forms.DataGridViewTextBoxColumn BARCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn MATERIALCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn OUTLABELCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn FHTIME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn TOZHONGTAITIME;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn TOZHONGTAIFLAG;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ZHONGTAIMSG;
+        private System.Windows.Forms.DataGridViewTextBoxColumn FIRSTFHDATE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn FIRSTFHNO;
+    }
+}

+ 232 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.cs

@@ -0,0 +1,232 @@
+/*******************************************************************************
+ * Copyright(c) 2016 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:F_SAP_HEGII_0112.cs
+ *      2.功能描述:中台同步日志
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      付斌            2022/09/02         1.00            新建
+ *******************************************************************************/
+using System;
+using System.Data;
+using System.Reflection;
+using System.Windows.Forms;
+
+using Dongke.IBOSS.PRD.Basics.BaseControls;
+using Dongke.IBOSS.PRD.Basics.BaseResources;
+using Dongke.IBOSS.PRD.Client.CommonModule;
+using Dongke.IBOSS.PRD.Client.Controls;
+using Dongke.IBOSS.PRD.Client.DataModels;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using Dongke.IBOSS.PRD.WCF.Proxys;
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    /// <summary>
+    /// 中台同步日志
+    /// </summary>
+    public partial class F_SAP_HEGII_0112 : DKDockPanelBase
+    {
+        #region 成员变量
+        private static F_SAP_HEGII_0112 _instance = null;
+        #endregion
+
+        #region 单例模式
+
+        /// <summary>
+        /// 单例模式,防止重复创建窗体
+        /// </summary>
+        public static F_SAP_HEGII_0112 Instance
+        {
+            get
+            {
+                if (_instance == null)
+                {
+                    _instance = new F_SAP_HEGII_0112();
+                }
+                return _instance;
+            }
+        }
+
+        #endregion
+
+        #region 构造函数
+        /// <summary>
+        /// 成品SAP日志
+        /// </summary>
+        public F_SAP_HEGII_0112()
+        {
+            InitializeComponent();
+
+            tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
+            tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
+        }
+        #endregion
+
+        #region 控件事件
+        /// <summary>
+        /// 关闭
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void F_SAP_HEGII_0112_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            _instance = null;
+        }
+
+        /// <summary>
+        /// 画面加载
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void F_SAP_HEGII_0112_Load(object sender, System.EventArgs e)
+        {
+            try
+            {
+                // 加载权限
+                FormPermissionManager.FormPermissionControl(Name, this,
+                    LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData,
+                    LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
+
+                dgvBarcode.AutoGenerateColumns = false;
+
+                dtpFhtimeBegin.Value = DateTime.Now.Date;
+                dtpFhtimeEnd.Value = DateTime.Now.Date;
+
+                DataTable dtToZhongTaiFlag = new DataTable();
+                dtToZhongTaiFlag.Columns.Add("Flag", typeof(string));
+                dtToZhongTaiFlag.Columns.Add("FlagName", typeof(string));
+
+                DataRow newRow = dtToZhongTaiFlag.NewRow();
+                dtToZhongTaiFlag.Rows.Add(newRow);
+                newRow = dtToZhongTaiFlag.NewRow();
+                newRow["Flag"] = "1";
+                newRow["FlagName"] = "已同步";
+                dtToZhongTaiFlag.Rows.Add(newRow);
+                newRow = dtToZhongTaiFlag.NewRow();
+                newRow["Flag"] = "0";
+                newRow["FlagName"] = "未同步";
+                dtToZhongTaiFlag.Rows.Add(newRow);
+
+                this.cmbToZhongTaiFlag.DisplayMember = "FlagName";
+                this.cmbToZhongTaiFlag.ValueMember = "Flag";
+                this.cmbToZhongTaiFlag.DataSource = dtToZhongTaiFlag;
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(ToString(),
+                    MethodBase.GetCurrentMethod().Name, Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 查询
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnSearch_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                tsrToolStrip1.Focus();
+                dgvBarcode.DataSource = null;
+                if (dtpFhtimeBegin.Value == null || dtpFhtimeEnd.Value == null)
+                {
+                    return;
+                }
+
+                ClientRequestEntity cre = new ClientRequestEntity();
+                cre.NameSpace = "Hegii";
+                cre.Name = "GetZhongTaiDataLog";
+                cre.Properties["FhtimeBegin"] = dtpFhtimeBegin.Value.Value;
+                cre.Properties["FhtimeEnd"] = dtpFhtimeEnd.Value.Value.AddDays(1);
+                cre.Properties["ToZhongTaiFlag"] = cmbToZhongTaiFlag.SelectedValue;
+                cre.Properties["ZhongTaiMsg"] = txtZhongTaiMsg.Text;
+
+                ServiceResultEntity sre = DoAsync(() =>
+                {
+                    return SAPDataModuleProxy.Service.DoRequest(cre);
+                });
+
+                if (sre.Status == Constant.ServiceResultStatus.Success)
+                {
+                    if (sre.Data.Tables[0].Rows.Count == 0)
+                    {
+                        DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_001);
+                        return;
+                    }
+
+                    // 查询成功
+                    dgvBarcode.DataSource = sre.Data.Tables[0];
+                    dgvBarcode.AutoResizeColumns();
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(ToString(),
+                    MethodBase.GetCurrentMethod().Name, Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 同步操作
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnSynLog_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                F_SAP_HEGII_011201 f = new F_SAP_HEGII_011201();
+                DialogResult dialogResult = f.ShowDialog();
+
+                if (dialogResult == DialogResult.OK)
+                {
+                    this.tsbtnSearch_Click(null, null);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 清除条件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnClearCondition_Click(object sender, EventArgs e)
+        {
+            dtpFhtimeBegin.Value = DateTime.Now.Date;
+            dtpFhtimeEnd.Value = DateTime.Now.Date;
+            this.cmbToZhongTaiFlag.SelectedIndex = 0;
+            txtZhongTaiMsg.Text = string.Empty;
+        }
+
+        /// <summary>
+        /// 自适应列宽
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnAdaptive_Click(object sender, EventArgs e)
+        {
+            dgvBarcode.AutoResizeColumns();
+        }
+
+        /// <summary>
+        /// 关闭画面
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnClose_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+        #endregion
+    }
+}

+ 153 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0112.resx

@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="tsrToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="BARCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="MATERIALCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="OUTLABELCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="FHTIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="TOZHONGTAITIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="TOZHONGTAIFLAG.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ZHONGTAIMSG.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="FIRSTFHDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="FIRSTFHNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>39</value>
+  </metadata>
+</root>

+ 121 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.Designer.cs

@@ -0,0 +1,121 @@
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    partial class F_SAP_HEGII_011201
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_SAP_HEGII_011201));
+            this.lblSyncDate = new Dongke.WinForm.Controls.LblLabel();
+            this.btnCancel = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
+            this.btnSave = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
+            this.dtpSyncDate = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DateTimePicker();
+            this.SuspendLayout();
+            // 
+            // lblSyncDate
+            // 
+            this.lblSyncDate.Location = new System.Drawing.Point(12, 16);
+            this.lblSyncDate.Name = "lblSyncDate";
+            this.lblSyncDate.Size = new System.Drawing.Size(53, 12);
+            this.lblSyncDate.TabIndex = 0;
+            this.lblSyncDate.Text = "同步日期";
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCancel.BackColor = System.Drawing.Color.Transparent;
+            this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
+            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCancel.ForeColor = System.Drawing.Color.White;
+            this.btnCancel.Location = new System.Drawing.Point(147, 52);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(85, 30);
+            this.btnCancel.TabIndex = 5;
+            this.btnCancel.Text = "关闭";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // btnSave
+            // 
+            this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnSave.BackColor = System.Drawing.Color.Transparent;
+            this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
+            this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnSave.ForeColor = System.Drawing.Color.White;
+            this.btnSave.Location = new System.Drawing.Point(56, 52);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(85, 30);
+            this.btnSave.TabIndex = 4;
+            this.btnSave.Text = "确定(&S)";
+            this.btnSave.UseVisualStyleBackColor = false;
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+            // 
+            // dtpSyncDate
+            // 
+            this.dtpSyncDate.CustomFormat = "yyyy-MM-dd";
+            this.dtpSyncDate.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dtpSyncDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.dtpSyncDate.Location = new System.Drawing.Point(71, 12);
+            this.dtpSyncDate.Name = "dtpSyncDate";
+            this.dtpSyncDate.Size = new System.Drawing.Size(161, 21);
+            this.dtpSyncDate.TabIndex = 6;
+            // 
+            // F_SAP_HEGII_011201
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.btnCancel;
+            this.ClientSize = new System.Drawing.Size(244, 107);
+            this.Controls.Add(this.dtpSyncDate);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.lblSyncDate);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.IsSaveFormSize = false;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "F_SAP_HEGII_011201";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.StatusSizingGrip = false;
+            this.Text = "手动同步";
+            this.Controls.SetChildIndex(this.lblSyncDate, 0);
+            this.Controls.SetChildIndex(this.btnSave, 0);
+            this.Controls.SetChildIndex(this.btnCancel, 0);
+            this.Controls.SetChildIndex(this.dtpSyncDate, 0);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private WinForm.Controls.LblLabel lblSyncDate;
+        private Basics.BaseControls.C_Button btnCancel;
+        private Basics.BaseControls.C_Button btnSave;
+		private Basics.BaseControls.C_DateTimePicker dtpSyncDate;
+	}
+}

+ 86 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.cs

@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright(c) 2016 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:F_SAP_HEGII_011201.cs
+ *      2.功能描述:手动同步
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      陈晓野          2018/11/16          1.00            新建
+ *******************************************************************************/
+using System;
+using System.Reflection;
+using System.Windows.Forms;
+using Dongke.IBOSS.PRD.Basics.BaseControls;
+using Dongke.IBOSS.PRD.Client.CommonModule;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using Dongke.IBOSS.PRD.WCF.Proxys;
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    public partial class F_SAP_HEGII_011201 : FormBase
+    {
+        public F_SAP_HEGII_011201()
+        {
+            InitializeComponent();
+            this.dtpSyncDate.Value = DateTime.Now.Date;
+        }
+
+        /// <summary>
+        /// 同步
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                string syncDate = this.dtpSyncDate.Value.ToString("yyyy-MM-dd");
+                DialogResult dr = MessageBox.Show("是否同步【" + syncDate + "】的数据。",
+                    this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
+
+                if (dr != DialogResult.Yes)
+                {
+                    return;
+                }
+
+                ClientRequestEntity cre = new ClientRequestEntity();
+                cre.NameSpace = "Hegii";
+                cre.Name = "SyncZhongTaiData";
+                cre.Properties["SyncDate"] = syncDate;
+
+                ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() =>
+                {
+                    return SAPDataModuleProxy.Service.DoRequest(cre);
+                });
+
+                if (sre.OtherStatus > 0)
+                {
+                    DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_002);
+                    this.DialogResult = DialogResult.OK;
+                    Close();
+                }
+                else
+                {
+                    DKMessageBox.ShowDialog(this, DKMessageCode.W_CMN_S_004, sre.Message);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 取消
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 137 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011201.resx

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnCancel.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAFUAAAAeCAYAAABdalL1AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+        vAAADrwBlbxySQAAAI5JREFUaEPt0KERxCAUQMFrEImOowUsioJSAb3gaOLfnLjJRMNzT2wD+ymlhPb1
+        3mOMEWutMPUQUwGmAkwFmAowFWAqwFSAqQBTAaYCTAWYCnilXtcV2tdaM/U0UwGmAmqtT2rOObTvnzrn
+        NPUUUwGmAkwFmAowFWAqwFSAqYBf6n3fpp70Sk0phfY9qTO+PIZEBQZ3CrAAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnSave.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAFUAAAAeCAYAAABdalL1AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+        vAAADrwBlbxySQAAAI5JREFUaEPt0KERxCAUQMFrEImOowUsioJSAb3gaOLfnLjJRMNzT2wD+ymlhPb1
+        3mOMEWutMPUQUwGmAkwFmAowFWAqwFSAqQBTAaYCTAWYCnilXtcV2tdaM/U0UwGmAmqtT2rOObTvnzrn
+        NPUUUwGmAkwFmAowFWAqwFSAqYBf6n3fpp70Sk0phfY9qTO+PIZEBQZ3CrAAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 470 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.Designer.cs

@@ -0,0 +1,470 @@
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    partial class F_SAP_HEGII_0113
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.grpCollapsible1 = new Dongke.WinForm.Controls.GrpCollapsible();
+            this.txtZhongTaiMsg = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
+            this.lblZhongTaiMsg = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.lblToZhongTaiFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
+            this.cmbToZhongTaiFlag = new Dongke.IBOSS.PRD.Basics.BaseControls.C_ComboBox();
+            this.lblFhtimeEnd = new Dongke.WinForm.Controls.LblLabel();
+            this.lblFhtimeBegin = new Dongke.WinForm.Controls.LblLabel();
+            this.dtpFhtimeEnd = new Dongke.WinForm.Controls.DtpDate();
+            this.dtpFhtimeBegin = new Dongke.WinForm.Controls.DtpDate();
+            this.tsrToolStrip1 = new Dongke.WinForm.Controls.TsrToolStrip();
+            this.tsbtnSearch = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnSynLog = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnClearCondition = new System.Windows.Forms.ToolStripButton();
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+            this.tsbtnAdaptive = new System.Windows.Forms.ToolStripButton();
+            this.tsbtnClose = new System.Windows.Forms.ToolStripButton();
+            this.dgvBarcode = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
+            this.YYYYMMDD = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BARCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SAPCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OUTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BANMA = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ORDERCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ORDERITEM = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SECURITYCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TOKUNCHUANTIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TOKUNCHUANFLAG = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.KUNCHUANMSG = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.grpCollapsible1.SuspendLayout();
+            this.tsrToolStrip1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvBarcode)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // grpCollapsible1
+            // 
+            this.grpCollapsible1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.grpCollapsible1.Controls.Add(this.txtZhongTaiMsg);
+            this.grpCollapsible1.Controls.Add(this.lblZhongTaiMsg);
+            this.grpCollapsible1.Controls.Add(this.lblToZhongTaiFlag);
+            this.grpCollapsible1.Controls.Add(this.cmbToZhongTaiFlag);
+            this.grpCollapsible1.Controls.Add(this.lblFhtimeEnd);
+            this.grpCollapsible1.Controls.Add(this.lblFhtimeBegin);
+            this.grpCollapsible1.Controls.Add(this.dtpFhtimeEnd);
+            this.grpCollapsible1.Controls.Add(this.dtpFhtimeBegin);
+            this.grpCollapsible1.Location = new System.Drawing.Point(0, 38);
+            this.grpCollapsible1.Name = "grpCollapsible1";
+            this.grpCollapsible1.Size = new System.Drawing.Size(1154, 52);
+            this.grpCollapsible1.TabIndex = 1;
+            this.grpCollapsible1.TabStop = false;
+            this.grpCollapsible1.Text = "查询条件";
+            // 
+            // txtZhongTaiMsg
+            // 
+            this.txtZhongTaiMsg.BackColor = System.Drawing.SystemColors.Window;
+            this.txtZhongTaiMsg.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.txtZhongTaiMsg.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
+            this.txtZhongTaiMsg.ErrorMessage = "";
+            this.txtZhongTaiMsg.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtZhongTaiMsg.Location = new System.Drawing.Point(530, 20);
+            this.txtZhongTaiMsg.MaxLength = 20;
+            this.txtZhongTaiMsg.Name = "txtZhongTaiMsg";
+            this.txtZhongTaiMsg.Size = new System.Drawing.Size(120, 21);
+            this.txtZhongTaiMsg.TabIndex = 28;
+            // 
+            // lblZhongTaiMsg
+            // 
+            this.lblZhongTaiMsg.AutoSize = true;
+            this.lblZhongTaiMsg.BackColor = System.Drawing.Color.Transparent;
+            this.lblZhongTaiMsg.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblZhongTaiMsg.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblZhongTaiMsg.Location = new System.Drawing.Point(471, 24);
+            this.lblZhongTaiMsg.Name = "lblZhongTaiMsg";
+            this.lblZhongTaiMsg.Size = new System.Drawing.Size(53, 12);
+            this.lblZhongTaiMsg.TabIndex = 25;
+            this.lblZhongTaiMsg.Text = "同步结果";
+            // 
+            // lblToZhongTaiFlag
+            // 
+            this.lblToZhongTaiFlag.AutoSize = true;
+            this.lblToZhongTaiFlag.BackColor = System.Drawing.Color.Transparent;
+            this.lblToZhongTaiFlag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblToZhongTaiFlag.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.lblToZhongTaiFlag.Location = new System.Drawing.Point(306, 24);
+            this.lblToZhongTaiFlag.Name = "lblToZhongTaiFlag";
+            this.lblToZhongTaiFlag.Size = new System.Drawing.Size(53, 12);
+            this.lblToZhongTaiFlag.TabIndex = 24;
+            this.lblToZhongTaiFlag.Text = "同步状态";
+            // 
+            // cmbToZhongTaiFlag
+            // 
+            this.cmbToZhongTaiFlag.BackColor = System.Drawing.SystemColors.Window;
+            this.cmbToZhongTaiFlag.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.cmbToZhongTaiFlag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmbToZhongTaiFlag.FormattingEnabled = true;
+            this.cmbToZhongTaiFlag.Location = new System.Drawing.Point(365, 20);
+            this.cmbToZhongTaiFlag.Name = "cmbToZhongTaiFlag";
+            this.cmbToZhongTaiFlag.Size = new System.Drawing.Size(100, 20);
+            this.cmbToZhongTaiFlag.TabIndex = 23;
+            // 
+            // lblFhtimeEnd
+            // 
+            this.lblFhtimeEnd.Location = new System.Drawing.Point(177, 24);
+            this.lblFhtimeEnd.Name = "lblFhtimeEnd";
+            this.lblFhtimeEnd.Size = new System.Drawing.Size(17, 12);
+            this.lblFhtimeEnd.TabIndex = 2;
+            this.lblFhtimeEnd.Text = "至";
+            // 
+            // lblFhtimeBegin
+            // 
+            this.lblFhtimeBegin.Location = new System.Drawing.Point(12, 24);
+            this.lblFhtimeBegin.Name = "lblFhtimeBegin";
+            this.lblFhtimeBegin.Size = new System.Drawing.Size(53, 12);
+            this.lblFhtimeBegin.TabIndex = 0;
+            this.lblFhtimeBegin.Text = "交接日期";
+            // 
+            // dtpFhtimeEnd
+            // 
+            this.dtpFhtimeEnd.AllowNull = false;
+            this.dtpFhtimeEnd.Location = new System.Drawing.Point(200, 20);
+            this.dtpFhtimeEnd.Name = "dtpFhtimeEnd";
+            this.dtpFhtimeEnd.Size = new System.Drawing.Size(100, 21);
+            this.dtpFhtimeEnd.TabIndex = 3;
+            this.dtpFhtimeEnd.Value = new System.DateTime(2017, 12, 1, 0, 0, 0, 0);
+            // 
+            // dtpFhtimeBegin
+            // 
+            this.dtpFhtimeBegin.AllowNull = false;
+            this.dtpFhtimeBegin.Location = new System.Drawing.Point(71, 20);
+            this.dtpFhtimeBegin.Name = "dtpFhtimeBegin";
+            this.dtpFhtimeBegin.Size = new System.Drawing.Size(100, 21);
+            this.dtpFhtimeBegin.TabIndex = 1;
+            this.dtpFhtimeBegin.Value = new System.DateTime(2017, 12, 1, 0, 0, 0, 0);
+            // 
+            // tsrToolStrip1
+            // 
+            this.tsrToolStrip1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsrToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.tsbtnSearch,
+            this.tsbtnSynLog,
+            this.tsbtnClearCondition,
+            this.toolStripSeparator1,
+            this.tsbtnAdaptive,
+            this.tsbtnClose});
+            this.tsrToolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.tsrToolStrip1.Name = "tsrToolStrip1";
+            this.tsrToolStrip1.Size = new System.Drawing.Size(1166, 35);
+            this.tsrToolStrip1.TabIndex = 0;
+            // 
+            // tsbtnSearch
+            // 
+            this.tsbtnSearch.AutoSize = false;
+            this.tsbtnSearch.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnSearch.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnSearch.Name = "tsbtnSearch";
+            this.tsbtnSearch.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnSearch.Text = "查询(&Q)";
+            this.tsbtnSearch.Click += new System.EventHandler(this.tsbtnSearch_Click);
+            // 
+            // tsbtnSynLog
+            // 
+            this.tsbtnSynLog.AutoSize = false;
+            this.tsbtnSynLog.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnSynLog.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnSynLog.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnSynLog.Name = "tsbtnSynLog";
+            this.tsbtnSynLog.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnSynLog.Text = "同步(&L)";
+            this.tsbtnSynLog.Click += new System.EventHandler(this.tsbtnSynLog_Click);
+            // 
+            // tsbtnClearCondition
+            // 
+            this.tsbtnClearCondition.AutoSize = false;
+            this.tsbtnClearCondition.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnClearCondition.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnClearCondition.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnClearCondition.Name = "tsbtnClearCondition";
+            this.tsbtnClearCondition.Size = new System.Drawing.Size(80, 25);
+            this.tsbtnClearCondition.Text = "清空条件(&C)";
+            this.tsbtnClearCondition.Click += new System.EventHandler(this.tsbtnClearCondition_Click);
+            // 
+            // toolStripSeparator1
+            // 
+            this.toolStripSeparator1.AutoSize = false;
+            this.toolStripSeparator1.Name = "toolStripSeparator1";
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            // 
+            // tsbtnAdaptive
+            // 
+            this.tsbtnAdaptive.AutoSize = false;
+            this.tsbtnAdaptive.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnAdaptive.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnAdaptive.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnAdaptive.Name = "tsbtnAdaptive";
+            this.tsbtnAdaptive.Size = new System.Drawing.Size(90, 25);
+            this.tsbtnAdaptive.Text = "自适应列宽(&A)";
+            this.tsbtnAdaptive.Click += new System.EventHandler(this.tsbtnAdaptive_Click);
+            // 
+            // tsbtnClose
+            // 
+            this.tsbtnClose.AutoSize = false;
+            this.tsbtnClose.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tsbtnClose.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.tsbtnClose.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.tsbtnClose.Name = "tsbtnClose";
+            this.tsbtnClose.Size = new System.Drawing.Size(60, 25);
+            this.tsbtnClose.Text = "关闭(&X)";
+            this.tsbtnClose.Click += new System.EventHandler(this.tsbtnClose_Click);
+            // 
+            // dgvBarcode
+            // 
+            this.dgvBarcode.AllowUserToAddRows = false;
+            this.dgvBarcode.AllowUserToDeleteRows = false;
+            this.dgvBarcode.AllowUserToModifyRows = true;
+            this.dgvBarcode.AllowUserToOrderColumns = true;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
+            this.dgvBarcode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvBarcode.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.dgvBarcode.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.dgvBarcode.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
+            this.dgvBarcode.CellHeight = 23;
+            this.dgvBarcode.ChildNodeColumnName = null;
+            this.dgvBarcode.ChildNodeColumnText = null;
+            this.dgvBarcode.ColumnDeep = 1;
+            this.dgvBarcode.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvBarcode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dgvBarcode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvBarcode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.YYYYMMDD,
+            this.BARCODE,
+            this.SAPCODE,
+            this.OUTCODE,
+            this.BANMA,
+            this.CREATETIME,
+            this.ORDERCODE,
+            this.ORDERITEM,
+            this.SECURITYCODE,
+            this.TOKUNCHUANTIME,
+            this.TOKUNCHUANFLAG,
+            this.KUNCHUANMSG});
+            this.dgvBarcode.ColumnTreeView = new System.Windows.Forms.TreeView[0];
+            this.dgvBarcode.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
+            this.dgvBarcode.DynamicColumnName = "";
+            this.dgvBarcode.EnableHeadersVisualStyles = false;
+            this.dgvBarcode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvBarcode.FormatQuantityColumns = null;
+            this.dgvBarcode.HasNode = false;
+            this.dgvBarcode.HorizontalMergeColumn = null;
+            this.dgvBarcode.IsAutoCountSum = true;
+            this.dgvBarcode.IsAutoResizeColumns = false;
+            this.dgvBarcode.IsClickF12 = false;
+            this.dgvBarcode.IsOpenMergeCellFlag = false;
+            this.dgvBarcode.IsSubTotalFlag = false;
+            this.dgvBarcode.IsTopDeep = false;
+            this.dgvBarcode.Location = new System.Drawing.Point(12, 96);
+            this.dgvBarcode.MergeColumnNames = null;
+            this.dgvBarcode.MergeDetailColumnNames = null;
+            this.dgvBarcode.MergeDetailOnlyColumn = null;
+            this.dgvBarcode.MergeOnlyColumn = null;
+            this.dgvBarcode.MultiSelect = false;
+            this.dgvBarcode.Name = "dgvBarcode";
+            this.dgvBarcode.ReadOnly = true;
+            this.dgvBarcode.RefreshAtHscroll = false;
+            this.dgvBarcode.RowHeadersWidth = 50;
+            this.dgvBarcode.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
+            this.dgvBarcode.RowsDefaultCellStyle = dataGridViewCellStyle6;
+            this.dgvBarcode.RowTemplate.Height = 21;
+            this.dgvBarcode.Size = new System.Drawing.Size(1142, 514);
+            this.dgvBarcode.SortOrderColumnName = null;
+            this.dgvBarcode.TabIndex = 2;
+            this.dgvBarcode.Tag = "";
+            this.dgvBarcode.TotalSumColumns = null;
+            this.dgvBarcode.ViewRowFilter = "";
+            this.dgvBarcode.VirtualNodes = false;
+            // 
+            // YYYYMMDD
+            // 
+            this.YYYYMMDD.DataPropertyName = "YYYYMMDD";
+            this.YYYYMMDD.HeaderText = "日期";
+            this.YYYYMMDD.Name = "YYYYMMDD";
+            this.YYYYMMDD.ReadOnly = true;
+            // 
+            // BARCODE
+            // 
+            this.BARCODE.DataPropertyName = "BARCODE";
+            this.BARCODE.HeaderText = "产品条码";
+            this.BARCODE.Name = "BARCODE";
+            this.BARCODE.ReadOnly = true;
+            // 
+            // SAPCODE
+            // 
+            this.SAPCODE.DataPropertyName = "SAPCODE";
+            this.SAPCODE.HeaderText = "物料编码";
+            this.SAPCODE.Name = "SAPCODE";
+            this.SAPCODE.ReadOnly = true;
+            // 
+            // OUTCODE
+            // 
+            this.OUTCODE.DataPropertyName = "OUTCODE";
+            this.OUTCODE.HeaderText = "外箱码";
+            this.OUTCODE.Name = "OUTCODE";
+            this.OUTCODE.ReadOnly = true;
+            // 
+            // BANMA
+            // 
+            this.BANMA.DataPropertyName = "BANMA";
+            this.BANMA.HeaderText = "板码";
+            this.BANMA.Name = "BANMA";
+            this.BANMA.ReadOnly = true;
+            // 
+            // CREATETIME
+            // 
+            this.CREATETIME.DataPropertyName = "CREATETIME";
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle3;
+            this.CREATETIME.HeaderText = "交接时间";
+            this.CREATETIME.Name = "CREATETIME";
+            this.CREATETIME.ReadOnly = true;
+            // 
+            // ORDERCODE
+            // 
+            this.ORDERCODE.DataPropertyName = "ORDERCODE";
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.ORDERCODE.DefaultCellStyle = dataGridViewCellStyle4;
+            this.ORDERCODE.HeaderText = "SAP销售单号";
+            this.ORDERCODE.Name = "ORDERCODE";
+            this.ORDERCODE.ReadOnly = true;
+            // 
+            // ORDERITEM
+            // 
+            this.ORDERITEM.HeaderText = "SAP销售单行号";
+            this.ORDERITEM.Name = "ORDERITEM";
+            this.ORDERITEM.ReadOnly = true;
+            // 
+            // SECURITYCODE
+            // 
+            this.SECURITYCODE.HeaderText = "防伪码";
+            this.SECURITYCODE.Name = "SECURITYCODE";
+            this.SECURITYCODE.ReadOnly = true;
+            // 
+            // TOKUNCHUANTIME
+            // 
+            this.TOKUNCHUANTIME.DataPropertyName = "TOKUNCHUANTIME";
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle5.Format = "yyyy-MM-dd HH:mm:ss";
+            this.TOKUNCHUANTIME.DefaultCellStyle = dataGridViewCellStyle5;
+            this.TOKUNCHUANTIME.HeaderText = "同步时间";
+            this.TOKUNCHUANTIME.Name = "TOKUNCHUANTIME";
+            this.TOKUNCHUANTIME.ReadOnly = true;
+            // 
+            // TOKUNCHUANFLAG
+            // 
+            this.TOKUNCHUANFLAG.DataPropertyName = "TOKUNCHUANFLAG";
+            this.TOKUNCHUANFLAG.FalseValue = "0";
+            this.TOKUNCHUANFLAG.HeaderText = "同步标识";
+            this.TOKUNCHUANFLAG.IndeterminateValue = "0";
+            this.TOKUNCHUANFLAG.Name = "TOKUNCHUANFLAG";
+            this.TOKUNCHUANFLAG.ReadOnly = true;
+            this.TOKUNCHUANFLAG.TrueValue = "1";
+            // 
+            // KUNCHUANMSG
+            // 
+            this.KUNCHUANMSG.DataPropertyName = "KUNCHUANMSG";
+            this.KUNCHUANMSG.HeaderText = "同步结果";
+            this.KUNCHUANMSG.Name = "KUNCHUANMSG";
+            this.KUNCHUANMSG.ReadOnly = true;
+            // 
+            // F_SAP_HEGII_0113
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1166, 622);
+            this.Controls.Add(this.dgvBarcode);
+            this.Controls.Add(this.grpCollapsible1);
+            this.Controls.Add(this.tsrToolStrip1);
+            this.Name = "F_SAP_HEGII_0113";
+            this.Text = "昆船WMS系统同步日志";
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.F_SAP_HEGII_0113_FormClosed);
+            this.Load += new System.EventHandler(this.F_SAP_HEGII_0113_Load);
+            this.grpCollapsible1.ResumeLayout(false);
+            this.grpCollapsible1.PerformLayout();
+            this.tsrToolStrip1.ResumeLayout(false);
+            this.tsrToolStrip1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvBarcode)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private Dongke.WinForm.Controls.TsrToolStrip tsrToolStrip1;
+        private System.Windows.Forms.ToolStripButton tsbtnSearch;
+        private System.Windows.Forms.ToolStripButton tsbtnAdaptive;
+        private System.Windows.Forms.ToolStripButton tsbtnClose;
+        private WinForm.Controls.GrpCollapsible grpCollapsible1;
+        private WinForm.Controls.LblLabel lblFhtimeBegin;
+        private WinForm.Controls.DtpDate dtpFhtimeBegin;
+        private System.Windows.Forms.ToolStripButton tsbtnClearCondition;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private WinForm.Controls.LblLabel lblFhtimeEnd;
+        private WinForm.Controls.DtpDate dtpFhtimeEnd;
+        private System.Windows.Forms.ToolStripButton tsbtnSynLog;
+        private Basics.BaseControls.C_Label lblToZhongTaiFlag;
+        private Basics.BaseControls.C_ComboBox cmbToZhongTaiFlag;
+        private Basics.BaseControls.C_Label lblZhongTaiMsg;
+        private Basics.BaseControls.C_TextBox txtZhongTaiMsg;
+        private Basics.BaseControls.C_DataGridView dgvBarcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn YYYYMMDD;
+        private System.Windows.Forms.DataGridViewTextBoxColumn BARCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SAPCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn OUTCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn BANMA;
+        private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ORDERCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ORDERITEM;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SECURITYCODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn TOKUNCHUANTIME;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn TOKUNCHUANFLAG;
+        private System.Windows.Forms.DataGridViewTextBoxColumn KUNCHUANMSG;
+    }
+}

+ 232 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.cs

@@ -0,0 +1,232 @@
+/*******************************************************************************
+ * Copyright(c) 2016 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:F_SAP_HEGII_0113.cs
+ *      2.功能描述:中台同步日志
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      付斌            2022/09/02         1.00            新建
+ *******************************************************************************/
+using System;
+using System.Data;
+using System.Reflection;
+using System.Windows.Forms;
+
+using Dongke.IBOSS.PRD.Basics.BaseControls;
+using Dongke.IBOSS.PRD.Basics.BaseResources;
+using Dongke.IBOSS.PRD.Client.CommonModule;
+using Dongke.IBOSS.PRD.Client.Controls;
+using Dongke.IBOSS.PRD.Client.DataModels;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using Dongke.IBOSS.PRD.WCF.Proxys;
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    /// <summary>
+    /// 中台同步日志
+    /// </summary>
+    public partial class F_SAP_HEGII_0113 : DKDockPanelBase
+    {
+        #region 成员变量
+        private static F_SAP_HEGII_0113 _instance = null;
+        #endregion
+
+        #region 单例模式
+
+        /// <summary>
+        /// 单例模式,防止重复创建窗体
+        /// </summary>
+        public static F_SAP_HEGII_0113 Instance
+        {
+            get
+            {
+                if (_instance == null)
+                {
+                    _instance = new F_SAP_HEGII_0113();
+                }
+                return _instance;
+            }
+        }
+
+        #endregion
+
+        #region 构造函数
+        /// <summary>
+        /// 成品SAP日志
+        /// </summary>
+        public F_SAP_HEGII_0113()
+        {
+            InitializeComponent();
+
+            tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
+            tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
+        }
+        #endregion
+
+        #region 控件事件
+        /// <summary>
+        /// 关闭
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void F_SAP_HEGII_0113_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            _instance = null;
+        }
+
+        /// <summary>
+        /// 画面加载
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void F_SAP_HEGII_0113_Load(object sender, System.EventArgs e)
+        {
+            try
+            {
+                // 加载权限
+                FormPermissionManager.FormPermissionControl(Name, this,
+                    LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData,
+                    LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
+
+                dgvBarcode.AutoGenerateColumns = false;
+
+                dtpFhtimeBegin.Value = DateTime.Now.Date;
+                dtpFhtimeEnd.Value = DateTime.Now.Date;
+
+                DataTable dtToZhongTaiFlag = new DataTable();
+                dtToZhongTaiFlag.Columns.Add("Flag", typeof(string));
+                dtToZhongTaiFlag.Columns.Add("FlagName", typeof(string));
+
+                DataRow newRow = dtToZhongTaiFlag.NewRow();
+                dtToZhongTaiFlag.Rows.Add(newRow);
+                newRow = dtToZhongTaiFlag.NewRow();
+                newRow["Flag"] = "1";
+                newRow["FlagName"] = "已同步";
+                dtToZhongTaiFlag.Rows.Add(newRow);
+                newRow = dtToZhongTaiFlag.NewRow();
+                newRow["Flag"] = "0";
+                newRow["FlagName"] = "未同步";
+                dtToZhongTaiFlag.Rows.Add(newRow);
+
+                this.cmbToZhongTaiFlag.DisplayMember = "FlagName";
+                this.cmbToZhongTaiFlag.ValueMember = "Flag";
+                this.cmbToZhongTaiFlag.DataSource = dtToZhongTaiFlag;
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(ToString(),
+                    MethodBase.GetCurrentMethod().Name, Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 查询
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnSearch_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                tsrToolStrip1.Focus();
+                dgvBarcode.DataSource = null;
+                if (dtpFhtimeBegin.Value == null || dtpFhtimeEnd.Value == null)
+                {
+                    return;
+                }
+
+                ClientRequestEntity cre = new ClientRequestEntity();
+                cre.NameSpace = "Hegii";
+                cre.Name = "GetKunChuanDataLog";
+                cre.Properties["FhtimeBegin"] = dtpFhtimeBegin.Value.Value;
+                cre.Properties["FhtimeEnd"] = dtpFhtimeEnd.Value.Value.AddDays(1);
+                cre.Properties["ToKunChuanFlag"] = cmbToZhongTaiFlag.SelectedValue;
+                cre.Properties["KunChuanMsg"] = txtZhongTaiMsg.Text;
+
+                ServiceResultEntity sre = DoAsync(() =>
+                {
+                    return SAPDataModuleProxy.Service.DoRequest(cre);
+                });
+
+                if (sre.Status == Constant.ServiceResultStatus.Success)
+                {
+                    if (sre.Data.Tables[0].Rows.Count == 0)
+                    {
+                        DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_001);
+                        return;
+                    }
+
+                    // 查询成功
+                    dgvBarcode.DataSource = sre.Data.Tables[0];
+                    dgvBarcode.AutoResizeColumns();
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(ToString(),
+                    MethodBase.GetCurrentMethod().Name, Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 同步操作
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnSynLog_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                F_SAP_HEGII_011301 f = new F_SAP_HEGII_011301();
+                DialogResult dialogResult = f.ShowDialog();
+
+                if (dialogResult == DialogResult.OK)
+                {
+                    this.tsbtnSearch_Click(null, null);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 清除条件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnClearCondition_Click(object sender, EventArgs e)
+        {
+            dtpFhtimeBegin.Value = DateTime.Now.Date;
+            dtpFhtimeEnd.Value = DateTime.Now.Date;
+            this.cmbToZhongTaiFlag.SelectedIndex = 0;
+            txtZhongTaiMsg.Text = string.Empty;
+        }
+
+        /// <summary>
+        /// 自适应列宽
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnAdaptive_Click(object sender, EventArgs e)
+        {
+            dgvBarcode.AutoResizeColumns();
+        }
+
+        /// <summary>
+        /// 关闭画面
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void tsbtnClose_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+        #endregion
+    }
+}

+ 162 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_0113.resx

@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="tsrToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="YYYYMMDD.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="BARCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="SAPCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="OUTCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="BANMA.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="CREATETIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ORDERCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ORDERITEM.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="SECURITYCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="TOKUNCHUANTIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="TOKUNCHUANFLAG.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="KUNCHUANMSG.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>39</value>
+  </metadata>
+</root>

+ 121 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.Designer.cs

@@ -0,0 +1,121 @@
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    partial class F_SAP_HEGII_011301
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_SAP_HEGII_011301));
+            this.lblSyncDate = new Dongke.WinForm.Controls.LblLabel();
+            this.btnCancel = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
+            this.btnSave = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
+            this.dtpSyncDate = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DateTimePicker();
+            this.SuspendLayout();
+            // 
+            // lblSyncDate
+            // 
+            this.lblSyncDate.Location = new System.Drawing.Point(12, 16);
+            this.lblSyncDate.Name = "lblSyncDate";
+            this.lblSyncDate.Size = new System.Drawing.Size(53, 12);
+            this.lblSyncDate.TabIndex = 0;
+            this.lblSyncDate.Text = "同步日期";
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCancel.BackColor = System.Drawing.Color.Transparent;
+            this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
+            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCancel.ForeColor = System.Drawing.Color.White;
+            this.btnCancel.Location = new System.Drawing.Point(147, 52);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(85, 30);
+            this.btnCancel.TabIndex = 5;
+            this.btnCancel.Text = "关闭";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // btnSave
+            // 
+            this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnSave.BackColor = System.Drawing.Color.Transparent;
+            this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
+            this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnSave.ForeColor = System.Drawing.Color.White;
+            this.btnSave.Location = new System.Drawing.Point(56, 52);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(85, 30);
+            this.btnSave.TabIndex = 4;
+            this.btnSave.Text = "确定(&S)";
+            this.btnSave.UseVisualStyleBackColor = false;
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+            // 
+            // dtpSyncDate
+            // 
+            this.dtpSyncDate.CustomFormat = "yyyy-MM-dd";
+            this.dtpSyncDate.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dtpSyncDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.dtpSyncDate.Location = new System.Drawing.Point(71, 12);
+            this.dtpSyncDate.Name = "dtpSyncDate";
+            this.dtpSyncDate.Size = new System.Drawing.Size(161, 21);
+            this.dtpSyncDate.TabIndex = 6;
+            // 
+            // F_SAP_HEGII_011301
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.btnCancel;
+            this.ClientSize = new System.Drawing.Size(244, 107);
+            this.Controls.Add(this.dtpSyncDate);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.lblSyncDate);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.IsSaveFormSize = false;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "F_SAP_HEGII_011301";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.StatusSizingGrip = false;
+            this.Text = "手动同步";
+            this.Controls.SetChildIndex(this.lblSyncDate, 0);
+            this.Controls.SetChildIndex(this.btnSave, 0);
+            this.Controls.SetChildIndex(this.btnCancel, 0);
+            this.Controls.SetChildIndex(this.dtpSyncDate, 0);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private WinForm.Controls.LblLabel lblSyncDate;
+        private Basics.BaseControls.C_Button btnCancel;
+        private Basics.BaseControls.C_Button btnSave;
+		private Basics.BaseControls.C_DateTimePicker dtpSyncDate;
+	}
+}

+ 86 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.cs

@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright(c) 2016 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:F_SAP_HEGII_011301.cs
+ *      2.功能描述:手动同步
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      陈晓野          2018/11/16          1.00            新建
+ *******************************************************************************/
+using System;
+using System.Reflection;
+using System.Windows.Forms;
+using Dongke.IBOSS.PRD.Basics.BaseControls;
+using Dongke.IBOSS.PRD.Client.CommonModule;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using Dongke.IBOSS.PRD.WCF.Proxys;
+
+namespace Dongke.IBOSS.PRD.Client.SAPDataModule
+{
+    public partial class F_SAP_HEGII_011301 : FormBase
+    {
+        public F_SAP_HEGII_011301()
+        {
+            InitializeComponent();
+            this.dtpSyncDate.Value = DateTime.Now.Date;
+        }
+
+        /// <summary>
+        /// 同步
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                string syncDate = this.dtpSyncDate.Value.ToString("yyyy-MM-dd");
+                DialogResult dr = MessageBox.Show("是否同步【" + syncDate + "】的数据。",
+                    this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
+
+                if (dr != DialogResult.Yes)
+                {
+                    return;
+                }
+
+                ClientRequestEntity cre = new ClientRequestEntity();
+                cre.NameSpace = "Hegii";
+                cre.Name = "SyncKunChuanData";
+                cre.Properties["SyncDate"] = syncDate;
+
+                ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() =>
+                {
+                    return SAPDataModuleProxy.Service.DoRequest(cre);
+                });
+
+                if (sre.OtherStatus > 0)
+                {
+                    DKMessageBox.ShowDialog(this, DKMessageCode.I_CMN_S_002);
+                    this.DialogResult = DialogResult.OK;
+                    Close();
+                }
+                else
+                {
+                    DKMessageBox.ShowDialog(this, DKMessageCode.W_CMN_S_004, sre.Message);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 对异常进行共通处理
+                ExceptionManager.HandleEventException(this.ToString(),
+                    MethodBase.GetCurrentMethod().Name, this.Text, ex);
+            }
+        }
+
+        /// <summary>
+        /// 取消
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 137 - 0
DK.Client/SAPDataModule/Hegii/F_SAP_HEGII_011301.resx

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnCancel.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAFUAAAAeCAYAAABdalL1AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+        vAAADrwBlbxySQAAAI5JREFUaEPt0KERxCAUQMFrEImOowUsioJSAb3gaOLfnLjJRMNzT2wD+ymlhPb1
+        3mOMEWutMPUQUwGmAkwFmAowFWAqwFSAqQBTAaYCTAWYCnilXtcV2tdaM/U0UwGmAmqtT2rOObTvnzrn
+        NPUUUwGmAkwFmAowFWAqwFSAqYBf6n3fpp70Sk0phfY9qTO+PIZEBQZ3CrAAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="btnSave.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAFUAAAAeCAYAAABdalL1AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+        vAAADrwBlbxySQAAAI5JREFUaEPt0KERxCAUQMFrEImOowUsioJSAb3gaOLfnLjJRMNzT2wD+ymlhPb1
+        3mOMEWutMPUQUwGmAkwFmAowFWAqwFSAqQBTAaYCTAWYCnilXtcV2tdaM/U0UwGmAmqtT2rOObTvnzrn
+        NPUUUwGmAkwFmAowFWAqwFSAqYBf6n3fpp70Sk0phfY9qTO+PIZEBQZ3CrAAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 36 - 0
DK.Client/SAPDataModule/SAPDataModule.csproj

@@ -116,6 +116,30 @@
     <Compile Include="Hegii\F_SAP_HEGII_0108.Designer.cs">
       <DependentUpon>F_SAP_HEGII_0108.cs</DependentUpon>
     </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_0112.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_0112.Designer.cs">
+      <DependentUpon>F_SAP_HEGII_0112.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_011201.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_011201.Designer.cs">
+      <DependentUpon>F_SAP_HEGII_011201.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_0113.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_0113.Designer.cs">
+      <DependentUpon>F_SAP_HEGII_0113.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_011301.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Hegii\F_SAP_HEGII_011301.Designer.cs">
+      <DependentUpon>F_SAP_HEGII_011301.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -182,6 +206,18 @@
     <EmbeddedResource Include="Hegii\F_SAP_HEGII_0108.resx">
       <DependentUpon>F_SAP_HEGII_0108.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Hegii\F_SAP_HEGII_0112.resx">
+      <DependentUpon>F_SAP_HEGII_0112.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Hegii\F_SAP_HEGII_011201.resx">
+      <DependentUpon>F_SAP_HEGII_011201.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Hegii\F_SAP_HEGII_0113.resx">
+      <DependentUpon>F_SAP_HEGII_0113.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Hegii\F_SAP_HEGII_011301.resx">
+      <DependentUpon>F_SAP_HEGII_011301.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 583 - 385
DK.Service/PMModuleLogic/PMModuleLogicDAL.cs


+ 26 - 16
DK.Service/PMModuleLogic/PMModuleLogicPartial.cs

@@ -3994,6 +3994,9 @@ and (TP_PM_ProductionDataIn.modeltype <> 5 or (exists (select 1 from tp_pm_grout
                                     OrderID,
                                     OrderNo,
                                     OrderDate,
+									VBELN,
+									POSNR,
+									SUMMARY,
                                     Remarks,
                                     ValueFlag,
                                     displayno,
@@ -4076,25 +4079,32 @@ and (TP_PM_ProductionDataIn.modeltype <> 5 or (exists (select 1 from tp_pm_grout
 			ServiceResultEntity sre = new ServiceResultEntity();
 			try
 			{
-				string sqlString =
-				"SELECT 1 as sel\n" +
-				"      ,od.materialcode\n" +
-				"      ,g.goodscode\n" +
-				"      ,l.logoname\n" +
-				"      ,pb.packingbomid\n" +
-				"  FROM tp_pm_orderdetail od\n" +
-				"  LEFT JOIN tp_mst_packingbom pb\n" +
-				"    ON pb.matnr = od.materialcode\n" +
-				"  LEFT JOIN tp_mst_goods g\n" +
-				"    ON g.goodsid = pb.goodsid\n" +
-				"  LEFT JOIN tp_mst_logo l\n" +
-				"    ON l.logoid = pb.logoid\n" +
-				" WHERE od.valueflag = '1'\n" +
-				"   AND od.orderid = :orderid";
+				string sqlString = @"
+				SELECT OD.MATERIALCODE,
+					   OD.MAKTX,
+					   OD.KWMENG,
+					   G.GOODSCODE,
+					   L.LOGONAME
+				  FROM TP_PM_ORDERDETAIL OD
+				  LEFT JOIN (SELECT PB.MATNR,
+									PB.GOODSID,
+									PB.LOGOID
+							   FROM TP_MST_PACKINGBOM PB
+							  WHERE PB.VALUEFLAG = '1'
+							  GROUP BY PB.MATNR,
+									   PB.GOODSID,
+									   PB.LOGOID) T
+					ON T.MATNR = OD.MATERIALCODE
+				  LEFT JOIN TP_MST_GOODS G
+					ON G.GOODSID = T.GOODSID
+				  LEFT JOIN TP_MST_LOGO L
+					ON L.LOGOID = T.LOGOID
+				 WHERE OD.VALUEFLAG = '1'
+				   AND OD.ORDERID = :ORDERID ";
 
 				OracleParameter[] paras = new OracleParameter[]
 				{
-					new OracleParameter(":orderid", orderID),
+					new OracleParameter(":ORDERID", orderID),
 				};
 
 				sre.Data = con.GetSqlResultToDs(sqlString, paras);

+ 256 - 0
DK.Service/SAPDataService/SAPDataLogicPartial.cs

@@ -7,9 +7,11 @@ using System.Linq;
 using System.Net;
 using System.Reflection;
 using System.Text;
+using System.Threading;
 using Dongke.IBOSS.PRD.Basics.BaseResources;
 using Dongke.IBOSS.PRD.Basics.DataAccess;
 using Dongke.IBOSS.PRD.Basics.Library;
+using Dongke.IBOSS.PRD.Service.WMSDataService;
 using Dongke.IBOSS.PRD.WCF.DataModels;
 using Newtonsoft.Json.Linq;
 using Oracle.ManagedDataAccess.Client;
@@ -159,6 +161,31 @@ namespace Dongke.IBOSS.PRD.Service.SAPHegiiDataService
                             LocalPath.LogExePath + "SAP_HEGII\\Error_");
                 }
             }
+            // 60 产成品
+            if (funCode == ",ALL," || funCode.Contains(",60,"))
+            {
+                try
+                {
+                    sre = SyncSap5000_60(ndate);
+                    if (sre.Status != Constant.ServiceResultStatus.Success ||
+                        "S" != sre.Result + "")
+                    {
+                        OutputLog.TraceLog(LogPriority.Warning,
+                                "AutoWorkDataToSAP5000",
+                                "60 产成品 " + ndate.ToString("yyyy-MM-dd HH:mm:ss"),
+                                JsonHelper.ToJson(sre),
+                                LocalPath.LogExePath + "SAP_HEGII\\Warn_");
+                    }
+                }
+                catch (Exception ex)
+                {
+                    OutputLog.TraceLog(LogPriority.Error,
+                            "AutoWorkDataToSAP5000",
+                            "60 产成品 " + ndate.ToString("yyyy-MM-dd HH:mm:ss"),
+                            ex.ToString(),
+                            LocalPath.LogExePath + "SAP_HEGII\\Error_");
+                }
+            }
         }
 
         /// <summary>
@@ -652,6 +679,235 @@ namespace Dongke.IBOSS.PRD.Service.SAPHegiiDataService
 
         }
 
+        /// <summary>
+        /// 同步SAP接口_60节点
+        /// </summary>
+        /// <param name="date"></param>
+        /// <param name="datacode"></param>
+        /// <param name="userid"></param>
+        /// <param name="logid"></param>
+        /// <returns></returns>
+        public static ServiceResultEntity SyncSap5000_60(DateTime date)
+        {
+            ServiceResultEntity sre = new ServiceResultEntity();
+            IDBTransaction oracleConn = ClsDbFactory.CreateDBTransaction(DataBaseType.ORACLE, DataManager.ConnectionString);
+
+            try
+            {
+                OracleParameter[] paras = null;
+                int r = 0;
+
+                // 查询当前节点所有不为S的日志
+                string sqlString = @"
+                SELECT DL.LOGID
+                  FROM TSAP_HEGII_DATALOG_BG DL
+                 WHERE 1 = 1
+                   AND DL.DATASTUTS = 'F'
+                   AND DL.LOGID > 6
+                   AND DL.DATACODE = '60' 
+                 ORDER BY DL.LOGID ";
+
+                DataTable dtLogID = oracleConn.GetSqlResultToDt(sqlString);
+
+                if (dtLogID.Rows.Count == 0)
+                {
+                    sre.Result = "S";
+                    sre.Message = "没有要同步的数据";
+                    return sre;
+                }
+                string logIDs = "," + string.Join(",", dtLogID.AsEnumerable().Select(d => d.Field<decimal>("LOGID")).ToArray()) + ",";
+
+                sqlString = @"
+                SELECT TO_CHAR(WD.YYYYMMDD) YYYYMMDD,
+                       WD.WORKCODE AS WERKS,
+                       TO_CHAR(WD.GOODSCODE) GROES,
+                       TO_CHAR(WD.SAPCODE) MATNR,
+                       TO_CHAR(WD.USERCODE) ZGHNU,
+                       TO_CHAR(WD.DATACODE) ZJDNU,
+                       TO_CHAR(WD.CREATETIME, 'YYYYMMDD') ZSCNU,
+                       TO_CHAR(WD.CREATETIME, 'HH24MISS') ZKSSJ,
+                       TO_CHAR(WD.CREATETIME, 'YYYYMMDDHH24MISS') ZJSRQ,
+                       TO_CHAR(WD.ORDERCODE) VBELN,
+                       TO_CHAR(WD.ORDERITEM) POSNR,
+                       TO_CHAR(WD.OUTPUTNUM) ZCLNG,
+                       TO_CHAR(WD.SCRAPNUM) ZSPNG,
+                       TO_CHAR(WD.CLEANUPNUM) ZQCNG,
+                       TO_CHAR(WD.RECOVERYNUM) ZHSNG,
+                       TO_CHAR(WD.REPAIRNUM) ZGBNG,
+                       TO_CHAR(WD.TESTMOULDFLAG) ZSCMS,
+                       'T' AS ZSCS,
+                       TO_CHAR(WD.WORKSHOP) ZSCCJ,
+                       WD.CHARG,
+                       '60' AS DATACODE,
+                       WD.WORKCODE || WD.CHARG || LPAD(DL.LOGID, 10, '0') AS ZID
+                  FROM TSAP_HEGII_WORKDATA_BG WD
+                 INNER JOIN TSAP_HEGII_DATALOG_BG DL
+                    ON WD.LOGID = DL.LOGID
+                 WHERE INSTR(:LOGIDS, ',' || WD.LOGID || ',') > 0
+                 ORDER BY WD.LOGID ";
+
+                paras = new OracleParameter[]
+                {
+                    new OracleParameter(":LOGIDS", OracleDbType.Varchar2, logIDs, ParameterDirection.Input),
+                };
+
+                DataTable workData = oracleConn.GetSqlResultToDt(sqlString, paras);
+                int num = workData.Rows.Count;
+
+                //sqlString = @"
+                //SELECT ZID,
+                //       WERKS,
+                //       MATNR,
+                //       ZJDNU,
+                //       ZSCS,
+                //       ZSCCJ,
+                //       ZSCMS,
+                //       ZSCNU,
+                //       ZKSSJ,
+                //       ZGHNU,
+                //       GROES,
+                //       POSNR,
+                //       IDNRK,
+                //       MENGE,
+                //       MEINS,
+                //       CHARG,
+                //       LGORT
+                //  FROM TSAP_HEGII_WORKDATA_BG_ZB
+                // WHERE INSTR(:LOGIDS, ',' || LOGID || ',') > 0
+                // ORDER BY LOGID  ";
+
+                //paras = new OracleParameter[]
+                //{
+                //    new OracleParameter(":LOGIDS", OracleDbType.Varchar2, logIDs, ParameterDirection.Input),
+                //};
+
+                //DataTable dtDetail = oracleConn.GetSqlResultToDt(sqlString, paras);
+
+                // 调用SAP接口
+                //string postString = "{\"ZSUM\":" + num.ToString() + ",\"TABLE_IN\":{\"item\":" + JsonHelper.ToJson(ModelConvertHelper<BGToSAP>.ConvertToModel(workData)) + "}"
+                //    + ",\"TABLE_IN1\":{\"item\":" + JsonHelper.ToJson(ModelConvertHelper<BGToSAPDetail>.ConvertToModel(dtDetail)) + "}}";
+                string postString = "{\"ZSUM\":" + num.ToString() + ",\"TABLE_IN\":{\"item\":" + JsonHelper.ToJson(ModelConvertHelper<BGToSAP>.ConvertToModel(workData)) + "}}";
+
+                // 配置文件
+                INIUtility ini = INIUtility.Instance(INIUtility.IniFile.SAP_HEGII);
+                string url030 = ini.ReadIniData("SAP_NEW_INFO", "Url030");
+
+                // 测试
+                //url030 = "http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM030";
+
+                // 正式
+                //url030 = "http://hgs4powd1.hegii.com:8000/RESTAdapter/DKMES/ZPPFM030";
+
+                string result = string.Empty;
+                try
+                {
+                    result = PostData(url030, postString, "POST");
+                }
+                catch (Exception ex)
+                {
+                    sre.Result = -2;
+                    sre.Message = "sap030接口同步失败," + ex.Message;
+                    return sre;
+                }
+
+                sqlString = @"
+                UPDATE TSAP_HEGII_DATALOG_BG T
+                   SET T.ENDTIME = SYSDATE,
+                       DATASTUTS = :DATASTUTS,
+                       DATAMSG   = :MSG
+                 WHERE INSTR(:LOGIDS, ',' || LOGID || ',') > 0 ";
+                paras = new OracleParameter[]
+                {
+                    new OracleParameter(":DATASTUTS",OracleDbType.Varchar2, JObject.Parse(result)["ZTYPE"].ToString(), ParameterDirection.Input),
+                    new OracleParameter(":MSG",OracleDbType.Varchar2, JObject.Parse(result)["ZMSG"].ToString(), ParameterDirection.Input),
+                    new OracleParameter(":LOGIDS", OracleDbType.Varchar2, logIDs, ParameterDirection.Input),
+                };
+                r = oracleConn.ExecuteNonQuery(sqlString, paras);
+
+                #region 同步WMS系统
+                DateTime now = DateTime.Now;
+                string message = string.Empty;
+
+                string sqlFpData = @"
+                SELECT WL.SKU,
+                       WL.SERIALNO,
+                       WL.ADDDAY,
+                       WL.ADDTIME,
+                       WL.CODEI,
+                       WL.UDF1,
+                       WL.UDF2,
+                       WL.LPN,
+                       WL.CREATETIME,
+                       GDD.SECURITYCODE,
+                       WL.LOGTYPE
+                  FROM TP_WMS_LOG WL
+                 INNER JOIN TP_PM_GROUTINGDAILYDETAIL GDD
+                    ON GDD.BARCODE = WL.CODEI
+                 WHERE WL.VALUEFLAG = '1'
+                   AND WL.BGLOGID = :BGLOGID ";
+
+                string sqlUpdate = @"
+                UPDATE TP_WMS_LOG
+                   SET RETURNDESC = :RETURNDESC,
+                       UPDATETIME = :UPDATETIME
+                 WHERE BGLOGID = :BGLOGID ";
+
+                foreach (DataRow row in dtLogID.Rows)
+                {
+                    // 歇2s,调太快会给接口累着。
+                    Thread.Sleep(2000);
+
+                    paras = new OracleParameter[]
+                    {
+                        new OracleParameter(":BGLOGID", OracleDbType.Int32, row["LOGID"], ParameterDirection.Input),
+                    };
+                    DataTable fpData = oracleConn.GetSqlResultToDt(sqlFpData, paras);
+
+                    if (fpData.Rows.Count > 0)
+                    {
+                        if ("1".Equals(fpData.Rows[0]["LOGTYPE"] + ""))
+                        {
+                            message = WMSDataLogic.PushWMS2(fpData, now);
+                        }
+                        else
+                        {
+                            message = WMSDataLogic.BackPushWMS2(fpData, now);
+                        }
+                    }
+
+                    paras = new OracleParameter[]
+                    {
+                        new OracleParameter(":RETURNDESC", OracleDbType.NVarchar2, message, ParameterDirection.Input),
+                        new OracleParameter(":UPDATETIME", OracleDbType.Date, now, ParameterDirection.Input),
+                        new OracleParameter(":BGLOGID", OracleDbType.Int32, row["LOGID"], ParameterDirection.Input),
+                    };
+                    r = oracleConn.ExecuteNonQuery(sqlUpdate, paras);
+                }
+                #endregion
+
+                oracleConn.Commit();
+
+                sre.Message = JObject.Parse(result)["ZMSG"].ToString();
+                sre.Result = JObject.Parse(result)["ZTYPE"].ToString();
+                return sre;
+            }
+            catch (Exception ex)
+            {
+                OutputLog.TraceLog(LogPriority.Error,
+                        "BGToSAP",
+                        "报工" + date.ToString("yyyy-MM-dd HH:mm:ss"),
+                        ex.ToString(),
+                        LocalPath.LogExePath + "SAP_HEGII\\Error_");
+                throw ex;
+            }
+            finally
+            {
+                if (oracleConn != null && oracleConn.ConnState == ConnectionState.Open)
+                {
+                    oracleConn.Disconnect();
+                }
+            }
+        }
         #endregion
 
         #region 跨车间作业(注销)

+ 4 - 0
DK.Service/SAPDataService/SAPHegiiDataService.csproj

@@ -131,6 +131,10 @@
       <Project>{16C72702-C162-4CD3-9CCC-40B9D8491CCD}</Project>
       <Name>Service.DataModels</Name>
     </ProjectReference>
+    <ProjectReference Include="..\WMSDataService\WMSDataService.csproj">
+      <Project>{66595313-4446-423e-a3ca-8d9ec76b2c27}</Project>
+      <Name>WMSDataService</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <None Include="Service References\HGSAPDK_ZPPFM008\configuration91.svcinfo" />

+ 513 - 1
DK.Service/WMSDataService/WMSDataLogic.cs

@@ -1,12 +1,15 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-
+using System.IO;
+using System.Net;
+using System.Text;
 using Dongke.IBOSS.PRD.Basics.DataAccess;
 using Dongke.IBOSS.PRD.Basics.Library;
 using Dongke.IBOSS.PRD.Service.DataModels;
 using Dongke.IBOSS.PRD.Service.WMSDataService.WMS_putBARCODEData;
 using Dongke.IBOSS.PRD.WCF.DataModels;
+using Newtonsoft.Json.Linq;
 using Oracle.ManagedDataAccess.Client;
 
 namespace Dongke.IBOSS.PRD.Service.WMSDataService
@@ -243,6 +246,269 @@ namespace Dongke.IBOSS.PRD.Service.WMSDataService
         }
 
         /// <summary>
+        /// 同步WMS系统条码(异步调用)
+        /// </summary>
+        /// <param name="fpRows"></param>
+        /// <returns></returns>
+        public static string PushWMS2(DataTable fpData, DateTime now)
+        {
+            INIUtility ini = INIUtility.Instance(INIUtility.IniFile.Config);
+            string endPointConfigurationName = ini.ReadIniData("WMS_INFO", "EndPointConfigurationName");
+            string userName = ini.ReadIniData("WMS_INFO", "UserName");
+            string password = ini.ReadIniData("WMS_INFO", "Password");
+            string factory = ini.ReadIniData("WMS_INFO", "Factory");
+
+            wmsResultInfo wmsResult = null;
+            string serialNO;
+
+            try
+            {
+                string outcode;
+                string orderitem;
+
+                // 主数据
+                using (ERPWSService2Client wmsClient = new ERPWSService2Client(endPointConfigurationName))
+                {
+                    // 登录
+                    wmsSecurityInfo info = new wmsSecurityInfo();
+                    info.username = userName;
+                    info.password = password;
+
+                    wmsBARCODEInfo barcodeInfo = new wmsBARCODEInfo();
+
+                    List<wmsBarCodeHeader> headers = new List<wmsBarCodeHeader>();
+                    wmsBarCodeHeader header = null;
+
+                    foreach (DataRow row in fpData.Rows)
+                    {
+                        serialNO = row["SerialNO"] + "";
+
+                        orderitem = row["UDF2"] + "";
+                        if (string.IsNullOrEmpty(orderitem) || "0".Equals(orderitem))
+                        {
+                            orderitem = "000000";
+                        }
+                        else
+                        {
+                            orderitem = orderitem.PadLeft(6, '0');
+                        }
+
+                        header = new wmsBarCodeHeader();
+                        header.SPS = factory;
+                        header.SKU = row["SKU"] + "";
+                        header.SerialNO = serialNO;
+                        header.SerialNO1 = serialNO.Substring(serialNO.Length - 10, 10);
+                        header.SerialNO2 = now.ToString("yyyyMMdd");
+                        header.AddDay = now.ToString("yyyyMMdd");
+                        header.AddTime = now.ToString("HHmmss");
+                        header.CODEI = row["CODEI"] + "";
+                        header.UDF1 = row["UDF1"] + "";
+                        header.UDF2 = orderitem;
+                        header.UDF8 = row["securitycode"] + "";
+                        header.AddWho = "HGMESDK";
+                        headers.Add(header);
+                    }
+
+                    barcodeInfo.wmsBarCodeHeader = headers.ToArray();
+
+                    wmsParamInfo wmsParam = new wmsParamInfo();
+                    wmsParam.customerid = "FLUXWMSSOAP";
+                    wmsParam.messageid = "ZTBARCODE";
+                    wmsParam.stdno = "ZTBARCODE";
+                    wmsParam.warehouseid = "WH01";
+
+                    // 推送前json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms主数据推送前", "PushWMS2", JsonHelper.ToJson(barcodeInfo),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    // 参数
+                    wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
+
+                    // 推送后json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms主数据推送后", "PushWMS2", JsonHelper.ToJson(wmsResult),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    if (wmsResult.returnCode != "0000")
+                    {
+                        return "同步失败:" + wmsResult.returnDesc;
+                    }
+                }
+
+                // 关系数据
+                using (ERPWSService2Client wmsClient = new ERPWSService2Client(endPointConfigurationName))
+                {
+                    // 登录
+                    wmsSecurityInfo info = new wmsSecurityInfo();
+                    info.username = userName;
+                    info.password = password;
+
+                    wmsBARCODEInfo barcodeInfo = new wmsBARCODEInfo();
+
+                    List<wmsBarCodeHeader> headers = new List<wmsBarCodeHeader>();
+                    wmsBarCodeHeader header = null;
+                    foreach (DataRow row in fpData.Rows)
+                    {
+                        serialNO = row["SerialNO"] + "";
+
+                        orderitem = row["UDF2"] + "";
+                        if (string.IsNullOrEmpty(orderitem) || "0".Equals(orderitem))
+                        {
+                            orderitem = "000000";
+                        }
+                        else
+                        {
+                            orderitem = orderitem.PadLeft(6, '0');
+                        }
+
+                        header = new wmsBarCodeHeader();
+                        header.SPS = factory;
+                        header.SKU = row["SKU"] + "";
+                        header.SerialNO = serialNO;
+                        header.TraceID = serialNO;
+                        header.SerialNO1 = serialNO.Substring(serialNO.Length - 10, 10);
+                        header.SerialNO2 = now.ToString("yyyyMMdd");
+                        header.AddDay = now.ToString("yyyyMMdd");
+                        header.AddTime = now.ToString("HHmmss");
+                        header.LPN = row["LPN"] + "";
+                        header.UDF1 = row["UDF1"] + "";
+                        header.UDF2 = orderitem;
+                        header.AddWho = "HGMESDK";
+                        headers.Add(header);
+                    }
+
+                    barcodeInfo.wmsBarCodeHeader = headers.ToArray();
+                    wmsParamInfo wmsParam = new wmsParamInfo();
+
+                    wmsParam.customerid = "FLUXWMSSOAP";
+                    wmsParam.messageid = "ZPPCODE";
+                    wmsParam.stdno = "ZPPCODE";
+                    wmsParam.warehouseid = "WH01";
+
+                    // 推送前json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms关系数据推送前", "PushWMS2", JsonHelper.ToJson(barcodeInfo),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    // 参数
+                    wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
+
+                    // 推送后json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms关系数据推送后", "PushWMS2", JsonHelper.ToJson(wmsResult),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    if (wmsResult.returnCode != "0000")
+                    {
+                        return "同步失败:" + wmsResult.returnDesc;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                return "同步失败:" + ex.Message;
+            }
+            return "同步成功";
+        }
+
+        /// <summary>
+        /// 撤销同步WMS系统的条码(异步调用)
+        /// </summary>
+        /// <param name="fpRows"></param>
+        /// <returns></returns>
+        public static string BackPushWMS2(DataTable fpData, DateTime now)
+        {
+            INIUtility ini = INIUtility.Instance(INIUtility.IniFile.Config);
+            string endPointConfigurationName = ini.ReadIniData("WMS_INFO", "EndPointConfigurationName");
+            string userName = ini.ReadIniData("WMS_INFO", "UserName");
+            string password = ini.ReadIniData("WMS_INFO", "Password");
+            string factory = ini.ReadIniData("WMS_INFO", "Factory");
+
+            wmsResultInfo wmsResult = null;
+            try
+            {
+                string outcode;
+                string orderitem;
+
+                // 关系数据
+                using (ERPWSService2Client wmsClient = new ERPWSService2Client(endPointConfigurationName))
+                {
+                    // 登录
+                    wmsSecurityInfo info = new wmsSecurityInfo();
+                    info.username = userName;
+                    info.password = password;
+
+                    wmsBARCODEInfo barcodeInfo = new wmsBARCODEInfo();
+
+                    List<wmsBarCodeHeader> headers = new List<wmsBarCodeHeader>();
+                    wmsBarCodeHeader header = null;
+                    foreach (DataRow row in fpData.Rows)
+                    {
+                        string serialNO = row["SerialNO"] + "";
+
+                        orderitem = row["UDF2"] + "";
+                        if (string.IsNullOrEmpty(orderitem) || "0".Equals(orderitem))
+                        {
+                            orderitem = "000000";
+                        }
+                        else
+                        {
+                            orderitem = orderitem.PadLeft(6, '0');
+                        }
+
+                        header = new wmsBarCodeHeader();
+                        header.SPS = factory;
+                        header.SKU = row["SKU"] + "";
+                        header.SerialNO = serialNO;
+                        header.TraceID = serialNO;
+                        header.SerialNO1 = serialNO.Substring(serialNO.Length - 10, 10);
+                        header.SerialNO2 = now.ToString("yyyyMMdd");
+                        header.AddDay = now.ToString("yyyyMMdd");
+                        header.AddTime = now.ToString("HHmmss");
+                        header.LPN = row["LPN"] + "";
+                        header.UDF1 = row["UDF1"] + "";
+                        header.UDF2 = orderitem;
+                        header.UDF5 = "X";
+                        header.AddWho = "HGMESDK";
+                        headers.Add(header);
+                    }
+
+                    barcodeInfo.wmsBarCodeHeader = headers.ToArray();
+                    wmsParamInfo wmsParam = new wmsParamInfo();
+
+                    wmsParam.customerid = "FLUXWMSSOAP";
+                    wmsParam.messageid = "ZPPCODE";
+                    wmsParam.stdno = "ZPPCODE";
+                    wmsParam.warehouseid = "WH01";
+
+                    // 推送前json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms撤销关系数据推送前", "BackPushWMS2", JsonHelper.ToJson(barcodeInfo),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    // 参数
+                    wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
+
+                    // 推送后json
+                    OutputLog.TraceLog(LogPriority.Information,
+                        "wms撤销关系数据推送后", "BackPushWMS2", JsonHelper.ToJson(wmsResult),
+                        LocalPath.LogExePath + "WMS_HEGII\\PushWMS2");
+
+                    if (wmsResult.returnCode != "0000")
+                    {
+                        return "同步失败:" + wmsResult.returnDesc;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                return "同步失败:" + ex.Message;
+            }
+            return "同步成功";
+        }
+
+        /// <summary>
         /// 手动同步WMS系统条码
         /// </summary>
         /// <param name="fpRows"></param>
@@ -318,9 +584,19 @@ namespace Dongke.IBOSS.PRD.Service.WMSDataService
                         wmsParam.stdno = "ZTBARCODE";
                         wmsParam.warehouseid = "WH01";
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动主数据推送前", "SyncWMSDataLog", JsonHelper.ToJson(barcodeInfo),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         // 参数
                         wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动主数据推送后", "SyncWMSDataLog", JsonHelper.ToJson(wmsResult),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         if (wmsResult.returnCode != "0000")
                         {
                             sre.OtherStatus = -1;
@@ -380,9 +656,19 @@ namespace Dongke.IBOSS.PRD.Service.WMSDataService
                         wmsParam.stdno = "ZPPCODE";
                         wmsParam.warehouseid = "WH01";
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动关系数据推送前", "SyncWMSDataLog", JsonHelper.ToJson(barcodeInfo),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         // 参数
                         wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动关系数据推送后", "SyncWMSDataLog", JsonHelper.ToJson(wmsResult),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         if (wmsResult.returnCode != "0000")
                         {
                             sre.OtherStatus = -1;
@@ -445,9 +731,19 @@ namespace Dongke.IBOSS.PRD.Service.WMSDataService
                         wmsParam.stdno = "ZPPCODE";
                         wmsParam.warehouseid = "WH01";
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动撤销关系数据推送前", "SyncWMSDataLog", JsonHelper.ToJson(barcodeInfo),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         // 参数
                         wmsResult = wmsClient.putBARCODEData(info, barcodeInfo, wmsParam);
 
+                        // 推送前json
+                        OutputLog.TraceLog(LogPriority.Information,
+                            "wms手动撤销关系数据推送后", "SyncWMSDataLog", JsonHelper.ToJson(wmsResult),
+                            LocalPath.LogExePath + "WMS_HEGII\\SyncWMSDataLog");
+
                         if (wmsResult.returnCode != "0000")
                         {
                             sre.OtherStatus = -1;
@@ -862,5 +1158,221 @@ namespace Dongke.IBOSS.PRD.Service.WMSDataService
             }
 
         }
+
+        #region 中台
+        /// <summary>
+        /// 查询中台日志
+        /// </summary>
+        /// <param name="cre"></param>
+        /// <returns></returns>
+        public static ServiceResultEntity GetZhongTaiDataLog(ClientRequestEntity cre, SUserInfo userInfo)
+        {
+            IDBConnection oracleConn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
+            ServiceResultEntity sre = new ServiceResultEntity();
+            List<OracleParameter> paras = new List<OracleParameter>();
+            try
+            {
+                string sqlString = @"
+                SELECT FP.BARCODE,
+                       GDD.MATERIALCODE,
+                       GDD.OUTLABELCODE,
+                       GDD.FIRSTFHDATE,
+                       GDD.FIRSTFHNO,
+                       FP.FHTIME,
+                     FP.TOZHONGTAIFLAG,
+                       FP.TOZHONGTAITIME,
+                       FP.ZHONGTAIMSG
+                  FROM TP_PM_FINISHEDPRODUCT FP
+                 INNER JOIN TP_PM_GROUTINGDAILYDETAIL GDD
+                    ON GDD.GROUTINGDAILYDETAILID = FP.GROUTINGDAILYDETAILID
+                 WHERE FP.accountid = :ACCOUNTID
+                   AND FP.FHTIME >= :FHTIMEBEGIN
+                   AND FP.FHTIME < :FHTIMEEND ";
+
+                paras.Add(new OracleParameter(":ACCOUNTID", OracleDbType.Int32, userInfo.AccountID, ParameterDirection.Input));
+                paras.Add(new OracleParameter(":FHTIMEBEGIN", OracleDbType.Date, cre.Properties["FhtimeBegin"], ParameterDirection.Input));
+                paras.Add(new OracleParameter(":FHTIMEEND", OracleDbType.Date, cre.Properties["FhtimeEnd"], ParameterDirection.Input));
+
+                if (!string.IsNullOrEmpty(cre.Properties["ToZhongTaiFlag"] + ""))
+                {
+                    sqlString += " AND FP.TOZHONGTAIFLAG = :TOZHONGTAIFLAG ";
+                    paras.Add(new OracleParameter(":TOZHONGTAIFLAG", OracleDbType.Varchar2, cre.Properties["ToZhongTaiFlag"], ParameterDirection.Input));
+                }
+                if (!string.IsNullOrEmpty(cre.Properties["ZhongTaiMsg"] + ""))
+                {
+                    sqlString += " AND FP.ZHONGTAIMSG LIKE :ZHONGTAIMSG ";
+                    paras.Add(new OracleParameter(":ZHONGTAIMSG", OracleDbType.NVarchar2, "%" + cre.Properties["ZhongTaiMsg"] + "%", ParameterDirection.Input));
+                }
+
+                sqlString += " ORDER BY FP.FHTIME, FP.BARCODE ";
+                sre.Data = oracleConn.GetSqlResultToDs(sqlString, paras.ToArray());
+                return sre;
+            }
+            catch (Exception ex)
+            {
+                sre.OtherStatus = -1;
+                sre.Message = ex.Message;
+                return sre;
+            }
+        }
+
+        /// <summary>
+        /// 同步中台日志
+        /// </summary>
+        /// <param name="cre"></param>
+        /// <returns></returns>
+        public static ServiceResultEntity SyncZhongTaiData(ClientRequestEntity cre)
+        {
+            ServiceResultEntity sre = new ServiceResultEntity();
+            try
+            {
+                INIUtility ini = INIUtility.Instance(INIUtility.IniFile.Config);
+                string urlZhongTai = ini.ReadIniData("ZhongTai", "urlZhongTai");
+                //string urlZhongTai = "http://localhost:62172/api/ZhongTai/ashxSyncZhongTai.ashx";
+
+                string syncDate = cre.Properties["SyncDate"].ToString();
+                string result = PostData(urlZhongTai, "{\"SyncDate\": \"" + syncDate + "\"}", "POST");
+
+                JObject obj = JObject.Parse(result);
+                sre.OtherStatus = 1;
+                sre.Message = "同步结果," + obj["message"].ToString();
+                return sre;
+            }
+            catch (Exception ex)
+            {
+                sre.Result = -2;
+                sre.Message = "同步失败," + ex.Message;
+                return sre;
+            }
+        }
+        #endregion
+
+        #region 昆船WMS
+        /// <summary>
+        /// 查询昆船WMS日志
+        /// </summary>
+        /// <param name="cre"></param>
+        /// <returns></returns>
+        public static ServiceResultEntity GetKunChuanDataLog(ClientRequestEntity cre, SUserInfo userInfo)
+        {
+            IDBConnection oracleConn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
+            ServiceResultEntity sre = new ServiceResultEntity();
+            List<OracleParameter> paras = new List<OracleParameter>();
+            try
+            {
+                string sqlString = @"
+                SELECT FP.YYYYMMDD,
+                       FP.BARCODE,
+                       FP.SAPCODE,
+                       FP.OUTCODE,
+                       FP.CREATETIME,
+                       NVL(FP.BANMA, FP.SAPFLBATCHNO) AS BANMA,
+                       FP.ORDERCODE,
+                       FP.ORDERITEM,
+                       FP.SECURITYCODE,
+                       FP.TOKUNCHUANFLAG,
+                       FP.KUNCHUANMSG,
+                       FP.TOKUNCHUANTIME
+                  FROM TSAP_HEGII_FINISHEDPRODUCT FP
+                 WHERE FP.ZTYPE = 'S'
+                   AND FP.CREATETIME >= :FHTIMEBEGIN
+                   AND FP.CREATETIME < :FHTIMEEND ";
+
+                paras.Add(new OracleParameter(":FHTIMEBEGIN", OracleDbType.Date, cre.Properties["FhtimeBegin"], ParameterDirection.Input));
+                paras.Add(new OracleParameter(":FHTIMEEND", OracleDbType.Date, cre.Properties["FhtimeEnd"], ParameterDirection.Input));
+
+                if (!string.IsNullOrEmpty(cre.Properties["ToKunChuanFlag"] + ""))
+                {
+                    sqlString += " AND FP.TOKUNCHUANFLAG = :TOKUNCHUANFLAG ";
+                    paras.Add(new OracleParameter(":TOKUNCHUANFLAG", OracleDbType.Varchar2, cre.Properties["ToKunChuanFlag"], ParameterDirection.Input));
+                }
+                if (!string.IsNullOrEmpty(cre.Properties["KunChuanMsg"] + ""))
+                {
+                    sqlString += " AND FP.KUNCHUANMSG LIKE :KUNCHUANMSG ";
+                    paras.Add(new OracleParameter(":KUNCHUANMSG", OracleDbType.NVarchar2, "%" + cre.Properties["KunChuanMsg"] + "%", ParameterDirection.Input));
+                }
+
+                sqlString += " ORDER BY FP.SAPFLBATCHNO, FP.OUTCODE ";
+                sre.Data = oracleConn.GetSqlResultToDs(sqlString, paras.ToArray());
+                return sre;
+            }
+            catch (Exception ex)
+            {
+                sre.OtherStatus = -1;
+                sre.Message = ex.Message;
+                return sre;
+            }
+        }
+
+        /// <summary>
+        /// 同步昆船WMS日志
+        /// </summary>
+        /// <param name="cre"></param>
+        /// <returns></returns>
+        public static ServiceResultEntity SyncKunChuanData(ClientRequestEntity cre)
+        {
+            ServiceResultEntity sre = new ServiceResultEntity();
+            try
+            {
+                INIUtility ini = INIUtility.Instance(INIUtility.IniFile.Config);
+                string urlKunChuan = ini.ReadIniData("KunChuan", "urlKunChuan");
+                //string urlKunChuan = "http://localhost:62172/api/KunChuan/ashxSyncKunChuan.ashx";
+
+                string syncDate = cre.Properties["SyncDate"].ToString();
+                string result = PostData(urlKunChuan, "{\"SyncDate\": \"" + syncDate + "\"}", "POST");
+
+                JObject obj = JObject.Parse(result);
+                sre.OtherStatus = 1;
+                sre.Message = "同步结果," + obj["message"].ToString();
+                return sre;
+            }
+            catch (Exception ex)
+            {
+                sre.Result = -2;
+                sre.Message = "同步失败," + ex.Message;
+                return sre;
+            }
+        } 
+        #endregion
+
+        #region 私有方法
+        /// <summary>
+        /// POST数据
+        /// </summary>
+        /// <param name="url"></param>
+        /// <param name="data"></param>
+        /// <param name="method"></param>
+        /// <returns></returns>
+        private static string PostData(string url, string data, string method)
+        {
+            //将单引号转义成双引号
+            data = data.Replace("'", "\"");
+            //创建Web访问对象
+            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
+            //把用户传过来的数据转成“UTF-8”的字节流
+            byte[] buf = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(data);
+
+            myRequest.Method = method;
+            myRequest.ContentLength = buf.Length;
+            myRequest.ContentType = "application/json;charset=UTF-8";
+            myRequest.AllowAutoRedirect = true;
+
+            //发送请求
+            Stream stream = myRequest.GetRequestStream();
+            stream.Write(buf, 0, buf.Length);
+            stream.Close();
+
+            //获取接口返回值
+            //通过Web访问对象获取响应内容
+            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
+            //通过响应内容流创建StreamReader对象,因为StreamReader更高级更快
+            StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
+            //string returnXml = HttpUtility.UrlDecode(reader.ReadToEnd());//如果有编码问题就用这个方法
+            string returnXml = reader.ReadToEnd();//利用StreamReader就可以从响应内容从头读到尾
+            reader.Close();
+            myResponse.Close();
+            return returnXml;
+        } 
+        #endregion
     }
 }

+ 4 - 0
DK.Service/WMSDataService/WMSDataService.csproj

@@ -31,6 +31,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\DLL\Newtonsoft.Json.dll</HintPath>
+    </Reference>
     <Reference Include="Oracle.ManagedDataAccess">
       <HintPath>..\..\DLL\Oracle.ManagedDataAccess.dll</HintPath>
     </Reference>

+ 6 - 0
IBOSS.PRD/F_SYS_0202.cs

@@ -1167,6 +1167,12 @@ namespace Dongke.IBOSS.PRD.Client
 								case "SAP0108":
 									this.ShowInDockPanel(F_SAP_HEGII_0108.Instance);
 									break;
+								case "SAP0111":
+									this.ShowInDockPanel(F_SAP_HEGII_0112.Instance);
+									break;
+								case "SAP0112":
+									this.ShowInDockPanel(F_SAP_HEGII_0113.Instance);
+									break;
 								#endregion
 
 								#region 生产计划 xuwei 20190827 add

+ 0 - 4
IBOSS.PRD/IBOSS.PRD.csproj

@@ -110,10 +110,6 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\DLL\Curtain.Framework.dll</HintPath>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\DK.Service\PDAModuleLogic\DLL\Newtonsoft.Json.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Data" />

+ 30 - 0
WCF.Service/WCF.DataModels/PMModule/OrderEntity.cs

@@ -159,5 +159,35 @@ namespace Dongke.IBOSS.PRD.WCF.DataModels
             get;
             set;
         }
+
+        /// <summary>
+        /// sap销售订单号
+        /// </summary>
+        [DataMember]
+        public string VBELN
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// sap销售订单行
+        /// </summary>
+        [DataMember]
+        public string POSNR
+        {
+            get;
+            set;
+        }
+
+        /// <summary>
+        /// 订单描述
+        /// </summary>
+        [DataMember]
+        public string Summary
+        {
+            get;
+            set;
+        }
     }
 }

+ 8 - 0
WCF.Service/WCF.Hosting/SAP_HEGII.ini

@@ -21,6 +21,10 @@ NextDate_BG=2022-10-19 22:00
 Interval_BG_50=30
 NextDate_BG_50=2022-10-19 22:00
 
+;±¨¹¤60
+Interval_BG_60=10
+NextDate_BG_60=2023-05-19 11:10
+
 ;ÒÆ¿â
 Interval_YK=120
 NextDate_YK=2022-10-01 02:00
@@ -43,6 +47,8 @@ EndDate6001=
 Url030=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM030
 Url033=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM033
 Url034=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM034
+Url039=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM039
+Url138=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZSDFM138
 UserName=hgsapdk:Sapdk#240
 Factory=5200
 
@@ -50,5 +56,7 @@ Factory=5200
 #Url030=http://hgs4powd1.hegii.com:8000/RESTAdapter/DKMES/ZPPFM030
 #Url033=http://hgs4powd1.hegii.com:8000/RESTAdapter/DKMES/ZPPFM033
 #Url034=http://hgs4powd1.hegii.com:8000/RESTAdapter/DKMES/ZPPFM034
+#Url039=http://hgs4podev.hegii.com:8000/RESTAdapter/DKMES/ZPPFM039
+#Url138=http://hgs4podev.hegii.com:8000/RESTAdapter/DKMES/ZSDFM138
 #UserName=PODKMES:Sapdk#800
 #Factory=5200

+ 12 - 0
WCF.Service/WCF.Services/PMModuleServiceNew.cs

@@ -14,6 +14,7 @@ using System.Data;
 using System.ServiceModel;
 using System.ServiceModel.Activation;
 using Curtain.Core;
+using Dongke.IBOSS.PRD.Basics.Library;
 using Dongke.IBOSS.PRD.Service.PDAModuleLogic;
 using Dongke.IBOSS.PRD.Service.PMModuleService;
 using Dongke.IBOSS.PRD.Service.SystemModuleLogic;
@@ -556,6 +557,17 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                     }
                     return null;
                 }
+                else if ("F_PM_2302" == cre.NameSpace)
+                {
+                    // 保存订单
+                    if (cre.Name == "SaveOrder")
+                    {
+                        OrderEntity order = JsonHelper.FromJson<OrderEntity>(cre.Request + "");
+                        return ServiceInvoker.Invoke<ServiceResultEntity>(this, () => Service.PMModuleLogic.PMModuleLogicDAL.SaveOrder(order, SUserInfo));
+                    }
+
+                    return null;
+                }
                 #endregion
 
                 #region 产成品整撤销

+ 51 - 14
WCF.Service/WCF.Services/SAPDataService.cs

@@ -34,6 +34,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                 #region Hegii
                 if ("Hegii" == cre.NameSpace)
                 {
+                    #region SAP相关
                     // 获取同步最后一次同步成功的日期
                     if ("GetLastDateByCode" == cre.Name)
                     {
@@ -72,16 +73,16 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                         ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
                             () => SAPDataLogic.GetWorkDataByDataLog(logid));
                         return result;
-					}
-					// 查询
-					if ("GetWorkDataSPSumByDate" == cre.Name)
-					{
-						ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
-							() => SAPDataLogic.GetWorkDataSPSumByDate(cre));
-						return result;
-					}
-					// 查询成品条码同步明细
-					if ("GetFinishedProductByDataLog" == cre.Name)
+                    }
+                    // 查询
+                    if ("GetWorkDataSPSumByDate" == cre.Name)
+                    {
+                        ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
+                            () => SAPDataLogic.GetWorkDataSPSumByDate(cre));
+                        return result;
+                    }
+                    // 查询成品条码同步明细
+                    if ("GetFinishedProductByDataLog" == cre.Name)
                     {
                         int logid = Convert.ToInt32(cre.Request);
                         ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
@@ -109,7 +110,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                     }
                     // 同步成品条码明细数据
                     if ("SetFP6001" == cre.Name)
-					{
+                    {
                         DateTime date = (DateTime)cre.Request;
                         //if (date.Year < 2018)
                         //{
@@ -118,9 +119,9 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                         //    return result1;
                         //}
                         ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
-							() => SAPDataLogic.SetFP6001(date, SUserInfo.UserID));
-						return result;
-					}
+                            () => SAPDataLogic.SetFP6001(date, SUserInfo.UserID));
+                        return result;
+                    }
                     // 同步成品条码明细数据
                     if ("SetFP6002" == cre.Name)
                     {
@@ -172,6 +173,42 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                            () => SAPDataLogic.GetDataIVITotal_BC(cre));
                         return result;
                     }
+                    #endregion
+
+                    #region 中台相关
+                    // 查询中台同步日志
+                    else if ("GetZhongTaiDataLog" == cre.Name)
+                    {
+                        ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
+                           () => WMSDataLogic.GetZhongTaiDataLog(cre, SUserInfo));
+                        return result;
+                    }
+                    // 同步中台同步日志
+                    else if ("SyncZhongTaiData" == cre.Name)
+                    {
+                        ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
+                            () => WMSDataLogic.SyncZhongTaiData(cre));
+                        return result;
+                    }
+                    #endregion
+
+                    #region 昆船WMS
+                    // 查询昆船WMS同步日志
+                    else if ("GetKunChuanDataLog" == cre.Name)
+                    {
+                        ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
+                           () => WMSDataLogic.GetKunChuanDataLog(cre, SUserInfo));
+                        return result;
+                    }
+                    // 同步昆船WMS同步日志
+                    else if ("SyncKunChuanData" == cre.Name)
+                    {
+                        ServiceResultEntity result = ServiceInvoker.Invoke<ServiceResultEntity>(this,
+                            () => WMSDataLogic.SyncKunChuanData(cre));
+                        return result;
+                    }
+                    #endregion
+
                     return null;
                 }
                 #endregion

+ 1 - 1
WCF.Service/WCF.Services/WCF.Services.csproj

@@ -191,7 +191,7 @@
       <Name>ReportModuleLogic</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\DK.Service\SAPDataService\SAPHegiiDataService.csproj">
-      <Project>{41D66009-A06F-4632-869C-110AB1C3B969}</Project>
+      <Project>{41d66009-a06f-4632-869c-110ab1c3b969}</Project>
       <Name>SAPHegiiDataService</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\DK.Service\Service.DataModels\Service.DataModels.csproj">

+ 37 - 0
WCF.Service/WCF.WebHosting/Global.asax.cs

@@ -442,6 +442,43 @@ namespace Dongke.IBOSS.PRD.WCF.WebHosting
                                    LocalPath.LogExePath + "SAP_HEGII\\Timer_");
                     }
                     #endregion
+
+                    #region 报工_60
+                    string nextDate_BG_60 = ini.ReadIniData("SAP_HEGII", "NextDate_BG_60");
+                    string strInterval_BG_60 = ini.ReadIniData("SAP_HEGII", "Interval_BG_60");
+
+                    if (!string.IsNullOrWhiteSpace(nextDate_BG_60) && !string.IsNullOrWhiteSpace(strInterval_BG_60) &&
+                        DateTime.TryParseExact(nextDate_BG_60, "yyyy-MM-dd HH:mm", null, DateTimeStyles.None, out ndate) && ndate <= dateTimeNow)
+                    {
+                        // 间隔时间(分钟)
+                        int interva_BG_60 = strInterval_BG_60.ToInt32();
+                        DateTime nextDateINI_BG_60 = ndate.AddMinutes(interva_BG_60);
+                        while (nextDateINI_BG_60 <= dateTimeNow)
+                        {
+                            nextDateINI_BG_60 = nextDateINI_BG_60.AddMinutes(interva_BG_60);
+                        }
+
+                        // 更新下次执行时间
+                        ini.WriteIniData("SAP_HEGII", "NextDate_BG_60", nextDateINI_BG_60.ToString("yyyy-MM-dd HH:mm"));
+
+                        OutputLog.TraceLog(LogPriority.Information,
+                                   "Global2",
+                                   "OnTimedEvent begin: ",
+                                   "SyncSap5000 : " + Timer_Loker.LockerName + " - " + e.SignalTime.ToString("yyyy-MM-dd HH:mm:ss")
+                                    + " - " + dateTimeNow.ToString("yyyy-MM-dd HH:mm:ss") + $" -date:" + ndate.ToString("yyyy-MM-dd HH:mm:ss")
+                                    + $" -[{interva_BG_60}]" + nextDateINI_BG_60.ToString("yyyy-MM-dd HH:mm:ss"),
+                                   LocalPath.LogExePath + "SAP_HEGII\\Timer_");
+
+                        Service.SAPHegiiDataService.SAPDataLogic.AutoWorkDataToSAP5000("60", ndate);
+
+                        OutputLog.TraceLog(LogPriority.Information,
+                                   "Global2",
+                                   "OnTimedEvent end",
+                                   "SyncSap5000 : " + Timer_Loker.LockerName + " - " + e.SignalTime.ToString("yyyy-MM-dd HH:mm:ss")
+                                    + " - " + dateTimeNow.ToString("yyyy-MM-dd HH:mm:ss") + " - " + ndate.ToString("yyyy-MM-dd HH:mm:ss"),
+                                   LocalPath.LogExePath + "SAP_HEGII\\Timer_");
+                    }
+                    #endregion
                 }
             }
             catch (Exception ex)

+ 11 - 5
WCF.Service/WCF.WebHosting/SAP_HEGII.ini

@@ -11,22 +11,26 @@ NextDate50=2020-06-01 00:00
 
 ;跨车间
 #Interval_KCJ=120
-NextDate_KCJ=2022-10-01
+NextDate_KCJ=2024-10-01
 
 ;报工_10、20、30、40
 Interval_BG=120
-NextDate_BG=2022-10-19 22:00
+NextDate_BG=2024-10-19 22:00
 
 ;报工50
 Interval_BG_50=30
-NextDate_BG_50=2022-10-19 22:00
+NextDate_BG_50=2024-10-19 22:00
+
+;报工60
+Interval_BG_60=10
+NextDate_BG_60=2023-06-08 16:20
 
 ;移库
 Interval_YK=120
-NextDate_YK=2022-10-01 02:00
+NextDate_YK=2024-10-01 02:00
 
 ByTime=07:30
-NextDate6002=2020-06-01 00:00
+NextDate6002=2024-06-01 00:00
 UserName=hgsapdk
 Password=Sapdk#240
 ;测试:Sapdk#240
@@ -43,6 +47,8 @@ EndDate6001=
 Url030=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM030
 Url033=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM033
 Url034=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM034
+Url039=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZPPFM039
+Url138=http://hgs4podev.hegii.com:50200/RESTAdapter/DKMES/ZSDFM138
 UserName=hgsapdk:Sapdk#240
 Factory=5200
 

+ 4 - 4
WCF.Service/WCF.WebHosting/Web.config

@@ -193,21 +193,21 @@
         bindingConfiguration="CERPWSService2ServiceSoapBinding" contract="WMS_putBARCODEData.IERPWSService2" name="CERPWSService2Port" />
     </client>-->
     <!--HEGII SAP同步 测试 240-->
-    <!--<client>
-      <endpoint address="http://S4DEVAPP.hegii.com:8080/sap/bc/srt/rfc/sap/zppfm010/240/zppfm010/zppfm010_bind" binding="customBinding" 
+    <client>
+      <!--<endpoint address="http://S4DEVAPP.hegii.com:8080/sap/bc/srt/rfc/sap/zppfm010/240/zppfm010/zppfm010_bind" binding="customBinding" 
 	    bindingConfiguration="ZPPFM010_BIND" contract="HGSAPDK_ZPPFM010.ZPPFM010" name="ZPPFM010_BIND"/>
       <endpoint address="http://S4DEVAPP.hegii.com:8080/sap/bc/srt/rfc/sap/zppfm010/240/zppfm010/zppfm010_bind" binding="customBinding" 
 	    bindingConfiguration="ZPPFM010_BIND_soap12" contract="HGSAPDK_ZPPFM010.ZPPFM010" name="ZPPFM010_BIND_soap12"/>
       <endpoint address="http://S4DEVAPP.hegii.com:8080/sap/bc/srt/rfc/sap/zppfm008/240/zppfm008/zppfm008_bind" binding="customBinding" 
 	    bindingConfiguration="ZPPFM008_BIND" contract="HGSAPDK_ZPPFM008.ZPPFM008" name="ZPPFM008_BIND"/>
       <endpoint address="http://S4DEVAPP.hegii.com:8080/sap/bc/srt/rfc/sap/zppfm008/240/zppfm008/zppfm008_bind" binding="customBinding" 
-	    bindingConfiguration="ZPPFM008_BIND_soap12" contract="HGSAPDK_ZPPFM008.ZPPFM008" name="ZPPFM008_BIND_soap12"/>
+	    bindingConfiguration="ZPPFM008_BIND_soap12" contract="HGSAPDK_ZPPFM008.ZPPFM008" name="ZPPFM008_BIND_soap12"/>-->
       
 	  <endpoint address="http://wmsqas.hegii.com:8091/datahubWeb/WMSSOAP/FLUXWMSSOAP" binding="basicHttpBinding" 
 	    bindingConfiguration="CERPWSService2ServiceSoapBinding_TEST" contract="WMS_putBARCODEData.IERPWSService2" name="CERPWSService2Port_TEST"/>
       <endpoint address="http://wms.hegii.com:18080/datahubWeb/WMSSOAP" binding="basicHttpBinding" 
 	    bindingConfiguration="CERPWSService2ServiceSoapBinding" contract="WMS_putBARCODEData.IERPWSService2" name="CERPWSService2Port"/>
-    </client>-->
+    </client>
     <!--aspNetCompatibilityEnabled属性设为True,让WCF启用ASP.NET管线(通俗的说就是启用Web模式下的各种设置)-->
     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
       <serviceActivations>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä