From 2075957d9c0c87e66b0392fdc0a2d5b9290dfee5 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期五, 14 二月 2025 08:22:54 +0800 Subject: [PATCH] 1.成品入库后台完成 2.报工后台优化 --- service/Warehouse/MesCprkManager.cs | 16 ++++++++-------- service/Wom/MesWorkProdManager.cs | 15 ++++++++------- Controllers/Warehouse/MesCprkController.cs | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Controllers/Warehouse/MesCprkController.cs b/Controllers/Warehouse/MesCprkController.cs index a22d2aa..b4fb843 100644 --- a/Controllers/Warehouse/MesCprkController.cs +++ b/Controllers/Warehouse/MesCprkController.cs @@ -57,7 +57,7 @@ try { dynamic resultInfos = new ExpandoObject(); - //resultInfos.tbBillList = m.CPRK(unity); + resultInfos.tbBillList = m.CPRK(unity); return new ResponseResult { status = 0, diff --git a/service/Warehouse/MesCprkManager.cs b/service/Warehouse/MesCprkManager.cs index 354be65..f6b7b34 100644 --- a/service/Warehouse/MesCprkManager.cs +++ b/service/Warehouse/MesCprkManager.cs @@ -32,10 +32,10 @@ using (var conn = new SqlConnection(DbHelperSQL.strConn)) { if (unity.userName.IsNullOrEmpty()) throw new Exception("鐢ㄦ埛鍚嶄笉鍏佽涓虹┖"); - if (unity.CfNum <= 0) throw new Exception("鎷嗗垎鏁伴噺闇�澶т簬绛変簬0"); + if (unity.sectionCode.IsNullOrEmpty()) throw new Exception("搴撲綅缂栧彿涓嶅厑璁镐负绌�"); if (unity.barcode.IsNullOrEmpty()) throw new Exception("鏉$爜涓嶅厑璁镐负绌�"); - using (var cmd = new SqlCommand("[prc_pda_bar_cf]", conn)) + using (var cmd = new SqlCommand("[prc_pda_inv_cprk]", conn)) { try { @@ -43,12 +43,12 @@ cmd.CommandType = CommandType.StoredProcedure; SqlParameter[] parameters = { - new("@outMsg", SqlDbType.NVarChar, 300), - new("@outSum", SqlDbType.NVarChar, 300), - new("@barcode_new", SqlDbType.NVarChar, 300), - new("@c_user", unity.userName), - new("@p_old_barcode", unity.barcode), - new("@p_qty", unity.CfNum), + new("@po_outMsg", SqlDbType.NVarChar, 300), + new("@po_outSum", SqlDbType.NVarChar, 300), + new("@po_womInBarSum", SqlDbType.NVarChar, 300), + new("@pi_user", unity.userName), + new("@pi_barcode", unity.barcode), + new("@pi_sectionCode", unity.sectionCode), }; parameters[0].Direction = ParameterDirection.Output; diff --git a/service/Wom/MesWorkProdManager.cs b/service/Wom/MesWorkProdManager.cs index 3d88cb7..75aa089 100644 --- a/service/Wom/MesWorkProdManager.cs +++ b/service/Wom/MesWorkProdManager.cs @@ -137,7 +137,7 @@ Quantity = reportQty }) .Where(x => x.Guid == barcode.Guid) - .ExecuteCommandAsync(); + .ExecuteCommand(); // 11. 鑾峰彇鎴栧垱寤烘姤宸ュ崟 var workProd = db.Queryable<MesWorkProd>() @@ -199,11 +199,12 @@ // 13. 鏇存柊宸ュ崟宸叉姤宸ユ暟閲� db.Updateable<Womdaa>() - .SetColumns(x => - x.Daa011 == (x.Daa011 ?? 0) + (int)barcode.Quantity - ) - .Where(x => x.Daa001 == barcode.BillNo) - .ExecuteCommandAsync(); + .SetColumns(x => new Womdaa + { + Daa011 = (x.Daa011 ?? 0) + (int)barcode.Quantity + }) + .Where(x => x.Daa001 == barcode.BillNo) + .ExecuteCommand(); // 14. 閲嶆柊鑾峰彇鏈�鏂板凡鎶ュ伐鏁伴噺 reportedQty = db.Queryable<MesWorkProd, MesWorkProdCDetails>( @@ -222,7 +223,7 @@ // 15. 杩斿洖澶勭悊缁撴灉 return new ScanWorkResult { - TaskNo = barcode.TaskNo, + TaskNo = barcode.BillNo, ItemNo = item.ItemNo, PlanQty = planQty ?? 0, ReportedQty = reportedQty ?? 0, -- Gitblit v1.9.3