From 918f9175edd2d64cb0f9fb459f987e3cbee3ea38 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 27 五月 2024 13:40:43 +0800 Subject: [PATCH] 1、销售出库维护页面:删除功能报错 2.网页端删除报错,如果是条码生成的应该在删除界面提示这张销售出库是条码生成,请去PDA缓存列表删除,如果是下推产生,应该可以直接删除。 --- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 561 ++++++++++--------------------------------------------- 1 files changed, 104 insertions(+), 457 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index ab9ad72..8d0d376 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -1013,8 +1013,8 @@ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 - oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� - oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� + //oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� + //oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� oBill.DetailColl.Add(oItemSub); @@ -1065,7 +1065,7 @@ } #endregion - #region 鍏朵粬鍏ュ簱鍗� 缂栬緫椤甸潰鍒濆鍖� + #region 鐩存帴璋冩嫧鍗� 缂栬緫椤甸潰鍒濆鍖� [Route("Kf_MoveStockBill/Kf_MoveStockBillEdit")] [HttpGet] public object Kf_MoveStockBillEdit(long HInterID) @@ -1105,7 +1105,7 @@ } #endregion - #region 鍏跺畠鍏ュ簱鍗曞鏍�/鍙嶅鏍稿姛鑳� + #region 鐩存帴璋冩嫧鍗� 瀹℃牳/鍙嶅鏍稿姛鑳� [Route("Kf_MoveStockBill/CheckKf_MoveStockBill")] [HttpGet] public object CheckKf_MoveStockBill(string HInterID, int Type, string user) @@ -1303,7 +1303,7 @@ } #endregion - #region 鍏跺畠鍏ュ簱鍗曞叧闂�/鍙嶅叧闂姛鑳� + #region 鐩存帴璋冩嫧鍗� 鍏抽棴/鍙嶅叧闂姛鑳� [Route("Kf_MoveStockBill/CloseKf_MoveStockBill")] [HttpGet] public object CloseKf_MoveStockBill(string HInterID, int Type, string user) @@ -1409,7 +1409,7 @@ } #endregion - #region 鍏朵粬鍏ュ簱鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� + #region 鐩存帴璋冩嫧鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� [Route("Kf_MoveStockBill/DropKf_MoveStockBill")] [HttpGet] public object DropKf_MoveStockBill(string HInterID, int Type, string user) @@ -1539,8 +1539,7 @@ } #endregion - - #region 璋冩嫧鍗曞垪琛� + #region 鐩存帴璋冩嫧鍗曞垪琛� /// <summary> /// 璋冩嫧鍗曞垪琛� /// </summary> @@ -1589,7 +1588,7 @@ } #endregion - #region 璋冩嫧鍗� 鍒犻櫎 + #region 鐩存帴璋冩嫧鍗� 鍒犻櫎 [Route("Kf_MoveStockBill/DelteteGetMoveStockBill")] [HttpGet] public object DelteteGetMoveStockBill(string HInterID, string user) @@ -1632,6 +1631,10 @@ //================================================================================== oCN.BeginTran(); + + //鐩存帴璋冩嫧鍗� 鍒犻櫎 鎾ら攢 鍥炲~ 璋冩嫧鐢宠鍗� 鍏宠仈鏁伴噺 + oCN.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Del " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); @@ -1670,6 +1673,43 @@ catch (Exception e) { oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鐩存帴璋冩嫧鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栬皟鎷ㄧ敵璇峰崟鏁版嵁 + [Route("Kf_MoveStockBill/loadKf_MoveStockBillMain_Push")] + [HttpGet] + public object loadKf_MoveStockBillMain_Push(long HInterID, long HSubID) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_MoveStockRequestBillList_Litee"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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(); @@ -1796,13 +1836,17 @@ oCN.BeginTran(); //閿�鍞嚭搴撳垹闄ゅ洖濉攢鍞鍗曞叧鑱旀暟閲� - //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID); + oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID); - //oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); - //oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); + //閿�鍞嚭搴撳垹闄ゅ洖濉敹璐ч�氱煡鍗曞叧鑱旀暟閲� + oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + HInterID); - string sql = "exec h_p_WMS_ICStockBillAndWMS_Delete " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','1205'"; - oCn.RunProc(sql); + + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); + + //string sql = "exec h_p_WMS_ICStockBillAndWMS_Delete " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','1205'"; + //oCn.RunProc(sql); //鍒犻櫎鍚庢帶鍒�================================================================================== string sql2 = "exec h_p_Kf_SellOutBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; @@ -2789,57 +2833,6 @@ } #endregion - - - /// <summary> - /// 浜у搧鍏ュ簱鍗曞垪琛� - /// </summary> - /// <returns></returns> - [Route("Kf_ProductInBill/GetProductInBill")] - [HttpGet] - public object GetProductInBill(string sWhere,string user) - { - try - { - //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� - if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Query", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; - objJsonResult.data = null; - return objJsonResult; - } - - - if (sWhere == null || sWhere.Equals("")) - { - ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList"); - } - else - { - string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; - ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); - } - - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - - } - catch (Exception ex) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #region 鏉$爜鏄庣粏 [Route("Kf_ICStockBillSub_WMS/Kf_ICStockBillSub_WMS_List")] [HttpGet] @@ -2864,392 +2857,6 @@ objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion - - /// <summary> - ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳� - /// </summary> - /// <returns></returns> - [Route("Kf_ProductInBill/DeltetProductInBill")] - [HttpGet] - public object DeltetProductInBill(string HInterID) - { - try - { - oCN.BeginTran(); - oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); - oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); - oCN.Commit(); - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; - } - catch (Exception e) - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - - #region 鐢熶骇鍏ュ簱鍗曞鏍�/鍙嶅鏍稿姛鑳� - [Route("Kf_ProductInBill/CheckKf_ProductInBill")] - [HttpGet] - public object CheckKf_ProductInBill(string HInterID, int Type, string user) - { - try - { - //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄� - if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Check", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳潈闄愬鏍�!"; - objJsonResult.data = null; - return objJsonResult; - } - - if (string.IsNullOrWhiteSpace(HInterID)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "HInterID涓虹┖锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - ClsPub.CurUserName = user; - BillOld.MvarItemKey = "Kf_ICStockBillMain"; - oCN.BeginTran();//寮�濮嬩簨鍔� - - //Type 1 瀹℃牳 2 鍙嶅鏍� - if (Type == 1) - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳 - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶉渶瑕佸啀瀹℃牳!"; - objJsonResult.data = null; - return objJsonResult; - } - } - //瀹℃牳鍗曟嵁 - if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - else - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍� - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插弽瀹℃牳!涓嶉渶瑕佸啀鍙嶅鏍�!"; - objJsonResult.data = null; - return objJsonResult; - } - } - //鍙嶅鏍稿崟鎹� - if (BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); - //DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl"); - ////if (DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["Hback"]) != 0) - ////{ - //// objJsonResult.code = "0"; - //// objJsonResult.count = 1; - //// objJsonResult.Message = "璇ヤ换鍔″崟宸蹭笅鎺ㄦ祦杞崱锛屼笉鍏佽鍙嶅鏍�" + DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HBackRemark"]); - //// objJsonResult.data = null; - //// return objJsonResult; - ////} - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - - oCN.Commit();//鎻愪氦浜嬪姟 - - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鎵ц鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; ; - - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion - - #region 鐢熶骇鍏ュ簱鍗曞叧闂�/鍙嶅叧闂姛鑳� - [Route("Kf_ProductInBill/CloseKf_ProductInBill")] - [HttpGet] - public object CloseKf_ProductInBill(string HInterID, int Type, string user) - { - try - { - //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄� - if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Close", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳潈闄愬叧闂�!"; - objJsonResult.data = null; - return objJsonResult; - } - - if (string.IsNullOrWhiteSpace(HInterID)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "HInterID涓虹┖锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - ClsPub.CurUserName = user; - BillOld.MvarItemKey = "Kf_ICStockBillMain"; - oCN.BeginTran();//寮�濮嬩簨鍔� - - //Type 1 鍏抽棴 2 鍙嶅叧闂� - if (Type == 1) - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴 - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶉渶瑕佸啀鍏抽棴!"; - objJsonResult.data = null; - return objJsonResult; - } - } - //鍏抽棴鍗曟嵁 - if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - else - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂� - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插弽鍏抽棴!涓嶉渶瑕佸啀鍙嶅叧闂�!"; - objJsonResult.data = null; - return objJsonResult; - } - } - //鍙嶅叧闂崟鎹� - if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - - oCN.Commit();//鎻愪氦浜嬪姟 - - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鎵ц鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; ; - - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion - - #region 鐢熶骇鍏ュ簱鍗� 浣滃簾/鍙嶄綔搴熷姛鑳� - [Route("Kf_ProductInBill/DropKf_ProductInBill")] - [HttpGet] - public object DropKf_ProductInBill(string HInterID, int Type, string user) - { - try - { - //鍒ゆ柇鏄惁鏈変綔搴熸潈闄� - if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Drop", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳潈闄愪綔搴�!"; - objJsonResult.data = null; - return objJsonResult; - } - - if (string.IsNullOrWhiteSpace(HInterID)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "HInterID涓虹┖锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - ClsPub.CurUserName = user; - BillOld.MvarItemKey = "Kf_ICStockBillMain"; - oCN.BeginTran();//寮�濮嬩簨鍔� - - //Type 1 浣滃簾 2 鍙嶄綔搴� - if (Type == 1) - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾 - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; - objJsonResult.data = null; - return objJsonResult; - } - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; - objJsonResult.data = null; - return objJsonResult; - } - if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; - objJsonResult.data = null; - return objJsonResult; - } - //浣滃簾鍗曟嵁 - if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - } - else - { - //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴� - DataSet ds; - string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; - ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); - if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; - objJsonResult.data = null; - return objJsonResult; - } - if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸啀鍙嶄綔搴�!"; - objJsonResult.data = null; - return objJsonResult; - } - //鍙嶄綔搴熷崟鎹� - if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - } - - oCN.Commit();//鎻愪氦浜嬪姟 - - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鎵ц鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; ; - - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -6191,7 +5798,7 @@ { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁 - ds = oCN.RunProcReturn("select HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckBillSub a left join Gy_Employee e on a.HManagerID=e.HItemID where 1=1 " + sqlWhere, "Sc_MouldDotCheckBillSub"); + ds = oCN.RunProcReturn("select * from h_v_Sc_MouldDotCheckBill_Edit where 1=1 " + sqlWhere, "h_v_Sc_MouldDotCheckBill_Edit"); //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID ,u2.hnumber HUnitNumber,u2.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark @@ -6204,7 +5811,7 @@ objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = null; + objJsonResult.data = ds.Tables[0]; objJsonResult.list = list; } @@ -6526,8 +6133,7 @@ { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁 - ds = oCN.RunProcReturn(@"select a.HDotCheckItemID,HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckPlanBillSub a - left join Gy_Employee e on a.HManagerID=e.HItemID + ds = oCN.RunProcReturn(@"select * from h_v_Sc_MouldDotCheckPlanBill_Edit where 1=1 " + sqlWhere, "Sc_MouldDotCheckPlanBillSub"); ////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 //ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID @@ -6540,7 +6146,7 @@ objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = null; + objJsonResult.data = ds.Tables[0]; objJsonResult.list = list; } catch (Exception e) @@ -6638,7 +6244,48 @@ #endregion - + #region 鏍规嵁鍣ㄥ叿鏉$爜鏌ユ壘鍣ㄥ叿妗f淇℃伅PDA + [Route("QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown")] + [HttpGet] + public object txtHBarCode_KeyDown(string HBarCode) + { + try + { + if (HBarCode == null || HBarCode.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒"; + objJsonResult.data = null; + return objJsonResult; + } + //寰楀埌淇℃伅 + ds = oCN.RunProcReturn("select top 1 * from Gy_MouldFileMain where HNumber= '" + HBarCode + "'", "Gy_MouldFileMain"); + //鍐欏叆淇℃伅 + if (ds == null || 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 妯″叿鎶ュ簾鍏ュ簱鍗� -- Gitblit v1.9.1