username@email.com
2024-12-04 ba381be6a5aac58df11e2e7b6b19f012bd9ff5a1
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);