From dab190364a9c8b341cfa399ddc2e5d6cb76fb394 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 30 十一月 2022 15:32:26 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 148 ++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 114 insertions(+), 34 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index a3149ea..ad6be8f 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -280,22 +280,13 @@ ds = Sc_MouldDotCheckPlanBillList_s(sWhere); - //if (ds.Tables[0].Rows.Count != 0 || ds != null) - //{ + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} + } catch (Exception ex) { @@ -881,22 +872,12 @@ ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); } - //if (ds.Tables[0].Rows.Count != 0 || ds != null) - //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} + } catch (Exception ex) { @@ -907,6 +888,46 @@ return objJsonResult; } } + + + #region 璋冩嫧鍗� 鍒犻櫎 + [Route("Kf_MoveStockBill/DelteteGetMoveStockBill")] + [HttpGet] + public object DelteteGetMoveStockBill(string HInterID, string user) + { + try + { + //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_MoveStockBill_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愬垹闄�!"; + objJsonResult.data = null; + return objJsonResult; + } + + 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; + } + } + #endregion /// <summary> /// 閿�鍞嚭搴撳崟鍒楄〃 @@ -1070,6 +1091,44 @@ } } + #region 鍏朵粬鍑哄簱鍗� 鍒犻櫎 + [Route("Kf_OtherOutBill/DelteteGetOtherOutBill")] + [HttpGet] + public object DelteteGetOtherOutBill(string HInterID, string user) + { + try + { + //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_OtherOutBill_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愬垹闄�!"; + objJsonResult.data = null; + return objJsonResult; + } + + 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; + } + } + #endregion /// <summary> /// 濮斿鍑哄簱鍗曞垪琛� @@ -1201,22 +1260,13 @@ ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); } - //if (ds.Tables[0].Rows.Count != 0 || ds != null) - //{ + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} + } catch (Exception ex) { @@ -1227,7 +1277,37 @@ return objJsonResult; } } - + + #region 鏉$爜鏄庣粏 + [Route("Kf_ICStockBillSub_WMS/Kf_ICStockBillSub_WMS_List")] + [HttpGet] + public object Kf_ICStockBillSub_WMS_List(string sWhere, string user) + { + try + { + ds = oCN.RunProcReturn(@"Select m.HNumber 鐗╂枡浠g爜,m.HName 鐗╂枡鍚嶇О,m.HModel 瑙勬牸鍨嬪彿 + ,wms.HBarCode 鏉$爜,wms.HQty 鏁伴噺,w.HNumber 浠撳簱浠g爜,w.HName 浠撳簱鍚嶇О from Kf_ICStockBillSub_WMS wms + left join h_v_IF_Material m on wms.HMaterID = m.HItemID + left join h_v_IF_Warehouse w on wms.HWhID = w.HItemID where 1=1 "+ sWhere, "Kf_ICStockBillSub_WMS"); + + 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; + } + } + #endregion + /// <summary> ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳� /// </summary> -- Gitblit v1.9.1