获取工单 排产工单 未排产工单
This commit is contained in:
@@ -11,5 +11,6 @@ namespace ZR.Service.mes.pro.IService
|
||||
{
|
||||
public interface IProWorkorderService
|
||||
{
|
||||
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week,int date,string isSchedule);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@@ -16,5 +17,20 @@ namespace ZR.Service.mes.pro
|
||||
[AppService(ServiceType = typeof(IProWorkorderService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class ProWorkorderService : BaseService<ProWorkorder>, IProWorkorderService
|
||||
{
|
||||
|
||||
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, string isSchedule)
|
||||
{
|
||||
var predicate = Expressionable.Create<ProWorkorder>()
|
||||
.AndIF(year > 0, it => it.Year == year)
|
||||
.AndIF(week > 0, it => it.Week == week)
|
||||
.AndIF(date > 0, it => it.Date == date)
|
||||
.AndIF(date > 0, it => it.Isarrange.Equals(isSchedule))
|
||||
.ToExpression();
|
||||
|
||||
int totalCount = 0;
|
||||
List<ProWorkorder> proWorkorderList = Context.Queryable<ProWorkorder>().Where(predicate).ToPageList(pageNum, pageSize, ref totalCount);
|
||||
|
||||
return (proWorkorderList, totalCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user