Prechádzať zdrojové kódy

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

Hcsy 8 rokov pred
rodič
commit
2819b77f10

+ 1 - 1
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -86,7 +86,7 @@ namespace UAS_MES.Query
                 sql.Append("from makesnruledetail where msd_makecode='" + ma_code.Text + "') union (select msl_sncode sncode,msl_makecode ");
                 sql.Append("makecode,msl_type type from makesnlist where msl_makecode='" + ma_code.Text + "') union (");
                 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");
+                sql.Append("A left join makeserial on ms_code=sncode and ms_makecode=makecode ");
                 sql.Append(condition);
                 if (statuscode == "0")
                 {

+ 2 - 0
UAS-MES/PublicMethod/BaseUtil.cs

@@ -948,6 +948,8 @@ namespace UAS_MES.PublicMethod
         /// <returns></returns>
         public static DataTable filterDataTable(DataTable dt, String condition)
         {
+            if (dt == null)
+                return new DataTable();
             //获取筛选条件中的列名,值
             DataRow[] dataRows = dt.Select(condition);
             DataTable ndt = dt.Clone();