chenxy 2 lat temu
rodzic
commit
69ce5191bf
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      wwwroot/mes/pc/materielquery/rpt.ashx

+ 3 - 2
wwwroot/mes/pc/materielquery/rpt.ashx

@@ -186,13 +186,14 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                 }
                 if (!string.IsNullOrEmpty(barcode))
                 {
-                    sqlStr += " AND gdd.barcode ='" + barcode + "'";
+                    sqlStr += " AND (gdd.barcode ='" + barcode + "' or gdd.OUTLABELCODE = '" + barcode + "')";
                 }
                     sqlStr += " order by gdd.groutingdate desc, t.fhtime desc, gdd.barcode ";
                 try
                 {
                     JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
                     context.Response.Write(data.ToJson());
+                        return;
                 }
                 catch (Exception ex)
                 {
@@ -230,7 +231,7 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                     WHERE
 	                    m.VALUEFLAG = '1' 
                         AND b.VALUEFLAG = '1' 
-	                    AND gdd.BARCODE = @BARCODE@
+	                    AND (gdd.BARCODE = @BARCODE@ or gdd.OUTLABELCODE = @BARCODE@ )
                     ",
                     new CDAParameter("BARCODE",barcode)
                 );