|
@@ -71,23 +71,11 @@ namespace TEAMModelOS.Controllers
|
|
|
_searcher = searcher;
|
|
|
}
|
|
|
[ProducesDefaultResponseType]
|
|
|
- [HttpPost("get-studentId")]
|
|
|
- public async Task<IActionResult> GetStudentId(JsonElement json) {
|
|
|
- List<string> ids = new List<string>();
|
|
|
-
|
|
|
- await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student")
|
|
|
- .GetItemQueryStreamIterator(queryText: " SELECT distinct value c.studentId FROM c where c.pk='OverallEducation' and c.schoolCode='ydzt' ", requestOptions :new QueryRequestOptions { }))
|
|
|
- {
|
|
|
- using var djson = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
- if (djson.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
- {
|
|
|
- foreach (var obj in djson.RootElement.GetProperty("Documents").EnumerateArray())
|
|
|
- {
|
|
|
- ids.Add(obj.ToObject<string>());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return Ok(ids);
|
|
|
+ [HttpPost("sendmsg")]
|
|
|
+ public async Task<IActionResult> Sendmsg(JsonElement json) {
|
|
|
+ var messageBlobPDF = new ServiceBusMessage(new { userType = "tmdid", bizType = "OfflineRecord" }.ToJsonString());
|
|
|
+ await _serviceBus.GetServiceBusClient().SendMessageAsync("screenpdf", messageBlobPDF);
|
|
|
+ return Ok();
|
|
|
}
|
|
|
|
|
|
|