From d8de78b09da94b54f105bb4a74cf4701128e7bf8 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 22 四月 2024 17:26:23 +0800
Subject: [PATCH] 1.工程项目的编辑页面,增加 工程信息 页签; 页签里 增加字段 项目类别HProjectClassID,状态,建设单位HBuildComp,地点HBuildAddress,任务编号HWorkNo,受理日期HReDate,图纸编号HPicNo,任务下达HWorkTask,项目内容HProjectNote ; 2.仓储流程的测试并完善功能; 分步式调出单-》分布式调入单 直接调拨单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )

---
 WebAPI/WebServer.cs |  595 +++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 451 insertions(+), 144 deletions(-)

diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs
index abac15c..7c7c485 100644
--- a/WebAPI/WebServer.cs
+++ b/WebAPI/WebServer.cs
@@ -5,7 +5,7 @@
 using System.Data;
 using System.Linq;
 using System.Web;
-using Kingdee.BOS.WebApi.Client;
+//using Kingdee.BOS.WebApi.Client;
 
 
 namespace WebAPI
@@ -53,6 +53,8 @@
             //DAL.ClsIF_Department_View dal = new DAL.ClsIF_Department_View();
             //return dal.GetList(sWhere);
         }
+
+       
 
         /// <summary>
         /// 鑾峰彇鐗╂枡鍒楄〃
@@ -122,6 +124,7 @@
             //return dal.GetList(sWhere);
         }
         #endregion
+
 
         #region 涓�閿壂鐮�    鍏ュ簱妯″潡
 
@@ -1121,6 +1124,7 @@
 
         #endregion
 
+
         #region 澶栬喘閫�鏂�    澶栬喘鍏ュ簱锛堢孩瀛楋級   *
 
         public bool set_SavePOStockInBackBill_New(WebAPI.WebS.ClsKf_ICStockBillMain oMain, string sHSourceType, ref string sErrMsg)
@@ -1128,7 +1132,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SavePOStockInBackBill_New(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -1618,7 +1622,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveEntrustInBackBill_New(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -1856,7 +1860,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveProductInBackBill_New(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -1990,6 +1994,11 @@
         public DataSet GetKf_ProductInBillList(string sWhere)
         {
             DAL.Cls_S_IF_ProductInBill_Lite dal = new DAL.Cls_S_IF_ProductInBill_Lite();
+            return dal.DisSourceBillList(sWhere);
+        }
+        public DataSet GetKf_MoveStockRequestBillList(string sWhere)
+        {
+            DAL.Cls_S_IF_MoveStockRequestBill_Lite dal = new DAL.Cls_S_IF_MoveStockRequestBill_Lite();
             return dal.DisSourceBillList(sWhere);
         }
         #endregion
@@ -2306,7 +2315,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveMateOutBackBill_New(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -2863,7 +2872,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveSellOutBackBill_New(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -3832,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();
@@ -3878,7 +3909,7 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveMoveStockBill(oMain, sHSourceType, ref sErrMsg))
             {
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -3989,6 +4020,44 @@
             //sErrMsg = "淇濆瓨璋冩嫧鍗曞け璐ワ紒" + sErrMsg;
             //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();
+            if (oWebs.set_SaveMoveStockStepOutBill_New(oMain, sHSourceType, ref sErrMsg))
+            {
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                return true;
+            }
+            else
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + ", 鍗曟嵁ID锛�" + oMain.HInterID + ";" + sErrMsg;
+                return false;
+            }
+
+            
+        }
+
+
         //鍒犻櫎璁板綍
         public bool set_DelPonderationBillMain_Temp_InterIDAndSource(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType, ref string sErrMsg)
         {
@@ -4022,6 +4091,68 @@
                 return false;
             }
         }
+        //鍒犻櫎鍗曟嵁涓存椂琛ㄤ俊鎭�
+        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))
+            {
+                sErrMsg = "鍒犻櫎鎴愬姛锛�";
+                return true;
+            }
+            else
+            {
+                sErrMsg = "鍒犻櫎澶辫触锛�";
+                return false;
+            }
+        }
+
         //public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode_Source(string sBarCode, Int64 sInterID, ref bool sBool, ref string sErrMsg)
         //{
         //    SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -4054,7 +4185,7 @@
         //        return null;
         //    }
         //}
