From 2b9f544a55f30f0b6e8010b84ed8b60f2c4cb78e Mon Sep 17 00:00:00 2001 From: hao <1836460075@qq.com> Date: 星期一, 04 八月 2025 20:35:52 +0800 Subject: [PATCH] 工单更新 --- StandardInterface/MESApplication/Controllers/QC/SJController.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 54 insertions(+), 4 deletions(-) diff --git a/StandardInterface/MESApplication/Controllers/QC/SJController.cs b/StandardInterface/MESApplication/Controllers/QC/SJController.cs index 107d6b9..87a2a52 100644 --- a/StandardInterface/MESApplication/Controllers/QC/SJController.cs +++ b/StandardInterface/MESApplication/Controllers/QC/SJController.cs @@ -41,14 +41,14 @@ try { dynamic resultInfos = new ExpandoObject(); - var tbBillList = - new SJService().getPage(queryObj); - resultInfos.tbBillList = tbBillList; + var (items, totalCount) = new SJService().getPage(queryObj); + resultInfos.tbBillList = items; return new ResponseResult { status = 0, message = "OK", - data = resultInfos + data = resultInfos, + TotalCount = totalCount }; } catch (Exception ex) @@ -319,4 +319,54 @@ return ResponseResult.ResponseError(ex); } } + + //鍒锋柊妫�楠岄」鐩� + [HttpPost("GenUpdate")] + public ResponseResult GenUpdate([FromBody] JObject data) + { + try + { + decimal? id = data["id"]?.ToObject<decimal>(); + string? no = data["no"]?.ToString(); + string? user = data["user"]?.ToString(); + + var (result, message) = new SJService().GenUpdate(id, no, user); + + dynamic resultInfos = new ExpandoObject(); + resultInfos.result = result; + resultInfos.message = message; + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + //鎻愪氦妫�楠� + [HttpPost("SjSubmit")] + public ResponseResult SjSubmit([FromBody] SJDto sjDto) + { + try + { + dynamic resultInfos = new ExpandoObject(); + var tbBillList = new SJService().SjSubmit(sjDto); + resultInfos.tbBillList = tbBillList; + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } } \ No newline at end of file -- Gitblit v1.9.3