IQC开始

This commit is contained in:
qianhao.xu
2023-11-24 20:40:45 +08:00
parent ce2e23ca02
commit 7ba84f96cd
10 changed files with 212 additions and 33 deletions

View File

@@ -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);
}

View File

@@ -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)

View 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);
}
}

View File

@@ -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)
{

View 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);
}
}
}