- 
+
         #endregion
 
         #region 澶栬喘鍏ュ簱
@@ -4261,6 +4392,19 @@
             //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)
         {
             BLL.ClsIF_StockPlace_View bll = new BLL.ClsIF_StockPlace_View();
@@ -4408,11 +4552,20 @@
 
 
         //杩斿洖缂撳瓨鍒楄〃淇℃伅  鍚屾璧勬枡
+        public DataSet GetKf_PonderationBillMain_TempList_New(string sHBillType, string sHMaker, Int64 sHOWNERID)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
+            return dal.GetKf_PonderationBillMain_TempList_New(sHBillType, sHMaker, sHOWNERID);
+        }
+
+
+        //杩斿洖缂撳瓨鍒楄〃淇℃伅  鍚屾璧勬枡
         public DataSet GetKf_PonderationBillMain_TempList(string sHBillType, string sWhere)
         {
             DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
             return dal.GetKf_PonderationBillMain_TempList(sHBillType, sWhere);
         }
+
 
 
 
@@ -4469,12 +4622,12 @@
                 //鍒ゆ柇鏄惁鍙嶅啓鎴愬姛
                 if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString()))
                 {
-                    sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                    //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                     return true;
                 }
                 else
                 {
-                    sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
+                    //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
                     return true;
                 }
             }
@@ -4484,6 +4637,60 @@
                 return false;
             }
         }
+
+        public bool set_SaveICMOReportBill_Json(WebAPI.WebS.ClsSc_ICMOReportBillMain oMain, string sHSourceType, 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_SaveICMOReportBill_New(oMain, sHSourceType, 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;
+            }
+        }
+
+
+        //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>
         /// 鐢熸垚澶栬喘鍏ュ簱鍗昁3
@@ -4850,7 +5057,7 @@
                 //    sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
                 //    return true;
                 //}
-                sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                 return true;
             }
             else
@@ -4931,7 +5138,7 @@
              WebS.WebService1 oWebs = new WebS.WebService1();
              if (oWebs.set_SaveMateOutBill_New(oMain, sHSourceType, ref sErrMsg))
              {
-                 sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                 //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                  return true;
              }
              else
@@ -5393,12 +5600,12 @@
                 //鍒ゆ柇鏄惁鍙嶅啓鎴愬姛
                 if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString()))
                 {
-                    sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                    //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                     return true;
                 }
                 else
                 {
-                    sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
+                    //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
                     return true;
                 }
             }
@@ -5663,7 +5870,7 @@
               WebS.WebService1 oWebs = new WebS.WebService1();
              if (oWebs.set_SaveEntrustOutBackBill_New(oMain, sHSourceType, ref sErrMsg))
              {
-                 sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                 //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                  return true;
              }
              else
@@ -6106,48 +6313,48 @@
 
                      //鐢熸垚 濮斿鍑哄簱 
                      string HReturn;
-                     ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
-                     string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
-                     bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
-                     if (bLogin)
-                     {
-                         var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
-                         new object[] { "SUB_PickMtrl", sJson });
+                     //ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
+                     //string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
+                     //bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
+                     //if (bLogin)
+                     //{
+                     //    var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
+                     //    new object[] { "SUB_PickMtrl", sJson });
 
-                         if (oSystemParameterMain.Kf_EntrustOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
-                         {
-                             string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
-                             var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
-                             new object[] { "SUB_PickMtrl", sJson2 });
+                     //    if (oSystemParameterMain.Kf_EntrustOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                     //    {
+                     //        string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+                     //        var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
+                     //        new object[] { "SUB_PickMtrl", sJson2 });
 
-                             string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
-                             var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
-                             new object[] { "SUB_PickMtrl", sJson3 });
+                     //        string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+                     //        var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
+                     //        new object[] { "SUB_PickMtrl", sJson3 });
 
