From f3047bc98b1ace53f1ee09beca82c3864bb5957e Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期四, 05 六月 2025 21:10:48 +0800
Subject: [PATCH] 签收送货单api提交

---
 StandardPda/MESApplication/Controllers/QC/LljController.cs |  343 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 317 insertions(+), 26 deletions(-)

diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs
index f4c58c0..7a81a79 100644
--- a/StandardPda/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -1,10 +1,14 @@
-锘縰sing System.Dynamic;
+锘縰sing Masuit.Tools;
 using MES.Service.Dto.service;
 using MES.Service.Modes;
 using MES.Service.service.QC;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
+using NetTaste;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
+using System.Data;
+using System.Dynamic;
 
 namespace MESApplication.Controllers.QC;
 
@@ -45,14 +49,14 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            var tbBillList =
-                new LljService().SetItems(itemNo, quantity, releaseNo);
-            resultInfos.tbBillList = tbBillList;
+
+            string[] msg = new LljService().SetItems(itemNo, quantity, releaseNo);
+
             return new ResponseResult
             {
-                status = 0,
-                message = "OK",
-                data = resultInfos
+                status = int.Parse(msg[0]),
+                message = msg[1],
+                data = msg[1]
             };
         }
         catch (Exception ex)
@@ -83,6 +87,35 @@
         }
     }
 
