123
This commit is contained in:
@@ -61,17 +61,26 @@ namespace DOAN.ServiceCore
|
||||
storagelocation.PackageNum = 2;
|
||||
inventorylog.Operation = 1;
|
||||
inventorylog.PackageNum = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//补料
|
||||
storagelocation.PackageNum = 4;
|
||||
inventorylog.Operation = 2;
|
||||
inventorylog.PackageNum = 4;
|
||||
}
|
||||
inventorylog.CreatedBy = "PLC";
|
||||
inventorylog.CreatedTime = DateTime.Now.ToLocalTime();
|
||||
await DbScoped.SugarScope.CopyNew().Insertable(storagelocation).ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (storagelocation.PackageNum<=2)
|
||||
{
|
||||
//补料成功
|
||||
storagelocation.PackageNum = 4;
|
||||
inventorylog.Operation = 2;
|
||||
inventorylog.PackageNum = 4;
|
||||
inventorylog.CreatedBy = "PLC";
|
||||
inventorylog.CreatedTime = DateTime.Now.ToLocalTime();
|
||||
await DbScoped.SugarScope.CopyNew().Insertable(storagelocation).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
await Task.Delay(5000, stoppingToken);
|
||||
|
||||
Reference in New Issue
Block a user