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 MeterWorkPreProcessService
    {
        public RESTfulResult<List<MeterWorkPreProcess>> doQueryWf(MeterWorkPreProcess info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<PageList<List<MeterWorkPreProcess>>> rm = db.doOption<PageList<List<MeterWorkPreProcess>>>("meterworkpreprocesss", "/", new object[] { info }, 0);

            RESTfulResult<List<MeterWorkPreProcess>> result = new RESTfulResult<List<MeterWorkPreProcess>>();
            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 == 1)
            {
                result.Data = rm.Data.list;
            }
            return result;
        }
    }
}
