From 1d47cda889c0408d2fe885fc99727e85c591764c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 08 二月 2023 09:47:27 +0800
Subject: [PATCH] 日计划维护

---
 WebAPI/WebServer.cs |  146 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 94 insertions(+), 52 deletions(-)

diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs
index 897c588..5a742a1 100644
--- a/WebAPI/WebServer.cs
+++ b/WebAPI/WebServer.cs
@@ -3841,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();
@@ -4349,6 +4371,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)
@@ -7106,61 +7141,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;
@@ -7972,5 +8007,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