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

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