From 94cfb1b89a8027bb55398d1dd709e163c984cf7c Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 30 一月 2024 10:25:51 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/工资管理/Pay_ErrWorkTimesRequestBillController.cs |   49 +++++++++++++++++++++++++++++++------------------
 1 files changed, 31 insertions(+), 18 deletions(-)

diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs"
index 6f4d10e..e8753ec 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs"
@@ -611,26 +611,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_ErrWorkTimesRequestBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Pay_ErrWorkTimesRequestBill_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_ErrWorkTimesRequestBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                     {
                         objJsonResult.code = "0";
-                        objJsonResult.count = 1;
+                        objJsonResult.count = 0;
                         objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
                         objJsonResult.data = null;
                         return objJsonResult;
@@ -638,26 +644,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_ErrWorkTimesRequestBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Pay_ErrWorkTimesRequestBill_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_ErrWorkTimesRequestBill_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