فهرست منبع

SN清单查询修改

Hcsy 8 سال پیش
والد
کامیت
e35a4d9f71
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

+ 7 - 5
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -36,9 +36,11 @@ namespace UAS_MES.Query
             ComBoxData.Columns.Add(status);
             ComBoxData.Columns.Add(statuscode);
             DataRow dr = ComBoxData.NewRow();
-            dr[0] = "全部"; dr[1] = "null"; ComBoxData.Rows.Add(dr);
+            dr[0] = "全部"; dr[1] = "ALL"; ComBoxData.Rows.Add(dr);
             dr = ComBoxData.NewRow();
-            dr[0] = "未生产"; dr[1] = "0"; ComBoxData.Rows.Add(dr);
+            dr[0] = "未生产"; dr[1] = "null"; ComBoxData.Rows.Add(dr);
+            dr = ComBoxData.NewRow();
+            dr[0] = "已归属"; dr[1] = "0"; ComBoxData.Rows.Add(dr);
             dr = ComBoxData.NewRow();
             dr[0] = "在线"; dr[1] = "1"; ComBoxData.Rows.Add(dr);
             dr = ComBoxData.NewRow();
@@ -80,7 +82,7 @@ namespace UAS_MES.Query
                 string statuscode = ms_status.SelectedValue.ToString();
                 sql.Clear();
                 sql.Append("select distinct sncode ms_sncode,ms_linecode,ms_stepcode,ms_nextstepcode,ms_craftcode,makecode ms_makecode, ");
-                sql.Append("case when ms_status is null then '未生产'  when ms_status=1 then '在线' when ms_status=2 ");
+                sql.Append("case when ms_status is null then '未生产' when ms_status=0 then '已归属' when ms_status=1 then '在线' when ms_status=2 ");
                 sql.Append(" then '已完工' when ms_status=3 then '不良待维修' when ms_status=4 then '已报废' ");
                 sql.Append("else 'null' end ms_status  from((select msd_sncode sncode,msd_makecode makecode,msd_type type ");
                 sql.Append("from makesnruledetail where msd_makecode='" + ma_code.Text + "') union (select msl_sncode sncode,msl_makecode ");
@@ -88,11 +90,11 @@ namespace UAS_MES.Query
                 sql.Append("select ms_sncode,ms_makecode,'' type from  makeserial where ms_makecode='" + ma_code.Text + "'))");
                 sql.Append("A left join makeserial on ms_code=sncode and ms_makecode=makecode ");
                 sql.Append(condition);
-                if (statuscode == "0")
+                if (statuscode == "null")
                 {
                     sql.Append("and ms_status is null");
                 }
-                else if (statuscode == "null")
+                else if (statuscode == "ALL")
                 {
 
                 }