From eddf415d6f0456a10ee8e1bdbd290c511957464b Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 13 三月 2024 11:33:29 +0800
Subject: [PATCH] 销售出库单:审核、反审核时,反写销售订单的销售出库审核数量

---
 WebAPI/Controllers/WebAPIController.cs |   78 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 1a48a70..d6ccfb0 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -143,6 +143,56 @@
             }
         }
 
+        /// <summary>
+        /// 鑷姩鑾峰彇鍩虹璧勬枡 娴佹按鍙� 灏辨槸浠g爜
+        /// </summary>
+        /// <param name="HBillType"></param>
+        /// <returns></returns>
+        [Route("Web/GetMAXNumber")]
+        [HttpGet]
+        public object GetMAXNumber(string HBillType,string HName,string TableName)
+        {
+            try
+            {
+                string HNumber = "";
+                HNumber = DBUtility.ClsPub.CreateHNumber(HBillType,HName, TableName, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                //----------鍒涘缓铏氳〃------------------------
+                DataTable dt_Main = new DataTable("Json");
+                dt_Main.Columns.Add("HNumber", typeof(string));
+              
+                //---------鍒涘缓鏂拌------------------------
+                DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌 
+                dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+                dr_main["HNumber"] = DBUtility.ClsPub.isStrNull(HNumber);
+              
+
+                if (HNumber == null)
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = "鑾峰彇澶辫触";
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛";
+                    objjson.data = dt_Main;
+                    return objjson;
+                }
+            }
+            catch (Exception e)
+            {
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + e.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
+
 
         //[Route("Web/Get_MaxBillNoAndID")]
         //[HttpGet]
@@ -8109,14 +8159,34 @@
                     return objJsonResult;
                 }
                 oCN.BeginTran();//寮�濮嬩簨鍔�
+                
                 ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
                     objJsonResult.data = null;
-                    return objJsonResult; ;
+                    return objJsonResult;
                 }
 
 
@@ -10065,7 +10135,7 @@
                         HView = "h_v_Sb_EquipMaintainBillList";
                         break;
                     case "WX":
-                        HView = "h_v_Sb_EquipRepairCheckBillList";
+                        HView = "h_v_Sb_EquipRepairWorkBillList";
                         break;
                     case "GZ":
                         HView = "h_v_Sb_EquipConkBookBillList";

--
Gitblit v1.9.1