From cb98f3abf09cb75bf1328c42745f3be8cd9d9374 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 17 五月 2024 08:04:43 +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