Пример #1
0
        /// <summary>
        /// 获取客户下车辆分页
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public AndroidData<RPage<List<RVehicleInfo>>> GetPageVehicleList(PPage<PSearchVehicleData> param)
        {
            AndroidData<RPage<List<RVehicleInfo>>> result = new AndroidData<RPage<List<RVehicleInfo>>>() { Message = "此客户暂无车辆数据!", ResultCode = (int)ResultCodeEnum.Fail };
            try
            {
                int rowCount = 0;
                EMVehicleService service = new EMVehicleService();
                IList<EMVehicle> vehicleList = service.SelectAll(new List<string>() { param.PageSearchEntity.TenantCode }, param.RowIndex, param.PageSize, ref rowCount);

                if (vehicleList.IsNullOrEmpty())
                    return result;

                List<RVehicleInfo> RList = new List<RVehicleInfo>();
                foreach (EMVehicle vehicle in vehicleList)
                {
                    RVehicleInfo info = new RVehicleInfo();
                    info.VehicleCode = vehicle.VehicleCode;
                    info.LicenceNumber = vehicle.LicenceNumber;

                    RList.Add(info);
                }

                RPage<List<RVehicleInfo>> rPageLIstInfo = new RPage<List<RVehicleInfo>>() {
                     PageList = RList,
                     RowCount = rowCount
                };
                result.Message = string.Empty;
                result.ResultCode = (int)ResultCodeEnum.Success;
                result.ResultData = rPageLIstInfo;
                //Logger.Info("[GetPageVehicleList]:" + param.PageSearchEntity.TenantCode);
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
                result.ResultCode = (int)ResultCodeEnum.Fail;
                Logger.Error("[GetPageVehicleList]:" + ex.Message, ex);
            }
            return result;
        }
Пример #2
0
        /// <summary>
        /// 获取租户下终端客户
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public AndroidData<RPage<List<MBTenantViewModel>>> GetPageMobileGuestList(PPage<PMobileGusetData> param)
        {
            AndroidData<RPage<List<MBTenantViewModel>>> result = new AndroidData<RPage<List<MBTenantViewModel>>>() { Message = "没有数据!", ResultCode = (int)ResultCodeEnum.Fail };
            try
            {
                EMTenantService service = new EMTenantService();
                int rowCount = 0;
                int allCount = 0;
                int freezCount = 0;
                IList<EMTenant> ltTenantAll = service.Select("", param.PageSearchEntity.OperateCode, param.RowIndex, param.PageSize, ref rowCount, ref freezCount, ref allCount);

                if(ltTenantAll.IsNullOrEmpty())
                    return result;

                RPage<List<MBTenantViewModel>> rPageListInfo = new RPage<List<MBTenantViewModel>>() {
                    PageList = ConverToMBTenantList(ltTenantAll),
                    RowCount = allCount
                };
                result.Message = string.Empty;
                result.ResultCode = (int)ResultCodeEnum.Success;
                result.ResultData = rPageListInfo;
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
                result.ResultCode = (int)ResultCodeEnum.Fail;
                Logger.Error("[GetPageMobileGuestList]:"+ex.Message,ex);
            }
            return result;
        }