From 2c94ac81135dea89de381ba6985fc48fa3e800b6 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 29 一月 2024 13:31:50 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/工资管理/Pay_ProcPriceRequestBillController.cs |   68 +++++++++++++++++++++++++---------
 1 files changed, 50 insertions(+), 18 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..301ebe4 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)
             {

--
Gitblit v1.9.1