From a52bdc2aed17ba07d5ce0f1cc4adf64d5cd21ad2 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期六, 06 五月 2023 15:07:10 +0800 Subject: [PATCH] 1 --- WebAPI/WebServer.cs | 242 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 189 insertions(+), 53 deletions(-) diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs index e7cc53b..430f1cc3 100644 --- a/WebAPI/WebServer.cs +++ b/WebAPI/WebServer.cs @@ -54,6 +54,8 @@ //return dal.GetList(sWhere); } + + /// <summary> /// 鑾峰彇鐗╂枡鍒楄〃 /// </summary> @@ -3839,6 +3841,28 @@ } } + //鏍规嵁鎵樻潯鐮� 鑾峰彇鏉$爜妗f鍒楄〃鍞竴鐮佷俊鎭� + public DataSet GetBarCode(string HBarCode) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + // + try + { + DataSet DS = oCn.RunProcReturn("select HBarCode,HQty from Sc_PackUnionBillSub where HBarCode_Pack ='" + HBarCode.ToString() + "'", "Sc_PackUnionBillSub", ref DBUtility.ClsPub.sExeReturnInfo); + //DataSet DS = oCn.RunProcReturn("Select * from h_v_Sc_AssemblyBill Where HInterID=" + HInterID.ToString() + " and HBillType='" + sBillType + "' " + sWhere, "h_v_Sc_AssemblyBill", ref DBUtility.ClsPub.sExeReturnInfo); + if (DS.Tables[0].Rows.Count == 0) + return null; + else + { + return DS; + } + } + catch (Exception e) + { + throw (e); + } + } + public DataSet GetHBW(long HBadType) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); @@ -3997,6 +4021,25 @@ //return false; } + + + + //public bool set_SaveMoveStockBill_PD(WebAPI.WebS.ClsKf_MoveStockBillMain oMain, string sHSourceType, ref string sErrMsg) + //{ + // WebS.WebService1 oWebs = new WebS.WebService1(); + // if (oWebs.set_SaveMoveStockBill_PD(oMain, sHSourceType, ref sErrMsg)) + // { + // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo; + // return true; + // } + // else + // { + // sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + ", 鍗曟嵁ID锛�" + oMain.HInterID + ";" + sErrMsg; + // return false; + // } + + //} + public bool set_MoveStockStepOutBill(WebAPI.WebS.ClsKf_MoveStockStepOutBillMain oMain, string sHSourceType, ref string sErrMsg) { WebS.WebService1 oWebs = new WebS.WebService1(); @@ -4049,7 +4092,53 @@ } } //鍒犻櫎鍗曟嵁涓存椂琛ㄤ俊鎭� - public bool DeleteBill(Int64 sHInterID,string HBillNo,string HBillType,string HBarCode, ref string sErrMsg) + public bool DeleteBill_AN(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType, ref string sErrMsg) + { + //DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); + //if (dal.DeleteByInterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType)) + //{ + // sErrMsg = "鍒犻櫎鎴愬姛锛�"; + // return true; + //} + //else + //{ + // sErrMsg = "鍒犻櫎澶辫触锛�"; + // return false; + //} + WebS.WebService1 oWebs = new WebS.WebService1(); + + if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType, ref DBUtility.ClsPub.sErrInfo)) + { + sErrMsg = "鍒犻櫎鎴愬姛锛�"; + return true; + } + else + { + sErrMsg = "鍒犻櫎澶辫触锛�"; + return false; + } + + //if (WebSoBar == null) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + // objJsonResult.data = null; + // return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 1; + // objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + // objJsonResult.data = WebSoBar; + // return objJsonResult; + //} + + } + + //鍒犻櫎鍗曟嵁涓存椂琛ㄤ俊鎭� + public bool DeleteBill(Int64 sHInterID, string HBillNo, string HBillType, string HBarCode, ref string sErrMsg) { DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); if (dal.DeleteBill(sHInterID, HBillNo, HBillType, HBarCode)) @@ -4301,6 +4390,19 @@ return bll.GetKf_PonderationBillMain_Temp(HInterID, sBillType,sWhere,ref DBUtility.ClsPub.sExeReturnInfo); //DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); //return dal.GetInfoByID_View(HInterID, sBillType, sWhere); + } + + public bool Get_CheckQtyByBarCode(string sBarcode, long HWHID, long HSPID, long HAuxPropID, string sBatchNo, string HMTONo, double sQty, ref double sRelQty) + { + DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); + if (dal.CheckQtyByBarCode(sBarcode, HWHID, HSPID, HAuxPropID, sBatchNo, HMTONo, sQty, ref sRelQty)) + { + return true; + } + else + { + return false; + } } public DataSet GetSPInfoByIDandHWHIDandOrg(long sItemID, long sHWHID, long HUSEORGID, ref string sErrMsg) @@ -4561,6 +4663,33 @@ return false; } } + + + //public bool set_SavePOInStockBill_NEW_Json(WebAPI.WebS.ClsCg_POInStockBillMain oMain, ref string sErrMsg) + //{ + // //BLL.ClsKf_POStockInBill bll = new BLL.ClsKf_POStockInBill(); + // //return bll.set_SavePOStockInBill_New(oMain, sHSourceType, ref DBUtility.ClsPub.sExeReturnInfo); + // WebS.WebService1 oWebs = new WebS.WebService1(); + // if (oWebs.set_SavePOInStockBill_Json(oMain, ref sErrMsg)) + // { + // //鍒ゆ柇鏄惁鍙嶅啓鎴愬姛 + // //if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString())) + // //{ + // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo; + // return true; + // //} + // //else + // //{ + // // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒"; + // // return true; + // //} + // } + // else + // { + // sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + ", 鍗曟嵁ID锛�" + oMain.HInterID + ";" + sErrMsg; + // return false; + // } + //} /// <summary> @@ -7058,61 +7187,61 @@ } - //鐢熸垚鍏朵粬鍏ュ簱鍗� - //public bool set_SaveOtherInBill_New(Model.ClsKf_OtherInBillMain oMain, string sHSourceType, ref string sErrMsg) - //{ - // //鑾峰彇绯荤粺鍙傛暟 - // Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - // if (oSystemParameter.ShowBill(ref sErrMsg) == false) - // { - // sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; - // return false; - // } - // // - // if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "WISE") //鍒ゆ柇鍚屾妯″紡鏄噾铦禬ISE - // { - // if (SaveOtherInBill_K3(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg)) - // { - // //"淇濆瓨鎴愬姛锛�"; - // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo; - // return true; - // } - // else - // { - // //"淇濆瓨澶辫触锛�"; - // sErrMsg = sErrMsg; - // return false; - // } - // } - // if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "CLOUD") //鍒ゆ柇鍚屾妯″紡鏄噾铦禖LOUD - // { - // ////涓婁紶鍓嶅繀濉」鍒ゆ柇 - // //if (oMain.HDeptID == 0) - // //{ - // // sErrMsg = "閮ㄩ棬娌℃湁閫夋嫨锛�"; - // // return false; - // //} - // //鍚屾鐢熸垚CLOUD鍗曟嵁 - // //if (SaveOtherInBill_CLD(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) - // //{ - // // //"淇濆瓨鎴愬姛锛�"; - // // return true; - // //} - // //else - // //{ - // // //"淇濆瓨澶辫触锛�"; - // // return false; - // //} - // } + //鐢熸垚鍏朵粬鍏ュ簱鍗� + //public bool set_SaveOtherInBill_New(Model.ClsKf_OtherInBillMain oMain, string sHSourceType, ref string sErrMsg) + //{ + // //鑾峰彇绯荤粺鍙傛暟 + // Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + // if (oSystemParameter.ShowBill(ref sErrMsg) == false) + // { + // sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; + // return false; + // } + // // + // if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "WISE") //鍒ゆ柇鍚屾妯″紡鏄噾铦禬ISE + // { + // if (SaveOtherInBill_K3(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg)) + // { + // //"淇濆瓨鎴愬姛锛�"; + // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo; + // return true; + // } + // else + // { + // //"淇濆瓨澶辫触锛�"; + // sErrMsg = sErrMsg; + // return false; + // } + // } + // if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "CLOUD") //鍒ゆ柇鍚屾妯″紡鏄噾铦禖LOUD + // { + // ////涓婁紶鍓嶅繀濉」鍒ゆ柇 + // //if (oMain.HDeptID == 0) + // //{ + // // sErrMsg = "閮ㄩ棬娌℃湁閫夋嫨锛�"; + // // return false; + // //} + // //鍚屾鐢熸垚CLOUD鍗曟嵁 + // //if (SaveOtherInBill_CLD(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) + // //{ + // // //"淇濆瓨鎴愬姛锛�"; + // // return true; + // //} + // //else + // //{ + // // //"淇濆瓨澶辫触锛�"; + // // return false; + // //} + // } - // sErrMsg = "淇濆瓨鍏朵粬鍏ュ簱鍗曞け璐ワ紒" + sErrMsg; - // return false; - //} + // sErrMsg = "淇濆瓨鍏朵粬鍏ュ簱鍗曞け璐ワ紒" + sErrMsg; + // return false; + //} - public bool set_SaveOtherInBill_New(WebAPI.WebS.ClsKf_OtherInBillMain oMain, string sHSourceType,WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) - { + public bool set_SaveOtherInBill_New(WebAPI.WebS.ClsKf_OtherInBillMain oMain, string sHSourceType, WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + { WebS.WebService1 oWebs = new WebS.WebService1();//set_SaveOtherInBill_CLD_New - if (oWebs.set_SaveOtherInBill_CLD_New(oMain, sHSourceType,oSystemParameterMain,ref sErrMsg)) + if (oWebs.set_SaveOtherInBill_CLD_New(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg)) { sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo; return true; @@ -7924,5 +8053,12 @@ return dal.GetKf_ICStockBillList(sHBillType, HMaker, HOrgID); } + //杩斿洖缂撳瓨鍒楄〃鏌ヨ宸蹭笂浼犲垪琛ㄤ俊鎭� + public DataSet GetQueryBillUpdateLoad_Json(string BillType, string HBillNo, string HSourceBillNo) + { + DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); + return dal.GetKf_ICStockBillQueryList(BillType, HBillNo, HSourceBillNo); + } + } } \ No newline at end of file -- Gitblit v1.9.1