3 Commits
d2a8319539
...
7d373abd1e
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
7d373abd1e |
长城更新前备份
|
2 months ago |
|
|
14f91844bc |
职业病
|
2 months ago |
|
|
0ce5149366 |
事务冲突
|
3 months ago |
15 changed files with 16887 additions and 215 deletions
-
104src/Shentun.Peis.Application/AIMessages/AIMessageAppService.cs
-
12src/Shentun.Peis.Application/BeiJingMZAKExportDatas/Class1.cs
-
121src/Shentun.Peis.Application/ChargeRequests/ChargeRequestAppService.cs
-
9src/Shentun.Peis.Application/InternalReports/InternalReportAppService.cs
-
172src/Shentun.Peis.Application/LisRequests/LisRequestAppService.cs
-
7src/Shentun.Peis.Application/MyUser/MyUserAppService.cs
-
28src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs
-
39src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
-
46src/Shentun.Peis.Domain/CacheService.cs
-
6src/Shentun.Peis.Domain/PatientOccupationalHistorys/PatientOccupationalHistory.cs
-
16377src/Shentun.Peis.EntityFrameworkCore/Migrations/20250827091748_patient_occupational_history_update_length.Designer.cs
-
81src/Shentun.Peis.EntityFrameworkCore/Migrations/20250827091748_patient_occupational_history_update_length.cs
-
14src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
-
69src/Shentun.Peis.HttpApi.Host/Controllers/AiMessageWsController.cs
-
17src/Shentun.Peis.HttpApi.Host/appsettings.json
@ -1,12 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Shentun.Peis.BeiJingMZAKExportDatas |
|||
{ |
|||
internal class Class1 |
|||
{ |
|||
} |
|||
} |
|||
16377
src/Shentun.Peis.EntityFrameworkCore/Migrations/20250827091748_patient_occupational_history_update_length.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,81 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class patient_occupational_history_update_length : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "work_type", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(10)", |
|||
oldMaxLength: 10, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "work_shop", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(10)", |
|||
oldMaxLength: 10, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "protective_measures", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(30)", |
|||
oldMaxLength: 30, |
|||
oldNullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "work_type", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(10)", |
|||
maxLength: 10, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "work_shop", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(10)", |
|||
maxLength: 10, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "protective_measures", |
|||
table: "patient_occupational_history", |
|||
type: "character varying(30)", |
|||
maxLength: 30, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "character varying(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
using Microsoft.AspNetCore.Http; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System.Net.WebSockets; |
|||
using System.Text; |
|||
using System.Threading; |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Shentun.Peis.Controllers |
|||
{ |
|||
[Route("api/[controller]")]
|
|||
[ApiController] |
|||
public class AiMessageWsController : ControllerBase |
|||
{ |
|||
|
|||
[HttpGet] |
|||
public IAsyncEnumerable<string> GetData() |
|||
{ |
|||
return GenerateDataAsync(); |
|||
} |
|||
|
|||
private async IAsyncEnumerable<string> GenerateDataAsync() |
|||
{ |
|||
for (int i = 0; i < 100; i++) |
|||
{ |
|||
await Task.Delay(100); // 模拟延迟
|
|||
yield return $"Data {i}"; |
|||
} |
|||
} |
|||
|
|||
//public async Task HandleWebSocket()
|
|||
//{
|
|||
// if (HttpContext.WebSockets.IsWebSocketRequest)
|
|||
// {
|
|||
// using var webSocket = await HttpContext.WebSockets.AcceptWebSocketAsync();
|
|||
// await ProcessDeepSeekStream(webSocket);
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// HttpContext.Response.StatusCode = StatusCodes.Status400BadRequest;
|
|||
// }
|
|||
//}
|
|||
|
|||
|
|||
|
|||
//private async Task ProcessDeepSeekStream(WebSocket webSocket)
|
|||
//{
|
|||
// // 调用deepseek API
|
|||
// var stream = await GetDeepSeekStream();
|
|||
|
|||
// foreach (var chunk in stream)
|
|||
// {
|
|||
// var buffer = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(chunk));
|
|||
// await webSocket.SendAsync(
|
|||
// new ArraySegment<byte>(buffer),
|
|||
// WebSocketMessageType.Text,
|
|||
// true,
|
|||
// CancellationToken.None);
|
|||
// }
|
|||
|
|||
// await webSocket.CloseAsync(
|
|||
// WebSocketCloseStatus.NormalClosure,
|
|||
// "Stream completed",
|
|||
// CancellationToken.None);
|
|||
//}
|
|||
|
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue