From 0cdfda43fa2f992614a1c0f3bd1aee48eac13797 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期二, 19 八月 2025 10:49:11 +0800 Subject: [PATCH] 1.AGV4个接口 2.其他入库优化 --- service/Warehouse/MesItemQtrkManager.cs | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/service/Warehouse/MesItemQtrkManager.cs b/service/Warehouse/MesItemQtrkManager.cs index 2ef12c8..b9a1539 100644 --- a/service/Warehouse/MesItemQtrkManager.cs +++ b/service/Warehouse/MesItemQtrkManager.cs @@ -124,17 +124,16 @@ var sqlParams = new List<SugarParameter> { new("@barcode", p_item_barcode), new("@billNo", p_bill_no) }; - var sql1 = @" SELECT TOP 1 A.rkCkId -FROM MES_QA_ITEMS_DETECT_01 A - LEFT JOIN MES_INV_ITEM_BARCODES B ON A.item_id = B.ITEM_ID -WHERE order_type = '鍏跺畠鍏ュ簱妫�' - AND A.lot_no = @billNo - AND ITEM_BARCODE = @barcode "; +// var sql1 = @" SELECT TOP 1 A.rkCkId +//FROM MES_QA_ITEMS_DETECT_01 A +// LEFT JOIN MES_INV_ITEM_BARCODES B ON A.item_id = B.ITEM_ID +//WHERE order_type = '鍏跺畠鍏ュ簱妫�' +// AND A.lot_no = @billNo +// AND ITEM_BARCODE = @barcode "; - var appDepotInfo = Db.Ado.SqlQuery<dynamic>(sql1, sqlParams).First(); +// var appDepotInfo = Db.Ado.SqlQuery<dynamic>(sql1, sqlParams).First(); - if(appDepotInfo.rkCkId != c_depot_id) - throw new Exception($"璇� {p_section_code} 瀵瑰簲鐨勪粨搴� 涓� 妫�楠屽垽瀹氱殑鍏ュ簱浠撳簱涓嶄竴鑷达紝璇风‘璁わ紒"); + var mesDepost = Db.Queryable<MesDepots>() @@ -173,6 +172,10 @@ if (qtrk == null) throw new Exception("鍏朵粬鍏ュ簱鐢宠鍗曚笉瀛樺湪锛�"); + + if (qtrk.Qt008 != c_depot_id.ToString()) + throw new Exception($"璇� {p_section_code} 瀵瑰簲鐨勪粨搴� 涓� 妫�楠屽垽瀹氱殑鍏ュ簱浠撳簱涓嶄竴鑷达紝璇风‘璁わ紒"); + var sql = @"SELECT c.item_no ItemNo,c.item_name ItemName,c.item_model ItemModel, ISNULL(A.qd007,0) FQty,ISNULL(A.qd008,0) SQty,ISNULL(A.qd007,0) - ISNULL(A.qd008,0) DSQty FROM MES_ITEM_QTRR_DETAIL A -- Gitblit v1.9.3