From c423a61ae9ee84f71a75ac793dac083fbd590eb1 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 05 六月 2024 20:48:53 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs | 94 ++++++++++++++++++++++++----------------------- 1 files changed, 48 insertions(+), 46 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs index e0df0f0..b3d6f23 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs @@ -198,6 +198,9 @@ + HInterID + ",'"+ HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString()+",'"+ oSub.HICMOBillNo.ToString() + "') "); + + //鍙嶅啓妯″叿鐘舵�� + oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='棰嗗嚭' where HInterID= " + oSub.HMouldID.ToString()); } objJsonResult.code = "1"; @@ -877,6 +880,9 @@ + HInterID + ",'" + HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString() + "') "); + + //鍙嶅啓妯″叿鐘舵�� + oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='鍦ㄥ簱' where HInterID= " + oSub.HMouldID.ToString()); } objJsonResult.code = "1"; @@ -1375,6 +1381,41 @@ } #endregion + #region 涓嬫ā鍗曟煡璇笂妯″崟淇℃伅 鍒楄〃鏌ヨ + [Route("Sc_MouldLowerBill/Sc_MouldUpperBillList")] + [HttpGet] + public object Sc_MouldUpperBillList(string sWhere) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_Qj_Sc_MouldUpperBillList where 1=1" + sWhere, "h_v_Qj_Sc_MouldUpperBillList"); + + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ユ棤鏁版嵁锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #region 涓�/涓嬫ā鍗曡幏鍙栨潯鐮佷俊鎭� [Route("Sc_MouldUpperBill/txtHBarCode_KeyDown")] @@ -1392,52 +1433,7 @@ return objJsonResult; } - //鎷嗗垎鏉″舰鐮� - 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)); - //鎴彇鏉$爜绫诲瀷3 鍓嶅洓浣� - string BillNoType4 = sBillBarCode.Substring(0, Math.Min(4, sBillBarCode.Length)); - - - switch (BillNoType2) - { - //鐢熶骇璧勬簮 - case "BM": - case "SS": - ds = oCN.RunProcReturn("select HItemID,HName,HNumber from Gy_Source where HNumber = '" + HBarCode + "'", "Gy_Source"); - break; - case "MO": - ds = oCN.RunProcReturn("select 鍗曟嵁鍙�,hmainid,HEntryID from h_v_IF_ICMOBillList where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_IF_ICMOBillList"); - break; - default: - break; - } - - switch (BillNoType3) - { - //鍣ㄥ叿妗f - case "MJD": - case "PAK": - ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_Gy_MouldFileList"); - break; - default: - break; - } - - switch (BillNoType4) - { - //娴佽浆鍗� - case "GXLX": - ds = oCN.RunProcReturn("select 浠诲姟鍗曞彿,hicmointerid,HICMOEntryID,鍗曟嵁鍙�,hmainid,HEntryID from h_v_Sc_ProcessExchangeBillQuerySub where 鍗曟嵁鍙� = '" + HBarCode + "'", "h_v_Sc_ProcessExchangeBillQuerySub"); - break; - default: - break; - } + ds = oCN.RunProcReturn("exec h_p_Sc_AllowLoadData '" + HBarCode + "'", "h_p_Sc_AllowLoadData"); if (ds == null || ds .Tables.Count== 0 || ds.Tables[0].Rows.Count == 0) { @@ -1598,6 +1594,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 +1741,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