From b6b20da09e72e9e287b252348e7700641d9745e8 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期一, 11 八月 2025 18:31:14 +0800
Subject: [PATCH] 11

---
 MESApplication/Controllers/QC/SJController.cs |   72 ++++++++++++++++++++++++++++++++++--
 1 files changed, 68 insertions(+), 4 deletions(-)

diff --git a/MESApplication/Controllers/QC/SJController.cs b/MESApplication/Controllers/QC/SJController.cs
index 107d6b9..c1b5451 100644
--- a/MESApplication/Controllers/QC/SJController.cs
+++ b/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,68 @@
             return ResponseResult.ResponseError(ex);
         }
     }
+
+    [HttpPost("SJQaSubmit")]
+    public ResponseResult SJQaSubmit([FromBody] QsItem item)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList = new SJService();
+            var detail021 = tbBillList.SJQaSubmit(item);
+            resultInfos.tbBillList = detail021;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 鏇存柊QsItemIpiItem鐨処sPass鍊�
+    /// </summary>
+    /// <param name="data">鍖呭惈id鍜宨sPass鐨凧SON瀵硅薄</param>
+    /// <returns>鏇存柊缁撴灉</returns>
+    [HttpPost("UpdateQsItemIpiItemIsPass")]
+    public ResponseResult UpdateQsItemIpiItemIsPass([FromBody] JObject data)
+    {
+        try
+        {
+            var id = data["id"]?.ToString();
+            var isPass = data["isPass"]?.ToString();
+
+            if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(isPass))
+            {
+                return new ResponseResult
+                {
+                    status = 1,
+                    message = "鍙傛暟涓嶈兘涓虹┖",
+                    data = null
+                };
+            }
+
+            dynamic resultInfos = new ExpandoObject();
+            var sjService = new SJService();
+            var result = sjService.UpdateQsItemIpiItemIsPass(Convert.ToDecimal(id), Convert.ToDecimal(isPass));
+            resultInfos.tbBillList = result;
+            
+            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