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

namespace Common
{
    public class MeterWorkCraneActualService
    {
        /// <summary>
        /// 数据查询：查询当天的数据
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public RESTfulResult<List<MeterWorkCraneActual>> doQueryWf(MeterWorkCraneActual info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<PageList<List<MeterWorkCraneActual>>> rm = db.doOption<PageList<List<MeterWorkCraneActual>>>("meterworkcraneactuals", "/", new object[] { info }, 0);

            RESTfulResult<List<MeterWorkCraneActual>> result = new RESTfulResult<List<MeterWorkCraneActual>>();
            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<MeterWorkCraneActual> doAddWf(MeterWorkCraneActual info)
        {
            DbHelper db = new DbHelper();
            RESTfulResult<MeterWorkCraneActual> rm = db.doOption<MeterWorkCraneActual>("meterworkcraneactuals", "doAddWf", new object[] { info }, 1);
            return rm;
        }
    }
}
