IQC开始
This commit is contained in:
@@ -9,7 +9,7 @@ using ZR.Model.MES.qu;
|
||||
|
||||
namespace ZR.Service.mes.qu.IService
|
||||
{
|
||||
public interface IQuRoughService
|
||||
public interface IQcRoughService
|
||||
{
|
||||
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, int isSchedule);
|
||||
}
|
||||
@@ -14,8 +14,8 @@ using ZR.Service.mes.qu.IService;
|
||||
|
||||
namespace ZR.Service.mes.qu
|
||||
{
|
||||
[AppService(ServiceType = typeof(IQuRoughService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class QuRoughService : BaseService<QuRough>, IQuRoughService
|
||||
[AppService(ServiceType = typeof(IQcRoughService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class QcRoughService : BaseService<QcRough>, IQcRoughService
|
||||
{
|
||||
|
||||
public (List<ProWorkorder>, int) GetWorkorderList(int pageNum, int pageSize, int year, int week, int date, int isSchedule)
|
||||
15
ZR.Service/mes/wm/IService/IMaterialreturnService.cs
Normal file
15
ZR.Service/mes/wm/IService/IMaterialreturnService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.wm;
|
||||
|
||||
namespace ZR.Service.mes.wm.IService
|
||||
{
|
||||
public interface IMaterialreturnService
|
||||
{
|
||||
|
||||
public (List<WmMaterialreturn>, int) Getmaterialreturn(int pageNum, int pageSize, int year, int week, int date);
|
||||
}
|
||||
}
|
||||
@@ -17,11 +17,9 @@ namespace ZR.Service.mes.wm
|
||||
|
||||
|
||||
[AppService(ServiceType = typeof(IMaterialRequisitionService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class MaterialRequisitionService : BaseService<QuRough>, IMaterialRequisitionService
|
||||
public class MaterialRequisitionService : BaseService<WmMaterialrequisition>, IMaterialRequisitionService
|
||||
{
|
||||
public MaterialRequisitionService() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public (List<WmMaterialrequisition>, int) GetmaterialsRequisition(int pageNum, int pageSize, int year, int week, int date)
|
||||
{
|
||||
|
||||
35
ZR.Service/mes/wm/MaterialreturnService.cs
Normal file
35
ZR.Service/mes/wm/MaterialreturnService.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
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.qu;
|
||||
using ZR.Model.MES.wm;
|
||||
using ZR.Service.mes.wm.IService;
|
||||
|
||||
namespace ZR.Service.mes.wm
|
||||
{
|
||||
|
||||
|
||||
[AppService(ServiceType = typeof(IMaterialreturnService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class MaterialreturnService : BaseService<WmMaterialreturn>, IMaterialreturnService
|
||||
{
|
||||
public (List<WmMaterialreturn>, int) Getmaterialreturn(int pageNum, int pageSize, int year, int week, int date)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmMaterialreturn>()
|
||||
.AndIF(year > 0, it => it.Year == year)
|
||||
.AndIF(week > 0, it => it.Week == week)
|
||||
.AndIF(date > 0, it => it.Date == date)
|
||||
.ToExpression();
|
||||
|
||||
int totalCount = 0;
|
||||
|
||||
List<WmMaterialreturn> materialreturnsList = Context.Queryable<WmMaterialreturn>().Where(predicate).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalCount);
|
||||
|
||||
return (materialreturnsList, totalCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user