You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Admin.Core.IRepository;
|
|
|
|
|
using Admin.Core.Service;
|
|
|
|
|
using Admin.Core.IService;
|
|
|
|
|
using Admin.Core.Model;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Admin.Core.Service
|
|
|
|
|
{
|
|
|
|
|
public class LR_weighServices : BaseServices<LR_weigh>, ILR_weighServices
|
|
|
|
|
{
|
|
|
|
|
private readonly IBaseRepository<LR_weigh> _dal;
|
|
|
|
|
public LR_weighServices(IBaseRepository<LR_weigh> dal)
|
|
|
|
|
{
|
|
|
|
|
this._dal = dal;
|
|
|
|
|
base.BaseDal = dal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<LR_weigh> GetRecentWeightList(string planCode)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<LR_weigh> list = _dal.Query(x => x.Plan_ID == planCode).ToList();
|
|
|
|
|
int maxMainID = list.Max(x => x.MainId);
|
|
|
|
|
List<LR_weigh> groupList = list.Where(x => x.MainId == maxMainID).ToList();
|
|
|
|
|
return groupList;
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
throw;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|