From 50f54028acb8191f18552d5b54a958ff9ce9afc8 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 26 六月 2023 09:10:42 +0800
Subject: [PATCH] 新增销售出库二次校验功能(原单据为扫码生成,审核时对原扫描的条码进行核对)

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  504 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 491 insertions(+), 13 deletions(-)

diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index ebaeb6c..866d6ff 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -265,6 +265,38 @@
         #endregion
 
 
+        #region 鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦā鍧�  鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+
+        /// <summary>
+        /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
+        {
+            try
+            {
+                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                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 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
 
         /// <summary>
@@ -1351,6 +1383,13 @@
             string sJXCode = "";
             if (oSystemParameter.ShowBill(ref sErrMsg) == true)
             {
+                string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                {
+                    //閿�鍞嚭搴撳崟
+                    sSourceBarCodeCtl = "Y";
+                }
+
                 if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
                     sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
@@ -1361,22 +1400,47 @@
                 }
                 try
                 {
-                    WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
-                    if (WebSoBar == null)
+                    //鍘熷崟鎹负鎵爜鐢熸垚锛屾牎楠屾椂涓嶇敓鎴愭潯鐮佽褰曪紝鍙鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+                    if (sSourceBarCodeCtl == "Y")
                     {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                        objJsonResult.data = null;
-                        return objJsonResult;
+                        WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+                        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 = "鎴愬姛";
+                            objJsonResult.data = WebSoBar;
+                            return objJsonResult;
+                        }
                     }
+                    //鍘熷崟鎹潪鎵爜鐢熸垚锛屾牎楠屾椂鐢熸垚鏉$爜璁板綍
                     else
                     {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 1;
-                        objJsonResult.Message = "鎴愬姛";
-                        objJsonResult.data = WebSoBar;
-                        return objJsonResult;
+                        WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+                        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 = "鎴愬姛";
+                            objJsonResult.data = WebSoBar;
+                            return objJsonResult;
+                        }
                     }
                 }
                 catch (Exception e)
@@ -1451,7 +1515,71 @@
 
         #endregion
 
