zhuangpei-mesbackend/DOAN.Service/Mobile/PreparationTaskService.cs
2024-09-18 09:46:38 +08:00

34 lines
974 B
C#

using Infrastructure.Attribute;
using DOAN.Service.Mobile.IService;
using DOAN.Model.MES.mm;
using DOAN.Model.MES.base_;
using DOAN.Model.MES.product;
namespace DOAN.Service.Mobile
{
[AppService(ServiceType = typeof(IPreparationTaskService), ServiceLifetime = LifeTime.Transient)]
public class PreparationTaskService : BaseService<MmPreparationTask>, IPreparationTaskService
{
public List<BaseWorkRoute> GetLines(DateTime HandleDate)
{
HandleDate = HandleDate.ToLocalTime().Date;
return Context.Queryable<BaseWorkRoute>().Where(it => it.Status == 1).ToList();
}
public List<ProWorkorder> GetWorkOrderList(DateTime HandleDate, string route_code)
{
HandleDate = HandleDate.ToLocalTime().Date;
return Context.Queryable<ProWorkorder>().Where(it => it.WorkorderDate == HandleDate)
.Where(it => it.LineCode == route_code).ToList();
}
}
}