章政 %!s(int64=7) %!d(string=hai) anos
pai
achega
01ecdaf6ce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      UAS-MES/FunctionCode/Make/Make_Repair.cs

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -524,7 +524,7 @@ namespace UAS_MES.Make
                 }
                 //查询对应的上料记录
                 sql.Clear();
-                sql.Append("select cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
+                sql.Append("select distinct cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
                 sql.Append(" makesnrelation where firstsn='" + firstsn + "') and cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
                 DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 //查询的结果不相等表示未完成上料