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/CGGL/Kf_POStockInBillController.cs | 64 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
index ada9c0f..5bad624 100644
--- a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
+++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
@@ -172,6 +172,16 @@
string HCloseMan = mainList[0].HCloseMan;
string HCloseDate = mainList[0].HCloseDate;
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Kf_POStockInBillList");
if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
@@ -211,6 +221,27 @@
}
else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
{ //淇敼
+
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Kf_POStockInBillList");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (dss.Tables[0].Rows[0]["瀹℃牳浜�"].ToString() != "" && dss.Tables[0].Rows[0]["瀹℃牳浜�"] != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (dss.Tables[0].Rows[0]["鐘舵��"].ToString() != "鍒涘缓")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
String sql = $@"update Kf_ICStockBillMain set " +
"HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
",HSupID=" + HSupID + ",HCurID=" + HCurID + ",HSecManagerID=" + HSecManagerID + ", HSTOCKORGID=" + HSTOCKORGID + ",HKeeperID=" + HKeeperID + ",HWHID = " + HWHID
@@ -425,6 +456,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;
+ }
string sReturn = "";
oCN.BeginTran();
@@ -663,6 +705,17 @@
}
//==================================================================================
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ 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;
+ }
+
//瀹℃牳鎻愪氦
if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_POStockInBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -703,6 +756,17 @@
}
//=========================================================
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ 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;
+ }
+
//鍙嶅鏍告彁浜bandonCheck
if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_POStockInBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
--
Gitblit v1.9.1