From ba381be6a5aac58df11e2e7b6b19f012bd9ff5a1 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 04 十二月 2024 10:34:30 +0800 Subject: [PATCH] 开票申请 --- CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoshenqingBLL.cs | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoshenqingBLL.cs b/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoshenqingBLL.cs index a98c77f..d048350 100644 --- a/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoshenqingBLL.cs +++ b/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoshenqingBLL.cs @@ -139,9 +139,9 @@ /// <param name="pa"></param> /// <returns></returns> public IEnumerable<OA_Kaipiaoshenqing> SelectModelPage(Pagination pa, Guid FirmId, string CreateTimeStart, string CreateTimeEnd, - string Kaipiaoshenqing, string Kehuqianshou, string BusinessManagerId, string CustormerName) + string Kaipiaoshenqing, string Kehuqianshou, string BusinessManagerId, string CustormerName, string PayStates, string HuikuanStates) { - string Condition = " and ok.FirmId ='" + FirmId + "' "; + string Condition = " and ok.FirmId ='" + FirmId + "' and ok.ApprovalStatus = 1 "; if (!string.IsNullOrEmpty(CreateTimeStart)) Condition += " and DATEDIFF(day,ok.[CreateTime],'" + CreateTimeStart + "')<=0 "; @@ -158,12 +158,35 @@ if (!string.IsNullOrEmpty(CustormerName)) Condition += " and oe.CompanyName like '%" + CustormerName + "%'"; + if (!string.IsNullOrEmpty(PayStates)) + { + if (PayStates == "2") + { + Condition += " and not EXISTS ( select eoe.[KaipiaoshenqingId] from [EC_OrderExtend] eoe inner join [EC_OrderBasic] eob on eob.Keyid = eoe.Keyid where ok.Keyid = eoe.[KaipiaoshenqingId] and eob.PayState !=-1 ) "; + } + else if (PayStates == "1") + { + Condition += " and EXISTS ( select eoe.[KaipiaoshenqingId] from [EC_OrderExtend] eoe inner join [EC_OrderBasic] eob on eob.Keyid = eoe.Keyid where ok.Keyid = eoe.[KaipiaoshenqingId] and eob.PayState !=-1 ) "; + } + } + if (!string.IsNullOrEmpty(HuikuanStates)) + { + if (HuikuanStates == "2") + { + Condition += " and ok.Huikuanmoney >0 "; + } + else if (HuikuanStates == "1") + { + Condition += " and ( ok.Huikuanmoney is null or ok.Huikuanmoney <=0) "; + } + } + Query query = new Query(); IList<Criterion> criterias = new List<Criterion>() { new Criterion("", Condition), - new Criterion("orderBy"," SellerOrderId desc ") + new Criterion("orderBy"," CreateTime desc ") }; query.Criteria = criterias; return _IOA_KaipiaoshenqingDAL.SelectModelPage(query, pa); -- Gitblit v1.9.1