From 79b889992365c0e31a7a517a1641cba20a52fc09 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 02 六月 2025 16:32:38 +0800 Subject: [PATCH] 1.优化认证信息储存 --- service/QC/IpqcService.cs | 18 ++++++++++-------- Controllers/QC/IpqcController.cs | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Controllers/QC/IpqcController.cs b/Controllers/QC/IpqcController.cs index 37dc059..ed93146 100644 --- a/Controllers/QC/IpqcController.cs +++ b/Controllers/QC/IpqcController.cs @@ -99,7 +99,7 @@ //鏇存柊妫�楠岄」鐩璇佷俊鎭� [HttpPost("updateIpqcRzxx")] - public ResponseResult updateIpqcRzxx(LLJDto ipqcDto) + public ResponseResult updateIpqcRzxx(dynamic ipqcDto) { try { diff --git a/service/QC/IpqcService.cs b/service/QC/IpqcService.cs index 5fb5477..8964b18 100644 --- a/service/QC/IpqcService.cs +++ b/service/QC/IpqcService.cs @@ -159,20 +159,22 @@ //鏇存柊涓嶅悎鏍兼弿杩� - public int updateIpqcRzxx(LLJDto dto) + public int updateIpqcRzxx(dynamic dto) { if (dto == null) throw new ArgumentNullException(nameof(dto), "鍙傛暟瀵硅薄涓嶈兘涓� null"); - - // 鍙傛暟鏍¢獙锛堟牴鎹瓨鍌ㄨ繃绋嬫柊澧炲弬鏁帮級 if (string.IsNullOrEmpty(dto.pid?.ToString())) throw new ArgumentException("椤圭洰鏄庣粏id瀛樺湪闂锛岃鑱旂郴绠$悊鍛橈紒", nameof(dto.pid)); - var withOracle = Db.Updateable<MesQaItemsDetectDetail5>() - .SetColumns(s => s.IPQCRZXX == dto.inRzxxValue) - .Where(s => s.Guid.ToString() == dto.pid) - .ExecuteCommand(); + var sqlParams = new List<SugarParameter> { + new("@inRzxxValue", dto.inRzxxValue), + new("@pid", dto.pid) + }; - return withOracle; + var sql = @"UPDATE MES_QA_ITEMS_DETECT_DETAIL5 + SET ipqc_rzxx = @inRzxxValue + WHERE guid = @pid"; + + return Db.Ado.ExecuteCommand(sql, sqlParams); } -- Gitblit v1.9.3