username@email.com
6 小时以前 c50c286df3108ce4a48674f15f29954fb3e4cb7f
CY_ECommercePlatform/CY.BLL/OA/CoreDeliverOrderBLL.cs
@@ -164,9 +164,28 @@
        /// <param name="pa"></param>
        /// <returns></returns>
        public IEnumerable<CoreDeliverOrder> SelectModelPage(Pagination pa, Guid FirmId, int? DriverId, string shipAddress,
            string BuyerName, string createTimeStart, string createTimeEnd)
            string BuyerName, string createTimeStart, string createTimeEnd, string OrderState)
        {
            string Condition = " and b.FirmId ='" + FirmId + "' and a.OrderState = 0 ";
            string Condition = " and b.FirmId ='" + FirmId + "' and b.DeliverState != 2 ";
            if (!string.IsNullOrEmpty(OrderState))
            {
                if (OrderState != "4")
                {
                    Condition += " and  a.OrderState = " + OrderState + " ";
                }
                else
                {
                    Condition += " and a.OrderState  in( 0,1 ) ";
                }
            }
            else
            {
                Condition += " and a.OrderState  in( 0,1,2 ) ";
            }
            if (DriverId.HasValue)
            {
               var oA_Staff  = staffBLL.GetModelByKeyid(DriverId);
@@ -174,7 +193,7 @@
            }
              
            if (!string.IsNullOrEmpty(shipAddress))
                Condition += " and  b.shipAddress = '" + shipAddress + "'";
                Condition += " and  b.shipAddress like '%" + shipAddress + "%'";
           
            if (!string.IsNullOrEmpty(BuyerName))
                Condition += " and  c.Keyid  = '" + BuyerName + "'";
@@ -242,17 +261,17 @@
            }
            if (!string.IsNullOrEmpty(shipAddress))
                Condition += " and  b.shipAddress = '" + shipAddress + "'";
                Condition += " and  b.shipAddress like '%" + shipAddress + "%'";
            if (!string.IsNullOrEmpty(BuyerName))
                Condition += " and  c.Keyid  = '" + BuyerName + "'";
            if (!string.IsNullOrEmpty(createTimeStart))
                Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeStart + "')<=0 ";
                Condition += " and DATEDIFF(day,a.[OverTime],'" + createTimeStart + "')<=0 ";
            if (!string.IsNullOrEmpty(createTimeEnd))
                Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeEnd + "')>=0 ";
                Condition += " and DATEDIFF(day,a.[OverTime],'" + createTimeEnd + "')>=0 ";
@@ -261,7 +280,7 @@
            {
                new Criterion("", Condition),
                new Criterion("orderBy"," MakeTime desc  ")
                new Criterion("orderBy"," OverTime desc  ")
            };
            query.Criteria = criterias;
            return _ICoreDeliverOrderDAL.SelectModelPage(query, pa);