public GetNotUseTicketNoViewModel GetNotUseNationTicketNoList(GetNotUseTicketNoQueryViewModel request) { //1.查询机场信息 SearchCityAportModel aportModel = _getCityForFlightServiceBll.SearchAirport(new List <string>() { "N" }); //2.根据Cid查询客户信息 CustomerModel customerModel = _getCustomerServiceBll.GetCustomerByCid(request.Cid); //3.查询机票订单 GetNotUseTicketNoQueryModel query = Mapper.Map <GetNotUseTicketNoQueryViewModel, GetNotUseTicketNoQueryModel>(request); query.AportInfo = aportModel; query.CorpId = customerModel.CorpID; query.Customer = customerModel; //3.1判断是否是administrator帐号,如果是则获取当前公司下所有订单 if (customerModel.UserID.ToLower() == "administrator") { query.Cid = null; } GetNotUseTicketNoModel notUseTicketNoModel = _getNotUseTicketNoListServiceBll.GetNotUseNationTicketNoList(query); GetNotUseTicketNoViewModel viewModel = Mapper.Map <GetNotUseTicketNoModel, GetNotUseTicketNoViewModel>(notUseTicketNoModel); return(viewModel); }
public ResponseBaseViewModel <GetNotUseTicketNoViewModel> GetNotUseNationTicketNoList( GetNotUseTicketNoQueryViewModel request) { request.Cid = this.GetCid(); GetNotUseTicketNoViewModel responseViewModel = _getNotUseTicketNoListApplication.GetNotUseNationTicketNoList(request); ResponseBaseViewModel <GetNotUseTicketNoViewModel> v = new ResponseBaseViewModel <GetNotUseTicketNoViewModel> { Flag = new ResponseCodeViewModel() { Code = 0, MojoryToken = this.GetToken() }, Data = responseViewModel }; return(v); }