From 610ed3b61509c7244bc401e436fb90d2285b65bf Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期二, 21 十一月 2023 12:11:29 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/XSGL/YS_ReceiveBackBillController.cs |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBackBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBackBillController.cs
index dcace17..ac57109 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveBackBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveBackBillController.cs
@@ -49,12 +49,12 @@
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveBackBillList_Query order by 鍗曟嵁鍙� ", "h_v_YS_ReceiveBackBillList_Query");
+                    ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveBackBillList_Query order by 鍗曟嵁鍙� desc", "h_v_YS_ReceiveBackBillList_Query");
                 }
                 else
                 {
                     string sql1 = "select * from h_v_YS_ReceiveBackBillList_Query where 1 = 1 ";
-                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
                     ds = oCN.RunProcReturn(sql, "h_v_YS_ReceiveBackBillList_Query");
                 }
 
@@ -312,6 +312,8 @@
         {
             try
             {
+                string s = "";
+
                 //鏌ョ湅鏉冮檺
                 if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBackBill_Drop", 1, false, user))
                 {
@@ -328,6 +330,24 @@
                     objJsonResult.count = 0;
                     objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
                     objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //鍒ゆ柇鏄惁鍙紪杈�
+                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+                    objJsonResult.data = 1;
                     return objJsonResult;
                 }
 
@@ -449,6 +469,17 @@
                 //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
                 if (IsAudit == 0) //瀹℃牳鎻愪氦
                 {
+                    string sql = "exec h_p_YS_ReceiveBackBill_CheckCrediControl " + oBill.omodel.HInterID;
+                    ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveBackBill_CheckCrediControl");
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
                     //瀹℃牳鎻愪氦
                     if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {

--
Gitblit v1.9.1