GP12触摸屏,油漆实验室改动提交
This commit is contained in:
@@ -599,17 +599,13 @@ namespace ZR.Service.Business
|
||||
public string ScanInnerLabel(QcGp12LabelScanDto data)
|
||||
{
|
||||
DateTime nowTime = DateTime.Now;
|
||||
// 标签防错
|
||||
// 标签防错 (内标签零件号)
|
||||
string partNumber = DoAnalyzePartnumber(data.Label);
|
||||
if (partNumber != data.PartNumber)
|
||||
// 内标签包含外标签
|
||||
if (!partNumber.Contains(data.PartNumber))
|
||||
{
|
||||
return "内标签零件号与外箱标签不一致!";
|
||||
}
|
||||
/* int qt = DoAnalyzeQuantity(data.Label);
|
||||
if (qt >= 6)
|
||||
{
|
||||
return "该标签可能为外箱标签!";
|
||||
}*/
|
||||
bool hasAny = Context
|
||||
.Queryable<QcGp12RecordLabelScan>()
|
||||
.Where(it => it.Label == data.Label)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.ql;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
|
||||
|
||||
namespace ZR.Service.mes.ql.IService
|
||||
@@ -15,5 +17,12 @@ namespace ZR.Service.mes.ql.IService
|
||||
|
||||
public int UpdateRawMaterialRecords(List<PLRawMaterial> list);
|
||||
|
||||
/// <summary>
|
||||
/// 根据查询条件,获取物料下拉信息
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
List<WmMaterialSelectOptions> QueryMaterialOptions(string query);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user