浏览代码

新增不良代码增加已审核条件

Hcsy 8 年之前
父节点
当前提交
a6fa526867

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_NewBadCode.cs

@@ -62,13 +62,13 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Append("select bg_code,bg_name from product left join productkind  on pr_kind =pk_name ");
             sql.Append("left join productbadgroup on pb_kindcode= pk_code left join badgroup on ");
-            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>''");
+            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>'' and bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //如果未查询到数据则获取全部的不良组别
             if (dt.Rows.Count == 0)
             {
                 sql.Clear();
-                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED'");
+                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 badgroup.DataSource = dt;
                 badgroup.DisplayMember = "bg_name";

+ 11 - 11
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.Designer.cs

@@ -72,7 +72,7 @@
             this.bg_name,
             this.bc_code,
             this.bc_name});
-            this.ChoosedRejectList.Location = new System.Drawing.Point(314, 195);
+            this.ChoosedRejectList.Location = new System.Drawing.Point(314, 206);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
             this.ChoosedRejectList.Size = new System.Drawing.Size(226, 242);
             this.ChoosedRejectList.TabIndex = 54;
@@ -114,7 +114,7 @@
             this.bg_name1,
             this.bc_code1,
             this.bc_name1});
-            this.WaitRejectList.Location = new System.Drawing.Point(14, 194);
+            this.WaitRejectList.Location = new System.Drawing.Point(14, 205);
             this.WaitRejectList.Name = "WaitRejectList";
             this.WaitRejectList.Size = new System.Drawing.Size(226, 244);
             this.WaitRejectList.TabIndex = 51;
@@ -240,7 +240,7 @@
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_makecode.ForeColor = System.Drawing.Color.Black;
             this.ms_makecode.ID = null;
-            this.ms_makecode.Location = new System.Drawing.Point(313, 35);
+            this.ms_makecode.Location = new System.Drawing.Point(312, 34);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Power = null;
             this.ms_makecode.Size = new System.Drawing.Size(141, 23);
@@ -254,7 +254,7 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(240, 35);
+            this.ms_makecode_label.Location = new System.Drawing.Point(239, 34);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 97;
@@ -270,7 +270,7 @@
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ForeColor = System.Drawing.Color.Black;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(82, 35);
+            this.ms_sncode.Location = new System.Drawing.Point(81, 34);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
             this.ms_sncode.Size = new System.Drawing.Size(141, 23);
@@ -284,7 +284,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(10, 35);
+            this.ms_sncode_label.Location = new System.Drawing.Point(9, 34);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 95;
@@ -297,7 +297,7 @@
             this.Cancel.DownImage = ((System.Drawing.Image)(resources.GetObject("Cancel.DownImage")));
             this.Cancel.Image = null;
             this.Cancel.IsShowBorder = true;
-            this.Cancel.Location = new System.Drawing.Point(289, 449);
+            this.Cancel.Location = new System.Drawing.Point(289, 460);
             this.Cancel.Margin = new System.Windows.Forms.Padding(2);
             this.Cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("Cancel.MoveImage")));
             this.Cancel.Name = "Cancel";
@@ -316,7 +316,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(200, 449);
+            this.Save.Location = new System.Drawing.Point(200, 460);
             this.Save.Margin = new System.Windows.Forms.Padding(2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
@@ -331,7 +331,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(252, 278);
+            this.ChooseedReject.Location = new System.Drawing.Point(252, 289);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 53;
@@ -341,7 +341,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(252, 336);
+            this.WaitReject.Location = new System.Drawing.Point(252, 347);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 52;
@@ -352,7 +352,7 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(123, 167);
+            this.Filter.Location = new System.Drawing.Point(123, 170);
             this.Filter.Margin = new System.Windows.Forms.Padding(2);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -66,13 +66,13 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Append("select bg_code,bg_name from product left join productkind  on pr_kind =pk_name ");
             sql.Append("left join productbadgroup on pb_kindcode= pk_code left join badgroup on ");
-            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>''");
+            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>'' and bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //如果未查询到数据则获取全部的不良组别
             if (dt.Rows.Count == 0)
             {
                 sql.Clear();
-                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED'");
+                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 badgroup.DataSource = dt;
                 badgroup.DisplayMember = "bg_name";