Explorar o código

winfrom提交

duyong %!s(int64=3) %!d(string=hai) anos
pai
achega
3d80005210

+ 2 - 0
CarMeterSystem/frmMain.cs

@@ -476,6 +476,8 @@ namespace CarMeterSystem
                 //}
                 //}
 
 
                 // 司机扫码为空,取工控机二维码
                 // 司机扫码为空,取工控机二维码
+                l.WriteLog(99, "sweepCodeClass2的扫码值:" + sweepCodeClass2.StrCode);
+                l.WriteLog(99, "sweepCodeClass的扫码值:" + sweepCodeClass.StrCode);
                 if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                 if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                 {
                 {
                     if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
                     if (string.IsNullOrEmpty(sweepCodeClass.StrCode))

+ 24 - 27
CarMeterSystem/frmMatMsgInfo.Designer.cs

@@ -35,10 +35,9 @@ namespace CarMeterSystem
             Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("dtPrediction", -1);
             Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("dtPrediction", -1);
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("predictionNo");
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("predictionNo");
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("matterName");
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("matterName");
-            Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("forwardingUnitName", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Ascending, false);
-            Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("receivingUintName");
+            Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("forwardingUnitName");
+            Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("receivingUintName", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Ascending, false);
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("trustDateTime");
             Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("trustDateTime");
-            Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("select", 0);
             Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
             Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
             Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
             Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
             Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
             Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
@@ -78,7 +77,7 @@ namespace CarMeterSystem
             this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
             this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
             this.btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnCancel.ForeColor = System.Drawing.Color.White;
             this.btnCancel.ForeColor = System.Drawing.Color.White;
-            this.btnCancel.Location = new System.Drawing.Point(396, 390);
+            this.btnCancel.Location = new System.Drawing.Point(688, 692);
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(122, 61);
             this.btnCancel.Size = new System.Drawing.Size(122, 61);
             this.btnCancel.TabIndex = 10;
             this.btnCancel.TabIndex = 10;
@@ -93,11 +92,11 @@ namespace CarMeterSystem
             this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
             this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
             this.btnSave.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnSave.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnSave.ForeColor = System.Drawing.Color.White;
             this.btnSave.ForeColor = System.Drawing.Color.White;
-            this.btnSave.Location = new System.Drawing.Point(112, 390);
+            this.btnSave.Location = new System.Drawing.Point(322, 692);
             this.btnSave.Name = "btnSave";
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(122, 61);
             this.btnSave.Size = new System.Drawing.Size(122, 61);
             this.btnSave.TabIndex = 9;
             this.btnSave.TabIndex = 9;
-            this.btnSave.Text = "继续保存";
+            this.btnSave.Text = "保存";
             this.btnSave.UseVisualStyleBackColor = false;
             this.btnSave.UseVisualStyleBackColor = false;
             this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
             this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
             // 
             // 
@@ -108,7 +107,7 @@ namespace CarMeterSystem
             this.lbMsgInfo.ForeColor = System.Drawing.Color.Black;
             this.lbMsgInfo.ForeColor = System.Drawing.Color.Black;
             this.lbMsgInfo.Location = new System.Drawing.Point(0, 0);
             this.lbMsgInfo.Location = new System.Drawing.Point(0, 0);
             this.lbMsgInfo.Name = "lbMsgInfo";
             this.lbMsgInfo.Name = "lbMsgInfo";
-            this.lbMsgInfo.Size = new System.Drawing.Size(638, 50);
+            this.lbMsgInfo.Size = new System.Drawing.Size(1134, 50);
             this.lbMsgInfo.TabIndex = 11;
             this.lbMsgInfo.TabIndex = 11;
             this.lbMsgInfo.Text = "请选择当前车辆的重量类型";
             this.lbMsgInfo.Text = "请选择当前车辆的重量类型";
             this.lbMsgInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             this.lbMsgInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -124,7 +123,7 @@ namespace CarMeterSystem
             this.btnTare.BackColor = System.Drawing.Color.Gray;
             this.btnTare.BackColor = System.Drawing.Color.Gray;
             this.btnTare.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnTare.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnTare.ForeColor = System.Drawing.Color.White;
             this.btnTare.ForeColor = System.Drawing.Color.White;
-            this.btnTare.Location = new System.Drawing.Point(113, 53);
+            this.btnTare.Location = new System.Drawing.Point(291, 53);
             this.btnTare.Name = "btnTare";
             this.btnTare.Name = "btnTare";
             this.btnTare.Size = new System.Drawing.Size(121, 48);
             this.btnTare.Size = new System.Drawing.Size(121, 48);
             this.btnTare.TabIndex = 12;
             this.btnTare.TabIndex = 12;
@@ -137,7 +136,7 @@ namespace CarMeterSystem
             this.btnGross.BackColor = System.Drawing.Color.Gray;
             this.btnGross.BackColor = System.Drawing.Color.Gray;
             this.btnGross.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnGross.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.btnGross.ForeColor = System.Drawing.Color.White;
             this.btnGross.ForeColor = System.Drawing.Color.White;
-            this.btnGross.Location = new System.Drawing.Point(396, 53);
+            this.btnGross.Location = new System.Drawing.Point(689, 53);
             this.btnGross.Name = "btnGross";
             this.btnGross.Name = "btnGross";
             this.btnGross.Size = new System.Drawing.Size(121, 48);
             this.btnGross.Size = new System.Drawing.Size(121, 48);
             this.btnGross.TabIndex = 12;
             this.btnGross.TabIndex = 12;
@@ -155,48 +154,44 @@ namespace CarMeterSystem
             ultraGridColumn1.Header.VisiblePosition = 0;
             ultraGridColumn1.Header.VisiblePosition = 0;
             ultraGridColumn1.RowLayoutColumnInfo.OriginX = 2;
             ultraGridColumn1.RowLayoutColumnInfo.OriginX = 2;
             ultraGridColumn1.RowLayoutColumnInfo.OriginY = 0;
             ultraGridColumn1.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn1.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(109, 0);
+            ultraGridColumn1.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(142, 0);
+            ultraGridColumn1.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 44);
             ultraGridColumn1.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn1.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn1.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn1.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn2.Header.VisiblePosition = 1;
             ultraGridColumn2.Header.VisiblePosition = 1;
             ultraGridColumn2.RowLayoutColumnInfo.OriginX = 4;
             ultraGridColumn2.RowLayoutColumnInfo.OriginX = 4;
             ultraGridColumn2.RowLayoutColumnInfo.OriginY = 0;
             ultraGridColumn2.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn2.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(114, 0);
+            ultraGridColumn2.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(165, 0);
+            ultraGridColumn2.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 44);
             ultraGridColumn2.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn2.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn2.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn2.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn3.Header.VisiblePosition = 2;
             ultraGridColumn3.Header.VisiblePosition = 2;
             ultraGridColumn3.RowLayoutColumnInfo.OriginX = 6;
             ultraGridColumn3.RowLayoutColumnInfo.OriginX = 6;
             ultraGridColumn3.RowLayoutColumnInfo.OriginY = 0;
             ultraGridColumn3.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn3.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(124, 0);
