This commit is contained in:
2023-09-19 09:21:51 +08:00
parent 18b72a8bad
commit a80a6fb0bf
2 changed files with 22 additions and 0 deletions

View File

@@ -19,5 +19,12 @@ namespace Tnb.BasicData.Interfaces
/// <param name="code"></param>
/// <returns></returns>
public Task<dynamic> GetWorkStationByCode(Dictionary<string, string> dic);
/// <summary>
/// 获取工位信息
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public Task<dynamic> GetWorkstationInfo();
}
}

View File

@@ -80,5 +80,20 @@ namespace Tnb.BasicData
}).FirstAsync();
return result;
}
[HttpPost]
public async Task<dynamic> GetWorkstationInfo()
{
var result = await _repository.AsSugarClient().Queryable<OrganizeEntity>()
.LeftJoin<BasQrcode>((a, b) => a.Id == b.source_id && b.source_name == "BASE_ORGANIZE")
.Where((a, b) => a.Category == DictConst.RegionCategoryStationCode && a.DeleteMark == null)
.Select((a, b) => new
{
label = a.FullName,
value = a.Id,
qrcode = b.code
}).ToListAsync();
return result;
}
}
}