From 93eee231d1d82f19013fbb51e8015ff9b84333d6 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 30 一月 2024 16:39:54 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/工资管理/Pay_ProcPriceRequestBillController.cs | 117 ++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 81 insertions(+), 36 deletions(-)
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
index 20dd9a9..d1ae6dd 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
@@ -186,19 +186,27 @@
string HBackerDate = mainList[0].HBackerDate;
string HBackRemark = mainList[0].HBackRemark;
-
- //if (OperationType == 2)
- //{
- // ds = oCN.RunProcReturn("select * from PM_ProjectBillMain where HBillNo ='" + HBillNo + "'", "PM_ProjectBillMain");
- // if (ds.Tables[0].Rows.Count > 0)
- // {
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鍗曟嵁鍙烽噸澶�,璇烽噸鏂拌緭鍏�!";
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- //}
+ //淇濆瓨鍓嶆帶鍒�
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_ProcPriceRequestBill_BeforeSaveCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
ds = oCN.RunProcReturn("select * from Pay_ProcPriceRequestBillMain where HInterID = " + HInterID + " and HBillNo = '" + HBillNo + "'", "Pay_ProcPriceRequestBillMain");
@@ -264,11 +272,35 @@
return objJsonResult;
}
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = null;
- objJsonResult.data = null;
- return objJsonResult;
+ //淇濆瓨鍚庢帶鍒�
+ DataSet AfterDs = oCN.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_ProcPriceRequestBill_AfterSaveCtrl");
+ if (AfterDs == null || AfterDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(AfterDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(AfterDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = null;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
}
catch (Exception e)
{
@@ -555,26 +587,32 @@
//Type 1 瀹℃牳 2 鍙嶅鏍�
if (Type == 1)
{
- //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
- DataSet ds;
- string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
- if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ //瀹℃牳鍓嶆帶鍒�
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
{
- if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶉渶瑕佸啀瀹℃牳!";
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
}
//瀹℃牳鍗曟嵁
- if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ if (!BillOld.CheckBill(Int64.Parse(HInterID), "", "h_p_Pay_ProcPriceRequestBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -582,26 +620,33 @@
}
else
{
- //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
- DataSet ds;
- string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
- if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ //鍙嶅鏍稿墠鎺у埗
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
{
- if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸插弽瀹℃牳!涓嶉渶瑕佸啀鍙嶅鏍�!";
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
}
+
//鍙嶅鏍稿崟鎹�
- if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ if (!BillOld.AbandonCheck(Int64.Parse(HInterID), "", "h_p_Pay_ProcPriceRequestBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
--
Gitblit v1.9.1