+            ultraGridColumn3.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(197, 0);
+            ultraGridColumn3.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 44);
             ultraGridColumn3.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn3.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn3.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn3.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn4.Header.VisiblePosition = 3;
             ultraGridColumn4.Header.VisiblePosition = 3;
             ultraGridColumn4.RowLayoutColumnInfo.OriginX = 8;
             ultraGridColumn4.RowLayoutColumnInfo.OriginX = 8;
             ultraGridColumn4.RowLayoutColumnInfo.OriginY = 0;
             ultraGridColumn4.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn4.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(115, 0);
+            ultraGridColumn4.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(239, 0);
+            ultraGridColumn4.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 44);
             ultraGridColumn4.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn4.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn4.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn4.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn5.Header.VisiblePosition = 4;
             ultraGridColumn5.Header.VisiblePosition = 4;
             ultraGridColumn5.RowLayoutColumnInfo.OriginX = 10;
             ultraGridColumn5.RowLayoutColumnInfo.OriginX = 10;
             ultraGridColumn5.RowLayoutColumnInfo.OriginY = 0;
             ultraGridColumn5.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn5.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(122, 0);
+            ultraGridColumn5.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(215, 0);
+            ultraGridColumn5.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(0, 44);
             ultraGridColumn5.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn5.RowLayoutColumnInfo.SpanX = 2;
             ultraGridColumn5.RowLayoutColumnInfo.SpanY = 2;
             ultraGridColumn5.RowLayoutColumnInfo.SpanY = 2;