-        #region 杩斿洖缂撳瓨鍒楄〃淇℃伅
+        #region 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
+
+        /// <summary>
+        /// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_Json")]
+        [HttpGet]
+        public object set_DeleteBarCodeByEntryID_BillCheck_Json(long HInterID, string HBillType, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, Int64 HStockOrgID)
+        {
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
+            {
+                string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                {
+                    //閿�鍞嚭搴撳崟
+                    sSourceBarCodeCtl = "Y";
+                }
+
+                //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+                if (sSourceBarCodeCtl == "Y")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏍¢獙鏉$爜锛屽垹闄ゅ姛鑳戒笉鍙敤锛� ";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鍘熷崟鎹潪鎵爜鐢熸垚
+                else
+                {
+                    try
+                    {
+                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HMaterID=" + HMaterID.ToString() + " and HAuxPropID=" + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo);
+                        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;
+                    }
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 缂撳瓨妯″潡    杩斿洖缂撳瓨鍒楄〃淇℃伅
 
         /// <summary>
         /// 杩斿洖缂撳瓨鍒楄〃淇℃伅    鏍¢獙妯″紡
@@ -1499,6 +1627,156 @@
                 return objJsonResult;
             }
         }
+
+        #endregion
+
+        #region 缂撳瓨妯″潡    鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰�
+
+        /// <summary>
+        /// 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/DeleteBillList_BillCheck_Json")]
+        [HttpGet]
+        public object DeleteBillList_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
+        {
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+            {
+                string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                {
+                    //閿�鍞嚭搴撳崟
+                    sSourceBarCodeCtl = "Y";
+                }
+
+                //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿锛屽垹闄ゆ潯鐮佸嚭鍏ュ簱鏍¢獙缂撳瓨璁板綍
+                if (sSourceBarCodeCtl == "Y")
+                {
+                    try
+                    {
+                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp_Verify where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                        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;
+                    }
+                }
+                //鍘熷崟鎹潪鎵爜鐢熸垚锛屽垹闄ゆ潯鐮佸嚭鍏ュ簱缂撳瓨鍒楄〃璁板綍
+                else
+                {
+                    try
+                    {
+                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                        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;
+                    }
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 缂撳瓨妯″潡    宸蹭笂浼犲垪琛ㄧ晫闈紝鎾ら攢鍔熻兘
+
+        /// <summary>
+        /// 宸蹭笂浼犲垪琛ㄧ晫闈紝鎾ら攢鍔熻兘锛屽垹闄MS琛ㄥ拰鏈湴鍑哄叆搴撳崟璁板綍锛屽苟鏇存柊TEMP琛ㄤ腑鐨勪笂浼犲瓧娈� HRelationInterID=0
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/DeleteICStockBillAndWMS_BillCheck_Json")]
+        [HttpGet]
+        public object DeleteICStockBillAndWMS_BillCheck_Json(Int64 HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
+        {
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+            {
+                string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                {
+                    //閿�鍞嚭搴撳崟
+                    sSourceBarCodeCtl = "Y";
+                }
+
+                //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+                if (sSourceBarCodeCtl == "Y")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏍¢獙鏉$爜锛屾挙閿�鍔熻兘涓嶅彲鐢紒 ";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鍘熷崟鎹潪鎵爜鐢熸垚
+                else
+                {
+                    try
+                    {
+                        if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    catch (Exception e)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+            }
+            else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
 
         #endregion
 
@@ -1783,6 +2061,104 @@
         #endregion
 
 
+        #region 鍒犳墭妯″潡璋冪敤鏂规硶
+
+        #region 鍒犳墭妯″潡 鎵弿鎵樻潯鐮�
+
+        /// <summary>
+        /// 鍒犳墭妯″潡 鎵弿鎵樻潯鐮�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_PackBarCode_DeletePackUnionBill_Json")]
+        [HttpGet]
+        public object Get_PackBarCode_DeletePackUnionBill_Json(string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鎵樻潯鐮佸垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+                    {
+                        List<object> columnNameList = new List<object>();
+                        //娣诲姞鍒楀悕
+                        foreach (DataColumn col in ds.Tables[0].Columns)
+                        {
+                            Type dataType = col.DataType;
+                            string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                            columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                        }
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛锛�";
+                        objJsonResult.data = ds.Tables[0];
+                        objJsonResult.list = columnNameList;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎵弿鎵樻潯鐮佸け璐ワ紒" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                        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 鍒犳墭妯″潡 涓婁紶 鍒犻櫎缁勬墭鍗曚俊鎭�
+
+        /// <summary>
+        /// 涓婁紶  鍒犻櫎缁勬墭鍗曚俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetDeletePackUnionBill_Json")]
+        [HttpGet]
+        public object GetDeletePackUnionBill_Json(long HInterID, string HBillType, string HMaker)
+        {
+            try
+            {
+                oCn.RunProc("exec h_p_WMS_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillType + "','" + HMaker + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                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
+
+        #endregion
+
+
         #region 鎹㈡墭璋冩嫧鍗曟ā鍧楄皟鐢ㄦ柟娉�
 
         #region 鎹㈡墭璋冩嫧鍗曟ā鍧� 鎵弿璋冨叆鎵樻潯鐮�
@@ -1960,6 +2336,108 @@
 
         #endregion
 
+        #region 鎹㈡墭璋冩嫧鍗曟ā鍧�    浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭�
+
+        /// <summary>
+        /// 浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKF_MoveStockBill_TempList_HuanTuo_Json")]
+        [HttpGet]
+        public object GetKF_MoveStockBill_TempList_HuanTuo_Json(Int64 HInterID, string HBillType)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo");
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠庣紦瀛樺垪琛ㄨ繑鍥炴椂锛屾病鏈夎繑鍥炰换浣曡褰曪紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖缂撳瓨鍒楄〃鍗曟嵁淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鎹㈡墭璋冩嫧鍗曠紦瀛樺垪琛ㄦā鍧�    杩斿洖缂撳瓨鍒楄〃淇℃伅
+
+        /// <summary>
+        /// 杩斿洖鎹㈡墭璋冩嫧鍗曠紦瀛樺垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetPonderationBillMain_TempList_HuanTuo_Json")]
+        [HttpGet]
+        public object GetPonderationBillMain_TempList_HuanTuo_Json(string HBillType, string HMaker, long HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo");
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁鏃犵紦瀛樿褰曪紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇缂撳瓨淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇缂撳瓨鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #endregion
 
 

--
Gitblit v1.9.1