-                             HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
-                         }
-                         else
-                         {
-                             HReturn = result.ToString();
-                         }
-                         if (HReturn.Contains("\"IsSuccess\":false") == true)
-                         {
-                             sErrMsg = "鐢熸垚濮斿鍑哄簱鍗曞け璐ワ紒" + HReturn + sJson;
-                             oCn.RollBack();
-                             return false;
-                         }
-                         else
-                         {
-                             oCn.Commit();
+                     //        HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
+                     //    }
+                     //    else
+                     //    {
+                     //        HReturn = result.ToString();
+                     //    }
+                     //    if (HReturn.Contains("\"IsSuccess\":false") == true)
+                     //    {
+                     //        sErrMsg = "鐢熸垚濮斿鍑哄簱鍗曞け璐ワ紒" + HReturn + sJson;
+                     //        oCn.RollBack();
+                     //        return false;
+                     //    }
+                     //    else
+                     //    {
+                     //        oCn.Commit();
                              return true;
-                         }
-                     }
-                     else
-                     {
-                         sErrMsg = "鐢熸垚濮斿鍑哄簱鍗曞け璐ワ紒鐧诲綍澶辫触锛�";
-                         oCn.RollBack();
-                         return false;
-                     }
+                         //}
+                     //}
+                     //else
+                     //{
+                     //    sErrMsg = "鐢熸垚濮斿鍑哄簱鍗曞け璐ワ紒鐧诲綍澶辫触锛�";
+                     //    oCn.RollBack();
+                     //    return false;
+                     //}
                  }
              }
              catch (Exception e)
@@ -6189,7 +6396,7 @@
              WebS.WebService1 oWebs = new WebS.WebService1();
              if (oWebs.set_SaveEntrustOutBill_New(oMain, sHSourceType, ref sErrMsg))
              {
-                 sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+                 //sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
                  return true;
              }
              else
@@ -6980,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;
@@ -7232,48 +7439,48 @@
 
                     //鐢熸垚 鍏朵粬鍏ュ簱鍗� 1涓墿鏂�1鍗�
                     string HReturn;
-                    ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
-                    string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
-                    bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
-                    if (bLogin)
-                    {
-                        var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
-                        new object[] { "STK_MISCELLANEOUS", sJson });
+                    //ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
+                    //string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
+                    //bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
+                    //if (bLogin)
+                    //{
+                    //    var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
+                    //    new object[] { "STK_MISCELLANEOUS", sJson });
 
-                        if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
-                        {
-                            string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
-                            var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
-                            new object[] { "STK_MISCELLANEOUS", sJson2 });
+                    //    if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                    //    {
+                    //        string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+                    //        var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
+                    //        new object[] { "STK_MISCELLANEOUS", sJson2 });
 
-                            string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
-                            var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
-                            new object[] { "STK_MISCELLANEOUS", sJson3 });
+                    //        string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+                    //        var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
+                    //        new object[] { "STK_MISCELLANEOUS", sJson3 });
 
-                            HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
-                        }
-                        else
-                        {
-                            HReturn = result.ToString();
-                        }
-                        if (HReturn.Contains("\"IsSuccess\":false") == true)
-                        {
-                            sErrMsg = "鍏朵粬鍏ュ簱鍗曞け璐ワ紒" + HReturn + sJson;
-                            oCn.RollBack();
+                    //        HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
+                    //    }
+                    //    else
+                    //    {
+                    //        HReturn = result.ToString();
+                    //    }
+                    //    if (HReturn.Contains("\"IsSuccess\":false") == true)
+                    //    {
+                    //        sErrMsg = "鍏朵粬鍏ュ簱鍗曞け璐ワ紒" + HReturn + sJson;
+                    //        oCn.RollBack();
                             return false;
-                        }
-                        else
-                        {
-                            oCn.Commit();
-                            return true;
-                        }
-                    }
-                    else
-                    {
-                        sErrMsg = "鍏朵粬鍏ュ簱鍗曞け璐ワ紒鐧诲綍澶辫触锛�";
-                        oCn.RollBack();
-                        return false;
-                    }
+                        //}
+                        //else
+                        //{
+                        //    oCn.Commit();
+                        //    return true;
+                        //}
+                    //}
+                    //else
+                    //{
+                    //    sErrMsg = "鍏朵粬鍏ュ簱鍗曞け璐ワ紒鐧诲綍澶辫触锛�";
+                    //    oCn.RollBack();
+                    //    return false;
+                    //}
                 }
             }
             catch (Exception e)
