From 1be2fc056943ba8b9e62328430e15beee03e8a9f Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 02 六月 2025 13:46:48 +0800 Subject: [PATCH] 1.生产补料优化 2.首检开发-v1 --- Controllers/QC/IpqcController.cs | 127 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 124 insertions(+), 3 deletions(-) diff --git a/Controllers/QC/IpqcController.cs b/Controllers/QC/IpqcController.cs index 5f9fd73..37dc059 100644 --- a/Controllers/QC/IpqcController.cs +++ b/Controllers/QC/IpqcController.cs @@ -118,7 +118,9 @@ return ResponseResult.ResponseError(ex); } } - + /// <summary> + /// 棣栨鍗曟嵁鏌ヨ + /// </summary> [HttpPost("createByWomdaa")] public ResponseResult CreateByWomdaa(dynamic query) { @@ -138,7 +140,9 @@ return ResponseResult.ResponseError(ex); } } - + /// <summary> + /// 鑾峰彇琛ㄦ牸閰嶇疆 + /// </summary> [HttpPost("GetTableConfig")] public ResponseResult GetTableConfig([FromBody] dynamic query) { @@ -169,7 +173,9 @@ return ResponseResult.ResponseError(ex); } } - + /// <summary> + /// 淇濆瓨琛ㄦ牸閰嶇疆 + /// </summary> [HttpPost("SaveTableConfig")] public ResponseResult SaveTableConfig([FromBody] dynamic query) { @@ -201,6 +207,121 @@ return ResponseResult.ResponseError(ex); } } + /// <summary> + /// 鑾峰彇璁よ瘉淇℃伅鍒楄〃 + /// </summary> + [HttpPost("GetRzxxList")] + public ResponseResult GetRzxxList([FromBody] dynamic query) + { + try + { + if (query.mxguid == null) + throw new ArgumentException("妫�楠岄」鐩瓽UID涓嶈兘涓虹┖"); + + var rzxxList = m.GetRzxxList(query.mxguid?.ToString()); + + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = rzxxList; + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + /// <summary> + /// 鏇存柊璁よ瘉淇℃伅_鐢熶骇鏃ユ湡 + /// </summary> + [HttpPost("updateScDate")] + public ResponseResult UpdateScDate([FromBody] dynamic query) + { + try + { + if (query.mxguid == null) + throw new ArgumentException("妫�楠岄」鐩瓽UID涓嶈兘涓虹┖"); + if (query.scDateValue == null) + throw new ArgumentException("鏃ユ湡鍙傛暟涓嶈兘涓虹┖"); + + var affectedRows = m.UpdateScDate( + query.scDateValue?.ToString(), + query.mxguid?.ToString() + ); + + return new ResponseResult + { + status = affectedRows > 0 ? 0 : 1, + message = affectedRows > 0 ? "鏃ユ湡鏇存柊鎴愬姛" : "鏃犳暟鎹洿鏂�", + data = new { updated = affectedRows } + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 淇濆瓨璁よ瘉淇℃伅鐩稿叧浣跨敤鏁伴噺 + /// </summary> + [HttpPost("saveIpqcrzxxNum")] + public ResponseResult SaveIpqcrzxxNum([FromBody] dynamic query) + { + try + { + if (query.guid == null || query.ipqcrzxxNum == null) + throw new ArgumentException("鍙傛暟涓嶈兘涓虹┖"); + + var affectedRows = m.UpdateRzxxNum( + query.ipqcrzxxNum?.ToString(), + query.guid?.ToString() + ); + + return new ResponseResult + { + status = affectedRows > 0 ? 0 : 1, + message = affectedRows > 0 ? "鏁伴噺鏇存柊鎴愬姛" : "鏃犳暟鎹洿鏂�", + data = new { updated = affectedRows } + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + /// <summary> + /// 淇濆瓨鍝佹按娴嬭瘯鏄惁鏈夊紓鍛� + /// </summary> + [HttpPost("saveIpqCpscs")] + public ResponseResult SaveIpqCpscs([FromBody] dynamic query) + { + try + { + if (query.guid == null || query.ipqCpscs == null) + throw new ArgumentException("鍙傛暟涓嶈兘涓虹┖"); + + var affectedRows = m.UpdateCpscs( + query.ipqCpscs?.ToString(), + query.guid?.ToString() + ); + + return new ResponseResult + { + status = affectedRows > 0 ? 0 : 1, + message = affectedRows > 0 ? "鏄惁鏈夋棤寮傚懗鏇存柊鎴愬姛" : "鏃犳暟鎹洿鏂�", + data = new { updated = affectedRows } + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } } \ No newline at end of file -- Gitblit v1.9.3