产品定义原始完工
This commit is contained in:
@@ -12,7 +12,7 @@ namespace ZR.Service.mes.md.IService
|
||||
{
|
||||
public int deleteProductDefine(int[] ids);
|
||||
public MdProductDefineDTO GetList(string name, string code, int pageNum, int pageSize);
|
||||
public List<MdProductDefine> GetList(SearchOptionDTO searchOption);
|
||||
public List<MdProductDefine> GetList(DateTime starttime, DateTime endtime, string productCode, string productName);
|
||||
public MdProductDefine GetProductDefinebyPK(int measure);
|
||||
List<MdUnit> GetProductDefineList(string name);
|
||||
List<MdUnit> GetProductDefineList();
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Xml.Linq;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.md.DTO;
|
||||
using ZR.Service.mes.md.IService;
|
||||
using static Org.BouncyCastle.Crypto.Engines.SM2Engine;
|
||||
|
||||
namespace ZR.Service.mes.md
|
||||
{
|
||||
@@ -49,6 +50,17 @@ namespace ZR.Service.mes.md
|
||||
|
||||
}
|
||||
|
||||
public List<MdProductDefine> GetList(DateTime starttime, DateTime endtime, string productCode, string productName)
|
||||
{
|
||||
|
||||
var predicate = Expressionable.Create<MdProductDefine>()
|
||||
.AndIF(productCode.IsNotEmpty(), pro => pro.ProductCode.Contains(productCode))
|
||||
.AndIF(productName.IsNotEmpty(), pro => pro.ProductName.Contains(productName))
|
||||
.AndIF(starttime.IsNotEmpty(), pro => pro.CreatedTime>=starttime)
|
||||
.AndIF(endtime.IsNotEmpty(), pro => pro.CreatedTime>=endtime)
|
||||
.ToExpression();
|
||||
return Context.Queryable<MdProductDefine>().Where(predicate).ToList();
|
||||
}
|
||||
|
||||
public MdProductDefine GetProductDefinebyPK(int measure)
|
||||
{
|
||||
@@ -84,10 +96,7 @@ namespace ZR.Service.mes.md
|
||||
return Update(paramss,true);
|
||||
}
|
||||
|
||||
List<MdProductDefine> IMdProductDefineService.GetList(SearchOptionDTO searchOption)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user