using com.hnshituo.core.webapp.vo;
using System.Collections.Generic;

namespace Common
{
    public class MeterBaseScalePointService
    {
        public RESTfulResult<List<MeterBaseScalePoint>> doQueryWf(MeterBaseScalePoint info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<PageList<List<MeterBaseScalePoint>>> rm = db.doOption<PageList<List<MeterBaseScalePoint>>>("meterbasescalepoints", "/", new object[] { info }, 0);
            RESTfulResult<List<MeterBaseScalePoint>> result = new RESTfulResult<List<MeterBaseScalePoint>>();
            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 != null && rm.Data.list.Count > 0)
            {
                result.Data = rm.Data.list;
            }
            return result;
        }

        /// <summary>
        /// 修改
        /// </summary>
        public RESTfulResult<string> doUpdateWf(MeterBaseScalePoint info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<string> rm = db.doOption<string>("meterbasescalepoints", "doUpdateWf", new object[] { info }, 1);
            return rm;
        }
    }
}