生产领料完成
This commit is contained in:
44
ZR.Service/mes/wm/MaterialRequisitionService.cs
Normal file
44
ZR.Service/mes/wm/MaterialRequisitionService.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wm;
|
||||
using ZR.Service.mes.qu.IService;
|
||||
using ZR.Service.mes.wm.IService;
|
||||
|
||||
namespace ZR.Service.mes.wm
|
||||
{
|
||||
|
||||
|
||||
[AppService(ServiceType = typeof(IMaterialRequisitionService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class MaterialRequisitionService : BaseService<QuRough>, IMaterialRequisitionService
|
||||
{
|
||||
public MaterialRequisitionService() {
|
||||
|
||||
}
|
||||
|
||||
public (List<WmMaterialrequisition>, int) GetmaterialsRequisition(int pageNum, int pageSize, int year, int week, int date)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmMaterialrequisition>()
|
||||
.AndIF(year > 0, it => it.Year == year)
|
||||
.AndIF(week > 0, it => it.Week == week)
|
||||
.AndIF(date > 0, it => it.Date == date)
|
||||
.And(it=>it.Status=="0")
|
||||
.ToExpression();
|
||||
|
||||
int totalCount = 0;
|
||||
List<WmMaterialrequisition> wmmr = Context.Queryable<WmMaterialrequisition>().Where(predicate).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalCount);
|
||||
|
||||
return (wmmr, totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user