调整
This commit is contained in:
@@ -26,20 +26,27 @@ namespace DOAN.Service.PBL
|
||||
item.CreatedTime= DateTime.Now;
|
||||
Context.Insertable(item).ExecuteCommand();
|
||||
|
||||
// 2.根据总成零件号 查询对应零件号,使得对应料架亮灯
|
||||
// 2.根据总成零件号 ,版本 查询对应零件号,使得对应料架亮灯
|
||||
|
||||
//镜壳 料架
|
||||
Storagelocation MirrorshellShelf = Context.Queryable<Storagelocation>().Where(it => it.Partnumber ==
|
||||
SqlFunc.Subqueryable<Billofmaterials>().Where(It => It.Productcode == light.AssemblyPartNumber).Select(it => it.MirrorshellCode)).First();
|
||||
SqlFunc.Subqueryable<Billofmaterials>().Where(It => It.Productcode == light.AssemblyPartNumber&&It.Version==light.Version).Select(it => it.MirrorshellCode)).First();
|
||||
|
||||
//镜体 料架
|
||||
Storagelocation MirrorshellBody = Context.Queryable<Storagelocation>().Where(it => it.Partnumber ==
|
||||
SqlFunc.Subqueryable<Billofmaterials>().Where(It => It.Productcode == light.AssemblyPartNumber).Select(it => it.MirrorbodyCode)).First();
|
||||
SqlFunc.Subqueryable<Billofmaterials>().Where(It => It.Productcode == light.AssemblyPartNumber&&It.Version == light.Version).Select(it => it.MirrorbodyCode)).First();
|
||||
|
||||
// 3.对应料架亮灯
|
||||
|
||||
|
||||
//TODO PLC 交互
|
||||
|
||||
// 对应料架 亮灯字段
|
||||
MirrorshellShelf.IsLight = 1;
|
||||
MirrorshellBody.IsLight = 1;
|
||||
Context.Insertable(MirrorshellShelf).ExecuteCommand();
|
||||
Context.Insertable(MirrorshellBody).ExecuteCommand();
|
||||
// 通知PLC
|
||||
|
||||
|
||||
//亮灯日志
|
||||
Light_Log light_Log = new Light_Log();
|
||||
light_Log.Id = XUEHUA;
|
||||
|
||||
Reference in New Issue
Block a user