首检添加数据看板
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
using ZR.Service.MES.md.IService;
|
||||
|
||||
namespace ZR.Service.mes.pro
|
||||
{
|
||||
@@ -18,13 +10,13 @@ namespace ZR.Service.mes.pro
|
||||
[AppService(ServiceType = typeof(IProWorkplanService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class ProWorkplanService : BaseService<ProWorkplan>, IProWorkplanService
|
||||
{
|
||||
|
||||
|
||||
public (List<ProWorkplan>, int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color)
|
||||
{
|
||||
var predicate = Expressionable.Create<ProWorkplan>()
|
||||
.AndIF(year > 0, it => it.Year == year)
|
||||
.AndIF(week > 0, it => it.Week == week)
|
||||
.AndIF(!string.IsNullOrEmpty(partNumber), it => it.Partnumber.Contains( partNumber))
|
||||
.AndIF(!string.IsNullOrEmpty(partNumber), it => it.Partnumber.Contains(partNumber))
|
||||
.AndIF(!string.IsNullOrEmpty(color), it => it.Color.Contains(color))
|
||||
.ToExpression();
|
||||
int totalCount = 0;
|
||||
@@ -32,7 +24,7 @@ namespace ZR.Service.mes.pro
|
||||
return (proWorkplanList, totalCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<ProWorkplan> GetProWorkplanById(string id)
|
||||
{
|
||||
return Context.Queryable<ProWorkplan>().Where(it => it.Id == id).ToList();
|
||||
@@ -67,7 +59,7 @@ namespace ZR.Service.mes.pro
|
||||
|
||||
public int AddWorkorder(ProWorkorder proWorkorder)
|
||||
{
|
||||
|
||||
|
||||
return Context.Insertable(proWorkorder).ExecuteCommand();
|
||||
}
|
||||
|
||||
@@ -81,6 +73,6 @@ namespace ZR.Service.mes.pro
|
||||
return Context.Deleteable<ProWorkorder>().In(id).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user