GP12触摸屏,油漆实验室改动提交

This commit is contained in:
2025-02-20 10:46:07 +08:00
parent 96e0986a0e
commit e7cff07b8a
4 changed files with 68 additions and 21 deletions

View File

@@ -1,7 +1,10 @@
using Infrastructure.Attribute;
using Aliyun.OSS;
using Infrastructure.Attribute;
using SqlSugar;
using System;
using ZR.Model.MES.ql;
using ZR.Model.MES.wms;
using ZR.Model.MES.wms.Dto;
using ZR.Service.mes.ql.IService;
namespace ZR.Service.mes.ql
@@ -97,6 +100,8 @@ namespace ZR.Service.mes.ql
//return (Context.Queryable<PLRawMaterial>().Where(it => it.Id > 0).ToList(),100);
}
/// <summary>
/// 更新数据记录
/// </summary>
@@ -134,5 +139,31 @@ namespace ZR.Service.mes.ql
UpdatedTime = DateTime.Now,
};
}
public List<WmMaterialSelectOptions> QueryMaterialOptions(string query)
{
var predicate = Expressionable
.Create<WmMaterial>()
.Or(it => it.Partnumber.Contains(query))
.Or(it => it.Description.Contains(query))
.Or(it => it.ProductName.Contains(query))
.And(it => it.Type == 1)
.And(it => it.Status == 1);
List<WmMaterialSelectOptions> options = Context
.Queryable<WmMaterial>()
.Where(predicate.ToExpression())
.Select(
(it) =>
new WmMaterialSelectOptions
{
Key = it.Id,
Label = "[ " + it.Partnumber + " ] " + it.Description,
Value = it.Description
}
)
.Take(10)
.ToList();
return options;
}
}
}