-            ultraGridColumn6.DataType = typeof(bool);
-            ultraGridColumn6.DefaultCellValue = false;
-            ultraGridColumn6.Header.VisiblePosition = 5;
-            ultraGridColumn6.RowLayoutColumnInfo.OriginX = 0;
-            ultraGridColumn6.RowLayoutColumnInfo.OriginY = 0;
-            ultraGridColumn6.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(58, 0);
-            ultraGridColumn6.RowLayoutColumnInfo.SpanX = 2;
-            ultraGridColumn6.RowLayoutColumnInfo.SpanY = 2;
             ultraGridBand1.Columns.AddRange(new object[] {
             ultraGridBand1.Columns.AddRange(new object[] {
             ultraGridColumn1,
             ultraGridColumn1,
             ultraGridColumn2,
             ultraGridColumn2,
             ultraGridColumn3,
             ultraGridColumn3,
             ultraGridColumn4,
             ultraGridColumn4,
-            ultraGridColumn5,
-            ultraGridColumn6});
+            ultraGridColumn5});
             ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
             ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
             this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
             this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
             this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
             this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
@@ -245,14 +240,16 @@ namespace CarMeterSystem
             appearance11.BorderColor = System.Drawing.Color.Silver;
             appearance11.BorderColor = System.Drawing.Color.Silver;
             this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance11;
             this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance11;
             this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
             this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
+            this.ultraGrid1.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFixed;
             appearance12.BackColor = System.Drawing.SystemColors.ControlLight;
             appearance12.BackColor = System.Drawing.SystemColors.ControlLight;
             this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance12;
             this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance12;
+            this.ultraGrid1.DisplayLayout.RowConnectorStyle = Infragistics.Win.UltraWinGrid.RowConnectorStyle.None;
             this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
             this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
             this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
             this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
-            this.ultraGrid1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ultraGrid1.Font = new System.Drawing.Font("宋体", 20F);
             this.ultraGrid1.Location = new System.Drawing.Point(-3, 122);
             this.ultraGrid1.Location = new System.Drawing.Point(-3, 122);
             this.ultraGrid1.Name = "ultraGrid1";
             this.ultraGrid1.Name = "ultraGrid1";
-            this.ultraGrid1.Size = new System.Drawing.Size(641, 262);
+            this.ultraGrid1.Size = new System.Drawing.Size(1137, 564);
             this.ultraGrid1.TabIndex = 13;
             this.ultraGrid1.TabIndex = 13;
             this.ultraGrid1.Text = "ultraGrid1";
             this.ultraGrid1.Text = "ultraGrid1";
             // 
             // 
@@ -306,7 +303,7 @@ namespace CarMeterSystem
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.LightBlue;
             this.BackColor = System.Drawing.Color.LightBlue;
-            this.ClientSize = new System.Drawing.Size(638, 463);
+            this.ClientSize = new System.Drawing.Size(1134, 765);
             this.ControlBox = false;
             this.ControlBox = false;
             this.Controls.Add(this.ultraGrid1);
             this.Controls.Add(this.ultraGrid1);
             this.Controls.Add(this.btnGross);
             this.Controls.Add(this.btnGross);

+ 14 - 20
CarMeterSystem/frmMatMsgInfo.cs

