| | |
| | | return _IOA_DeliverPlanDAL.GetModelByformid(formid); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据deliverPlanPaicheid获得信息 |
| | | /// </summary> |
| | | /// <param name="deliverPlanPaicheid">编号</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.OA_DeliverPlan> GetModelByDeliverPlanPaicheid(Guid deliverPlanPaicheid) |
| | | { |
| | | |
| | | return _IOA_DeliverPlanDAL.GetModelByDeliverPlanPaicheid(deliverPlanPaicheid); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | |
| | | /// <param name="pa"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<OA_DeliverPlan> SelectModelPage(Pagination pa, Guid FirmId, string DeliveredTime, |
| | | string CarId, string DriverId,string trueMemberId ="", string CustormerName = "", string BusinessManager = "") |
| | | string CarId, string DriverId,string trueMemberId ="", string CustormerName = "", string BusinessManager = "", string Paiche = "") |
| | | { |
| | | string Condition = " and od.FirmId ='" + FirmId + "' and od.shifouDelivery = 1 "; |
| | | string sort = " case when Sort is null then 1 else 0 end asc,Sort asc "; |
| | | string sort = " Dizhi asc "; |
| | | if (!string.IsNullOrEmpty(DeliveredTime) ) |
| | | { |
| | | if(DeliveredTime != "逾期") |
| | |
| | | } |
| | | else |
| | | { |
| | | Condition += " and DATEDIFF(day,GETDATE(),od.[DeliverTime])<0 and od.[DeliveredTime] is null "; |
| | | sort = " DeliverTime desc,Sort asc "; |
| | | Condition += " and DATEDIFF(day,GETDATE(),od.[DeliverTime])<0 "; |
| | | sort = " DeliverTime desc,Dizhi asc "; |
| | | } |
| | | } |
| | | |
| | |
| | | Condition += " and od.BusinessManagerId = '" + BusinessManager + "'"; |
| | | if (!string.IsNullOrEmpty(CustormerName)) |
| | | Condition += " and od.CompanyName like '%" + CustormerName + "%'"; |
| | | if (!string.IsNullOrEmpty(Paiche)) |
| | | { |
| | | if(Paiche == "1") |
| | | { |
| | | Condition += " and od.CarId >0"; |
| | | } |
| | | else |
| | | { |
| | | Condition += " and ( od.CarId = 0 or od.CarId is null )"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | Query query = new Query(); |
| | | IList<Criterion> criterias = new List<Criterion>() |