zhuangpei-mesbackend/DOAN.Service/JobKanban/WorkorderProgressService.cs

40 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Infrastructure.Attribute;
using DOAN.Service.JobKanban.IService;
using DOAN.Model.MES.product;
using DOAN.Model.MES.base_;
namespace DOAN.Service.JobKanban
{
[AppService(ServiceType = typeof(IWorkorderProgressService), ServiceLifetime = LifeTime.Transient)]
public class WorkorderProgressService : BaseService<ProWorkorder>, IWorkorderProgressService
{
public List<BaseWorkRoute> GetRoutes()
{
return Context.Queryable<BaseWorkRoute>().Where(it => it.Status == 1).ToList();
}
public List<BaseGroup> GetGroups()
{
return Context.Queryable<BaseGroup>().Where(it => it.Status == 1).ToList();
}
public List<ProWorkorder> GetWorkOrderList(string group_code, string line_code, DateTime handleDate)
{
handleDate = handleDate.ToLocalTime().Date;
return Context.Queryable<ProWorkorder>().Where(it => it.GroupCode == group_code)
.Where(it => it.LineCode == line_code)
.Where(it => it.WorkorderDate == handleDate)
.ToList();
}
}
}