@@ -16,9 +16,10 @@ namespace CarMeterSystem
 {
 {
     public partial class frmMatMsgInfo : Form
     public partial class frmMatMsgInfo : Form
     {
     {
-        public frmMatMsgInfo()
+        public frmMatMsgInfo(string carNo)
         {
         {
             InitializeComponent();
             InitializeComponent();
+            _carNo = carNo;
         }
         }
 
 
         MeterWorkPreWgttypeService meterWorkPreWeightTypeService = new MeterWorkPreWgttypeService();
         MeterWorkPreWgttypeService meterWorkPreWeightTypeService = new MeterWorkPreWgttypeService();
@@ -28,39 +29,32 @@ namespace CarMeterSystem
 
 
         public string weightType = "";
         public string weightType = "";
 
 
-        string _matName = "", _chkMatName = "";
+        string _matName = "", _chkMatName = "",_carNo = "";
 
 
-        public frmMatMsgInfo(string matName) 
+        public frmMatMsgInfo() 
         {
         {
             InitializeComponent();
             InitializeComponent();
-            _matName = matName;
         }
         }
 
 
 
 
         private void btnCancel_Click(object sender, EventArgs e)
         private void btnCancel_Click(object sender, EventArgs e)
         {
         {
             this.DialogResult = DialogResult.Cancel;
             this.DialogResult = DialogResult.Cancel;
+            PbCache.isSelFrmMat = false;
             this.Close();
             this.Close();
         }
         }
 
 
         private void btnSave_Click(object sender, EventArgs e)
         private void btnSave_Click(object sender, EventArgs e)
         {
         {
-            string carNo = "湘G66666";
+            string carNo = _carNo;
             string preTrackScaleNo = "";
             string preTrackScaleNo = "";
             string weightTypes = weightType;
             string weightTypes = weightType;
-            int selectNum = 0;
-            if (ultraGrid1.Rows.Count > 0)
-            {
-                foreach (UltraGridRow ugr in ultraGrid1.Rows)
-                {
-                    string s = ugr.Cells["select"].Value.ToString();
-                    if (s == "True")
-                    {
-                        preTrackScaleNo = ugr.Cells["predictionNo"].Value.ToString();
-                        selectNum++;
-                    }
-                }
-            }
+            int selectNum = 1;
+
+            UltraGridRow ugr = ultraGrid1.ActiveRow;
+
+            preTrackScaleNo = ugr.Cells["predictionNo"].Value.ToString();
+
             if (weightTypes == "")
             if (weightTypes == "")
             {
             {
                 MessageBox.Show("请选择重量类型");
                 MessageBox.Show("请选择重量类型");
@@ -76,6 +70,7 @@ namespace CarMeterSystem
                     btnSave.Enabled = false;
                     btnSave.Enabled = false;
                     btnCancel.Enabled = false;
                     btnCancel.Enabled = false;
                     ultraGrid1.UpdateData();
                     ultraGrid1.UpdateData();
+                    PbCache.isSelFrmMat = false;
                     this.Close();
                     this.Close();
                 }
                 }
                 else
                 else
@@ -135,8 +130,7 @@ namespace CarMeterSystem
                                          t.FORWARDING_UNIT_NAME forwardingUnitName,
                                          t.FORWARDING_UNIT_NAME forwardingUnitName,
                                          t.TRUST_DATE_TIME trustDateTime
                                          t.TRUST_DATE_TIME trustDateTime
                                          from PRE_TRACK_SCALE t
                                          from PRE_TRACK_SCALE t
-                                         where value_flag = '1' and CAR_NO = '{0}' and LINE_DESC = '0'", "湘G66666");
-
+                                         where value_flag = '1' and TRUST_AVAILABILITY_TIME >= SYSDATE and CAR_NO = '{0}' and LINE_DESC = '0'", "湘G66666");
             DataTable dtV = dtPrediction.Clone();
             DataTable dtV = dtPrediction.Clone();
 
 
             PbModelDbService<List<PreTrackScale>> pb = new PbModelDbService<List<PreTrackScale>>();
             PbModelDbService<List<PreTrackScale>> pb = new PbModelDbService<List<PreTrackScale>>();

+ 20 - 2
CarMeterSystem/frmOneYardToEnd.Designer.cs

@@ -56,6 +56,7 @@
             this.panelShowWeightJGNoUsed = new System.Windows.Forms.Panel();
             this.panelShowWeightJGNoUsed = new System.Windows.Forms.Panel();
             this.ucCarFormButtomJXJG1 = new MeterModuleLibrary.uc.ucCarFormButtomJXJG();
             this.ucCarFormButtomJXJG1 = new MeterModuleLibrary.uc.ucCarFormButtomJXJG();
             this.ucCarFormTop_Jisco1 = new MeterModuleLibrary.uc.ucCarFormTop_Jisco();
             this.ucCarFormTop_Jisco1 = new MeterModuleLibrary.uc.ucCarFormTop_Jisco();
+            this.btnSelPreType = new System.Windows.Forms.Button();
             this.panelCarFormCentered.SuspendLayout();
             this.panelCarFormCentered.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtCarNo)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtCarNo)).BeginInit();
             this.tableLayoutPanelPromptMsg.SuspendLayout();
             this.tableLayoutPanelPromptMsg.SuspendLayout();
@@ -98,9 +99,9 @@
             this.btnFH.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnFH.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnFH.Font = new System.Drawing.Font("楷体", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)), true);
             this.btnFH.Font = new System.Drawing.Font("楷体", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)), true);
             this.btnFH.ForeColor = System.Drawing.Color.White;
             this.btnFH.ForeColor = System.Drawing.Color.White;
