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

namespace Common
{
    public class MeterBaseTermTareCarService
    {
        public RESTfulResult<List<MeterBaseTermTareCar>> doQueryWf(MeterBaseTermTareCar info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<PageList<List<MeterBaseTermTareCar>>> rm = db.doOption<PageList<List<MeterBaseTermTareCar>>>("meterbasetermtarecars", "/", new object[] { info }, 0);

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

        public RESTfulResult<List<MeterBaseTermTareCar>> doValidTareWf(PreTrackScale info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<List<MeterBaseTermTareCar>> result = db.doOption<List<MeterBaseTermTareCar>>("meterbasetermtarecars", "doValidTareWf", new object[] { info }, 1);
            return result;
        }
    }
}
