From c9826deec7b7d657df13c5382ba9af053ede4dff Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期一, 18 八月 2025 18:34:02 +0800
Subject: [PATCH] 1、产测查询工单改为通过线体直接查询 2、产测sn新增接口添加周转码字段

---
 StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs |    4 +++-
 StandardPda/MES.Service/Dto/service/AsnInfo.cs                       |    4 ++++
 StandardPda/MES.Service/service/Warehouse/WomdaaManager.cs           |   17 +++++++++--------
 StandardPda/MES.Service/Dto/service/CCLoginDto.cs                    |    6 +++++-
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/StandardPda/MES.Service/Dto/service/AsnInfo.cs b/StandardPda/MES.Service/Dto/service/AsnInfo.cs
index f4947c0..f6f7fe7 100644
--- a/StandardPda/MES.Service/Dto/service/AsnInfo.cs
+++ b/StandardPda/MES.Service/Dto/service/AsnInfo.cs
@@ -24,6 +24,10 @@
         /// </summary>
         public string loginId { get; set; }
         /// <summary>
+        /// 鍛ㄨ浆鐮�
+        /// </summary>
+        public string? turnoverCode { get; set; }
+        /// <summary>
         /// 澶辫触椤圭洰
         /// </summary>
         public List<CcFailItems>? failItems { get; set; }
diff --git a/StandardPda/MES.Service/Dto/service/CCLoginDto.cs b/StandardPda/MES.Service/Dto/service/CCLoginDto.cs
index 4700033..0b8939d 100644
--- a/StandardPda/MES.Service/Dto/service/CCLoginDto.cs
+++ b/StandardPda/MES.Service/Dto/service/CCLoginDto.cs
@@ -7,6 +7,10 @@
         /// </summary>
         public string LoginId { get; set; }
 
-       
+        /// <summary>
+        /// 绾夸綋
+        /// </summary>
+        public string LineId { get; set; }
+
     }
 }
diff --git a/StandardPda/MES.Service/service/Warehouse/WomdaaManager.cs b/StandardPda/MES.Service/service/Warehouse/WomdaaManager.cs
index 7b4fa5f..f32c386 100644
--- a/StandardPda/MES.Service/service/Warehouse/WomdaaManager.cs
+++ b/StandardPda/MES.Service/service/Warehouse/WomdaaManager.cs
@@ -39,12 +39,13 @@
 
 
             //鍙栫洿鎺ュ叧鑱旂嚎浣撶殑浜ф祴鐧诲綍鍙锋暟鎹紝鍘诲彇鑾峰彇宸ュ崟
-            var sql1 = "select DAA001 tickeNo,s.ITEM_NO itemNo,s.ITEM_NAME itemName,s.ITEM_MODEL itemModel,DAA008 plannedNum from " +
-                "MESLINE_LIKE_CCLOGIN_WORKS A1" +
-                "                        join MES_LINE b on A1.LOGINID=b.ID" +
-                "                        left join WOMDAA C on C.DAA015=B.LINE_NO" +
-                "                        left join mes_items s on s.id = C.daa002" +
-                "                       where WORKSNO='" + id + "' and DAA018='宸插紑宸�'  order by DAA016 asc";
+            //var sql1 = "select DAA001 tickeNo,s.ITEM_NO itemNo,s.ITEM_NAME itemName,s.ITEM_MODEL itemModel,DAA008 plannedNum from " +
+            //    "MESLINE_LIKE_CCLOGIN_WORKS A1" +
+            //    "                        join MES_LINE b on A1.LOGINID=b.ID" +
+            //    "                        left join WOMDAA C on C.DAA015=B.LINE_NO" +
+            //    "                        left join mes_items s on s.id = C.daa002" +
+            //    "                       where WORKSNO='" + id + "' and DAA018='宸插紑宸�'  order by DAA016 asc";
+            var sql1 = "select DAA001 tickeNo, s.ITEM_NO itemNo, s.ITEM_NAME itemName, s.ITEM_MODEL itemModel, DAA008 plannedNum\r\nfrom  WOMDAA C\r\n         left join mes_items s on s.id = C.daa002\r\nleft join womcaa A on A.caa001=C.daa021\r\nwhere C.DAA015 = '" + id + "'\r\n  and DAA018 = '宸插紑宸�' and A.CAA023='2'\r\norder by DAA016 asc";
             return SQLHelper.ExecuteQuery(sql1);
         }
 
@@ -91,13 +92,13 @@
                 // 1. 涓昏〃鎻掑叆
                 var sql1 = $@"
             INSERT INTO MES_SN_STATUS_DETAILS
-              (ID, TICKET_NO, SN_NO, WORKSTATION_NO, SN_STATE, LOGIN_ID)
+              (ID, TICKET_NO, SN_NO, WORKSTATION_NO, SN_STATE, LOGIN_ID,TURNOVER_CODE)
               VALUES (SEQ_MES_SN_STATUS_DETAILS_ID.NEXTVAL,
                       '{asnInfo.tickeNo}',
                       '{asnInfo.snNo}',
                       '{asnInfo.workstationNo}',
                       '{asnInfo.snState}',
-                      '{asnInfo.loginId}')";
+                      '{asnInfo.loginId}','{asnInfo.turnoverCode}')";
                 int i = sqlHelper.ExecuteNonQueryWithTransaction(connection, transaction, sql1);
 
                 // 2. 澶辫触椤规彃鍏�
diff --git a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
index dfdcdd9..69616eb 100644
--- a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
+++ b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
@@ -42,7 +42,9 @@
             try
             {
                 dynamic resultInfos = new ExpandoObject();
-                var result = m.GetTickeInfo(ccLoginDto.LoginId);
+                //var result = m.GetTickeInfo(ccLoginDto.LoginId);
+                //浼犵嚎浣撶紪鐮侊紝鏍规嵁绾夸綋缂栫爜鑾峰彇宸ュ崟淇℃伅
+                var result = m.GetTickeInfo(ccLoginDto.LineId);
                 resultInfos.tbBillList = result;
 
                 entity.Result = 0;

--
Gitblit v1.9.3