-            this.btnFH.Location = new System.Drawing.Point(960, 686);
+            this.btnFH.Location = new System.Drawing.Point(1177, 728);
             this.btnFH.Name = "btnFH";
             this.btnFH.Name = "btnFH";
-            this.btnFH.Size = new System.Drawing.Size(238, 70);
+            this.btnFH.Size = new System.Drawing.Size(91, 38);
             this.btnFH.TabIndex = 642;
             this.btnFH.TabIndex = 642;
             this.btnFH.Text = "返回主界面";
             this.btnFH.Text = "返回主界面";
             this.btnFH.UseVisualStyleBackColor = false;
             this.btnFH.UseVisualStyleBackColor = false;
@@ -237,6 +238,7 @@
             this.panelCarFormCentered.Controls.Add(this.ucWeightT1);
             this.panelCarFormCentered.Controls.Add(this.ucWeightT1);
             this.panelCarFormCentered.Controls.Add(this.panelShowWeightJGNoUsed);
             this.panelCarFormCentered.Controls.Add(this.panelShowWeightJGNoUsed);
             this.panelCarFormCentered.Controls.Add(this.btnRecover);
             this.panelCarFormCentered.Controls.Add(this.btnRecover);
+            this.panelCarFormCentered.Controls.Add(this.btnSelPreType);
             this.panelCarFormCentered.Controls.Add(this.btnSave);
             this.panelCarFormCentered.Controls.Add(this.btnSave);
             this.panelCarFormCentered.Controls.Add(this.btnHelp);
             this.panelCarFormCentered.Controls.Add(this.btnHelp);
             this.panelCarFormCentered.Controls.Add(this.btnTare);
             this.panelCarFormCentered.Controls.Add(this.btnTare);
@@ -366,6 +368,21 @@
             this.ucCarFormTop_Jisco1.Size = new System.Drawing.Size(1280, 95);
             this.ucCarFormTop_Jisco1.Size = new System.Drawing.Size(1280, 95);
             this.ucCarFormTop_Jisco1.TabIndex = 595;
             this.ucCarFormTop_Jisco1.TabIndex = 595;
             // 
             // 
+            // btnSelPreType
+            // 
+            this.btnSelPreType.BackColor = System.Drawing.Color.DodgerBlue;
+            this.btnSelPreType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSelPreType.Font = new System.Drawing.Font("楷体", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)), true);
+            this.btnSelPreType.ForeColor = System.Drawing.Color.White;
+            this.btnSelPreType.Location = new System.Drawing.Point(919, 687);
+            this.btnSelPreType.Name = "btnSelPreType";
+            this.btnSelPreType.Size = new System.Drawing.Size(234, 70);
+            this.btnSelPreType.TabIndex = 641;
+            this.btnSelPreType.Text = "选择计量类型";
+            this.btnSelPreType.UseVisualStyleBackColor = false;
+            this.btnSelPreType.Visible = false;
+            this.btnSelPreType.Click += new System.EventHandler(this.btnSelPreType_Click);
+            // 
             // frmOneYardToEnd
             // frmOneYardToEnd
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -425,5 +442,6 @@
         private Infragistics.Win.UltraWinEditors.UltraTextEditor txtCarNo;
         private Infragistics.Win.UltraWinEditors.UltraTextEditor txtCarNo;
         private MeterModuleLibrary.uc.ucCarFormTop_Jisco ucCarFormTop_Jisco1;
         private MeterModuleLibrary.uc.ucCarFormTop_Jisco ucCarFormTop_Jisco1;
         private MeterModuleLibrary.ucCarMeterInfoJisco ucCarMeterInfoJisco1;
         private MeterModuleLibrary.ucCarMeterInfoJisco ucCarMeterInfoJisco1;
+        private System.Windows.Forms.Button btnSelPreType;
     }
     }
 }
 }

+ 25 - 7
CarMeterSystem/frmOneYardToEnd.cs

