From 3a23f941956f3a7b800a66719c64e550ba11f226 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 18 九月 2025 22:59:55 +0800
Subject: [PATCH] SJ,XJ,RKJ

---
 MESApplication/Controllers/QC/RKJController.cs |  107 +++++++++++++++++++++++++++++------------------------
 1 files changed, 59 insertions(+), 48 deletions(-)

diff --git a/MESApplication/Controllers/QC/RKJController.cs b/MESApplication/Controllers/QC/RKJController.cs
index 3aea949..9bdcb0e 100644
--- a/MESApplication/Controllers/QC/RKJController.cs
+++ b/MESApplication/Controllers/QC/RKJController.cs
@@ -12,28 +12,6 @@
 [ApiController]
 public class RKJController : ControllerBase
 {
-    //getMaxReleaseNo
-    [HttpPost("getMaxReleaseNo")]
-    public ResponseResult getMaxReleaseNo()
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            var tbBillList =
-                new RKJService().getMaxBillNo();
-            resultInfos.tbBillList = tbBillList;
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
 
     //getLine
     [HttpPost("getLineAll")]
@@ -107,20 +85,23 @@
         }
     }
 
-    [HttpPost("save")]
-    public ResponseResult save([FromBody] RKJDto rkjDto)
+
+    //GetPage
+    [HttpPost("GetPage")]
+    public ResponseResult GetPage([FromBody] RKJPageResult queryObj)
     {
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            var tbBillList =
-                new RKJService().save(rkjDto);
+            var service = new RKJService();
+            var (tbBillList, totalCount) = service.getPageWithTotal(queryObj);
             resultInfos.tbBillList = tbBillList;
             return new ResponseResult
             {
                 status = 0,
                 message = "OK",
-                data = resultInfos
+                data = resultInfos,
+                TotalCount = totalCount
             };
         }
         catch (Exception ex)
@@ -129,27 +110,6 @@
         }
     }
 
-    [HttpPost("getPage")]
-    public ResponseResult getPage([FromBody] XJPageResult queryObj)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            var tbBillList =
-                new RKJService().getPage(queryObj);
-            resultInfos.tbBillList = tbBillList;
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
 
     //getItems
     [HttpPost("getItems")]
@@ -364,4 +324,55 @@
             return ResponseResult.ResponseError(ex);
         }
     }
+
+    [HttpPost("GenUpdateRKJ")]
+    public ResponseResult GenUpdateRKJ([FromBody] JObject data)
+    {
+        var id = Convert.ToDecimal(data["id"]?.ToString());
+        var no = data["no"]?.ToString();
+        var userNo = data["userNo"]?.ToString();
+        try
+        {
+            var service = new RKJService();
+            var (code, message) = service.GenUpdateRKJ(id, no, userNo);
+            return new ResponseResult
+            {
+                status = code,
+                message = message,
+                data = new ExpandoObject()
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 鎻愪氦鍏ュ簱妫�楠屽崟
+    /// </summary>
+    /// <param name="data">鍖呭惈gid鍜寀serNo鐨凧SON鏁版嵁</param>
+    /// <returns>鎻愪氦缁撴灉</returns>
+    [HttpPost("RKJQaSubmit")]
+    public ResponseResult RKJQaSubmit([FromBody] JObject data)
+    {
+        var userNo = data["userNo"]?.ToString();
+        var id = Convert.ToDecimal(data["gid"]?.ToString());
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList = new RKJService().RKJQaSubmit(userNo, id);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "鎻愪氦鎴愬姛",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3