From 8b0f16ffc339afa580534c935131b5095537e5a2 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 17 五月 2024 09:19:51 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/Kf_EntrustInBillController.cs |   94 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/Kf_EntrustInBillController.cs b/WebAPI/Controllers/Kf_EntrustInBillController.cs
index caf6c18..246f0a2 100644
--- a/WebAPI/Controllers/Kf_EntrustInBillController.cs
+++ b/WebAPI/Controllers/Kf_EntrustInBillController.cs
@@ -447,6 +447,89 @@
             }
         }
 
+        #region 濮斿鍔犲伐鍏ュ簱鍗� 鍒犻櫎
+      
+        /// </summary>
+        [Route("Kf_EntrustInBill/DeleteKf_EntrustInBill")]
+        [HttpGet]
+        public object DeleteKf_EntrustInBill(string HInterID, string user)
+        {
+            try
+            {
+                string s = "";
+                DAL.ClsKf_OtherInBill oBill = new DAL.ClsKf_OtherInBill();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Kf_EntrustInBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (HInterID == null || HInterID.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oBill.ShowBill(long.Parse(HInterID), ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //鍒ゆ柇鏄惁鍙紪杈�
+                if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }             
+
+                //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                int sYear = 0;
+                int sPeriod = 0;
+                DateTime HDate = DateTime.Now;
+                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                {
+                    objJsonResult.Message = s;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                oCN.RunProc("delete from Kf_ICStockBillMain where HInterID = " + HInterID);
+                oCN.RunProc("delete from Kf_ICStockBillSub where HInterID= " + HInterID);
+
+
+                oCN.Commit();
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
 
         #region 濮斿鍔犲伐鍏ュ簱鍗� 瀹℃牳/鍙嶅鏍�
         /// <summary>
@@ -481,6 +564,17 @@
                     return objJsonResult;
                 }
 
+                //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                string s = "";
+                int sYear = 0;
+                int sPeriod = 0;
+                DateTime HDate = DateTime.Now;
+                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                {
+                    objJsonResult.Message = s;
+                    return objJsonResult;
+                }
+
                 ClsPub.CurUserName = user;
                 BillOld.MvarItemKey = "Kf_ICStockBillMain";
                 oCN.BeginTran();//寮�濮嬩簨鍔�

--
Gitblit v1.9.1