修复BUG
This commit is contained in:
parent
bff53544d8
commit
9bf40e3849
@ -115,24 +115,26 @@ public class TrayService : ITrayService
|
||||
|
||||
public Task ExportedAsync(string trayCode)
|
||||
{
|
||||
var tray = _db.CopyNew().Queryable<TrayEntity>().Where(d => d.TrayCode == trayCode).First();
|
||||
tray.Exported = true;
|
||||
return _db.CopyNew().Updateable(tray).ExecuteCommandAsync();
|
||||
return _db.CopyNew().Updateable<TrayEntity>()
|
||||
.Where(x => x.TrayCode == trayCode)
|
||||
.SetColumns(x => x.Exported, true).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public Task<List<string>> GetNoExportCodesAsync()
|
||||
public async Task<List<string>> GetNoExportCodesAsync()
|
||||
{
|
||||
var tray = _db.CopyNew().Queryable<TrayEntity>().Where(x => x.Exported != true && x.FinishTime != null)
|
||||
.ToList();
|
||||
var tray = await _db.CopyNew().Queryable<TrayEntity>().Where(x => x.Exported != true && x.FinishTime != null)
|
||||
.ToListAsync();
|
||||
var trayCodes = tray.Select(x => x.TrayCode).ToList();
|
||||
return Task.FromResult(trayCodes);
|
||||
return trayCodes;
|
||||
}
|
||||
|
||||
public Task SetControlNoAsync(string trayCode, int controlNo)
|
||||
{
|
||||
var tray = _db.CopyNew().Queryable<TrayEntity>().Where(d => d.TrayCode == trayCode).First();
|
||||
tray.ControlNo = controlNo;
|
||||
return _db.CopyNew().Updateable(tray).ExecuteCommandAsync();
|
||||
return _db.CopyNew()
|
||||
.Updateable<TrayEntity>()
|
||||
.Where(d => d.TrayCode == trayCode)
|
||||
.SetColumns(x => x.ControlNo, controlNo)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public async Task<Tray> GetIsPacking()
|
||||
|
Loading…
x
Reference in New Issue
Block a user