@@ -958,7 +958,7 @@ namespace CarMeterSystem
         MeterWorkCarActualFirst outFirstTimer = new MeterWorkCarActualFirst();
         MeterWorkCarActualFirst outFirstTimer = new MeterWorkCarActualFirst();
         RESTfulResult<MeterBaseCar> resResgiterCarTimer = new RESTfulResult<MeterBaseCar>();
         RESTfulResult<MeterBaseCar> resResgiterCarTimer = new RESTfulResult<MeterBaseCar>();
         MeterBaseCar resgiterCarTimer = new MeterBaseCar();
         MeterBaseCar resgiterCarTimer = new MeterBaseCar();
-
+        frmMatMsgInfo frmMatMsgInfo = new frmMatMsgInfo();
         private void timer1_Tick(object sender, EventArgs e)
         private void timer1_Tick(object sender, EventArgs e)
         {
         {
             if (!isStop)
             if (!isStop)
@@ -1322,6 +1322,7 @@ namespace CarMeterSystem
                                 //厂内车辆
                                 //厂内车辆
                                 if (carScaleTimer.carTypeNo == "001004003")
                                 if (carScaleTimer.carTypeNo == "001004003")
                                 {
                                 {
+                                    btnSelPreType.Visible = true;
                                     preTrackScaleCarTimer.carNo = PbCache.collect.carno;
                                     preTrackScaleCarTimer.carNo = PbCache.collect.carno;
                                     preTrackScaleCarTimer.lineDesc = "1";
                                     preTrackScaleCarTimer.lineDesc = "1";
                                     rmScaleListCarTimer = PreTrackScaleService.doQueryByFlag(preTrackScaleCarTimer);
                                     rmScaleListCarTimer = PreTrackScaleService.doQueryByFlag(preTrackScaleCarTimer);
@@ -1515,14 +1516,18 @@ namespace CarMeterSystem
                             // 如果计量点配置中,设置了秤点计量类型为智能计量(下秤),验证扫码信息是否与识别车号一致。
                             // 如果计量点配置中,设置了秤点计量类型为智能计量(下秤),验证扫码信息是否与识别车号一致。
                             // 如果为是,自动保存
                             // 如果为是,自动保存
                             //3秒后自动执行保存方法
                             //3秒后自动执行保存方法
-                            lg.WriteLog(25, PbCache.lockCarNo + "Sleep前点击保存按钮");
-                            Thread.Sleep(3000);
-                            lg.WriteLog(25, PbCache.lockCarNo + "Sleep后点击保存按钮");
-                            if(PbCache.collect.weight > 500)
+
+                            if (!PbCache.isSelFrmMat)
                             {
                             {
-                                this.btnSave.PerformClick();
+                                lg.WriteLog(25, PbCache.lockCarNo + "Sleep前点击保存按钮");
+                                Thread.Sleep(3000);
+                                lg.WriteLog(25, PbCache.lockCarNo + "Sleep后点击保存按钮");
+                                if (PbCache.collect.weight > 500)
+                                {
+                                    this.btnSave.PerformClick();
+                                }
+                                lg.WriteLog(25, PbCache.lockCarNo + "PerformClick后保存按钮");
                             }
                             }
-                            lg.WriteLog(25, PbCache.lockCarNo + "PerformClick后保存按钮");
                         }
                         }
                         else if (PbCache.monitor.validMatClick == "0")
                         else if (PbCache.monitor.validMatClick == "0")
                         {
                         {
@@ -2640,5 +2645,18 @@ namespace CarMeterSystem
 
 
     }
     }
         #endregion
         #endregion
+
+        private void btnSelPreType_Click(object sender, EventArgs e)
+        {
+            if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
+            {
+                new frmMatMsgInfo(PbCache.collect.carno).Show();
+                PbCache.isSelFrmMat = true;
+            }
+            else
+            {
+                MessageBox.Show("车号为空");
+            }
+        }
     }
     }
 }
 }

+ 5 - 0
Common/cacheCls/PbCache.cs

@@ -51,6 +51,11 @@ namespace Common
         /// </summary>
         /// </summary>
         public static bool isTest { get; set; }
         public static bool isTest { get; set; }
 
 
+        /// <summary>
+        /// 是否打开手动选择毛皮
+        /// </summary>
+        public static bool isSelFrmMat { get; set; }
+
         /// <summary>
         /// <summary>
         /// 是否皮重(true=皮重;false=毛重)
         /// 是否皮重(true=皮重;false=毛重)
         /// </summary>
         /// </summary>