From e9a84a2ca945afa4693306045bc244973ebe9835 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 13 三月 2026 13:44:28 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs |   41 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index d70ad5d..5dc7d1b 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -13,8 +13,10 @@
 using System.Threading.Tasks;
 using System.Web.Http;
 using WebAPI.Models;
+using WebAPI.Service;
 using System.Threading;
 using SyntacticSugar.constant;
+using WebApiWithFleck;
 
 namespace WebAPI.Controllers.SCGL
 {
@@ -7407,7 +7409,6 @@
                 }
                 if (bResult)
                 {
-
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -7793,6 +7794,12 @@
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
+
+                    // 涓帹鏂瑰紡鎺ㄩ�佹暟鎹�
+                    GeTuiService.PubishSingle(HInterID);
+
+                    // webSocket鏂瑰紡鎺ㄩ�佹暟鎹�
+                    // WebSocketServer.PushOne(HInterID);
                 }
                 if (IsAudit == 1) //鍙嶅鏍告彁浜�
                 {
@@ -8224,14 +8231,29 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();
 
-                string sql = "select * from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc";
+                string sql = $@"select HSendMan 鍥炲浜�, HDescription 鍥炲鍐呭, HDate 鍥炲鏃堕棿,
+                                case HSendStatus 
+                                when 1 then '鏅��'
+                                when 10 then '楠岃瘉閫氳繃'
+                                when 9 then '缁撴'
+                                end as 绫诲瀷
+                                ,* from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc";
                 ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillSub");
+
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
                 return objJsonResult;
             }
             catch (Exception e)
@@ -8671,10 +8693,23 @@
         {
             try
             {
+                string sql = "";
                 List<object> columnNameList = new List<object>();
 
-                string sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HDatePlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
+                if (!string.IsNullOrEmpty(HSourceBill) && HSourceBill.Substring(0, 6) == "GXCZHB")
+                {
+                    HSourceBill = HSourceBill.Split('-')[0];
+                    //鍗庤垷鍋氭湯浠跺彂璧峰畨鐏殑鏃跺�� 浼犺繃鏉ョ殑鏄嚭绔欏崟鐨勫崟鎹彿
+                    sql = @"select a.HProcExchInterID 娴佽浆鍗′富鍐呯爜,a.HProcExchEntryID 娴佽浆鍗″瓙鍐呯爜,a.HProcExchBillNo 娴佽浆鍗″彿,a.HSourceID,b.HName 鐢熶骇璧勬簮, c.HNumber 鐗╂枡浠g爜, c.HName 鐗╂枡鍚嶇О, c.HModel 瑙勬牸鍨嬪彿, a.HPlanQty 璁″垝鏁伴噺
+                            from Sc_StationOutBillMain a  left  join Gy_Source b on a.HSourceID = b.HItemID  left  join Gy_Material c on a.HMaterID = c.HItemID  where a.HBillNo = '" + HSourceBill + "'";
+                }
+                else
+                {
+                    //鎶ュ伐鍙颁紶杩囨潵鐨勬槸娴佽浆鍗$殑
+                    sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HDatePlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
                     "left join Gy_Material b on a.HMaterID=b.HItemID  left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "' and a.HICMOStatus=1";
+                }
+                 
                 ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
                 if (ds.Tables[0].Rows.Count == 0)
                 {

--
Gitblit v1.9.1