From 77162bdc19b49d5bb86661f3c4f679df71cc7202 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期日, 16 四月 2023 21:53:09 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/Sc_ProcessMangementController.cs |   94 +++++++++++++++++++++++++---------------------
 1 files changed, 51 insertions(+), 43 deletions(-)

diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 1f5258c..4fc83d5 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -410,6 +410,14 @@
                 string OrganizationNUM = oCN.RunProcReturn("select HNumber from Xt_ORGANIZATIONS where HItemID=" + OrganizationID, "Xt_ORGANIZATIONS").Tables[0].Rows[0]["HNumber"].ToString();
                 //鏍规嵁宸ュ簭姹囨姤鍗曚富ID鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曠殑鏁版嵁
                 DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
+                if(ds.Tables[0].Rows.Count <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鐢熸垚鐢熶骇姹囨姤鍗曡繃绋嬩腑娌℃湁鏌ヨ鍒板嚭绔欏崟";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 DataRow dr = ds.Tables[0].Rows[0];
                 
                 //淇濆瓨
@@ -677,7 +685,7 @@
                 //DataSet ds1 = oCN.RunProcReturn("select * from  h_v_TOERPProcduct_LastProc where HLastProc = '鏄�' and  hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc");
                 DataSet ds1 = oCN.RunProcReturn("exec h_p_TOERPProcduct_LastProc '" + BillNo + "'", "h_p_TOERPProcduct_LastProc");
                 DataRow dr1 = ds1.Tables[0].Rows[0];
-                if (ds1.Tables[0].Rows.Count <= 0)
+                if (double.Parse(dr1[0].ToString()) <= 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -892,7 +900,7 @@
                 //DataRow dr = ds.Tables[0].Rows[0];
 
                 //鍒ゆ柇鏈鎶ュ簾鎬绘暟閲忔槸鍚︿负0
-                var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from  Sc_StationOutBillMain where  HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
+                var DTable = oCN.RunProcReturn("select isnull(sum(HWasterQty),0) HWasterQty from  Sc_StationOutBillMain where  HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
 
                 if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0)
                 {
@@ -1392,49 +1400,49 @@
 
 
 
-        /// <summary>
-        /// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
-        /// </summary>
-        /// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param>
-        /// <returns></returns>
-        [Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
-        [HttpGet]
-        public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
-            double HCheckQty, double HRightQty, double HBadQty,
-            string HCheckResult, string HSupNumber,
-            string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
-            Int64 HSourceEntryID, string HSourceBillNo, string user,
-            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
-            Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
-            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
-        {
-            WebS2.WebService1 oWebs1 = new WebS2.WebService1();
+        ///// <summary>
+        ///// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
+        ///// </summary>
+        ///// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param>
+        ///// <returns></returns>
+        //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
+        //[HttpGet]
+        //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
+        //    double HCheckQty, double HRightQty, double HBadQty,
+        //    string HCheckResult, string HSupNumber,
+        //    string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
+        //    Int64 HSourceEntryID, string HSourceBillNo, string user,
+        //    Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
+        //    Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
+        //    Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
+        //{
+        //    WebS.WebService1 oWebs1 = new WebS.WebService1();
 
 
-            //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
-            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
-            if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
-                , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
-                , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
-                , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
-                , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
-                , ref sErrMsg))
-            {
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�";
-                objJsonResult.data = null;
-                return objJsonResult;
-            }
-            else
-            {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�";
-                objJsonResult.data = sErrMsg;
-                return objJsonResult;
-            }
-        }
+        //    //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
+        //    //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
+        //    if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
+        //        , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
+        //        , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
+        //        , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
+        //        , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
+        //        , ref sErrMsg))
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 1;
+        //        objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�";
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //    else
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�";
+        //        objJsonResult.data = sErrMsg;
+        //        return objJsonResult;
+        //    }
+        //}
         #endregion
 
 

--
Gitblit v1.9.1