From 0ff18a7500fd1ec0c2b96c371b35d944a9bb5f0b Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期六, 01 四月 2023 10:40:53 +0800
Subject: [PATCH] 扫流转卡,扫仓库码,派工单。

---
 WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 6600f68..2f3f1de 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -164,22 +164,19 @@
                     NewBarCode = sBillBarCode.Split(Convert.ToChar("#"));
                     sBillBarCode = NewBarCode[0];
                 }
-                string sBillNo = sBillBarCode;
+                string sBillNo = sBillBarCode; //鏉″舰鐮�
 
-                string[] arr = sBillNo.Split('&');
-                string BillNo_PGD = arr[0];
-                string entryid_PGD = "";
+                string[] arr = sBillNo.Split('&'); //浠ョ鍙封��&鈥欏垎鍓叉潯褰㈢爜
+                string BillNo_PGD = arr[0]; //鍗曟嵁鍙�
+                string entryid_PGD = "";//瀛恑d
                 if(arr.Length > 1)
                 {
                     entryid_PGD = arr[1];
-
                 }
 
-
-
-                //鎴彇鏉$爜绫诲瀷
+                //鎴彇鏉$爜绫诲瀷 鍓嶄笁浣�
                 string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length));
-                //鎴彇鏉$爜绫诲瀷2
+                //鎴彇鏉$爜绫诲瀷2 鍓嶅洓浣�
                 string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length));
                 //鎴彇鍐呯爜
                 string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length));
@@ -189,7 +186,14 @@
                         ds = oCN.RunProcReturn("select * from h_v_Sc_ProcExchSendWorkBill  where 娲惧伐鍗曟嵁鍙� = '" + BillNo_PGD + "'" + " and HEntryID ='" + entryid_PGD + "'", "h_v_Sc_ProcExchSendWorkBill");
                         break;
                     case "GXLX"://娴佽浆鍗�
-                        ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
+                        if (entryid_PGD != "") //濡傛灉瀛恑d涓嶄负绌哄垯鍔犲叆瀛恑d杩囨护锛�
+                        {
+                            ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList  where 鍗曟嵁鍙�= '" + BillNo_PGD + "'" + " and hsubid ='" + entryid_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
+                        }
+                        else
+                        {
+                            ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
+                        }
                         break;
                 }
                 switch (BillNoType)

--
Gitblit v1.9.1