From ee6683a1351733a7c5b1e50a7722c96dfd42e2a2 Mon Sep 17 00:00:00 2001 From: hao <1836460075@qq.com> Date: 星期五, 30 五月 2025 16:25:28 +0800 Subject: [PATCH] 退换料确认 --- StandardInterface/MES.Service/service/QC/RetMatService.cs | 23 ++++++++++++++++++++++- StandardInterface/MESApplication/Controllers/QC/RetMatController.cs | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 1 deletions(-) diff --git a/StandardInterface/MES.Service/service/QC/RetMatService.cs b/StandardInterface/MES.Service/service/QC/RetMatService.cs index ddf0bee..dd0cedb 100644 --- a/StandardInterface/MES.Service/service/QC/RetMatService.cs +++ b/StandardInterface/MES.Service/service/QC/RetMatService.cs @@ -55,7 +55,7 @@ s.ITEM_MODEL AS spec, a.THLD005 AS qty, a.THLD014 AS reason, - s.ID AS item_id + s.ID AS itemId FROM MES_ITEM_THL_DETAIL a LEFT JOIN MES_ITEM_THL b ON a.THLMID = b.ID LEFT JOIN MES_ITEMS s ON a.ITEM_ID = s.ID @@ -131,5 +131,26 @@ } + + public void Reject(string docNo, string user) + { + var db = SqlSugarHelper.GetInstance(); + + string sql = @" + UPDATE MES_ITEM_THL + SET BH_TIME = SYSDATE, + BH_USER = :pi_user, + THL010 = '', + THL011 = '', + THL012 = 0 + WHERE THL_NO = :pi_no + "; + + db.Ado.ExecuteCommand(sql, + new SugarParameter("pi_user", user), + new SugarParameter("pi_no", docNo) + ); + } + } } diff --git a/StandardInterface/MESApplication/Controllers/QC/RetMatController.cs b/StandardInterface/MESApplication/Controllers/QC/RetMatController.cs index fa187d1..1f18c50 100644 --- a/StandardInterface/MESApplication/Controllers/QC/RetMatController.cs +++ b/StandardInterface/MESApplication/Controllers/QC/RetMatController.cs @@ -66,4 +66,19 @@ return ResponseResult.ResponseError(ex); } } + [HttpPost("Reject")] + public ResponseResult Reject([FromBody] ReviewRequest req) + { + try + { + _service.Reject(docNo: req.DocNo, user: req.User); + return new ResponseResult { status = 0, message = "椹冲洖鎴愬姛" }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + } -- Gitblit v1.9.3