工艺路线
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.mes.md;
|
||||
|
||||
namespace ZR.Service.mes.md.IService
|
||||
{
|
||||
public interface IMdTechnologicalProrouteService
|
||||
{
|
||||
int AddWorkProroute(MdTechnologicalProroute proroute);
|
||||
|
||||
public (int, List<MdTechnologicalProroute>) GetAll(string ProrouteCode, string ProrouteName, int pageNum, int pageSize);
|
||||
|
||||
public int UpdateWorkProroute(MdTechnologicalProroute proroute);
|
||||
|
||||
public int deleteWorksProroute(int[] ids);
|
||||
}
|
||||
}
|
||||
48
ZR.Service/mes/md/MdTechnologicalProrouteService.cs
Normal file
48
ZR.Service/mes/md/MdTechnologicalProrouteService.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
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.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
|
||||
namespace ZR.Service.mes.md
|
||||
{
|
||||
[AppService(ServiceType = typeof(IMdTechnologicalProrouteService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class MdTechnologicalProrouteService : BaseService<MdTechnologicalProroute>, IMdTechnologicalProrouteService
|
||||
{
|
||||
public int AddWorkProroute(MdTechnologicalProroute proroute)
|
||||
{
|
||||
return Add(proroute);
|
||||
}
|
||||
|
||||
public int deleteWorksProroute(int[] ids)
|
||||
{
|
||||
return Delete(ids);
|
||||
}
|
||||
|
||||
public (int, List<MdTechnologicalProroute>) GetAll(string ProrouteCode, string ProrouteName, int pageNum, int pageSize)
|
||||
{
|
||||
int totalNum = 0;
|
||||
var predicate = Expressionable.Create<MdTechnologicalProroute>()
|
||||
.AndIF(!string.IsNullOrEmpty(ProrouteCode), it => it.ProrouteCode.Contains(ProrouteCode))
|
||||
.AndIF(!string.IsNullOrEmpty(ProrouteName), it => it.ProrouteName.Contains(ProrouteName))
|
||||
.ToExpression();
|
||||
|
||||
|
||||
List<MdTechnologicalProroute> data = Context.Queryable<MdTechnologicalProroute>().Where(predicate).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
|
||||
return (totalNum, data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int UpdateWorkProroute(MdTechnologicalProroute proroute)
|
||||
{
|
||||
return Update(proroute, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user