From a321728ec413c26dc8707d3d463e593b68a3d455 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 27 五月 2024 16:10:34 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
index e0df0f0..1876434 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -1396,12 +1396,14 @@
                 string sBillBarCode = HBarCode.Trim();
 
               
-                //鎴彇鏉$爜绫诲瀷2 鍓嶄袱浣�
+                //鎴彇鏉$爜绫诲瀷 鍓嶄袱浣�
                 string BillNoType2 = sBillBarCode.Substring(0, Math.Min(2, sBillBarCode.Length));
-                //鎴彇鏉$爜绫诲瀷 鍓嶄笁浣�
-                string BillNoType3 = sBillBarCode.Substring(0, Math.Min(3, sBillBarCode.Length));
+                //鎴彇鏉$爜绫诲瀷 鍓嶄簲浣�
+                string BillNoType3 = sBillBarCode.Substring(0, Math.Min(5, sBillBarCode.Length));
                 //鎴彇鏉$爜绫诲瀷3 鍓嶅洓浣�
                 string BillNoType4 = sBillBarCode.Substring(0, Math.Min(4, sBillBarCode.Length));
+                //鎴彇鏉$爜绫诲瀷 鍓嶅叓浣�
+                string BillNoType5 = sBillBarCode.Substring(0, Math.Min(8, sBillBarCode.Length));
 
 
                 switch (BillNoType2)
@@ -1418,12 +1420,15 @@
                         break;
                 }
 
+
                 switch (BillNoType3)
                 {
                     //鍣ㄥ叿妗f
                     case "MJD":
                     case "PAK":
-                        ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_Gy_MouldFileList");
+                    case "https":
+                        HBarCode = HBarCode.Substring(23, HBarCode.Length-23);
+                        ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList where 鏉$爜缂栧彿 = '" + HBarCode + "'", "h_v_Gy_MouldFileList");
                         break;
                     default:
                         break;
@@ -1435,8 +1440,24 @@
                     case "GXLX":
                         ds = oCN.RunProcReturn("select 浠诲姟鍗曞彿,hicmointerid,HICMOEntryID,鍗曟嵁鍙�,hmainid,HEntryID from h_v_Sc_ProcessExchangeBillQuerySub where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_Sc_ProcessExchangeBillQuerySub");
                         break;
+                    //鐢熶骇璁㈠崟
+                    case "9010":
+                        ds = oCN.RunProcReturn("select 鍗曟嵁鍙�,hmainid,HEntryID from h_v_IF_ICMOBillList where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_IF_ICMOBillList");
+                        break;
                     default:
                         break;
+                }
+
+                DateTime date;
+                bool flag = false;
+                if (BillNoType5.Length == 8) {
+                    BillNoType5 = BillNoType5.Substring(0, 4) + "-" + BillNoType5.Substring(4, 2) + "-" + BillNoType5.Substring(6, 2);
+                }
+                flag = DateTime.TryParse(BillNoType5, out date);
+              
+
+                if (flag) {
+                    ds = oCN.RunProcReturn("select 浠诲姟鍗曞彿,hicmointerid,HICMOEntryID,鍗曟嵁鍙�,hmainid,HEntryID from h_v_Sc_ProcessExchangeBillQuerySub where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_Sc_ProcessExchangeBillQuerySub");
                 }
 
                 if (ds == null || ds .Tables.Count== 0 || ds.Tables[0].Rows.Count == 0)
@@ -1598,6 +1619,9 @@
                      + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString()
                      + "','" + oSub.HProcExchBillNo.ToString() + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString()
                      + ",'" + oSub.HScanDate.ToString() + "','" + oSub.HMouldNumber.ToString() + "') ");
+
+                //鍙嶅啓妯″叿鐘舵��
+                oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='棰嗗嚭' where HInterID= "+ oSub.HMouldID.ToString());
             }
 
             objJsonResult.code = "1";
@@ -1742,6 +1766,9 @@
                      + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString()
                      + "','" + oSub.HProcExchBillNo.ToString() + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString()
                      + ",'" + oSub.HScanDate.ToString() + "','" + oSub.HMouldNumber.ToString() + "') ");
+
+                //鍙嶅啓妯″叿鐘舵��
+                oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='鍦ㄥ簱' where HInterID= " + oSub.HMouldID.ToString());
             }
 
             objJsonResult.code = "1";

--
Gitblit v1.9.1