From aa63b28eb1187509cfc54d4e56f5f4f669021563 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期五, 19 十二月 2025 13:49:43 +0800
Subject: [PATCH] 1,巡检A工序不合格需要重新生成一张新的A工序;

---
 StandardPda/MESApplication/Controllers/QC/XJController.cs |  144 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 137 insertions(+), 7 deletions(-)

diff --git a/StandardPda/MESApplication/Controllers/QC/XJController.cs b/StandardPda/MESApplication/Controllers/QC/XJController.cs
index ef25d6b..a7db76f 100644
--- a/StandardPda/MESApplication/Controllers/QC/XJController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/XJController.cs
@@ -1,10 +1,11 @@
-锘縰sing System.Dynamic;
-using MES.Service.Dto.service;
+锘縰sing 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;
+using System.Dynamic;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
 
 namespace MESApplication.Controllers.QC;
 
@@ -159,17 +160,40 @@
             return ResponseResult.ResponseError(ex);
         }
     }
+    
+    [HttpPost("XJQaSubmit")]
+    public ResponseResult XJQaSubmit(LLJDto rkjDto)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new XJService().XJQaSubmit(rkjDto);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
 
     //setJYItem
     [HttpPost("setJYItem")]
     public ResponseResult setJYItem([FromBody] JObject data)
     {
         var itemNo = data["itemNo"].ToString();
+        var releaseNo = data["releaseNo"].ToString();
         try
         {
             dynamic resultInfos = new ExpandoObject();
             var tbBillList =
-                new XJService().setJYItem(itemNo);
+                new XJService().setJYItem(itemNo, releaseNo);
             resultInfos.tbBillList = tbBillList;
             return new ResponseResult
             {
@@ -207,6 +231,38 @@
         }
     }
 
+
+    [HttpPost("closeInspection")]
+    public ResponseResult CloseInspection([FromBody] XJCloseInspectionDto dto)
+    {
+        try
+        {
+            var service = new XJService();
+            var result = service.CloseInspection(dto);
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = result
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+
+
+
+
+
+
+
+
+
     [HttpPost("saveItem")]
     public ResponseResult saveItem([FromBody] XJDto xjDto)
     {
@@ -236,14 +292,15 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
+            var (item, totalCount) = new XJService().getPage(queryObj);
             var tbBillList =
-                new XJService().getPage(queryObj);
-            resultInfos.tbBillList = tbBillList;
+                resultInfos.tbBillList = item;
             return new ResponseResult
             {
                 status = 0,
                 message = "OK",
-                data = resultInfos
+                data = resultInfos,
+                TotalCount = totalCount
             };
         }
         catch (Exception ex)
@@ -442,4 +499,77 @@
             return ResponseResult.ResponseError(ex);
         }
     }
-}
\ No newline at end of file
+    /// <summary>
+    ///     鑾峰彇宸℃妫�鍗曟墍鏈変笉鑹弿杩�
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("getJYBlmsItem")]
+    public ResponseResult getJYBlmsItem([FromBody] JObject data)
+    {
+        var id = data["id"]?.ToString();
+
+        try
+        {
+            var tbBillList = new XJService().getBlmsItem1(id);
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = tbBillList
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+
+
+    /// <summary>
+    ///     娣诲姞宸℃鍗�
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("createInspection")]
+    public ResponseResult createInspection([FromBody] CreateInspectionDto data)
+    {
+        try
+        {
+            var tbBillList = new XJService().createInspection(data);
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = tbBillList
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+

--
Gitblit v1.9.3