public GetRetApplyResponseViewModel GetRetApplyView(GetRetApplyRequestViewModel request) { //1.查询机场信息 SearchCityAportModel aportModel = _getCityForFlightServiceBll.SearchAirport(new List <string>() { "N" }); //2.根据Cid查询客户信息 CustomerModel customerModel = _getCustomerServiceBll.GetCustomerByCid(request.Cid); GetRetApplyQueryModel query = Mapper.Map <GetRetApplyRequestViewModel, GetRetApplyQueryModel>(request); query.AportInfo = aportModel; query.Customer = customerModel; if (customerModel.UserID.ToLower() == "administrator" && !string.IsNullOrEmpty(customerModel.CorpID)) { throw new Exception("administrator帐号无法提交退票申请"); } GetRetApplyModel dataModel = _getFltDomesticRetApplyViewServiceBll.GetRetApply(query); GetRetApplyResponseViewModel viewModel = Mapper.Map <GetRetApplyModel, GetRetApplyResponseViewModel>(dataModel); viewModel.ServiceFee = (dataModel.FlightList[0].ServiceFee ?? 0); return(viewModel); }
public ResponseBaseViewModel <GetRetApplyResponseViewModel> GetRetApply([FromBody] GetRetApplyRequestViewModel request) { request.Cid = this.GetCid(); GetRetApplyResponseViewModel responseViewModel = _getFltDomesticRetApplyViewApplication.GetRetApplyView(request); ResponseBaseViewModel <GetRetApplyResponseViewModel> v = new ResponseBaseViewModel <GetRetApplyResponseViewModel> { Flag = new ResponseCodeViewModel() { Code = 0, MojoryToken = this.GetToken() }, Data = responseViewModel }; return(v); }