using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using com.hnshituo.core.webapp.vo;

namespace Common
{
    public class MeterBaseSpecialUnitService
    {
        /// <summary>
        /// 基础信息查询，保持MeterBaseCar
        /// </summary>
        /// <param name="car"></param>
        /// <returns></returns>
        public RESTfulResult<List<MeterBaseSpecialUnit>> doQueryCarList(MeterBaseSpecialUnit meterBaseSpecialUnit)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<PageList<List<MeterBaseSpecialUnit>>> rm = db.doOption<PageList<List<MeterBaseSpecialUnit>>>("meterbasespecialunits", "/list", new object[] { meterBaseSpecialUnit }, 1);

            RESTfulResult<List<MeterBaseSpecialUnit>> result = new RESTfulResult<List<MeterBaseSpecialUnit>>();
            result.Succeed = rm.Succeed;
            result.Status = rm.Status;
            result.Message = rm.Message;
            result.ResultMessage = rm.ResultMessage;
            result.Code = rm.Code;
            if (rm.Succeed && rm.Data != null && rm.Data.list.Count > 0)
            {
                result.Data = rm.Data.list;
            }
            return result;
        }
    }
}