@@ -7769,5 +7976,105 @@
          }
         #endregion
 
+        #region [鑾峰彇鎵撳嵃妯℃澘]
+        /// <summary>
+        /// 鎵撳嵃妯℃澘鍒楄〃
+        /// </summary>
+        /// <param name="sWhere"></param>
+        /// <param name="sErr"></param>
+        /// <returns></returns>
+        public DataSet GetOpenTmpList(string sWhere, ref string sErr)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            DataSet ds = new DataSet();
+            ds = oCn.RunProcReturn("select * from h_v_IF_OpenTmpList " + sWhere, "h_v_IF_OpenTmpList");
+            return ds;
+        }
+        #endregion
+
+        #region [鑾峰彇榛樿鎵撳嵃妯℃澘]
+        /// <summary>
+        /// 榛樿鎵撳嵃妯℃澘
+        /// </summary>
+        /// <param name="sWhere"></param>
+        /// <param name="sErr"></param>
+        /// <returns></returns>
+        public DataSet GetDefaultOpenTmp(string sWhere, ref string sErr)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            DataSet ds = new DataSet();
+            ds = oCn.RunProcReturn("select * from h_v_IF_OpenTmpList " + sWhere, "h_v_IF_OpenTmpList");
+            return ds;
+        }
+        #endregion
+
+        //杩斿洖鏉$爜涓存椂琛�
+        /// <summary>
+        /// 杩斿洖鏉$爜涓存椂琛�
+        /// </summary>
+        public DataSet GetBarCode_Temp(long HInterID, long HMaterID, Int64 HAuxPropID, string HMTONo, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, string HBatchNo, Int64 HSourceInterID, Int64 HSourceEntryID, string sBillType, string sWhere)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
+            return dal.GetBarCodeByID_View(HInterID, sBillType, HMaterID, HAuxPropID, HMTONo, HWhID, HSPID, HSCWhID, HSCSPID, HBatchNo, HSourceInterID, HSourceEntryID, sWhere);
+        }
+
+        //鍒犻櫎鍑哄叆搴撴潯鐮佷复鏃惰〃(鏍规嵁鏉$爜)
+        public bool set_DelPonderationBillMain_Temp_BarCode(long HInterID, string sBarCode, string sHBillType, ref string sErrMsg)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+            if (dal.DeleteByBarCode(HInterID, sBarCode, sHBillType))
+            {
+                sErrMsg = "鍒犻櫎鎴愬姛锛�";
+                return true;
+            }
+            else
+            {
+                sErrMsg = "鍒犻櫎澶辫触锛�";
+                return false;
+            }
+        }
+
+
+        /// <summary>
+        /// 杩斿洖鎵爜鏄庣粏淇℃伅
+        /// </summary>
+        public DataSet GetBarcodeList(long HInterID, string HBillNo, string sBillType, ref string sMouldManagerCtl, ref string sFIFOCtl, ref string sErrMsg)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_View bll = new DAL.ClsKF_PonderationBillMain_Temp_View();
+            return bll.GetBillEntry_TmpList(HInterID, HBillNo, sBillType, ref sMouldManagerCtl, ref sFIFOCtl, ref sErrMsg);
+            //DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
+            //return dal.GetInfoByID_View(HInterID, sBillType, sWhere);
+        }
+
+        //鎾ら攢缂撳瓨鍒楄〃閫変腑鏁版嵁
+        public bool RescindBillList(Int64 sHInterID, string sBillNo, string sBillType, ref string sErrMsg)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+            if (dal.DeleteICStockBillAndWMS(sHInterID, sBillNo, sBillType, ref sErrMsg))
+            {
+                sErrMsg = "鍒犻櫎鎴愬姛锛�";
+                return true;
+            }
+            else
+            {
+                sErrMsg = "鍒犻櫎澶辫触锛�";
+                return false;
+            }
+        }
+
+        //杩斿洖缂撳瓨鍒楄〃宸蹭笂浼犲垪琛ㄤ俊鎭�
+        public DataSet GetDisBillUpdateLoad_Json(string sHBillType, string HMaker, Int64 HOrgID)
+        {
+            DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
+            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