日志
This commit is contained in:
@@ -37,6 +37,10 @@ namespace DOAN.Service.PBL
|
||||
SqlFunc.Subqueryable<Billofmaterials>().Where(It => It.Productcode == light.AssemblyPartNumber).Select(it => it.MirrorbodyCode)).First();
|
||||
|
||||
// 3.对应料架亮灯
|
||||
|
||||
//TODO PLC 交互
|
||||
|
||||
//亮灯日志
|
||||
Light_Log light_Log = new Light_Log();
|
||||
light_Log.Id = XUEHUA;
|
||||
light_Log.LightOperation = 1;
|
||||
@@ -76,7 +80,15 @@ namespace DOAN.Service.PBL
|
||||
Context.Insertable(item).ExecuteCommand();
|
||||
|
||||
//2 找到对应的料架 灭灯
|
||||
|
||||
|
||||
|
||||
Storagelocation storagelocation= Context.Queryable<Storagelocation>().Where(it => it.Partnumber == scan_code).First();
|
||||
|
||||
//TODO PLC 交互
|
||||
|
||||
|
||||
//亮灯日志
|
||||
Light_Log light_Log = new Light_Log();
|
||||
light_Log.Id = XUEHUA;
|
||||
light_Log.LightOperation = 2;
|
||||
@@ -87,14 +99,11 @@ namespace DOAN.Service.PBL
|
||||
light_Log.Operationer = "PBL";
|
||||
light_Log.CreatedTime = DateTime.Now;
|
||||
int result= Context.Insertable(light_Log).ExecuteCommand();
|
||||
if (result > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//3 扣减对应的库存
|
||||
|
||||
return result > 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user