From 6ae77aea2d4b06d48be58666a2d6227f205882a9 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 24 十一月 2023 13:07:15 +0800
Subject: [PATCH] 白坯发布汇总报表、染厂汇总报表、生产日记、半成品报表:取消用户关联客户过滤
---
WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs | 93 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 91 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
index 942e365..6fde40b 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
@@ -49,12 +49,12 @@
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveBillList_Query order by 鍗曟嵁鍙� ", "h_v_YS_ReceiveBillList_Query");
+ ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveBillList_Query order by 鍗曟嵁鍙� desc", "h_v_YS_ReceiveBillList_Query");
}
else
{
string sql1 = "select * from h_v_YS_ReceiveBillList_Query where 1 = 1 ";
- string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
ds = oCN.RunProcReturn(sql, "h_v_YS_ReceiveBillList_Query");
}
@@ -312,6 +312,8 @@
{
try
{
+ string s = "";
+
//鏌ョ湅鏉冮檺
if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBill_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;
}
@@ -469,6 +489,17 @@
}
if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
+ string sql = "exec h_p_YS_ReceiveBill_AbandonCheckCrediControl " + oBill.omodel.HInterID;
+ ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveBill_AbandonCheckCrediControl");
+ 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;
+ }
+
//鍙嶅鏍告彁浜bandonCheck
if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -781,5 +812,63 @@
}
}
#endregion
+
+ #region 鏀舵鍗� 鏍规嵁瀹㈡埛鑾峰彇甯佸埆銆佹眹鐜囥�佺粨绠楁柟寮忋�侀摱琛屻�侀摱琛岃处鎴枫�佸鎴蜂俊鐢ㄩ搴�
+ [Route("YS_ReceiveBill/getCustomerByCusID")]
+ [HttpGet]
+ public object getCustomerByCusID(long HCusID)
+ {
+ try
+ {
+ string sql = @"select
+ c.HItemID HCusID
+ ,c.HNumber HCusNumber
+ ,c.HName HCusName
+ ,c.HSSID
+ ,s.HName HSSName
+ ,c.HCurID
+ ,cur.HName HCurName
+ ,cur.HExchangeRate HExRate
+ ,c.HTaxRate
+ ,ISNULL(b.HItemID,0) HBankID
+ ,b.HName HBankName
+ ,c.HBankAccount
+ ,ISNULL(cre.HCreditRating_Now,0) HCreditRating_Now
+ from Gy_Customer as c
+ left join Gy_SettleStyle as s on c.HSSID = s.HItemID
+ left join Gy_Currency as cur on c.HCurID = cur.HItemID
+ left join Gy_Bank as b on c.HBank = b.HName
+ left join Gy_Customer_Credit as cre on c.HItemID = cre.HCusID
+ where c.HItemID = " + HCusID;
+ ds = oCN.RunProcReturn(sql, "Gy_Customer");
+
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌璇ュ鎴蜂俊鎭紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1