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