| | |
| | | /// <param name="OutOrderId"></param> |
| | | /// <param name="RelationType"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<EC_OrderBasic> SelectAferOfOutOrder(Infrastructure.Query.Pagination pagination, Guid MemberId, DateTime? StartCreatTime, DateTime? EndCreatTime, DateTime? StartReturnTime, DateTime? EndReturnTime, string Creater, string OutFirm, string WorkStates, string OutOrderId, int? RelationType) |
| | | public IEnumerable<EC_OrderBasic> SelectAferOfOutOrder(Infrastructure.Query.Pagination pagination, Guid MemberId, DateTime? StartCreatTime, DateTime? EndCreatTime, DateTime? StartReturnTime, DateTime? EndReturnTime, string Creater, string OutFirm, string WorkStates, string OutOrderId, int? RelationType, string PayState = null) |
| | | { |
| | | return _eC_OrderBasicDAL.SelectAferOfOutOrder(pagination, MemberId, StartCreatTime, EndCreatTime, StartReturnTime, EndReturnTime, Creater, OutFirm, WorkStates, OutOrderId, RelationType); |
| | | return _eC_OrderBasicDAL.SelectAferOfOutOrder(pagination, MemberId, StartCreatTime, EndCreatTime, StartReturnTime, EndReturnTime, Creater, OutFirm, WorkStates, OutOrderId, RelationType, PayState); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查询客户预付款列表 |
| | | /// </summary> |
| | | /// <param name="pa"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<EC_OrderBasic> GetModelPageListForSonghuoyanchis(Pagination pa, string DeliveryTime, string Province, string City, string County, string BuyerName, string BusinessManagerId, string SellerOrderId, string DocumentName, Guid SellerId) |
| | | { |
| | | string Condition = " and ( ob.[OrderState] ='1' or ob.[OrderState] ='2' or ob.[OrderState] ='3' or ob.[OrderState] ='4' ) and SellerId='" + SellerId + "' "; |
| | | |
| | | if (!string.IsNullOrEmpty(DeliveryTime)) |
| | | { |
| | | if (DeliveryTime == "明天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=1 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=1 )"; |
| | | } |
| | | else if (DeliveryTime == "后天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=2 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=2 )"; |
| | | } |
| | | else if (DeliveryTime == "3天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=3 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=3 )"; |
| | | } |
| | | else if (DeliveryTime == "4天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=4 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=4 )"; |
| | | } |
| | | else if (DeliveryTime == "5天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=5 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=5) "; |
| | | } |
| | | else if (DeliveryTime == "6天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=6 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=6) "; |
| | | } |
| | | else if (DeliveryTime == "7天") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])=7 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])=7 )"; |
| | | } |
| | | else if (DeliveryTime == "一周后") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime]) >7 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])>7 )"; |
| | | } |
| | | else if (DeliveryTime == "逾期") |
| | | { |
| | | Condition += " and ( DATEDIFF(DAY,GETDATE(),ob.[DeliveryTime])<=0 or DATEDIFF(DAY,GETDATE(),oe.[DelayTime])<=0 )"; |
| | | } |
| | | |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(Province)) |
| | | Condition += string.Format(" and CustomerCommunications.Province='{0}'", Province); |
| | | |
| | | if (!string.IsNullOrEmpty(City)) |
| | | Condition += string.Format(" and CustomerCommunications.City='{0}'", City); |
| | | |
| | | if (!string.IsNullOrEmpty(County)) |
| | | Condition += string.Format(" and CustomerCommunications.County='{0}'", County); |
| | | |
| | | if (!string.IsNullOrEmpty(BuyerName)) |
| | | { |
| | | Condition += " and ob.BuyerName like '%" + BuyerName + "%'"; |
| | | } |
| | | if (!string.IsNullOrEmpty(BusinessManagerId)) |
| | | { |
| | | Condition += string.Format(" and oe.BusinessManagerId='{0}'", BusinessManagerId); |
| | | } |
| | | |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(SellerOrderId)) |
| | | { |
| | | Condition += " and ob.SellerOrderId like '%" + SellerOrderId + "%'"; ; |
| | | } |
| | | if (!string.IsNullOrEmpty(DocumentName)) |
| | | { |
| | | Condition += " and ob.DocumentName like '%" + DocumentName + "%'"; ; |
| | | } |
| | | |
| | | |
| | | Query query = new Query(); |
| | | IList<Criterion> criterias = new List<Criterion>() |
| | | { |
| | | new Criterion("", Condition), |
| | | |
| | | new Criterion("orderBy"," [DeliveryTime] DESC ") |
| | | }; |
| | | query.Criteria = criterias; |
| | | return _eC_OrderBasicDAL.SelectModelPage_weiwangong(query, pa); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据新增订单操作,并修改订单状态 |