From 0cff826ea489a1faa5cbb320cad52d102530a9e0 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期四, 13 三月 2025 10:53:42 +0800
Subject: [PATCH] 代码提交

---
 StandardPda/MESApplication/Controllers/QC/RKJController.cs |  391 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 391 insertions(+), 0 deletions(-)

diff --git a/StandardPda/MESApplication/Controllers/QC/RKJController.cs b/StandardPda/MESApplication/Controllers/QC/RKJController.cs
new file mode 100644
index 0000000..427250f
--- /dev/null
+++ b/StandardPda/MESApplication/Controllers/QC/RKJController.cs
@@ -0,0 +1,391 @@
+锘縰sing System.Dynamic;
+using MES.Service.Dto.service;
+using MES.Service.Modes;
+using MES.Service.service.QC;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json.Linq;
+
+namespace MESApplication.Controllers.QC;
+
+[Route("api/[controller]")]
+[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")]
+    public ResponseResult getLineAll()
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().getLineNo();
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    //getDaa001
+    [HttpPost("getDaa001")]
+    public ResponseResult getDaa001([FromBody] JObject data)
+    {
+        var lineNo = data["lineNo"].ToString();
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().GetDaa001s(lineNo);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    [HttpPost("setJYItem")]
+    public ResponseResult setJYItem([FromBody] JObject data)
+    {
+        var itemNo = data["itemNo"].ToString();
+        var quantity = Convert.ToDecimal(data["quantity"].ToString());
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().SetItems(itemNo, quantity);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    [HttpPost("save")]
+    public ResponseResult save([FromBody] RKJDto rkjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().save(rkjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    [HttpPost("getPage")]
+    public ResponseResult getPage([FromBody] XJPageResult queryObj)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var (items, totalCount) = new RKJService().getPage(queryObj);
+            var tbBillList = items;
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos,
+                TotalCount = totalCount
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //getItems
+    [HttpPost("getItems")]
+    public ResponseResult getJYItem([FromBody] JObject data)
+    {
+        var pid = data["pid"]?.ToString();
+        var id = data["id"]?.ToString();
+
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().GetItems(Convert.ToDecimal(pid),
+                    Convert.ToDecimal(id));
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //removeXJ
+    [HttpPost("removeXJ")]
+    public ResponseResult removeXJ([FromBody] JObject data)
+    {
+        var id = data["id"]?.ToString();
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().removeXJ(Convert.ToDecimal(id));
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //getXjDetail02ById
+    [HttpPost("getXjDetail02ById")]
+    public ResponseResult getXjDetail02ById([FromBody] JObject data)
+    {
+        var id = data["id"]?.ToString();
+
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().getXjDetail02ById(Convert.ToDecimal(id));
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    [HttpPost("SetQSItemDetail")]
+    public ResponseResult SetQSItemDetail([FromBody] QsItemOqcItemDetail detail)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList = new RKJService();
+            var detail021 = tbBillList.SetQSItemDetail(detail);
+            resultInfos.tbBillList = detail021;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    [HttpPost("UpdateQSItemDetail")]
+    public ResponseResult UpdateQSItemDetail(
+        [FromBody] QsItemOqcItemDetail detail)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList = new RKJService();
+            var detail021 = tbBillList.UpdateQSItemDetail(detail);
+            resultInfos.tbBillList = detail021;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //saveRemarksGid
+    [HttpPost("saveRemarksGid")]
+    public ResponseResult saveRemarksGid([FromBody] RKJDto rkjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().saveRemarksGid(rkjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //saveRemarksPid
+    [HttpPost("saveRemarksPid")]
+    public ResponseResult saveRemarksPid([FromBody] RKJDto rkjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().saveRemarksPid(rkjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //saveRemarksById
+    [HttpPost("saveRemarksById")]
+    public ResponseResult saveRemarksById([FromBody] RKJDto rkjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().saveRemarksById(rkjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    [HttpPost("saveItem")]
+    public ResponseResult saveItem([FromBody] RKJDto xjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().saveItem(xjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    //cleanReqResult
+    [HttpPost("cleanReqResult")]
+    public ResponseResult cleanReqResult([FromBody] RKJDto xjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new RKJService().cleanReqResult(xjDto);
+            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