+
+    [HttpPost("SaveCheckBy")]
+    public ResponseResult SaveCheckBy([FromBody] JObject data)
+    {
+        try
+        {
+            var NewStaffName = data["NewStaffName"].ToString();
+            var userID = data["userID"].ToString();
+            var releaseNo = data["releaseNo"].ToString();
+            var NewStaffUserID = data["NewStaffUserID"].ToString();
+
+            string[] msg = new LljService().SaveCheckBy(NewStaffUserID, userID, releaseNo);
+
+
+            
+            return new ResponseResult
+            {
+                status = int.Parse(msg[0]),
+                message = msg[1],
+                data = msg[1]
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
     //getItems
     [HttpPost("getJYItem")]
     public ResponseResult getJYItem([FromBody] JObject data)
@@ -109,6 +142,118 @@
         }
     }
 
+    /// <summary>
+    /// 鑾峰彇涓�鑷存�ф牳瀵归」鐩�
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("getYzxItem")]
+    public ResponseResult getYzxItem([FromBody] JObject data)
+    {
+      
+        var id = data["id"]?.ToString();
+        try
+        {
+            var tbBillList =new LljService().getYzxBDlist(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("getJYBlmsItem")]
+    public ResponseResult getJYBlmsItem([FromBody] JObject data)
+    {
+
+        var id = data["id"]?.ToString();
+        
+        try
+        {
+            var tbBillList = new LljService().getBlmsItem(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("saveYzxItem")]
+    public ResponseResult saveYzxItem([FromBody] JObject data)
+    {
+
+        var id = data["id"]?.ToString();
+        var dataDt = data["data"]?.ToString();
+        DataTable dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
+        try
+        {
+            new LljService().saveYzxBDlist(id, dt);
+            string[] msg=new LljService().YzxImgVerify(id);
+
+            return new ResponseResult
+            {
+                status = int.Parse( msg[0]),
+                message = msg[1],
+                data = ""
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 鑾峰彇鎵�鏈夋楠屽憳淇℃伅
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("getAllInspectors")]
+    public ResponseResult getAllInspectors([FromBody] JObject data)
+    {
+      
+        try
+        {
+            var tbBillList = new LljService().getAllInspectors();
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = tbBillList
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
     //getXjDetail02ById
     [HttpPost("getXjDetail02ById")]
     public ResponseResult getXjDetail02ById([FromBody] JObject data)
@@ -126,6 +271,66 @@
                 status = 0,
                 message = "OK",
                 data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    /// <summary>
+    /// 閫氳繃鏉$爜鑾峰彇閫佹鍗曚俊鎭�
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("getFromInfo")]
+    public ResponseResult getFromInfo([FromBody] JObject data)
+    {
+        var id = data["Barcode"]?.ToString();
+
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var tbBillList =
+                new LljService().getFromInfo(id);
+            resultInfos.tbBillList = tbBillList;
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    /// <summary>
+    /// 鑾峰彇涓嶈壇鎻忚堪淇℃伅
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("getBlmsItem")]
+    public ResponseResult getBlmsItem([FromBody] JObject data)
+    {
+
+       
+        try
+        {
+            var tbBillList = new LljService().getBlmsItem();
+            string[] arrRate = tbBillList.AsEnumerable().Select(d => d.Field<string>("DEFECT_NAME")).ToArray();
+             
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = arrRate
             };
         }
         catch (Exception ex)
@@ -258,14 +463,13 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            var tbBillList =
-                new LljService().IqcQaSubmit(rkjDto);
-            resultInfos.tbBillList = tbBillList;
+            var msg = new LljService().IqcQaSubmit(rkjDto);
+             
             return new ResponseResult
             {
-                status = 0,
-                message = "OK",
-                data = resultInfos
+                status = int.Parse(msg[0]),
+                message = msg[1],
+                data = msg[1]
             };
         }
         catch (Exception ex)
@@ -274,25 +478,112 @@
         }
     }
     //IqcQaSubmit
-    [HttpPost("GetFileUrlByU9List")]
-    public ResponseResult GetFileUrlByU9List(LLJDto rkjDto)
+    [HttpPost("getImgBDlist")]
+    public ResponseResult getImgBDlist([FromBody] JObject data)
     {
         try
         {
-            //dynamic resultInfos = new ExpandoObject();
-            //var tbBillList =
-            //    new LljService().IqcQaSubmit(rkjDto);
-            //resultInfos.tbBillList = tbBillList;
-            string[] fileUrls =
- {
-    "https://new-service.oss-cn-hangzhou.aliyuncs.com/sheet-attachment/1728624575152_ty5VSi9R.png",
-    "https://new-service.oss-cn-hangzhou.aliyuncs.com/sheet-attachment/1728624610583_EwIN55BL.pdf"
-};
+            var id = data["id"]?.ToString();
+             
+            var db = new LljService().getImgBDlist(id);
+
             return new ResponseResult
             {
-                status = 0,
+                status = int.Parse("0"),
                 message = "OK",
-                data = fileUrls
+                data = db
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 鑾峰彇U9鍥剧焊鏁版嵁
+    /// </summary>
+    /// <param name="data"></param>
+    /// <returns></returns>
+    [HttpPost("GetFileUrlByU9List")]
+    public async Task<ResponseResult> GetFileUrlByU9List([FromBody] JObject data)
+    {
+        try
+        {
+            var type = data["type"]?.ToString();
+            var itemID = data["u9No"]?.ToString();
+            dynamic resultInfos = new ExpandoObject();
+            var lljService = new LljService();
+            var tbBillList = await lljService.GetFileUrlByU9List(type, itemID);
+            if (tbBillList != null)
+            {
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = tbBillList
+                };
+            }
+            else
+            {
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "OK",
+                    data = ""
+                };
+            }
+
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+    /// <summary>
+    /// 瀹為獙瀹ら�佹鏁版嵁淇濆瓨
+    /// </summary>
+    /// <param name="sysSubmit">瀹為獙瀹ら�佹鏁版嵁</param>
+    /// <returns></returns>
+    [HttpPost("SaveSysSubmit")]
+    public ResponseResult SaveSysSubmit(SysSubmit sysSubmit)
+    {
+        try
+        {
+
+            string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+
+            return new ResponseResult
+            {
+                status = int.Parse(msg[0]),
+                message = msg[1],
+                data = msg[1]
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 閫佽揣鍗曠鏀跺苟鐢熸垚鍒拌揣鍗�
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    [HttpPost("SignDelivery")]
+    public async Task<ResponseResult> SignDelivery(string id)
+    {
+        try
+        {
+
+             //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+            string[] msg= await new LljService().SignDelivery(id);
+            return new ResponseResult
+            {
+                status = int.Parse(msg[0]),
+                message = msg[1],
+                data = msg[1]
             };
         }
         catch (Exception ex)

--
Gitblit v1.9.3