| | |
| | | /// <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); |
| | |
| | | } |
| | | |
| | | 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(shipAddress)) |
| | | Condition += " and b.shipAddress = '" + shipAddress + "'"; |
| | | Condition += " and b.shipAddress like '%" + shipAddress + "%'"; |
| | | |
| | | if (!string.IsNullOrEmpty(BuyerName)) |
| | | Condition += " and c.Keyid = '" + BuyerName + "'"; |