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

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

            RESTfulResult<List<MeterBaseHisTareCount>> result = new RESTfulResult<List<MeterBaseHisTareCount>>();
            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;
        }

        /// <summary>
        /// 特殊物资信息处理
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public RESTfulResult<List<MeterBaseHisTareCount>> doQuerySpecWf(MeterBaseHisTareCount info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<List<MeterBaseHisTareCount>> rm = db.doOption<List<MeterBaseHisTareCount>>("meterbasehistarecounts", "doQuerySpecWf", new object[] { info }, 1);
            return rm;
        }
    }
}
