Compare commits
237 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ac8f114a | |||
| 78bc09d71a | |||
| d2bca834ed | |||
| 34c50858c9 | |||
| a7441c8c78 | |||
| 125846e6b2 | |||
| d35b9a6f6f | |||
| 6b592cbda7 | |||
| f8e498b2e1 | |||
| 8ff23af18c | |||
| 828bd38eab | |||
| a9f22897e9 | |||
| b14f3fb251 | |||
| 91cde3f944 | |||
| fcffa32e06 | |||
| e2e03e30ef | |||
| bdb12a7df3 | |||
| e456f8684c | |||
| 81b56c03b7 | |||
| a92fa86809 | |||
| 745ab5cb25 | |||
| 8cee47a9f7 | |||
| b174a72709 | |||
| aebc9446ba | |||
| 6e7b77af00 | |||
| e147c2a370 | |||
| 30f41ba270 | |||
| 468a124841 | |||
| 33a15676b5 | |||
| a8b614e2a5 | |||
| 57d9a8665d | |||
| 2d03635ec4 | |||
| 5e34a41902 | |||
| 6b02c03f7f | |||
| 1c0547f3ff | |||
| 4b3e1ba5c0 | |||
| eb77fcfa2f | |||
| 86692d220a | |||
| 1417277cb1 | |||
| f40a48265c | |||
| 04e4b0ac34 | |||
| 6526e03d2c | |||
| 1fb09d05a3 | |||
| 6eefbb1745 | |||
| effd6fee41 | |||
| 84ba0bc4a9 | |||
| 7cf9bd4a81 | |||
| ba8a457688 | |||
| 848e33edb8 | |||
| 47eaed78ed | |||
| 137f77cdc5 | |||
| a2cfec6553 | |||
| da2209cf95 | |||
| ce8611e138 | |||
| 948c0d32ab | |||
| c2ed06061a | |||
| b610143e33 | |||
| fa0e4f7326 | |||
| 393bce5f5c | |||
| 004f73b24d | |||
| e53b56f0d4 | |||
| 7dbf99e1c8 | |||
| 2f77c0ecef | |||
| 2ce0306311 | |||
| 79ff873607 | |||
| 9827ffa0f2 | |||
| f81cf9c2f2 | |||
| 456e6f3035 | |||
| 25c3a6518d | |||
| 53a33c956f | |||
| c9daa09a0b | |||
| 156db9f6c5 | |||
| 1b9eeba5ba | |||
| a1588273e8 | |||
| 38b661da01 | |||
| 017babde86 | |||
| 74da92bc72 | |||
| 281b5d2177 | |||
| a9a435ee0f | |||
| 6f784a1054 | |||
| 90412c5817 | |||
| ecb0ab07d2 | |||
| 522e056f3c | |||
| 92ca6a9a34 | |||
| 93f660a2ca | |||
| 7997e8c408 | |||
| eb363fd564 | |||
| 04e4e786b0 | |||
| 12449325a9 | |||
| 3b48685a07 | |||
| 1adb7e6e2a | |||
| 46e1da667a | |||
| c5aaa08326 | |||
| e7193be3d7 | |||
| 56f27189f1 | |||
| 69bfecca9c | |||
| bc68271a2a | |||
| 27314a139d | |||
| 8ebaface32 | |||
| 408e03d02f | |||
| 8415d848c7 | |||
| 6ded64d830 | |||
| 00f6e3dc29 | |||
| 7fad0345cf | |||
| 4fa9dafdd8 | |||
| 819dfe9b68 | |||
| d0828ddf0e | |||
| c7d9e02b8d | |||
| 1bec318440 | |||
| cd6c57cec8 | |||
| f3942b507c | |||
| 888be6430a | |||
| c5e5ac4e45 | |||
| ece6832bb8 | |||
| 6c434e2ace | |||
| c08bad2fec | |||
| 5cafbdeaca | |||
| 70b99d56a4 | |||
| 66f91986bc | |||
| 8eff23a8f2 | |||
| 9bd0a23734 | |||
| e3622cb86f | |||
| eaf3d5e3e8 | |||
| d7bce4802a | |||
| 99c594acac | |||
| 5844b28983 | |||
| 26c2e917d9 | |||
| 07a2f19cf5 | |||
| 085213f920 | |||
| 985250e25c | |||
| 1c6acff8d7 | |||
| dd77dc43b6 | |||
| c7b86954fa | |||
| 13c55be759 | |||
| ce8e842823 | |||
| e5508e9b0c | |||
| 67e526893c | |||
| efcb3cf168 | |||
| ed8f24a3ad | |||
| 98947b0609 | |||
| 09d7a34c97 | |||
| 50667bddfb | |||
| 655ef79754 | |||
| 9d3e1edd61 | |||
| aba0101b01 | |||
| 7ca007b6fa | |||
| 3603656a1c | |||
| c372498251 | |||
| 05b5d0d264 | |||
| 45ab896bb9 | |||
| 2326d26c0b | |||
| 28587c8e91 | |||
| 78c707a018 | |||
| 5e889b1529 | |||
| ec945b4b39 | |||
| 4f72d97039 | |||
| 4d4af84716 | |||
| 47be1e52c9 | |||
| 4145421087 | |||
| f83bd75853 | |||
| 7e53c24919 | |||
| 341e4321b2 | |||
| c90258c49e | |||
| 5fdbdfec82 | |||
| 41a889f201 | |||
| 1f33a9fa4e | |||
| 760321f8fa | |||
| aae8afd0c5 | |||
| 33bf0d908d | |||
| 4f67de2898 | |||
| 79949b9bad | |||
| 1648cbef7b | |||
| 4abd7c8fe2 | |||
| bdf14d8641 | |||
| d2530de925 | |||
| f1a6ca24be | |||
| 8d1a6c8cec | |||
| 656b1cf252 | |||
| b89cfeb90c | |||
| 5b3beea8fa | |||
| b7d3a365b4 | |||
| bf0ab3411d | |||
| c5dacab771 | |||
| db363a7daa | |||
| 4c41a5a579 | |||
| c48803ca0c | |||
| b5e26da1ff | |||
| 501272a2a2 | |||
| e66475ab61 | |||
| 6a54a36719 | |||
| b2851352f2 | |||
| 756838e106 | |||
| b83ea13aed | |||
| 5202ee7bd6 | |||
| 424a05c211 | |||
| 702e20c834 | |||
| 506955ca7c | |||
| 9cbd1faf93 | |||
| 3354aa37f4 | |||
| f17001bace | |||
| 80d99d4862 | |||
| d19b5da008 | |||
| 31fdedb033 | |||
| c87e268165 | |||
| 93726ae28c | |||
| fed21316df | |||
| 205619071d | |||
| 16e985b37e | |||
| 590a7e7b05 | |||
| 239f87320b | |||
| d03c00d138 | |||
| 9778f5e943 | |||
| 3752bc0311 | |||
| 76bdbcbfcb | |||
| 70d321f778 | |||
| e666d93829 | |||
| a6a8f34734 | |||
| 317184ba7a | |||
| 68052766f8 | |||
| dc1cea6b5a | |||
| ebe597a575 | |||
| 4b4688538d | |||
| 0111136c95 | |||
| 8a0f1d0759 | |||
| 44c1ad740c | |||
| 664942a235 | |||
| 99e7079c14 | |||
| ec8e553304 | |||
| 93ed4013fe | |||
| 531e2f4a08 | |||
| 06059f15ac | |||
| 23e6811e89 | |||
| 6a1a7ba452 | |||
| a9c9486162 | |||
| 3d6cfccbdf | |||
| 007f8eddc9 | |||
| b94bc8eff1 |
@@ -12,18 +12,18 @@
|
|||||||
"RegionId": "cn-shanghai",
|
"RegionId": "cn-shanghai",
|
||||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
|
||||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
|
||||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
|
||||||
"BucketName": "zy-irc-uat-store",
|
"BucketName": "tl-med-irc-uat-store",
|
||||||
"ViewEndpoint": "https://zy-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
"ViewEndpoint": "https://tl-med-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
"Region": "oss-cn-shanghai",
|
"Region": "oss-cn-shanghai",
|
||||||
"DurationSeconds": 7200
|
"DurationSeconds": 7200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
"Hangfire": "Server101.132.253.119,1435;Database=Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
},
|
},
|
||||||
"DicomSCPServiceConfig": {
|
"DicomSCPServiceConfig": {
|
||||||
"CalledAEList": [
|
"CalledAEList": [
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Amazon.Auth.AccessControlPolicy;
|
using Amazon.Auth.AccessControlPolicy;
|
||||||
using Amazon.SecurityToken;
|
using Amazon.SecurityToken;
|
||||||
using Azure.Core;
|
using Azure.Core;
|
||||||
|
using IdentityModel.Client;
|
||||||
|
using IdentityModel.OidcClient;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
using IRaCIS.Core.API.OAuth;
|
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
@@ -25,7 +26,9 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ZiggyCreatures.Caching.Fusion;
|
using ZiggyCreatures.Caching.Fusion;
|
||||||
using AssumeRoleRequest = Amazon.SecurityToken.Model.AssumeRoleRequest;
|
using AssumeRoleRequest = Amazon.SecurityToken.Model.AssumeRoleRequest;
|
||||||
@@ -308,7 +311,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
{
|
{
|
||||||
var token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
|
var token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
|
||||||
{
|
{
|
||||||
Id = Guid.Empty,
|
Id = Guid.NewGuid(),
|
||||||
IsReviewer = false,
|
IsReviewer = false,
|
||||||
IsAdmin = false,
|
IsAdmin = false,
|
||||||
RealName = "Share001",
|
RealName = "Share001",
|
||||||
@@ -433,63 +436,6 @@ namespace IRaCIS.Api.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 客户端方式获取logto 里面的信息
|
|
||||||
|
|
||||||
var baseUrl = "https://logto.test.extimaging.com";
|
|
||||||
var appId = "v2mr2ndxwkxz0xpsuc1th";
|
|
||||||
var appSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q";
|
|
||||||
var apiAddress = "https://default.logto.app/api"; //这里是个坑
|
|
||||||
var scope = "all";
|
|
||||||
|
|
||||||
var opts = new RestClientOptions(baseUrl);
|
|
||||||
using var client = new RestClient(opts);
|
|
||||||
|
|
||||||
//https://bump.sh/logto/doc/logto-management-api/authentication
|
|
||||||
var request = new RestRequest("oidc/token", Method.Post);
|
|
||||||
request
|
|
||||||
.AddHeader("Content-Type", "application/x-www-form-urlencoded")
|
|
||||||
.AddParameter("grant_type", "client_credentials")
|
|
||||||
.AddParameter("client_id", appId)
|
|
||||||
.AddParameter("client_secret", appSecret)
|
|
||||||
.AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别
|
|
||||||
.AddParameter("scope", scope);
|
|
||||||
|
|
||||||
|
|
||||||
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
|
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.OK)
|
|
||||||
{
|
|
||||||
var tokenResponse = response.Data;
|
|
||||||
|
|
||||||
Console.WriteLine(tokenResponse.ToJsonStr());
|
|
||||||
|
|
||||||
#region 获取应用信息
|
|
||||||
|
|
||||||
var applicationRequest = new RestRequest($"/api/applications", Method.Get)
|
|
||||||
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
|
|
||||||
|
|
||||||
var applicationResponse = await client.ExecuteAsync(applicationRequest);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 获取用户信息
|
|
||||||
//curl \
|
|
||||||
// -X GET https://[tenant_id].logto.app/api/users/{userId} \
|
|
||||||
// -H "Authorization: Bearer $ACCESS_TOKEN"
|
|
||||||
|
|
||||||
var userId = "4fqx4cb3438k";
|
|
||||||
var userInfoRequest = new RestRequest($"api/users/{userId}", Method.Get)
|
|
||||||
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
|
|
||||||
|
|
||||||
|
|
||||||
var userResponse = await client.ExecuteAsync<LogtoUser>(userInfoRequest);
|
|
||||||
|
|
||||||
Console.WriteLine(userResponse.Content);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|||||||
@@ -346,147 +346,6 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Tokens">
|
|
||||||
<summary>
|
|
||||||
The token names used by Cookie and OpenID Connect middleware to store and retrieve tokens from
|
|
||||||
Logto OpenID Connect provider.
|
|
||||||
<br/>
|
|
||||||
See <see href="https://github.com/dotnet/aspnetcore/blob/4a9118c674a798aaf6379b4b7b2d8787bc688f96/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs#L994-L1035">tokens that are stored by OpenID Connect middleware</see> for more details.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes">
|
|
||||||
<summary>
|
|
||||||
The scope names used by Logto OpenID Connect provider to request for user information.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Email">
|
|
||||||
<summary>
|
|
||||||
The scope name for requesting user's email.
|
|
||||||
Logto will issue two claims to the ID token: <c>email</c> and <c>email_verified</c>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Phone">
|
|
||||||
<summary>
|
|
||||||
The scope name for requesting user's phone number.
|
|
||||||
Logto will issue two claims to the ID token: <c>phone</c> and <c>phone_verified</c>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.CustomData">
|
|
||||||
<summary>
|
|
||||||
The scope name for requesting user's custom data.
|
|
||||||
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>custom_data</c>.
|
|
||||||
<br/>
|
|
||||||
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Scopes.Identities">
|
|
||||||
<summary>
|
|
||||||
The scope name for requesting user's identities.
|
|
||||||
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>identities</c>.
|
|
||||||
<br/>
|
|
||||||
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.API.OAuth.LogtoParameters.Claims">
|
|
||||||
<summary>
|
|
||||||
The claim names used by Logto OpenID Connect provider for ID token and userinfo endpoint.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Issuer">
|
|
||||||
<summary>
|
|
||||||
The claim name for the issuer identifier for whom issued the token.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Subject">
|
|
||||||
<summary>
|
|
||||||
The claim name for the subject identifier for whom the token is intended (user ID).
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Audience">
|
|
||||||
<summary>
|
|
||||||
The claim name for the audience that the token is intended for, which is the client ID.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Expiration">
|
|
||||||
<summary>
|
|
||||||
The claim name for the expiration time of the token (in seconds).
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.IssuedAt">
|
|
||||||
<summary>
|
|
||||||
The claim name for the time at which the token was issued (in seconds).
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Name">
|
|
||||||
<summary>
|
|
||||||
The claim name for the user's full name.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Username">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's username.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Picture">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's profile picture URL.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Email">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's email.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.EmailVerified">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's email verification status.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.PhoneNumber">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's phone number.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.PhoneNumberVerified">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's phone number verification status.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.CustomData">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's custom data.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:IRaCIS.Core.API.OAuth.LogtoParameters.Claims.Identities">
|
|
||||||
<summary>
|
|
||||||
The claim name for user's identities.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.AccessToken">
|
|
||||||
<summary>
|
|
||||||
The access token issued by the Logto authorization server.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.TokenType">
|
|
||||||
<summary>
|
|
||||||
The type of the token issued by the Logto authorization server.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.ExpiresIn">
|
|
||||||
<summary>
|
|
||||||
The lifetime in seconds of the access token.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.RefreshToken">
|
|
||||||
<summary>
|
|
||||||
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.API.OAuth.LogtoTokenResponse.IdToken">
|
|
||||||
<summary>
|
|
||||||
The ID token, which can be used to verify the identity of the user.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.API.IpPolicyRateLimitSetup">
|
<member name="T:IRaCIS.Core.API.IpPolicyRateLimitSetup">
|
||||||
<summary>
|
<summary>
|
||||||
IPLimit限流 启动服务
|
IPLimit限流 启动服务
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ SerilogExtension.AddSerilogSetup(enviromentName);
|
|||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
|
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
|
||||||
{
|
{
|
||||||
|
|
||||||
EnvironmentName = enviromentName
|
EnvironmentName = enviromentName
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ namespace IRaCIS.Core.API
|
|||||||
|
|
||||||
triggerOptions.AddTrigger<UserLogTrigger>();
|
triggerOptions.AddTrigger<UserLogTrigger>();
|
||||||
|
|
||||||
|
triggerOptions.AddTrigger<UserAddTrigger>();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ public static class SwaggerSetup
|
|||||||
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
|
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
|
||||||
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
|
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
|
||||||
options.RoutePrefix = string.Empty;
|
options.RoutePrefix = string.Empty;
|
||||||
options.RoutePrefix = string.Empty;
|
|
||||||
|
|
||||||
//DocExpansion设置为none可折叠所有方法
|
//DocExpansion设置为none可折叠所有方法
|
||||||
options.DocExpansion(DocExpansion.None);
|
options.DocExpansion(DocExpansion.None);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
"CompanyShortName": "Extensive Imaging",
|
"CompanyShortName": "Extensive Imaging",
|
||||||
"CompanyShortNameCN": "展影医疗",
|
"CompanyShortNameCN": "展影医疗",
|
||||||
"IsEnv_US": false,
|
"IsEnv_US": false,
|
||||||
"IsOpenErrorNoticeEmail": true,
|
"IsOpenErrorNoticeEmail": false,
|
||||||
"ErrorNoticeEmailList": [ "872297557@qq.com" ]
|
"ErrorNoticeEmailList": [ "872297557@qq.com" ]
|
||||||
},
|
},
|
||||||
"SystemPacsConfig": {
|
"SystemPacsConfig": {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
"Hangfire": "Server=101.132.253.119,1435;Database=Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
},
|
},
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
"RegionId": "cn-shanghai",
|
"RegionId": "cn-shanghai",
|
||||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
|
||||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
|
||||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
|
||||||
"BucketName": "zy-irc-uat-store",
|
"BucketName": "tl-med-irc-uat-store",
|
||||||
"ViewEndpoint": "https://zy-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
"ViewEndpoint": "https://tl-med-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
"Region": "oss-cn-shanghai",
|
"Region": "oss-cn-shanghai",
|
||||||
"DurationSeconds": 7200
|
"DurationSeconds": 7200
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,5 +66,13 @@
|
|||||||
"ApiPathList": [
|
"ApiPathList": [
|
||||||
"/test/get"
|
"/test/get"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"oauth": {
|
||||||
|
"github": {
|
||||||
|
"app_id": "github_app_id",
|
||||||
|
"app_key": "github_app_key",
|
||||||
|
"redirect_uri": "https://oauthlogin.net/oauth/githubcallback",
|
||||||
|
"scope": "repo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
using IRaCIS.Core.Application.Helper;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using Microsoft.Extensions.Localization;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using ZiggyCreatures.Caching.Fusion;
|
|
||||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Filter;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 主要为了 处理项目结束 锁库,不允许操作
|
|
||||||
/// </summary>
|
|
||||||
public class TrialResourceFilter : Attribute, IAsyncResourceFilter
|
|
||||||
{
|
|
||||||
private readonly IUserInfo _userInfo;
|
|
||||||
private readonly IFusionCache _fusionCache;
|
|
||||||
public IStringLocalizer _localizer;
|
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
|
||||||
private readonly List<string> _trialOptList = new List<string>();
|
|
||||||
|
|
||||||
|
|
||||||
public TrialResourceFilter(IFusionCache fusionCache, IRepository<Trial> trialRepository, IStringLocalizer localizer, IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
|
|
||||||
{
|
|
||||||
_fusionCache = fusionCache;
|
|
||||||
_userInfo = userInfo;
|
|
||||||
_localizer = localizer;
|
|
||||||
_trialRepository = trialRepository;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
|
|
||||||
if (!string.IsNullOrWhiteSpace(trialOpt2)) _trialOptList.Add(trialOpt2.Trim());
|
|
||||||
if (!string.IsNullOrWhiteSpace(trialOpt3)) _trialOptList.Add(trialOpt3.Trim());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//优先选择异步的方法
|
|
||||||
public async Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)
|
|
||||||
{
|
|
||||||
// var typeFilter = context.ActionDescriptor.EndpointMetadata.Where(t => t.GetType() == typeof(TypeFilterAttribute)).Select(t => (TypeFilterAttribute)t).ToList().FirstOrDefault();
|
|
||||||
//var _trialOptList= typeFilter.Arguments.Select(t => t.ToString()).ToList();
|
|
||||||
|
|
||||||
// 获取当前请求的 Host 信息
|
|
||||||
var requestHost = context.HttpContext.Request.Host;
|
|
||||||
|
|
||||||
// 检查请求是否来自 localhost:6100
|
|
||||||
if (requestHost.Host == "localhost" && (requestHost.Port == 6100|| requestHost.Port==3305))
|
|
||||||
{
|
|
||||||
await next.Invoke();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 处理新的用户类型,不能操作项目相关接口
|
|
||||||
|
|
||||||
// 后期列举出具体的类型,其他任何用户类型,都不允许操作
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA && _userInfo.RequestUrl.ToLower() != "TrialDocument/userConfirm".ToLower())
|
|
||||||
{
|
|
||||||
//---对不起,您的账户没有操作权限。
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_NoAccessPermission"]));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TrialId 传递的途径多种,可能在path 可能在body 可能在数组中,也可能在对象中,可能就在url
|
|
||||||
var trialIdStr = string.Empty;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(context.HttpContext.Request.Query["trialId"]))
|
|
||||||
{
|
|
||||||
trialIdStr = context.HttpContext.Request.Query["trialId"];
|
|
||||||
}
|
|
||||||
|
|
||||||
//先尝试从path中取TrialId
|
|
||||||
else if (context.RouteData.Values.Keys.Any(t => t.Contains("trialId")))
|
|
||||||
{
|
|
||||||
var index = context.RouteData.Values.Keys.ToList().IndexOf("trialId");
|
|
||||||
trialIdStr = context.RouteData.Values.Values.ToList()[index] as string;
|
|
||||||
}
|
|
||||||
else if (context.HttpContext.Request.Headers["Referer"].ToString().Contains("trialId"))
|
|
||||||
{
|
|
||||||
var headerStr = context.HttpContext.Request.Headers["Referer"].ToString();
|
|
||||||
|
|
||||||
var trialIdIndex = headerStr.IndexOf("trialId");
|
|
||||||
|
|
||||||
|
|
||||||
var matchResult = Regex.Match(headerStr.Substring(trialIdIndex), @"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
|
|
||||||
|
|
||||||
if (matchResult.Success)
|
|
||||||
{
|
|
||||||
trialIdStr = matchResult.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#region body 中取数据
|
|
||||||
|
|
||||||
//设置可以多次读
|
|
||||||
context.HttpContext.Request.EnableBuffering();
|
|
||||||
var reader = new StreamReader(context.HttpContext.Request.Body);
|
|
||||||
var contentFromBody = await reader.ReadToEndAsync();
|
|
||||||
//读取后,流的位置还原
|
|
||||||
context.HttpContext.Request.Body.Seek(0, SeekOrigin.Begin);
|
|
||||||
//context.HttpContext.Request.Body.Position = 0;
|
|
||||||
|
|
||||||
//找到参数位置在字符串中的索引
|
|
||||||
var trialIdIndex = contentFromBody.IndexOf("\"TrialId\"", StringComparison.OrdinalIgnoreCase);
|
|
||||||
|
|
||||||
if (trialIdIndex > -1)
|
|
||||||
{
|
|
||||||
// (?<="trialId" *: *").*?(?=",)
|
|
||||||
|
|
||||||
//使用正则 [0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}
|
|
||||||
|
|
||||||
var matchResult = Regex.Match(contentFromBody.Substring(trialIdIndex), @"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
|
|
||||||
|
|
||||||
if (matchResult.Success)
|
|
||||||
{
|
|
||||||
//有可能匹配错误 "trialId":"","documentId":"b8180000-3e2c-0016-9fe0-08da33f96236" 从缓存里面验证下
|
|
||||||
|
|
||||||
trialIdStr = matchResult.Value;
|
|
||||||
|
|
||||||
var trialStatusStr = await _fusionCache.GetOrSetAsync(CacheKeys.Trial(trialIdStr), _ => CacheHelper.GetTrialStatusAsync(Guid.Parse(trialIdStr), _trialRepository), TimeSpan.FromDays(7));
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(trialStatusStr))
|
|
||||||
{
|
|
||||||
|
|
||||||
//数据库 检查该项目Id不对
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//使用字符串取 如果是swagger 可能有时取的不对 因为空格的原因
|
|
||||||
//trialIdStr = contentFromBody.Substring(trialIdIndex + "TrialId".Length + 4, 3
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
//通过path 或者body 找到trialId 了
|
|
||||||
if (!string.IsNullOrWhiteSpace(trialIdStr))
|
|
||||||
{
|
|
||||||
var trialStatusStr = await _fusionCache.GetOrSetAsync(CacheKeys.Trial(trialIdStr), _ => CacheHelper.GetTrialStatusAsync(Guid.Parse(trialIdStr), _trialRepository), TimeSpan.FromDays(7));
|
|
||||||
|
|
||||||
// 这里是统一拦截 项目有关的操作允许情况(特殊的地方,比如项目配置(有的在多种状态(初始化,ongoing)都可以操作,有的仅仅在Initializing)还有 项目添加和更新,不走这里,特殊处理,不然在这里显得很乱,判断是哪个接口)
|
|
||||||
if (trialStatusStr == StaticData.TrialState.TrialOngoing || _trialOptList.Any(t => t == TrialOpt.BeforeOngoingCantOpt))
|
|
||||||
{
|
|
||||||
|
|
||||||
await next.Invoke();
|
|
||||||
|
|
||||||
}
|
|
||||||
// 项目停止、或者完成 不允许操作
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//---本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_InterceptedProjectStatusRule"]));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//添加项目 签名系统文档的时候 不做拦截 但是更新项目 签名项目文档的时候需要拦截
|
|
||||||
else if (_trialOptList.Any(t => t == TrialOpt.AddOrUpdateTrial || t == TrialOpt.SignSystemDocNoTrialId))
|
|
||||||
{
|
|
||||||
await next.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//如果项目相关接口没有传递trialId 会来到这里,提醒,以便修改
|
|
||||||
|
|
||||||
//---该接口参数中,没有传递项目编号,请核对。
|
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_MissingProjectNumber"]));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -27,6 +27,13 @@ public static class CacheKeys
|
|||||||
//超时没请求接口自动退出
|
//超时没请求接口自动退出
|
||||||
public static string UserAutoLoginOut(Guid userId) => $"UserAutoLoginOut:{userId}";
|
public static string UserAutoLoginOut(Guid userId) => $"UserAutoLoginOut:{userId}";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户登录错误 限制登录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string UserLoginError(string userName) => $"login-failures:{userName}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 跳过阅片
|
/// 跳过阅片
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using NPOI.SS.UserModel;
|
|||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using Xceed.Document.NET;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service;
|
namespace IRaCIS.Core.Application.Service;
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ public static class ExcelExportHelper
|
|||||||
foreach (var key in dic.Keys)
|
foreach (var key in dic.Keys)
|
||||||
{
|
{
|
||||||
//是数组 那么找到对应的属性 进行翻译
|
//是数组 那么找到对应的属性 进行翻译
|
||||||
if (dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
|
if (dic[key]!=null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
|
||||||
{
|
{
|
||||||
|
|
||||||
var newObjList = new List<object>();
|
var newObjList = new List<object>();
|
||||||
@@ -73,39 +74,40 @@ public static class ExcelExportHelper
|
|||||||
{
|
{
|
||||||
var itemDic = item.ConvertToDictionary();
|
var itemDic = item.ConvertToDictionary();
|
||||||
|
|
||||||
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
////处理集合里面时间类型,根据当前语言将时间转变为字符串
|
||||||
foreach (var itemValuePair in itemDic)
|
//foreach (var itemValuePair in itemDic)
|
||||||
{
|
//{
|
||||||
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
// // 临床数据 1,1 会变成2024-01-01
|
||||||
{
|
// if (itemValuePair.Value?.ToString().Length > 8 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
||||||
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
// {
|
||||||
}
|
// itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
foreach (var needTranslateProperty in needTranslatePropertyList)
|
foreach (var needTranslateProperty in needTranslatePropertyList)
|
||||||
{
|
{
|
||||||
//翻译的属性依赖其他属性
|
if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
|
||||||
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
|
|
||||||
{
|
{
|
||||||
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
|
//翻译的属性依赖其他属性
|
||||||
|
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
|
||||||
|
{
|
||||||
|
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
|
||||||
|
{
|
||||||
|
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
||||||
|
|
||||||
|
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//普通翻译 或者某一标准翻译
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
||||||
|
|
||||||
|
|
||||||
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//普通翻译 或者某一标准翻译
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
|
||||||
|
|
||||||
|
|
||||||
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
itemDic.Add("No", no++);
|
itemDic.Add("No", no++);
|
||||||
@@ -125,6 +127,7 @@ public static class ExcelExportHelper
|
|||||||
|
|
||||||
translateData = dic;
|
translateData = dic;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -162,12 +165,55 @@ public static class ExcelExportHelper
|
|||||||
workbook.RemoveSheetAt(1);
|
workbook.RemoveSheetAt(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
var memoryStream2 = new MemoryStream();
|
//中文替换项目术语
|
||||||
workbook.Write(memoryStream2, true);
|
if (data.TrialObjectNameList?.Count > 0)
|
||||||
|
{
|
||||||
|
var replaceObjectList = data.TrialObjectNameList;
|
||||||
|
|
||||||
|
var sheet = workbook.GetSheetAt(0);
|
||||||
|
|
||||||
|
int rowCount = sheet.PhysicalNumberOfRows;
|
||||||
|
|
||||||
|
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||||
|
{
|
||||||
|
var row = sheet.GetRow(rowIndex);
|
||||||
|
|
||||||
|
if (row != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var colums = row.LastCellNum;
|
||||||
|
|
||||||
|
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||||
|
{
|
||||||
|
var cell = row.GetCell(colIndex);
|
||||||
|
|
||||||
|
// 只处理字符串类型的单元格
|
||||||
|
if (cell != null)
|
||||||
|
{
|
||||||
|
var cellValue = cell.StringCellValue;
|
||||||
|
|
||||||
|
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
cell.SetCellValue(find.TrialName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
using (var memoryStream2 = new MemoryStream())
|
||||||
|
{
|
||||||
|
workbook.Write(memoryStream2, true);
|
||||||
|
|
||||||
|
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
templateStream = memoryStream2;
|
||||||
|
}
|
||||||
|
|
||||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
|
||||||
|
|
||||||
templateStream = memoryStream2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件名称 从sheet里面取
|
// 文件名称 从sheet里面取
|
||||||
@@ -277,7 +323,7 @@ public static class ExcelExportHelper
|
|||||||
foreach (var key in dic.Keys)
|
foreach (var key in dic.Keys)
|
||||||
{
|
{
|
||||||
//是数组 那么找到对应的属性 进行翻译
|
//是数组 那么找到对应的属性 进行翻译
|
||||||
if (dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
|
if (dic[key] != null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
|
||||||
//if (dic[key].GetType().IsAssignableFrom(typeof(JArray)))
|
//if (dic[key].GetType().IsAssignableFrom(typeof(JArray)))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -289,36 +335,40 @@ public static class ExcelExportHelper
|
|||||||
//var itemDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(item.ToJsonNotIgnoreNull());
|
//var itemDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(item.ToJsonNotIgnoreNull());
|
||||||
var itemDic = item.ConvertToDictionary();
|
var itemDic = item.ConvertToDictionary();
|
||||||
|
|
||||||
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
////处理集合里面时间类型,根据当前语言将时间转变为字符串
|
||||||
foreach (var itemValuePair in itemDic)
|
//foreach (var itemValuePair in itemDic)
|
||||||
{
|
//{
|
||||||
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
// if (itemValuePair.Value?.ToString().Length > 8 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
||||||
{
|
// {
|
||||||
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
// itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
foreach (var needTranslateProperty in needTranslatePropertyList)
|
foreach (var needTranslateProperty in needTranslatePropertyList)
|
||||||
{
|
{
|
||||||
//翻译的属性依赖其他属性
|
if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
|
||||||
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
|
|
||||||
{
|
{
|
||||||
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
|
//翻译的属性依赖其他属性
|
||||||
|
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
|
||||||
|
{
|
||||||
|
if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
|
||||||
|
{
|
||||||
|
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
||||||
|
|
||||||
|
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//普通翻译 或者某一标准翻译
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
||||||
|
|
||||||
|
|
||||||
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//普通翻译 或者某一标准翻译
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
|
|
||||||
|
|
||||||
|
|
||||||
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -371,6 +421,42 @@ public static class ExcelExportHelper
|
|||||||
workbook.RemoveSheetAt(1);
|
workbook.RemoveSheetAt(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//中文替换项目术语
|
||||||
|
if (data.TrialObjectNameList?.Count > 0)
|
||||||
|
{
|
||||||
|
var replaceObjectList = data.TrialObjectNameList;
|
||||||
|
|
||||||
|
var sheet = workbook.GetSheetAt(0);
|
||||||
|
|
||||||
|
int rowCount = sheet.PhysicalNumberOfRows;
|
||||||
|
|
||||||
|
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||||
|
{
|
||||||
|
var row = sheet.GetRow(rowIndex);
|
||||||
|
if (row != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var colums = row.LastCellNum;
|
||||||
|
|
||||||
|
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||||
|
{
|
||||||
|
var cell = row.GetCell(colIndex);
|
||||||
|
|
||||||
|
// 只处理字符串类型的单元格
|
||||||
|
if (cell != null)
|
||||||
|
{
|
||||||
|
var cellValue = cell.StringCellValue;
|
||||||
|
|
||||||
|
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
cell.SetCellValue(find.TrialName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dynamicColumnConfig != null)
|
if (dynamicColumnConfig != null)
|
||||||
{
|
{
|
||||||
@@ -391,7 +477,7 @@ public static class ExcelExportHelper
|
|||||||
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
|
||||||
|
|
||||||
//减去动态移除后原始结束索引
|
//减去动态移除后原始结束索引
|
||||||
var originRemoveEndIndex= originTotalEndIndex- dynamicRemoveColunmCount;
|
var originRemoveEndIndex = originTotalEndIndex - dynamicRemoveColunmCount;
|
||||||
|
|
||||||
//最终表 动态列开始索引
|
//最终表 动态列开始索引
|
||||||
var dynamicColunmStartIndex = dynamicColumnConfig.AutoColumnStartIndex - beforeDynamicRemoveCount;
|
var dynamicColunmStartIndex = dynamicColumnConfig.AutoColumnStartIndex - beforeDynamicRemoveCount;
|
||||||
@@ -451,6 +537,7 @@ public static class ExcelExportHelper
|
|||||||
var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex];
|
var name = dynamicColumnConfig.ColumnNameList[i - dynamicColunmStartIndex];
|
||||||
|
|
||||||
titelRow.GetCell(i).SetCellValue(name);
|
titelRow.GetCell(i).SetCellValue(name);
|
||||||
|
templateRow.GetCell(i).SetCellValue("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,7 +550,6 @@ public static class ExcelExportHelper
|
|||||||
templateStream = memoryStream2;
|
templateStream = memoryStream2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -513,7 +599,7 @@ public static class ExcelExportHelper
|
|||||||
|
|
||||||
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
|
||||||
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
|
||||||
|
|
||||||
if (itemDicName.IsNotNullOrEmpty())
|
if (itemDicName.IsNotNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
case EmailBusinessScenario.QCToCRCImageQuestion:
|
case EmailBusinessScenario.QCToCRCImageQuestion:
|
||||||
HangfireJobHelper.AddOrUpdateCronJob<IMediator>(jobId, t => t.Send(new QCImageQuestionRecurringEvent() { TrialId = trialId }, default), emailCron);
|
HangfireJobHelper.AddOrUpdateCronJob<IMediator>(jobId, t => t.Send(new QCImageQuestionRecurringEvent() { TrialId = trialId }, default), emailCron);
|
||||||
break;
|
break;
|
||||||
|
//加急阅片 10分钟
|
||||||
|
case EmailBusinessScenario.ExpeditedReading:
|
||||||
|
HangfireJobHelper.AddOrUpdateCronJob<IMediator>(jobId, t => t.Send(new UrgentIRUnReadTaskRecurringEvent() { TrialId = trialId }, default), emailCron);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
|
||||||
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.1.4" />
|
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.1.4" />
|
||||||
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.400.36" />
|
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.400.36" />
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
|
||||||
@@ -69,4 +70,8 @@
|
|||||||
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Service\MinimalApiService\CodeTemplate\FrontTemplate\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -549,23 +549,134 @@
|
|||||||
系统模板文档配置表
|
系统模板文档配置表
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.Common.DevelopService">
|
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
|
||||||
<summary>
|
<summary>
|
||||||
开始时候一些帮助 比如根据配置的字典生成枚举
|
数据字典-基础数据维护
|
||||||
</summary>
|
</summary>
|
||||||
<param name="_dictionaryRepository"></param>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||||
<summary>
|
<summary>
|
||||||
开始时候一些帮助 比如根据配置的字典生成枚举
|
数据字典-基础数据维护
|
||||||
</summary>
|
</summary>
|
||||||
<param name="_dictionaryRepository"></param>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.BackDicGenerateEnum(System.String)">
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
||||||
<summary>
|
<summary>
|
||||||
根据配置的字典名生成后端枚举
|
添加bool
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dicName"></param>
|
<param name="addOrEditBasic"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
|
||||||
|
<summary>
|
||||||
|
获取所有字典的Key
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
|
||||||
|
<summary>
|
||||||
|
添加字典 的同时 一起添加子项 --New
|
||||||
|
</summary>
|
||||||
|
<param name="addBasicDicAndChild"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
|
||||||
|
<summary>
|
||||||
|
New 查询条件
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
||||||
|
<summary>
|
||||||
|
添加和编辑
|
||||||
|
</summary>
|
||||||
|
<param name="addOrEditBasic"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取子项数组
|
||||||
|
</summary>
|
||||||
|
<param name="parentId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
|
||||||
|
<summary> 删除字典数据 </summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
|
||||||
|
<summary>
|
||||||
|
传递父亲 code 字符串 数组 返回多个下拉框数据
|
||||||
|
</summary>
|
||||||
|
<param name="searchArray"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据父亲Code 获取单个下拉框数据
|
||||||
|
</summary>
|
||||||
|
<param name="searchKey"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据父亲字典分组 获取子项
|
||||||
|
</summary>
|
||||||
|
<param name="searchKey"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准字典
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准字典
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准指定字典
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
|
||||||
|
<summary>
|
||||||
|
获取所有下拉框 枚举 bool 数据
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
获取是和否
|
||||||
|
</summary>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
|
||||||
|
<summary>
|
||||||
|
获取审核状态
|
||||||
|
</summary>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<param name="trial"></param>
|
||||||
|
<param name="childCode"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
|
||||||
|
<summary>
|
||||||
|
邮件事件消息列表
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
重新发布失败的事件消息
|
||||||
|
</summary>
|
||||||
|
<param name="eventId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser})">
|
||||||
@@ -781,31 +892,23 @@
|
|||||||
影像检查列表-患者为维度组织
|
影像检查列表-患者为维度组织
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
|
<param name="_patientRepository"></param>
|
||||||
|
<param name="_dictionaryService"></param>
|
||||||
|
<param name="_trialRepository"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSelfAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetEmailNoticeConfigList_Export(IRaCIS.Core.Application.Contracts.EmailNoticeConfigQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||||
<summary>
|
<summary>
|
||||||
自身一致性分析(仅做了resist1.1)
|
邮件导出
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
<param name="_commonDocumentRepository"></param>
|
<param name="_emailNoticeConfigrepository"></param>
|
||||||
<param name="_dictionaryService"></param>
|
<param name="_dictionaryService"></param>
|
||||||
<param name="_trialRepository"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetGroupAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
|
||||||
<summary>
|
|
||||||
组件一致性分析(仅做了resist1.1)
|
|
||||||
</summary>
|
|
||||||
<param name="inQuery"></param>
|
|
||||||
<param name="_commonDocumentRepository"></param>
|
|
||||||
<param name="_dictionaryService"></param>
|
|
||||||
<param name="_trialRepository"></param>
|
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
一致性分析结果导出 9 10 分别是自身 和组件一致性
|
一致性分析结果导出 7 8 分别是自身 和组件一致性
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
<param name="_commonDocumentRepository"></param>
|
<param name="_commonDocumentRepository"></param>
|
||||||
@@ -830,7 +933,7 @@
|
|||||||
<param name="_trialRepository"></param>
|
<param name="_trialRepository"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonJudgeRatioList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonJudgeRatioList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
裁判一致率导出
|
裁判一致率导出
|
||||||
</summary>
|
</summary>
|
||||||
@@ -841,136 +944,6 @@
|
|||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:System.Exception"></exception>
|
<exception cref="T:System.Exception"></exception>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
|
|
||||||
<summary>
|
|
||||||
数据字典-基础数据维护
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
|
||||||
<summary>
|
|
||||||
数据字典-基础数据维护
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
|
||||||
<summary>
|
|
||||||
添加bool
|
|
||||||
</summary>
|
|
||||||
<param name="addOrEditBasic"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
|
|
||||||
<summary>
|
|
||||||
获取所有字典的Key
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
|
|
||||||
<summary>
|
|
||||||
添加字典 的同时 一起添加子项 --New
|
|
||||||
</summary>
|
|
||||||
<param name="addBasicDicAndChild"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
|
|
||||||
<summary>
|
|
||||||
New 查询条件
|
|
||||||
</summary>
|
|
||||||
<param name="inQuery"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
|
||||||
<summary>
|
|
||||||
添加和编辑
|
|
||||||
</summary>
|
|
||||||
<param name="addOrEditBasic"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
获取子项数组
|
|
||||||
</summary>
|
|
||||||
<param name="parentId"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
|
|
||||||
<summary> 删除字典数据 </summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
|
|
||||||
<summary>
|
|
||||||
传递父亲 code 字符串 数组 返回多个下拉框数据
|
|
||||||
</summary>
|
|
||||||
<param name="searchArray"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
|
|
||||||
<summary>
|
|
||||||
根据父亲Code 获取单个下拉框数据
|
|
||||||
</summary>
|
|
||||||
<param name="searchKey"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
|
|
||||||
<summary>
|
|
||||||
根据父亲字典分组 获取子项
|
|
||||||
</summary>
|
|
||||||
<param name="searchKey"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准字典
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准字典
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准指定字典
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
|
|
||||||
<summary>
|
|
||||||
获取所有下拉框 枚举 bool 数据
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
获取是和否
|
|
||||||
</summary>
|
|
||||||
<param name="value"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
|
|
||||||
<summary>
|
|
||||||
获取审核状态
|
|
||||||
</summary>
|
|
||||||
<typeparam name="T"></typeparam>
|
|
||||||
<param name="trial"></param>
|
|
||||||
<param name="childCode"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
|
|
||||||
<summary>
|
|
||||||
邮件事件消息列表
|
|
||||||
</summary>
|
|
||||||
<param name="inQuery"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
重新发布失败的事件消息
|
|
||||||
</summary>
|
|
||||||
<param name="eventId"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
|
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
|
||||||
<summary>
|
<summary>
|
||||||
ExploreRecommendService
|
ExploreRecommendService
|
||||||
@@ -1166,13 +1139,20 @@
|
|||||||
<param name="indto"></param>
|
<param name="indto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DoctorService.UpdateGneralSituation(IRaCIS.Application.Contracts.UpdateGneralSituationDto)">
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.AddOrUpdateGneralSituation(IRaCIS.Application.Contracts.SummarizeInfoDto)">
|
||||||
<summary>
|
<summary>
|
||||||
修改概述
|
修改概述
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.DeleteSummarizeInfo(IRaCIS.Application.Contracts.DeleteSummarizeInfoInDto)">
|
||||||
|
<summary>
|
||||||
|
删除概述
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetSummarizeInfo(IRaCIS.Application.Contracts.GetSummarizeInfoInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetSummarizeInfo(IRaCIS.Application.Contracts.GetSummarizeInfoInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取概述
|
获取概述
|
||||||
@@ -1337,6 +1317,13 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.VacationService.GetIsVacation(IRaCIS.Application.Contracts.GetIsVacationInDto)">
|
||||||
|
<summary>
|
||||||
|
获取是否休假
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService">
|
<member name="T:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService">
|
||||||
<summary>
|
<summary>
|
||||||
TrialEmailNoticeConfigService
|
TrialEmailNoticeConfigService
|
||||||
@@ -2324,6 +2311,21 @@
|
|||||||
<param name="password"></param>
|
<param name="password"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GetDataBaseTableList(System.String,System.String)">
|
||||||
|
<summary>
|
||||||
|
获取数据库的表信息 以及字段信息
|
||||||
|
</summary>
|
||||||
|
<param name="tableName"></param>
|
||||||
|
<param name="comment"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GenerateEnumDefine(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据字典名 code 生成枚举定义
|
||||||
|
</summary>
|
||||||
|
<param name="code"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
||||||
<summary>
|
<summary>
|
||||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||||
@@ -2339,7 +2341,176 @@
|
|||||||
<param name="_hostEnvironment"></param>
|
<param name="_hostEnvironment"></param>
|
||||||
</member>
|
</member>
|
||||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo)" -->
|
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
|
||||||
|
<summary>
|
||||||
|
测试efcore json 列支持情况
|
||||||
|
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetAuthorizationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||||
|
<summary>
|
||||||
|
获取授权码明文信息
|
||||||
|
</summary>
|
||||||
|
<param name="authorizationCode"></param>
|
||||||
|
<param name="_hospitalOption"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetTrialActivationCode(IRaCIS.Core.Application.Service.TrialAuthorizationInfo,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption})">
|
||||||
|
<summary>
|
||||||
|
获取项目激活码
|
||||||
|
</summary>
|
||||||
|
<param name="_basicSystemConfigConfig"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.OAuthService.TestClientCredentialsAsync">
|
||||||
|
<summary>
|
||||||
|
测试客户端凭证代码
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Tokens">
|
||||||
|
<summary>
|
||||||
|
The token names used by Cookie and OpenID Connect middleware to store and retrieve tokens from
|
||||||
|
Logto OpenID Connect provider.
|
||||||
|
<br/>
|
||||||
|
See <see href="https://github.com/dotnet/aspnetcore/blob/4a9118c674a798aaf6379b4b7b2d8787bc688f96/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectHandler.cs#L994-L1035">tokens that are stored by OpenID Connect middleware</see> for more details.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes">
|
||||||
|
<summary>
|
||||||
|
The scope names used by Logto OpenID Connect provider to request for user information.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Email">
|
||||||
|
<summary>
|
||||||
|
The scope name for requesting user's email.
|
||||||
|
Logto will issue two claims to the ID token: <c>email</c> and <c>email_verified</c>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Phone">
|
||||||
|
<summary>
|
||||||
|
The scope name for requesting user's phone number.
|
||||||
|
Logto will issue two claims to the ID token: <c>phone</c> and <c>phone_verified</c>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.CustomData">
|
||||||
|
<summary>
|
||||||
|
The scope name for requesting user's custom data.
|
||||||
|
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>custom_data</c>.
|
||||||
|
<br/>
|
||||||
|
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Scopes.Identities">
|
||||||
|
<summary>
|
||||||
|
The scope name for requesting user's identities.
|
||||||
|
Logto will issue a claim to the response of the <c>userinfo</c> endpoint: <c>identities</c>.
|
||||||
|
<br/>
|
||||||
|
Note that when requesting this scope, you must set <see cref="!:LogtoOptions.GetClaimsFromUserInfoEndpoint"/> to <c>true</c>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims">
|
||||||
|
<summary>
|
||||||
|
The claim names used by Logto OpenID Connect provider for ID token and userinfo endpoint.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Issuer">
|
||||||
|
<summary>
|
||||||
|
The claim name for the issuer identifier for whom issued the token.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Subject">
|
||||||
|
<summary>
|
||||||
|
The claim name for the subject identifier for whom the token is intended (user ID).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Audience">
|
||||||
|
<summary>
|
||||||
|
The claim name for the audience that the token is intended for, which is the client ID.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Expiration">
|
||||||
|
<summary>
|
||||||
|
The claim name for the expiration time of the token (in seconds).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.IssuedAt">
|
||||||
|
<summary>
|
||||||
|
The claim name for the time at which the token was issued (in seconds).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Name">
|
||||||
|
<summary>
|
||||||
|
The claim name for the user's full name.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Username">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's username.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Picture">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's profile picture URL.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Email">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's email.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.EmailVerified">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's email verification status.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.PhoneNumber">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's phone number.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.PhoneNumberVerified">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's phone number verification status.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.CustomData">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's custom data.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Core.Application.Service.OAuth.LogtoParameters.Claims.Identities">
|
||||||
|
<summary>
|
||||||
|
The claim name for user's identities.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.AccessToken">
|
||||||
|
<summary>
|
||||||
|
The access token issued by the Logto authorization server.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.TokenType">
|
||||||
|
<summary>
|
||||||
|
The type of the token issued by the Logto authorization server.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.ExpiresIn">
|
||||||
|
<summary>
|
||||||
|
The lifetime in seconds of the access token.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.RefreshToken">
|
||||||
|
<summary>
|
||||||
|
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.OAuth.LogtoTokenResponse.IdToken">
|
||||||
|
<summary>
|
||||||
|
The ID token, which can be used to verify the identity of the user.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
|
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
|
||||||
<summary>
|
<summary>
|
||||||
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||||
@@ -5559,6 +5730,13 @@
|
|||||||
影像阅片临床数据签名
|
影像阅片临床数据签名
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingClinicalDataService.GetVisitClinicalDataName(IRaCIS.Core.Application.Service.Reading.Dto.GetVisitClinicalDataNameInDto)">
|
||||||
|
<summary>
|
||||||
|
获取访视临床数据名称
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingClinicalDataService.GetTrialClinicalDataSelect(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingClinicalDataService.GetTrialClinicalDataSelect(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取下拉菜单
|
获取下拉菜单
|
||||||
@@ -7112,6 +7290,11 @@
|
|||||||
上传时间
|
上传时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.GetVisitClinicalDataNameInDto">
|
||||||
|
<summary>
|
||||||
|
获取临床数据名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto.TrialId">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto.TrialId">
|
||||||
<summary>
|
<summary>
|
||||||
项目ID
|
项目ID
|
||||||
@@ -12733,8 +12916,12 @@
|
|||||||
暂时不用
|
暂时不用
|
||||||
<summary> 获取项目访视计划</summary>
|
<summary> 获取项目访视计划</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetVisitStageList(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetVisitStageList(IRaCIS.Application.Contracts.GetVisitStageListInDto)">
|
||||||
<summary> 根据项目Id,获取项目访视计划(不分页)[New]</summary>
|
<summary>
|
||||||
|
根据项目Id,获取项目访视计划
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetTrialVisitStageSelect(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.VisitPlanService.GetTrialVisitStageSelect(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -12889,10 +13076,12 @@
|
|||||||
参考处理链接: https://learn.microsoft.com/zh-cn/aspnet/core/fundamentals/error-handling?view=aspnetcore-8.0
|
参考处理链接: https://learn.microsoft.com/zh-cn/aspnet/core/fundamentals/error-handling?view=aspnetcore-8.0
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Filter.TrialResourceFilter">
|
<member name="M:IRaCIS.Core.Application.Helper.CacheKeys.UserLoginError(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
主要为了 处理项目结束 锁库,不允许操作
|
用户登录错误 限制登录
|
||||||
</summary>
|
</summary>
|
||||||
|
<param name="userName"></param>
|
||||||
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Helper.CacheKeys.SkipReadingCacheKey(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Helper.CacheKeys.SkipReadingCacheKey(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -15172,6 +15361,13 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.UseEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.UseEmialGetDoctorInfoInDto)">
|
||||||
|
<summary>
|
||||||
|
根据邮箱获取DoctorId 没有的话创建一个
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.VerifyEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.VerifyEmialGetDoctorInfoInDto)">
|
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.VerifyEmialGetDoctorInfo(IRaCIS.Core.Application.Contracts.VerifyEmialGetDoctorInfoInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
验证邮箱验证码 获取医生信息Id
|
验证邮箱验证码 获取医生信息Id
|
||||||
@@ -16731,6 +16927,35 @@
|
|||||||
<param name="trialConfig"></param>
|
<param name="trialConfig"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialBodyPartList(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取项目部位配置列表
|
||||||
|
</summary>
|
||||||
|
<param name="trialId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.TrialConfigService.AddOrUpdateTrialBodyPart(IRaCIS.Core.Application.Contracts.AddOrUpdateTrialBodyPartCommand)">
|
||||||
|
<summary>
|
||||||
|
添加更新 项目部位配置
|
||||||
|
</summary>
|
||||||
|
<param name="incommand"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialExtralConfig(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取项目额外配置
|
||||||
|
</summary>
|
||||||
|
<param name="trialId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialPacsConfigInfo(System.Guid,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemPacsConfig})">
|
||||||
|
<summary>
|
||||||
|
获取项目Pacs 配置
|
||||||
|
</summary>
|
||||||
|
<param name="trialId"></param>
|
||||||
|
<param name="optionsMonitor"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Triggers.ChallengeStateTrigger">
|
<member name="T:IRaCIS.Core.Application.Triggers.ChallengeStateTrigger">
|
||||||
<summary>
|
<summary>
|
||||||
访视 质疑状态 触发修改
|
访视 质疑状态 触发修改
|
||||||
@@ -17046,16 +17271,56 @@
|
|||||||
银行手机号
|
银行手机号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.Summarize">
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.DoctorId">
|
||||||
|
<summary>
|
||||||
|
医生Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.Summarize">
|
||||||
<summary>
|
<summary>
|
||||||
概述
|
概述
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.SummarizeEn">
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.SummarizeEn">
|
||||||
<summary>
|
<summary>
|
||||||
概述
|
概述
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.IsMain">
|
||||||
|
<summary>
|
||||||
|
是否是主模板
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.Indication">
|
||||||
|
<summary>
|
||||||
|
适应症
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.IndicationEn">
|
||||||
|
<summary>
|
||||||
|
适应症
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Application.Contracts.SummarizeInfoDto.TrialId">
|
||||||
|
<summary>
|
||||||
|
项目Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveSelf">
|
||||||
|
<summary>
|
||||||
|
保存自己
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveAndCover">
|
||||||
|
<summary>
|
||||||
|
保存并覆盖
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:IRaCIS.Application.Contracts.SaveSummarizeInfo.SaveAndAdd">
|
||||||
|
<summary>
|
||||||
|
保存并新增
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.WorkPartTime">
|
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.WorkPartTime">
|
||||||
<summary>
|
<summary>
|
||||||
工作兼职
|
工作兼职
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class UrgentMedicalReviewAddedEventConsumer(
|
|||||||
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }
|
||||||
}
|
}
|
||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ public class UrgentIRRepliedMedicalReviewConsumer(
|
|||||||
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "MedicalReviewDoctorUserIdea",EnumValue=medicalReview.DoctorUserIdeaEnum.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "MedicalReviewAuditState",EnumValue=medicalReview.AuditState.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -299,9 +299,9 @@ public class UrgentMIMRepliedMedicalReviewConsumer(
|
|||||||
DictionaryList = new List<DictionaryDto>()
|
DictionaryList = new List<DictionaryDto>()
|
||||||
{
|
{
|
||||||
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=taskInfo.ReadingCategory.GetEnumInt(), },
|
||||||
new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString(), },// 审核结论
|
new DictionaryDto (){DictionaryCode= "IsPass",EnumValue=medicalReview.IsHaveQuestion.ToString().ToLower(), },// 审核结论
|
||||||
new DictionaryDto (){DictionaryCode= "AuditAdvice",EnumValue=medicalReview.AuditAdviceEnum.GetEnumInt(), },// 审核建议
|
new DictionaryDto (){DictionaryCode= "AuditAdvice",EnumValue=medicalReview.AuditAdviceEnum.GetEnumInt(), },// 审核建议
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString(), }, //是否加急
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=taskInfo.IsUrgent.ToString().ToLower(), }, //是否加急
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ public class UserSiteSurveySubmitedEventConsumer(
|
|||||||
return (topicStr, htmlBodyStr);
|
return (topicStr, htmlBodyStr);
|
||||||
};
|
};
|
||||||
|
|
||||||
var scenario = _trialSiteSurveyRepository.Any(t => t.Id != trialSiteSurveyId && t.TrialId == siteSurveyInfo.TrialId && t.TrialSiteId == siteSurveyInfo.TrialSiteId) ?
|
var scenario = _trialSiteSurveyRepository.Where(t => t.Id != trialSiteSurveyId && t.TrialId == siteSurveyInfo.TrialId && t.TrialSiteId == siteSurveyInfo.TrialSiteId).IgnoreQueryFilters().Any() ?
|
||||||
EmailBusinessScenario.Approval_UpdateSiteSurvey : EmailBusinessScenario.Approval_SubmitSiteSurvey;
|
EmailBusinessScenario.Approval_UpdateSiteSurvey : EmailBusinessScenario.Approval_SubmitSiteSurvey;
|
||||||
|
|
||||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.Approval_SubmitSiteSurvey, messageToSend, emailConfigFunc);
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, scenario, messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ public class SiteSurveySPMSubmitedEventConsumer(
|
|||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
{
|
{
|
||||||
var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo);
|
||||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
toUserName,
|
toUserName,
|
||||||
siteInfo.TrialSiteCode,
|
siteInfo.TrialSiteCode,
|
||||||
@@ -274,7 +274,7 @@ public class SiteSurverRejectedEventConsumer(
|
|||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
{
|
{
|
||||||
var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo);
|
||||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
toUserName,
|
toUserName,
|
||||||
trialInfo.TrialCode,
|
trialInfo.TrialCode,
|
||||||
|
|||||||
@@ -73,12 +73,17 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
foreach (var userinfo in userinfoList)
|
|
||||||
{
|
|
||||||
var messageToSend = new MimeMessage();
|
var messageToSend = new MimeMessage();
|
||||||
//发件地址
|
//发件地址
|
||||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
|
||||||
|
|
||||||
|
foreach (var userinfo in userinfoList)
|
||||||
|
{
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
}
|
||||||
|
|
||||||
|
var userNames = userinfoList.Select(x => x.FullName).ToList();
|
||||||
|
|
||||||
foreach (var pm in pmandAPm)
|
foreach (var pm in pmandAPm)
|
||||||
{
|
{
|
||||||
@@ -95,7 +100,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||||||
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
userinfo.FullName, // 用户名 {0}
|
string.Join(',', userNames), // 用户名 {0}
|
||||||
trialInfo.ExperimentName, // 项目 {1}
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
subjectCode, // 受试者 {2}
|
subjectCode, // 受试者 {2}
|
||||||
subjectVisit.VisitName, // 访视 {3}
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
@@ -113,7 +118,7 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
|||||||
messageToSend, emailConfigFunc);
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +186,7 @@ public class CRCRepliedQCChallengeEventConsumer(
|
|||||||
IsEn_US = isEn_US,
|
IsEn_US = isEn_US,
|
||||||
DictionaryList = new List<DictionaryDto>()
|
DictionaryList = new List<DictionaryDto>()
|
||||||
{
|
{
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString().ToLower(), }, //是否关闭
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -234,7 +239,22 @@ public class QCRepliedQCChallengeEventConsumer(
|
|||||||
{
|
{
|
||||||
Console.WriteLine("发送(014,015) 【 QC回复 质控质疑,通知CRC】邮件!!!");
|
Console.WriteLine("发送(014,015) 【 QC回复 质控质疑,通知CRC】邮件!!!");
|
||||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId).Include(x => x.QCChallenge).FirstNotNullAsync();
|
|
||||||
|
string talkContent = string.Empty;
|
||||||
|
var isclose = false;
|
||||||
|
if (context.Message.QCChallengeDialogId != null)
|
||||||
|
{
|
||||||
|
var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId.Value).Include(x => x.QCChallenge).FirstNotNullAsync();
|
||||||
|
talkContent = qCChallengeDialog.TalkContent;
|
||||||
|
isclose = qCChallengeDialog.QCChallenge.IsClosed;
|
||||||
|
}
|
||||||
|
else if(context.Message.QCChallengeId != null)
|
||||||
|
{
|
||||||
|
var qCChallenge = await _qCChallengeRepository.Where(x => x.Id == context.Message.QCChallengeId.Value).FirstNotNullAsync();
|
||||||
|
talkContent = qCChallenge.Content;
|
||||||
|
isclose = qCChallenge.IsClosed;
|
||||||
|
}
|
||||||
|
|
||||||
var subjectVisitId = context.Message.SubjectVisitId;
|
var subjectVisitId = context.Message.SubjectVisitId;
|
||||||
|
|
||||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
|
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
|
||||||
@@ -257,7 +277,7 @@ public class QCRepliedQCChallengeEventConsumer(
|
|||||||
IsEn_US = isEn_US,
|
IsEn_US = isEn_US,
|
||||||
DictionaryList = new List<DictionaryDto>()
|
DictionaryList = new List<DictionaryDto>()
|
||||||
{
|
{
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=isclose.ToString().ToLower(), }, //是否关闭
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -285,12 +305,12 @@ public class QCRepliedQCChallengeEventConsumer(
|
|||||||
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
userinfo.FullName, // 用户名 {0}
|
||||||
trialInfo.ExperimentName, // 项目 {1}
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
userinfo.FullName, // 用户名 {1}
|
|
||||||
subjectCode, // 受试者 {2}
|
subjectCode, // 受试者 {2}
|
||||||
subjectVisit.VisitName, // 访视 {3}
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
dictionValue[0], // 质疑是否关闭 {4}
|
dictionValue[0], // 质疑是否关闭 {4}
|
||||||
qCChallengeDialog.TalkContent, // 质疑内容 {5}
|
talkContent, // 质疑内容 {5}
|
||||||
_systemEmailConfig.SiteUrl // 链接 {65}
|
_systemEmailConfig.SiteUrl // 链接 {65}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -376,8 +396,8 @@ public class CRCRepliedCheckChallengeEventConsumer(
|
|||||||
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
trialInfo.ExperimentName, // 项目 {1}
|
userinfo.FullName, // 用户名 {0}
|
||||||
userinfo.FullName, // 用户名 {1}
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
subjectCode, // 受试者 {2}
|
subjectCode, // 受试者 {2}
|
||||||
subjectVisit.VisitName, // 访视 {3}
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
dictionValue[0], // 核查状态 {4}
|
dictionValue[0], // 核查状态 {4}
|
||||||
@@ -424,7 +444,7 @@ public class PMRepliedCheckChallengeEventConsumer(
|
|||||||
var checkChallengeDialog = await _checkChallengeDialogRepository.Where(x => x.Id == context.Message.CheckChallengeDialogId).FirstNotNullAsync();
|
var checkChallengeDialog = await _checkChallengeDialogRepository.Where(x => x.Id == context.Message.CheckChallengeDialogId).FirstNotNullAsync();
|
||||||
var subjectVisitId = context.Message.SubjectVisitId;
|
var subjectVisitId = context.Message.SubjectVisitId;
|
||||||
|
|
||||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
|
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.NoneDicomStudyList).Include(x => x.StudyList).Include(x => x.Subject).FirstNotNullAsync();
|
||||||
|
|
||||||
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
||||||
|
|
||||||
@@ -434,24 +454,12 @@ public class PMRepliedCheckChallengeEventConsumer(
|
|||||||
|
|
||||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
string json = checkChallengeDialog.ParamInfo;
|
|
||||||
List<string> modalities = new List<string>();
|
List<string> modalities = new List<string>();
|
||||||
if (json.IsNotNullOrEmpty())
|
modalities =subjectVisit.NoneDicomStudyList.Select(t => t.Modality)
|
||||||
{
|
.Union(subjectVisit.StudyList.Select(k => k.ModalityForEdit)).ToList();
|
||||||
List<Dictionary<string, string>> studies = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json);
|
|
||||||
foreach (var study in studies)
|
|
||||||
{
|
|
||||||
if (study.ContainsKey("Modality"))
|
|
||||||
{
|
|
||||||
modalities.Add(study["Modality"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
modalities = modalities.Distinct().ToList();
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
|
||||||
|
|
||||||
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
|
||||||
{
|
{
|
||||||
|
|
||||||
DictionaryRepository = _dictionaryRepository,
|
DictionaryRepository = _dictionaryRepository,
|
||||||
@@ -697,7 +705,7 @@ public class QCClaimTaskEventConsumer(
|
|||||||
|
|
||||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
|
|
||||||
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQCClaim : EmailBusinessScenario.EligibilityVerification_PendingClaim,
|
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQC : EmailBusinessScenario.EligibilityVerification_PendingImageQC,
|
||||||
|
|
||||||
messageToSend, emailConfigFunc);
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using IRaCIS.Application.Contracts;
|
using DocumentFormat.OpenXml;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||||
@@ -43,7 +44,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||||||
IsEn_US = isEn_US,
|
IsEn_US = isEn_US,
|
||||||
DictionaryList = new List<DictionaryDto>()
|
DictionaryList = new List<DictionaryDto>()
|
||||||
{
|
{
|
||||||
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue="1" }
|
new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue="true" }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -66,16 +67,16 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||||||
foreach (var trialUser in trialUserList)
|
foreach (var trialUser in trialUserList)
|
||||||
{
|
{
|
||||||
|
|
||||||
var userId=trialUser.UserId;
|
var userId = trialUser.UserId;
|
||||||
|
|
||||||
var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == userId))
|
var doctorCriterionList = await _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.TrialId == trialId && t.Trial.TrialUserList.Any(t => t.UserId == userId))
|
||||||
.Select(c => new
|
.Select(c => new
|
||||||
{
|
{
|
||||||
|
|
||||||
TrialReadingCriterionId = c.Id,
|
TrialReadingCriterionId = c.Id,
|
||||||
CriterionName=c.CriterionName,
|
CriterionName = c.CriterionName,
|
||||||
|
|
||||||
UnReadList = c.VisitTaskList
|
UnReadList = c.VisitTaskList.Where(t => t.ExpetidEmailNoticeTime == null) //没有被通知
|
||||||
.Where(t => t.DoctorUserId == userId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
.Where(t => t.DoctorUserId == userId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||||
// 前序 不存在 未一致性核查未通过的
|
// 前序 不存在 未一致性核查未通过的
|
||||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||||
@@ -84,69 +85,84 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||||||
|
|
||||||
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
||||||
|
|
||||||
.Where(t=> t.SourceSubjectVisit.PDState==PDStateEnum.PDProgress || t.SourceSubjectVisit.IsEnrollmentConfirm ||
|
.Where(t => t.SourceSubjectVisit.PDState == PDStateEnum.PDProgress || t.SourceSubjectVisit.IsEnrollmentConfirm ||
|
||||||
t.ReadModule.SubjectVisit.PDState == PDStateEnum.PDProgress || t.ReadModule.SubjectVisit.IsEnrollmentConfirm)
|
t.ReadModule.SubjectVisit.PDState == PDStateEnum.PDProgress || t.ReadModule.SubjectVisit.IsEnrollmentConfirm)
|
||||||
.Select(c=>new
|
.Select(c => new
|
||||||
{
|
{
|
||||||
SubejctCode= c.IsAnalysisCreate? c.BlindSubjectCode: c.Subject.Code,
|
SubejctCode = c.IsAnalysisCreate ? c.BlindSubjectCode : c.Subject.Code,
|
||||||
c.TaskBlindName,
|
c.TaskBlindName,
|
||||||
c.TaskName
|
c.TaskName,
|
||||||
|
VisitTaskId = c.Id
|
||||||
}).ToList()
|
}).ToList()
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var toTalUnreadCount= doctorCriterionList.SelectMany(t=>t.UnReadList).Count();
|
var toTalUnreadCount = doctorCriterionList.SelectMany(t => t.UnReadList).Count();
|
||||||
|
|
||||||
|
if (toTalUnreadCount > 0)
|
||||||
var messageToSend = new MimeMessage();
|
|
||||||
|
|
||||||
//发件地址
|
|
||||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
|
||||||
messageToSend.To.Add(new MailboxAddress(trialUser.FullName, trialUser.EMail));
|
|
||||||
|
|
||||||
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
|
||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
|
||||||
{
|
{
|
||||||
var topicStr = string.Format(input.topicStr, trialUser.ResearchProgramNo);
|
var messageToSend = new MimeMessage();
|
||||||
|
|
||||||
var template = input.htmlBodyStr;
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
messageToSend.To.Add(new MailboxAddress(trialUser.FullName, trialUser.EMail));
|
||||||
|
|
||||||
//正则提取循环的部分 {%for%}(.*?){%end for%}
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
string pattern = @"{%for%}(.*?){%end for%}";
|
|
||||||
var match = Regex.Match(template, pattern, RegexOptions.Singleline);
|
|
||||||
|
|
||||||
string criteriaTemplate = match.Groups[1].Value; // 提取循环模板
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
|
||||||
// 构建循环内容
|
|
||||||
string criteriaDetails = "";
|
|
||||||
foreach (var criteria in doctorCriterionList)
|
|
||||||
{
|
{
|
||||||
criteriaDetails += string.Format(criteriaTemplate, criteria.CriterionName, criteria.UnReadList.Select(t=>t.SubejctCode).Distinct().Count(), criteria.UnReadList.Count());
|
var topicStr = string.Format(input.topicStr, trialUser.ResearchProgramNo);
|
||||||
}
|
|
||||||
|
|
||||||
// 用循环内容替换原始模板中的循环部分
|
var template = input.htmlBodyStr;
|
||||||
string emailContent = Regex.Replace(template, pattern, criteriaDetails);
|
|
||||||
|
//正则提取循环的部分 {%for%}(.*?){%end for%}
|
||||||
|
string pattern = @"{%for%}(.*?){%end for%}";
|
||||||
|
var match = Regex.Match(template, pattern, RegexOptions.Singleline);
|
||||||
|
|
||||||
|
string criteriaTemplate = match.Groups[1].Value; // 提取循环模板
|
||||||
|
|
||||||
|
// 构建循环内容
|
||||||
|
string criteriaDetails = "";
|
||||||
|
foreach (var criteria in doctorCriterionList)
|
||||||
|
{
|
||||||
|
if (criteria.UnReadList.Count() > 0)
|
||||||
|
{
|
||||||
|
criteriaDetails += string.Format(criteriaTemplate, criteria.CriterionName, criteria.UnReadList.Select(t => t.SubejctCode).Distinct().Count(), criteria.UnReadList.Count());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用循环内容替换原始模板中的循环部分
|
||||||
|
string emailContent = template.Replace(criteriaTemplate, criteriaDetails).Replace("{%for%}", "").Replace("{%end for%}", "");
|
||||||
|
|
||||||
|
|
||||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
|
||||||
trialUser.FullName,
|
|
||||||
|
|
||||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, emailContent),
|
||||||
toTalUnreadCount,
|
trialUser.FullName,
|
||||||
|
|
||||||
trialUser.ResearchProgramNo,
|
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
dictionValue[0],
|
toTalUnreadCount,
|
||||||
_systemEmailConfig.SiteUrl
|
|
||||||
);
|
|
||||||
|
|
||||||
return (topicStr, htmlBodyStr);
|
trialUser.ResearchProgramNo,
|
||||||
};
|
dictionValue[0],
|
||||||
|
_systemEmailConfig.SiteUrl
|
||||||
|
);
|
||||||
|
|
||||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.ExpeditedReading, messageToSend, emailConfigFunc);
|
return (topicStr, htmlBodyStr);
|
||||||
|
};
|
||||||
|
|
||||||
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository, EmailBusinessScenario.ExpeditedReading, messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
|
|
||||||
|
//处理标记已通知的任务
|
||||||
|
|
||||||
|
var visitTaskIdList = doctorCriterionList.Where(t => t.UnReadList.Count() > 0).SelectMany(t => t.UnReadList.Select(u => u.VisitTaskId)).ToList();
|
||||||
|
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => visitTaskIdList.Contains(t.Id), u => new VisitTask() { ExpetidEmailNoticeTime = DateTime.Now });
|
||||||
|
}
|
||||||
|
|
||||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
||||||
|
|
||||||
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum==lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
if (existGlobal == null)
|
if (existGlobal == null)
|
||||||
@@ -469,7 +469,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var lastTask = (subjectAddTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
var lastTask = (subjectAddTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
||||||
|
|
||||||
|
|
||||||
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskGroupSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum == lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskGroupSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
if (existGlobal == null)
|
if (existGlobal == null)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(queryCommonDocument.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
|
.WhereIf(queryCommonDocument.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
|
||||||
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
|
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
|
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name) || t.NameCN.Contains(queryCommonDocument.Name))
|
||||||
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||||
|
|
||||||
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
|
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
// 生成时间 2022-02-15 11:55:57
|
// 生成时间 2022-02-15 11:55:57
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
public class TrialSelectEmailNoticeConfigView : EmailNoticeConfigView
|
public class TrialSelectEmailNoticeConfigView : EmailNoticeConfigView
|
||||||
@@ -62,7 +64,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public bool? IsDistinguishCriteria { get; set; }
|
public bool? IsDistinguishCriteria { get; set; }
|
||||||
|
|
||||||
public SysEmailLevel? SystemLevel { get; set; }
|
public SysEmailLevel? SystemLevel { get; set; }
|
||||||
public int? BusinessModuleEnum { get; set; }
|
public BusinessModule? BusinessModuleEnum { get; set; }
|
||||||
|
|
||||||
|
public int? EmailUrgentEnum { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? ToUserType { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? CopyUserType { get; set; }
|
||||||
|
|
||||||
|
public BusinessLevel? BusinessLevelEnum { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,8 +143,41 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class EmailNoticeConfigExportDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public string Code { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
[DictionaryTranslate("Email_BusinessScenario")]
|
||||||
|
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[DictionaryTranslate("YesOrNo")]
|
||||||
|
public bool IsDistinguishCriteria { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[DictionaryTranslate("CriterionType")]
|
||||||
|
public CriterionType? CriterionTypeEnum { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslate("BusinessModule")]
|
||||||
|
public int BusinessModuleEnum { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslate("BusinessLevel")]
|
||||||
|
public int BusinessLevelEnum { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslate("EmailUrgent")]
|
||||||
|
public int EmailUrgentEnum { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public string EmailTopic { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string EmailTopicCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.Common
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 开始时候一些帮助 比如根据配置的字典生成枚举
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="_dictionaryRepository"></param>
|
|
||||||
[ApiExplorerSettings(GroupName = "Common")]
|
|
||||||
public class DevelopService(IRepository<Dictionary> _dictionaryRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 根据配置的字典名生成后端枚举
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dicName"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> BackDicGenerateEnum(string dicName)
|
|
||||||
{
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,37 +26,6 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
|
||||||
{
|
{
|
||||||
|
|
||||||
public async Task<IResponseOutput> GenerateEnumDefine(string code)
|
|
||||||
{
|
|
||||||
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
|
|
||||||
// StringBuilder 用于构建枚举代码字符串
|
|
||||||
var enumCode = new StringBuilder();
|
|
||||||
|
|
||||||
// 生成枚举定义
|
|
||||||
enumCode.AppendLine($"public enum {code}");
|
|
||||||
enumCode.AppendLine("{");
|
|
||||||
|
|
||||||
foreach (var item in searchList)
|
|
||||||
{
|
|
||||||
// 添加 XML 注释作为枚举描述
|
|
||||||
enumCode.AppendLine($" /// <summary>");
|
|
||||||
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
|
|
||||||
enumCode.AppendLine($" /// </summary>");
|
|
||||||
// 每个枚举值生成
|
|
||||||
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
enumCode.AppendLine("}");
|
|
||||||
|
|
||||||
// 返回生成的枚举代码
|
|
||||||
var enumStr = enumCode.ToString();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(enumStr);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加bool
|
/// 添加bool
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -25,10 +25,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
|
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
|
||||||
.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
||||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||||
|
.WhereIf(inQuery.BusinessLevelEnum != null, t => t.BusinessLevelEnum == inQuery.BusinessLevelEnum)
|
||||||
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
|
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
|
||||||
|
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||||
|
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||||
|
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||||
|
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||||
.ProjectTo<EmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
.ProjectTo<EmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||||
@@ -39,9 +44,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
{
|
{
|
||||||
var verifyExp1 = new EntityVerifyExp<EmailNoticeConfig>()
|
var verifyExp1 = new EntityVerifyExp<EmailNoticeConfig>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.BusinessScenarioEnum == addOrEditEmailNoticeConfig.BusinessScenarioEnum,
|
VerifyExp = t => t.BusinessScenarioEnum == addOrEditEmailNoticeConfig.BusinessScenarioEnum && t.CriterionTypeEnum== addOrEditEmailNoticeConfig.CriterionTypeEnum,
|
||||||
|
|
||||||
VerifyMsg = _localizer["EmailNoticeConfig_RepeatEmailScenario"]
|
VerifyMsg = _localizer["EmailNoticeConfig_RepeatEmailScenario"]
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 匹配所有占位符的正则表达式,允许包含空格的占位符
|
// 匹配所有占位符的正则表达式,允许包含空格的占位符
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>()
|
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>()
|
||||||
.ForMember(t => t.EmailNoticeUserList, u => u.MapFrom(c => c.EmailNoticeUserTypeList));
|
.ForMember(t => t.EmailNoticeUserList, u => u.MapFrom(c => c.EmailNoticeUserTypeList));
|
||||||
|
|
||||||
|
CreateMap<EmailNoticeConfig, EmailNoticeConfigExportDto>();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<Dictionary, DicView>()
|
CreateMap<Dictionary, DicView>()
|
||||||
.ForMember(t => t.ParentCode, u => u.MapFrom(c => c.Parent.Code));
|
.ForMember(t => t.ParentCode, u => u.MapFrom(c => c.Parent.Code));
|
||||||
CreateMap<SystemBasicData, SystemBasicDataView>();
|
CreateMap<SystemBasicData, SystemBasicDataView>();
|
||||||
@@ -73,6 +76,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
|
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
|
CreateMap<InternationalizationAddOrEdit, IRCGlobalInfoDTO>();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<Internationalization, BatchInternationalizationDto>().ReverseMap();
|
CreateMap<Internationalization, BatchInternationalizationDto>().ReverseMap();
|
||||||
|
|
||||||
CreateMap<Internationalization, IRCGlobalInfoDTO>();
|
CreateMap<Internationalization, IRCGlobalInfoDTO>();
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string DepartmentOtherCN { get; set; } = String.Empty;
|
public string DepartmentOtherCN { get; set; } = String.Empty;
|
||||||
|
|
||||||
//增加的
|
//增加的
|
||||||
public Guid? SpecialityId { get; set; } = Guid.Empty;
|
public Guid? SpecialityId { get; set; }
|
||||||
public string SpecialityOther { get; set; } = string.Empty;
|
public string SpecialityOther { get; set; } = string.Empty;
|
||||||
public string SpecialityOtherCN { get; set; } = string.Empty;
|
public string SpecialityOtherCN { get; set; } = string.Empty;
|
||||||
public string Speciality { get; set; } = string.Empty;
|
public string Speciality { get; set; } = string.Empty;
|
||||||
@@ -174,6 +174,8 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public class SelectionReviewerDTO : DoctorDTO
|
public class SelectionReviewerDTO : DoctorDTO
|
||||||
{
|
{
|
||||||
public int DoctorTrialState { get; set; }
|
public int DoctorTrialState { get; set; }
|
||||||
|
|
||||||
|
public bool IsEnroll { get; set; } = false;
|
||||||
public string OptUserName { get; set; } = string.Empty;
|
public string OptUserName { get; set; } = string.Empty;
|
||||||
public DateTime? OptTime { get; set; }
|
public DateTime? OptTime { get; set; }
|
||||||
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
@@ -209,7 +211,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string BlindName { get; set; }
|
public string BlindName { get; set; }
|
||||||
public string BlindNameCN { get; set; } = string.Empty;
|
public string BlindNameCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid? SpecialityId { get; set; } = Guid.Empty;
|
public Guid? SpecialityId { get; set; }
|
||||||
|
|
||||||
public string SpecialityCN { get; set; } = string.Empty;
|
public string SpecialityCN { get; set; } = string.Empty;
|
||||||
public string Speciality { get; set; } = string.Empty;
|
public string Speciality { get; set; } = string.Empty;
|
||||||
@@ -308,6 +310,8 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string WeChat { get; set; } = String.Empty;
|
public string WeChat { get; set; } = String.Empty;
|
||||||
public int Nation { get; set; }
|
public int Nation { get; set; }
|
||||||
|
|
||||||
|
public string? BlindPublications { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工作兼职
|
/// 工作兼职
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -324,7 +328,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
public class SendEmailInDto
|
public class SendEmailInDto
|
||||||
{
|
{
|
||||||
public string Email { get; set; }
|
public List<string> Email { get; set; }
|
||||||
|
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
}
|
}
|
||||||
@@ -361,18 +365,26 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class DeleteSummarizeInfoInDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
}
|
||||||
public class GetSummarizeInfoInDto
|
public class GetSummarizeInfoInDto
|
||||||
{
|
{
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
|
|
||||||
public Guid? TrialId { get; set; }
|
public Guid? TrialId { get; set; } = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UpdateGneralSituationDto
|
public class SummarizeInfoDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public Guid? TrialId { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 医生Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid DoctorId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 概述
|
/// 概述
|
||||||
@@ -383,24 +395,70 @@ namespace IRaCIS.Application.Contracts
|
|||||||
/// 概述
|
/// 概述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SummarizeEn { get; set; } = string.Empty;
|
public string SummarizeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是主模板
|
||||||
|
/// </summary>
|
||||||
|
public bool IsMain { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适应症
|
||||||
|
/// </summary>
|
||||||
|
public string Indication { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适应症
|
||||||
|
/// </summary>
|
||||||
|
public string IndicationEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
|
public SaveSummarizeInfo SaveSummarizeInfoType { get; set; } = SaveSummarizeInfo.SaveSelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SaveSummarizeInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 保存自己
|
||||||
|
/// </summary>
|
||||||
|
SaveSelf = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存并覆盖
|
||||||
|
/// </summary>
|
||||||
|
SaveAndCover = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存并新增
|
||||||
|
/// </summary>
|
||||||
|
SaveAndAdd = 2,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateGneralSituationDto
|
||||||
|
{
|
||||||
|
public List<SummarizeInfoDto> SummarizeList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
|
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
|
||||||
{
|
{
|
||||||
//部门
|
//部门
|
||||||
public Guid? DepartmentId { get; set; } = Guid.Empty;
|
public Guid? DepartmentId { get; set; }
|
||||||
public string DepartmentOther { get; set; } = string.Empty;
|
public string DepartmentOther { get; set; } = string.Empty;
|
||||||
public string DepartmentOtherCN { get; set; } = string.Empty;
|
public string DepartmentOtherCN { get; set; } = string.Empty;
|
||||||
//职称
|
//职称
|
||||||
public Guid? RankId { get; set; } = Guid.Empty;
|
public Guid? RankId { get; set; }
|
||||||
public string RankOther { get; set; } = string.Empty;
|
public string RankOther { get; set; } = string.Empty;
|
||||||
public string RankOtherCN { get; set; } = string.Empty;
|
public string RankOtherCN { get; set; } = string.Empty;
|
||||||
//职位 主席 副主席
|
//职位 主席 副主席
|
||||||
public Guid? PositionId { get; set; } = Guid.Empty;
|
public Guid? PositionId { get; set; }
|
||||||
public string PositionOther { get; set; } = string.Empty;
|
public string PositionOther { get; set; } = string.Empty;
|
||||||
public string PositionOtherCN { get; set; } = string.Empty;
|
public string PositionOtherCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid? HospitalId { get; set; } = Guid.Empty;
|
public Guid? HospitalId { get; set; }
|
||||||
|
|
||||||
public Guid? PhysicianId { get; set; }
|
public Guid? PhysicianId { get; set; }
|
||||||
public string Physician { get; set; } = string.Empty;
|
public string Physician { get; set; } = string.Empty;
|
||||||
@@ -580,19 +638,19 @@ namespace IRaCIS.Application.Contracts
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
//部门
|
//部门
|
||||||
public Guid? DepartmentId { get; set; } = Guid.Empty;
|
public Guid? DepartmentId { get; set; }
|
||||||
public string DepartmentOther { get; set; } = string.Empty;
|
public string DepartmentOther { get; set; } = string.Empty;
|
||||||
public string DepartmentOtherCN { get; set; } = string.Empty;
|
public string DepartmentOtherCN { get; set; } = string.Empty;
|
||||||
//职称
|
//职称
|
||||||
public Guid? RankId { get; set; } = Guid.Empty;
|
public Guid? RankId { get; set; } = null;
|
||||||
public string RankOther { get; set; } = string.Empty;
|
public string RankOther { get; set; } = string.Empty;
|
||||||
public string RankOtherCN { get; set; } = string.Empty;
|
public string RankOtherCN { get; set; } = string.Empty;
|
||||||
//职位 主席 副主席
|
//职位 主席 副主席
|
||||||
public Guid? PositionId { get; set; } = Guid.Empty;
|
public Guid? PositionId { get; set; }
|
||||||
public string PositionOther { get; set; } = string.Empty;
|
public string PositionOther { get; set; } = string.Empty;
|
||||||
public string PositionOtherCN { get; set; } = string.Empty;
|
public string PositionOtherCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid? HospitalId { get; set; } = Guid.Empty;
|
public Guid? HospitalId { get; set; }
|
||||||
|
|
||||||
public Guid? PhysicianId { get; set; }
|
public Guid? PhysicianId { get; set; }
|
||||||
public string Physician { get; set; } = string.Empty;
|
public string Physician { get; set; } = string.Empty;
|
||||||
@@ -735,7 +793,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string SubspecialityOther { get; set; } = string.Empty;
|
public string SubspecialityOther { get; set; } = string.Empty;
|
||||||
public string SubspecialityOtherCN { get; set; } = string.Empty;
|
public string SubspecialityOtherCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid? SpecialityId { get; set; } = Guid.Empty;
|
public Guid? SpecialityId { get; set; }
|
||||||
public string SpecialityCN { get; set; } = string.Empty;
|
public string SpecialityCN { get; set; } = string.Empty;
|
||||||
public string SpecialityOther { get; set; } = string.Empty;
|
public string SpecialityOther { get; set; } = string.Empty;
|
||||||
public string SpecialityOtherCN { get; set; } = string.Empty;
|
public string SpecialityOtherCN { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
{
|
{
|
||||||
public DateTime? CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
|
public string BeginDateStr => BeginDate?.ToString("yyyy/MM");
|
||||||
public string EndDateStr => EndDate?.ToString("yyyy-MM");
|
public string EndDateStr => EndDate?.ToString("yyyy/MM");
|
||||||
|
|
||||||
}
|
}
|
||||||
public class PostgraduateCommand
|
public class PostgraduateCommand
|
||||||
@@ -81,9 +81,9 @@
|
|||||||
{
|
{
|
||||||
public DateTime? CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
|
public string BeginDateStr => BeginDate?.ToString("yyyy/MM");
|
||||||
|
|
||||||
public string EndDateStr => EndDate?.ToString("yyyy-MM");
|
public string EndDateStr => EndDate?.ToString("yyyy/MM");
|
||||||
}
|
}
|
||||||
public class DoctorEducationExperienceDTO
|
public class DoctorEducationExperienceDTO
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,4 +8,15 @@
|
|||||||
public DateTime EndDate { get; set; }
|
public DateTime EndDate { get; set; }
|
||||||
public int Status { get; set; } = 1;
|
public int Status { get; set; } = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetIsVacationInDto
|
||||||
|
{
|
||||||
|
public Guid DoctorId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetIsVacationOutDto
|
||||||
|
{
|
||||||
|
public bool IsVacation { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
var query = _doctorRepository.AsQueryable()
|
var query = _doctorRepository.AsQueryable()
|
||||||
|
.Where(x=>x.TrialId==null)
|
||||||
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
|
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
|
||||||
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
|
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
|
||||||
.WhereIf(inQuery.HospitalId != null, t => t.HospitalId == inQuery.HospitalId)
|
.WhereIf(inQuery.HospitalId != null, t => t.HospitalId == inQuery.HospitalId)
|
||||||
@@ -76,6 +77,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var guidList = inQuery.ReadingTypeIdList.Concat(inQuery.SubspecialityIdList).Concat(inQuery.TitleIdList);
|
var guidList = inQuery.ReadingTypeIdList.Concat(inQuery.SubspecialityIdList).Concat(inQuery.TitleIdList);
|
||||||
|
|
||||||
var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/
|
var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/
|
||||||
|
.Where(x=>x.TrialId==null)
|
||||||
|
|
||||||
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
|
.WhereIf(inQuery.DepartmentId != null, t => t.DepartmentId == inQuery.DepartmentId)
|
||||||
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
|
.WhereIf(inQuery.SpecialityId != null, t => t.SpecialityId == inQuery.SpecialityId)
|
||||||
@@ -102,6 +104,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var doctorStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus == EnrollStatus.HasApplyDownloadResume)
|
var doctorStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus == EnrollStatus.HasApplyDownloadResume)
|
||||||
.ProjectTo<DoctorStateModelDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<DoctorStateModelDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
var doctorEnrollList =await _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup)
|
||||||
|
.ToListAsync();
|
||||||
result.CurrentPageData.ToList().ForEach(doctor =>
|
result.CurrentPageData.ToList().ForEach(doctor =>
|
||||||
{
|
{
|
||||||
//简历申请列表 --处理已经申请的
|
//简历申请列表 --处理已经申请的
|
||||||
@@ -109,6 +113,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
if (doctorState != null)
|
if (doctorState != null)
|
||||||
{
|
{
|
||||||
doctor.DoctorTrialState = (int)EnrollStatus.HasApplyDownloadResume;
|
doctor.DoctorTrialState = (int)EnrollStatus.HasApplyDownloadResume;
|
||||||
|
doctor.IsEnroll = doctorEnrollList.Any(x => x.DoctorId == doctor.Id);
|
||||||
doctor.OptTime = doctorState.OptTime;
|
doctor.OptTime = doctorState.OptTime;
|
||||||
doctor.OptUserName = doctorState.OptUserName;
|
doctor.OptUserName = doctorState.OptUserName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using IRaCIS.Application.Contracts;
|
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using MimeKit;
|
using MimeKit;
|
||||||
@@ -13,7 +15,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[ApiExplorerSettings(GroupName = "Reviewer")]
|
[ApiExplorerSettings(GroupName = "Reviewer")]
|
||||||
public class DoctorService(IRepository<Doctor> _doctorRepository,
|
public class DoctorService(IRepository<Doctor> _doctorRepository,
|
||||||
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
||||||
|
IRepository<DoctorSummarize> _doctorSummarizeRepository,
|
||||||
IRepository<Enroll> _enrollRepository,
|
IRepository<Enroll> _enrollRepository,
|
||||||
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
IRepository<Attachment> _attachmentRepository,
|
IRepository<Attachment> _attachmentRepository,
|
||||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||||
IRepository<DoctorCriterionFile> _doctorCriterionFileRepository,
|
IRepository<DoctorCriterionFile> _doctorCriterionFileRepository,
|
||||||
@@ -69,6 +73,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
//插入中间表
|
//插入中间表
|
||||||
basicInfoModel.TitleIds.ForEach(titleId => doctor.DoctorDicRelationList.Add(new DoctorDictionary() { DoctorId = doctor.Id, KeyName = StaticData.Title, DictionaryId = titleId }));
|
basicInfoModel.TitleIds.ForEach(titleId => doctor.DoctorDicRelationList.Add(new DoctorDictionary() { DoctorId = doctor.Id, KeyName = StaticData.Title, DictionaryId = titleId }));
|
||||||
|
|
||||||
|
// 新增给默认值
|
||||||
|
doctor.CooperateStatus = ContractorStatusEnum.Noncooperation;
|
||||||
|
doctor.ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse;
|
||||||
|
doctor.AcceptingNewTrial = false;
|
||||||
|
doctor.ActivelyReading = false;
|
||||||
|
doctor.IsVirtual = false;
|
||||||
|
|
||||||
|
|
||||||
await _doctorRepository.AddAsync(doctor);
|
await _doctorRepository.AddAsync(doctor);
|
||||||
//_doctorRepository.Add(doctor);
|
//_doctorRepository.Add(doctor);
|
||||||
@@ -218,41 +229,120 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<bool> UpdateGneralSituation(UpdateGneralSituationDto inDto)
|
public async Task<DoctorSummarize> AddOrUpdateGneralSituation(SummarizeInfoDto inDto)
|
||||||
{
|
{
|
||||||
if (inDto.TrialId != null)
|
if (inDto.TrialId != null&&inDto.Id==null)
|
||||||
{
|
{
|
||||||
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.DoctorId == inDto.Id&&x.TrialId==inDto.TrialId.Value, x => new Doctor()
|
var systemCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == null).CountAsync();
|
||||||
|
if (systemCount == 0)
|
||||||
{
|
{
|
||||||
Summarize = inDto.Summarize,
|
var trialinfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).FirstNotNullAsync();
|
||||||
SummarizeEn = inDto.SummarizeEn,
|
var dictionery = await _dictionaryRepository.Where(x => x.Parent.Code == "Indication" && x.Code == trialinfo.IndicationEnum.ToString()).FirstNotNullAsync();
|
||||||
});
|
inDto.IndicationEn = dictionery.Value;
|
||||||
|
inDto.Indication = dictionery.ValueCN;
|
||||||
|
var system= inDto.Clone();
|
||||||
|
system.TrialId = null;
|
||||||
|
system.IsMain = true;
|
||||||
|
await _doctorSummarizeRepository.InsertOrUpdateAsync(system, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (inDto.TrialId == null)
|
||||||
{
|
{
|
||||||
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
|
var systemCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == null).CountAsync();
|
||||||
|
if (systemCount == 0)
|
||||||
{
|
{
|
||||||
Summarize = inDto.Summarize,
|
inDto.IsMain = true;
|
||||||
SummarizeEn = inDto.SummarizeEn,
|
|
||||||
|
}
|
||||||
|
if (inDto.Indication.IsNullOrEmpty() && inDto.IndicationEn.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
inDto.Indication = "默认";
|
||||||
|
inDto.IndicationEn = "Default";
|
||||||
|
}
|
||||||
|
var exists = await _doctorSummarizeRepository
|
||||||
|
.Where( x => x.IndicationEn == inDto.IndicationEn|| x.Indication == inDto.Indication)
|
||||||
|
|
||||||
|
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id);
|
||||||
|
if (exists)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (inDto.TrialId != null && inDto.SaveSummarizeInfoType!= SaveSummarizeInfo.SaveSelf)
|
||||||
|
{
|
||||||
|
switch (inDto.SaveSummarizeInfoType)
|
||||||
|
{
|
||||||
|
case SaveSummarizeInfo.SaveAndCover:
|
||||||
|
await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x =>
|
||||||
|
x.DoctorId == inDto.DoctorId && x.TrialId == null &&
|
||||||
|
x.IndicationEn == inDto.IndicationEn && x.Indication == inDto.Indication, x => new DoctorSummarize()
|
||||||
|
{
|
||||||
|
Summarize = inDto.Summarize,
|
||||||
|
SummarizeEn = inDto.SummarizeEn
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case SaveSummarizeInfo.SaveAndAdd:
|
||||||
|
|
||||||
|
|
||||||
|
var exists = await _doctorSummarizeRepository
|
||||||
|
.WhereIf(_userInfo.IsEn_Us, x => x.IndicationEn == inDto.IndicationEn)
|
||||||
|
.WhereIf(!_userInfo.IsEn_Us, x => x.Indication == inDto.Indication)
|
||||||
|
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null);
|
||||||
|
if (exists)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
|
||||||
|
}
|
||||||
|
await _doctorSummarizeRepository.BatchDeleteNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId);
|
||||||
|
|
||||||
|
|
||||||
|
var needData = inDto.Clone();
|
||||||
|
needData.TrialId = null;
|
||||||
|
await _doctorSummarizeRepository.InsertOrUpdateAsync(needData, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (inDto.TrialId == null && inDto.IsMain)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null,
|
||||||
|
x => new DoctorSummarize()
|
||||||
|
{
|
||||||
|
IsMain = false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var success= await _doctorRepository.SaveChangesAsync();
|
var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
return success;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除概述
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> DeleteSummarizeInfo(DeleteSummarizeInfoInDto inDto)
|
||||||
|
{
|
||||||
|
var result = await _doctorSummarizeRepository.DeleteFromQueryAsync(x=>x.Id==inDto.Id);
|
||||||
|
return await _doctorSummarizeRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取概述
|
/// 获取概述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id"></param>
|
/// <param name="Id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<UpdateGneralSituationDto?> GetSummarizeInfo(GetSummarizeInfoInDto inDto)
|
[HttpPost]
|
||||||
|
public async Task<UpdateGneralSituationDto> GetSummarizeInfo(GetSummarizeInfoInDto inDto)
|
||||||
{
|
{
|
||||||
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == inDto.DoctorId)
|
|
||||||
.ProjectTo<UpdateGneralSituationDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
|
||||||
if (inDto.TrialId != null)
|
if (inDto.TrialId != null)
|
||||||
{
|
{
|
||||||
var doctorInfo = await trialExperienceService.GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
|
var doctorInfo = await trialExperienceService.GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
|
||||||
@@ -261,15 +351,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
DoctorId = inDto.DoctorId,
|
DoctorId = inDto.DoctorId,
|
||||||
});
|
});
|
||||||
|
|
||||||
doctorBasicInfo = new UpdateGneralSituationDto()
|
|
||||||
{
|
|
||||||
Summarize = doctorInfo.Summarize,
|
|
||||||
SummarizeEn = doctorInfo.SummarizeEn,
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
var result = await _doctorSummarizeRepository.Where(t => t.DoctorId == inDto.DoctorId && t.TrialId == inDto.TrialId)
|
||||||
return doctorBasicInfo;
|
.ProjectTo<SummarizeInfoDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
return new UpdateGneralSituationDto() {
|
||||||
|
SummarizeList= result
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -283,7 +370,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var messageToSend = new MimeMessage();
|
var messageToSend = new MimeMessage();
|
||||||
//发件地址
|
//发件地址
|
||||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, inDto.Email));
|
foreach (var item in inDto.Email)
|
||||||
|
{
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, item));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.OrderBy(t => t.CreateTime).ProjectTo<EducationInfoViewModel>(_mapper.ConfigurationProvider).ToListAsync();
|
.OrderBy(t => t.CreateTime).ProjectTo<EducationInfoViewModel>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var postgraduateList = await _postgraduateRepository.Where(o => o.DoctorId == doctorId)
|
var postgraduateList = await _postgraduateRepository.Where(o => o.DoctorId == doctorId)
|
||||||
.OrderBy(t => t.CreateTime).ProjectTo<PostgraduateViewModel>(_mapper.ConfigurationProvider).ToListAsync();
|
.OrderBy(t => t.CreateTime).ProjectTo<PostgraduateViewModel>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
return new DoctorEducationExperienceDTO()
|
return new DoctorEducationExperienceDTO()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
@@ -7,6 +8,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[ApiExplorerSettings(GroupName = "Reviewer")]
|
[ApiExplorerSettings(GroupName = "Reviewer")]
|
||||||
public class TrialExperienceService(IRepository<TrialExperience> _trialExperienceRepository,
|
public class TrialExperienceService(IRepository<TrialExperience> _trialExperienceRepository,
|
||||||
IRepository<Doctor> _doctorRepository,
|
IRepository<Doctor> _doctorRepository,
|
||||||
|
IRepository<DoctorSummarize> _doctorSummarizeRepository,
|
||||||
IRepository<TrialExperienceCriteria> _trialExperienceCriteriaRepository,
|
IRepository<TrialExperienceCriteria> _trialExperienceCriteriaRepository,
|
||||||
IRepository<Attachment> _attachmentRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialExperienceService
|
IRepository<Attachment> _attachmentRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialExperienceService
|
||||||
{
|
{
|
||||||
@@ -84,11 +86,59 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
OtherClinicalExperience = systemInfoDcotor.OtherClinicalExperience,
|
OtherClinicalExperience = systemInfoDcotor.OtherClinicalExperience,
|
||||||
OtherClinicalExperienceCN = systemInfoDcotor.OtherClinicalExperienceCN,
|
OtherClinicalExperienceCN = systemInfoDcotor.OtherClinicalExperienceCN,
|
||||||
Summarize = systemInfoDcotor.Summarize,
|
|
||||||
SummarizeEn = systemInfoDcotor.SummarizeEn,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#region 概述
|
||||||
|
///没有就加
|
||||||
|
var summarizeCount = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId).CountAsync();
|
||||||
|
if (summarizeCount == 0)
|
||||||
|
{
|
||||||
|
var main = await _doctorSummarizeRepository.Where(x => x.DoctorId == inDto.DoctorId && x.IsMain && x.TrialId == null).ProjectTo<SummarizeInfoDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
if (main != null)
|
||||||
|
{
|
||||||
|
main.Id = null;
|
||||||
|
main.TrialId = inDto.TrialId;
|
||||||
|
main.IsMain = false;
|
||||||
|
var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(main, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
doctorInfo = await _doctorRepository.AddAsync(doctor, true);
|
doctorInfo = await _doctorRepository.AddAsync(doctor, true);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 临床试验
|
||||||
|
|
||||||
|
var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId)
|
||||||
|
.Where(x=>x.TrialId==null||x.TrialId!=inDto.TrialId)
|
||||||
|
.Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).Include(x => x.ExperienceCriteriaList).ToListAsync();
|
||||||
|
List<TrialExperienceCriteria> criteriaList = new List<TrialExperienceCriteria>();
|
||||||
|
foreach (var item in trialExperienceList)
|
||||||
|
{
|
||||||
|
item.Trial = null;
|
||||||
|
item.TrialId = inDto.TrialId;
|
||||||
|
item.ExperienceDataType = ExperienceDataType.Trial;
|
||||||
|
item.Id = NewId.NextGuid();
|
||||||
|
item.ExperienceCriteriaList.ForEach(x => {
|
||||||
|
|
||||||
|
criteriaList.Add(new TrialExperienceCriteria()
|
||||||
|
{
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
EvaluationCriteriaId = x.EvaluationCriteriaId,
|
||||||
|
TrialExperienceId = item.Id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
item.ExperienceCriteriaList = new List<TrialExperienceCriteria>();
|
||||||
|
}
|
||||||
|
await _trialExperienceCriteriaRepository.AddRangeAsync(criteriaList);
|
||||||
|
await _trialExperienceRepository.AddRangeAsync(trialExperienceList);
|
||||||
|
await _trialExperienceRepository.SaveChangesAsync();
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return doctorInfo;
|
return doctorInfo;
|
||||||
@@ -107,25 +157,20 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 当前项目没有则复制
|
// 先添加
|
||||||
if (!(await _trialExperienceRepository.AnyAsync(x => x.TrialId == inDto.TrialId)))
|
await GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
|
||||||
{
|
{
|
||||||
var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId)
|
DoctorId = inDto.DoctorId,
|
||||||
.Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).ToListAsync();
|
TrialId = inDto.TrialId.Value,
|
||||||
foreach (var item in trialExperienceList)
|
});
|
||||||
{
|
|
||||||
item.Trial = null;
|
|
||||||
item.TrialId = inDto.TrialId;
|
|
||||||
item.ExperienceDataType = ExperienceDataType.Trial;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var doctorClinicalTrialExperienceList = await _trialExperienceRepository
|
var doctorClinicalTrialExperienceList = await _trialExperienceRepository
|
||||||
.Where(o => o.DoctorId == inDto.DoctorId)
|
.Where(o => o.DoctorId == inDto.DoctorId)
|
||||||
.Where(x => x.ExperienceDataType == ExperienceDataType.Trial|| x.ExperienceDataType == ExperienceDataType.TrialAuto)
|
.Where(x => x.ExperienceDataType == ExperienceDataType.Trial|| x.ExperienceDataType == ExperienceDataType.TrialAuto)
|
||||||
.Where(x => x.TrialId == inDto.TrialId.Value)
|
.Where(x => x.TrialId == inDto.TrialId.Value)
|
||||||
.OrderBy(t => t.CreateTime)
|
.OrderBy(t => t.CreateTime)
|
||||||
.ProjectTo<TrialExperienceListDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TrialExperienceListDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
return doctorClinicalTrialExperienceList;
|
return doctorClinicalTrialExperienceList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +287,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
if (inDto.TrialId != null)
|
if (inDto.TrialId != null)
|
||||||
{
|
{
|
||||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
|
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.DoctorId == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
|
||||||
{
|
{
|
||||||
OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
|
OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
|
||||||
OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
|
OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
|
||||||
|
|||||||
@@ -70,6 +70,36 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取是否休假
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<GetIsVacationOutDto> GetIsVacation(GetIsVacationInDto inDto)
|
||||||
|
{
|
||||||
|
var query = await _vacationRepository.Where(u => u.DoctorId == inDto.DoctorId).ToListAsync();
|
||||||
|
|
||||||
|
bool isVacation = false;
|
||||||
|
|
||||||
|
var now = DateTime.Now;
|
||||||
|
foreach (var item in query)
|
||||||
|
{
|
||||||
|
if (item.StartDate <= now && now <= item.EndDate)
|
||||||
|
{
|
||||||
|
isVacation = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return new GetIsVacationOutDto() {
|
||||||
|
|
||||||
|
IsVacation= isVacation
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<IResponseOutput> OnVacation(Guid doctorId)
|
public async Task<IResponseOutput> OnVacation(Guid doctorId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
public DoctorConfig()
|
public DoctorConfig()
|
||||||
{
|
{
|
||||||
|
var isEn_Us = false;
|
||||||
|
|
||||||
// 从 DateTime 映射到 DateOnly
|
// 从 DateTime 映射到 DateOnly
|
||||||
CreateMap<DateTime, DateOnly>().ConvertUsing(dt => DateOnly.FromDateTime(dt));
|
CreateMap<DateTime, DateOnly>().ConvertUsing(dt => DateOnly.FromDateTime(dt));
|
||||||
@@ -57,11 +58,18 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<AddDoctorCriterionFileDto, DoctorCriterionFile>();
|
CreateMap<AddDoctorCriterionFileDto, DoctorCriterionFile>();
|
||||||
CreateMap<DoctorCriterionFile, GetDoctorCriterionFileOutDto>();
|
CreateMap<DoctorCriterionFile, GetDoctorCriterionFileOutDto>();
|
||||||
CreateMap<Doctor, DoctorBasicInfoCommand>();
|
CreateMap<Doctor, DoctorBasicInfoCommand>();
|
||||||
|
|
||||||
|
CreateMap<Doctor, BasicInfoAndEmploymentDto>();
|
||||||
|
|
||||||
|
CreateMap<BasicInfoAndEmploymentDto, Doctor>().ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null)); ;
|
||||||
|
|
||||||
CreateMap<Education, EducationInfoViewModel>();
|
CreateMap<Education, EducationInfoViewModel>();
|
||||||
|
|
||||||
CreateMap<Vacation, VacationCommand>();
|
CreateMap<Vacation, VacationCommand>();
|
||||||
CreateMap<ResearchPublication, ResearchPublicationDTO>();
|
CreateMap<ResearchPublication, ResearchPublicationDTO>();
|
||||||
CreateMap<Postgraduate, PostgraduateViewModel>();
|
CreateMap<Postgraduate, PostgraduateViewModel>()
|
||||||
|
.ForMember(t => t.Hospital, c => c.MapFrom(d => d.HospitalEnt.HospitalName))
|
||||||
|
.ForMember(t => t.HospitalCN, c => c.MapFrom(d => d.HospitalEnt.HospitalNameCN));
|
||||||
CreateMap<Attachment, AttachmentDTO>();
|
CreateMap<Attachment, AttachmentDTO>();
|
||||||
CreateMap<Doctor, ResumeConfirmDTO>();
|
CreateMap<Doctor, ResumeConfirmDTO>();
|
||||||
|
|
||||||
@@ -70,6 +78,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<Doctor, PaymentModeDto>();
|
CreateMap<Doctor, PaymentModeDto>();
|
||||||
|
|
||||||
|
CreateMap<DoctorSummarize, SummarizeInfoDto>();
|
||||||
|
CreateMap<SummarizeInfoDto, DoctorSummarize>();
|
||||||
|
|
||||||
CreateMap<PaymentModeDto, Doctor>();
|
CreateMap<PaymentModeDto, Doctor>();
|
||||||
|
|
||||||
CreateMap<Doctor, TrialExperienceModel>();
|
CreateMap<Doctor, TrialExperienceModel>();
|
||||||
|
|||||||
@@ -108,6 +108,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public string SortField { get; set; } = string.Empty;
|
public string SortField { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool Asc { get; set; }
|
public bool Asc { get; set; }
|
||||||
|
|
||||||
|
public bool? IsEnable { get; set; }
|
||||||
|
|
||||||
|
public int? EmailUrgentEnum { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? ToUserType { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? CopyUserType { get; set; }
|
||||||
|
|
||||||
|
public BusinessModule? BusinessModuleEnum { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Task<List<TrialEmailNoticeConfigView>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery);
|
Task<IResponseOutput<List<TrialEmailNoticeConfigView>>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery);
|
||||||
|
|
||||||
Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig);
|
Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig);
|
||||||
|
|
||||||
|
|||||||
@@ -1242,19 +1242,51 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<TrialSelectEmailNoticeConfigView>> GetSysEmailNoticeConfigList(EmailNoticeConfigQuery inQuery)
|
public async Task<PageOutput<TrialSelectEmailNoticeConfigView>> GetSysEmailNoticeConfigList(EmailNoticeConfigQuery inQuery)
|
||||||
{
|
{
|
||||||
var emailNoticeConfigQueryable = _emailNoticeConfigRepository
|
var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
|
||||||
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys || t.SystemLevel == SysEmailLevel.sys_Config_role)
|
|
||||||
//.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
var emailNoticeConfigQueryable = _emailNoticeConfigRepository.Where(t => t.BusinessLevelEnum == BusinessLevel.Trial)
|
||||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||||
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||||
|
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||||
|
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||||
|
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||||
|
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
|
||||||
|
.WhereIf(trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification)
|
||||||
|
.WhereIf(trialConfig.IsPDProgressView == false && trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification
|
||||||
|
&& t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
|
||||||
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId });
|
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId });
|
||||||
|
|
||||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IResponseOutput> BatchAddEnrollOrPdEmailConfig(Guid trialId)
|
||||||
|
{
|
||||||
|
var trialConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
|
||||||
|
|
||||||
|
var emailNoticeConfigQueryable = _emailNoticeConfigRepository
|
||||||
|
|
||||||
|
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == true && trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum == BusinessModule.EligibilityVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
|
||||||
|
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false && trialConfig.IsPDProgressView == true, t => t.BusinessModuleEnum == BusinessModule.PDVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
|
||||||
|
.WhereIf(trialConfig.IsPDProgressView == true && trialConfig.IsEnrollementQualificationConfirm == true, t => t.BusinessModuleEnum == BusinessModule.PDVerification
|
||||||
|
|| t.BusinessModuleEnum == BusinessModule.EligibilityVerification || t.BusinessModuleEnum == BusinessModule.Eligibility_PDVerification)
|
||||||
|
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = trialId });
|
||||||
|
|
||||||
|
|
||||||
|
var list = await emailNoticeConfigQueryable.ToListAsync();
|
||||||
|
|
||||||
|
var addList = _mapper.Map<List<BatchAddTrialEmailNoticeConfig>>(list.Where(t => t.IsHaveSelected == false).ToList());
|
||||||
|
|
||||||
|
foreach (var item in addList)
|
||||||
|
{
|
||||||
|
item.TrialId = trialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await BatchAddSysEmailConfig(addList);
|
||||||
|
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量勾选 传递列表每行数据,后台进行处理转换,建立关联关系
|
/// 批量勾选 传递列表每行数据,后台进行处理转换,建立关联关系
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1262,6 +1294,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> BatchAddSysEmailConfig(List<BatchAddTrialEmailNoticeConfig> batchAddList)
|
public async Task<IResponseOutput> BatchAddSysEmailConfig(List<BatchAddTrialEmailNoticeConfig> batchAddList)
|
||||||
{
|
{
|
||||||
|
if (!batchAddList.Any())
|
||||||
|
{
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
var first = batchAddList.First();
|
var first = batchAddList.First();
|
||||||
var trialId = first.TrialId;
|
var trialId = first.TrialId;
|
||||||
@@ -1312,31 +1348,56 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
|
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
//处理定时任务
|
||||||
|
var taskInfoList = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId== trialId && t.EmailCron != string.Empty && t.IsAutoSend)
|
||||||
|
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
foreach (var task in taskInfoList)
|
||||||
|
{
|
||||||
|
//利用主键作为任务Id
|
||||||
|
var jobId = $"{task.TrialId}({task.TrialCode})_({task.BusinessScenarioEnum})";
|
||||||
|
|
||||||
|
HangfireJobHelper.AddOrUpdateTrialCronJob(jobId, trialId, task.BusinessScenarioEnum, task.EmailCron);
|
||||||
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<TrialEmailNoticeConfigView>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery)
|
public async Task<IResponseOutput<List<TrialEmailNoticeConfigView>>> GetTrialEmailNoticeConfigList(TrialEmailNoticeConfigQuery inQuery)
|
||||||
{
|
{
|
||||||
//await SyncSystemEmainCofigDocListAsync(inQuery.TrialId);
|
//await SyncSystemEmainCofigDocListAsync(inQuery.TrialId);
|
||||||
|
|
||||||
|
var trialConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.IsEnrollementQualificationConfirm, t.IsPDProgressView }).First();
|
||||||
|
|
||||||
var trialEmailNoticeConfigQueryable = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == inQuery.TrialId)
|
var trialEmailNoticeConfigQueryable = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||||
.WhereIf(inQuery.IsDistinguishCriteria == false, t => t.TrialReadingCriterionId == null)
|
.WhereIf(inQuery.IsDistinguishCriteria == false, t => t.TrialReadingCriterionId == null)
|
||||||
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
|
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||||
|
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||||
|
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||||
|
.WhereIf(inQuery.ToUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||||
|
.WhereIf(inQuery.CopyUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||||
|
|
||||||
|
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||||
|
|
||||||
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
|
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
|
||||||
var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc");
|
var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc");
|
||||||
return await orderQuery.ToListAsync();
|
var list = await orderQuery.ToListAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(list, trialConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
|
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
|
||||||
{
|
{
|
||||||
await TestEmailConfigAsync(addOrEditTrialEmailNoticeConfig);
|
await TestEmailConfigAsync(addOrEditTrialEmailNoticeConfig);
|
||||||
@@ -1405,7 +1466,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
|
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
|
||||||
|
|
||||||
var jobId = $"{addOrEditTrialEmailNoticeConfig.TrialId}_{id}";
|
var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == addOrEditTrialEmailNoticeConfig.Id)
|
||||||
|
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
|
||||||
|
.FirstAsync();
|
||||||
|
|
||||||
|
var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
|
||||||
|
|
||||||
|
|
||||||
if (addOrEditTrialEmailNoticeConfig.IsAutoSend)
|
if (addOrEditTrialEmailNoticeConfig.IsAutoSend)
|
||||||
{
|
{
|
||||||
@@ -1523,12 +1589,16 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
[HttpDelete("{trialEmailNoticeConfigId:guid}")]
|
[HttpDelete("{trialEmailNoticeConfigId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId)
|
public async Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId)
|
||||||
{
|
{
|
||||||
var trialId = await _trialEmailNoticeConfigRepository.Where(t => t.Id == trialEmailNoticeConfigId).Select(t => t.TrialId).FirstOrDefaultAsync();
|
|
||||||
var jobId = $"{trialId}_{trialEmailNoticeConfigId}";
|
var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == trialEmailNoticeConfigId)
|
||||||
|
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
|
||||||
|
.FirstAsync();
|
||||||
|
|
||||||
|
var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
|
||||||
|
|
||||||
HangfireJobHelper.RemoveCronJob(jobId);
|
HangfireJobHelper.RemoveCronJob(jobId);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<BatchAddTrialEmailNoticeConfig, TrialEmailNoticeConfig>();
|
CreateMap<BatchAddTrialEmailNoticeConfig, TrialEmailNoticeConfig>();
|
||||||
|
|
||||||
|
CreateMap<TrialSelectEmailNoticeConfigView, BatchAddTrialEmailNoticeConfig > ();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<AddOrEditTrialDocument, TrialDocument>()
|
CreateMap<AddOrEditTrialDocument, TrialDocument>()
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
if (findStudy.SubejectCode == inCommand.SubjectCode && findStudy.SubjectId == inCommand.SubjectId)
|
if (findStudy.SubejectCode == inCommand.SubjectCode && findStudy.SubjectId == inCommand.SubjectId)
|
||||||
{
|
{
|
||||||
//上传给后处理其他访视了
|
//上传给后处理其他访视了
|
||||||
if (inCommand.VisitTaskId != null && findStudy.VisitTaskId != null && findStudy.VisitTaskId != inCommand.VisitTaskId)
|
if (inCommand.VisitTaskId != null && findStudy.VisitTaskId != null && findStudy.VisitTaskId != inCommand.VisitTaskId && findStudy.SubjectVisitId != currentUploadSubjectVisitId)
|
||||||
{
|
{
|
||||||
result.Add(new TaskStudyArchiveConfirmResult() { StudyInstanceUid = studyUid, IsAllowReUpload = false, IsAllowUpload = false });
|
result.Add(new TaskStudyArchiveConfirmResult() { StudyInstanceUid = studyUid, IsAllowReUpload = false, IsAllowUpload = false });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string LastName { get; set; } = string.Empty;
|
public string LastName { get; set; } = string.Empty;
|
||||||
public int? Sex { get; set; } // 1-男 2-女
|
public int? Sex { get; set; } // 1-男 2-女
|
||||||
|
|
||||||
public int Status { get; set; } = 1; // 0-已删除 1-正常
|
public UserStateEnum Status { get; set; } = UserStateEnum.Enable;
|
||||||
|
|
||||||
public string Phone { get; set; } = string.Empty;
|
public string Phone { get; set; } = string.Empty;
|
||||||
public string EMail { get; set; } = string.Empty;
|
public string EMail { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -287,6 +287,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IsFirstAdd = true
|
IsFirstAdd = true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var userName = _userRepository.Where(t => t.Id == userId).Select(t => t.UserName).FirstOrDefault();
|
||||||
|
|
||||||
|
await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(userName));
|
||||||
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.ResetPassword }, true);
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = UserOptType.ResetPassword }, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
@@ -554,6 +558,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
if (user == null) return Null404NotFound(user);
|
if (user == null) return Null404NotFound(user);
|
||||||
|
|
||||||
|
if (user.Status!=model.Status)
|
||||||
|
{
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = model.Status == UserStateEnum.Enable ? UserOptType.AccountEnable : UserOptType.AccountLocked }, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
_mapper.Map(model, user);
|
_mapper.Map(model, user);
|
||||||
|
|
||||||
if (user.IsZhiZhun)
|
if (user.IsZhiZhun)
|
||||||
@@ -561,7 +572,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN;
|
user.OrganizationName = _userInfo.IsEn_Us ? _systemEmailConfig.OrganizationName : _systemEmailConfig.OrganizationNameCN;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser }, true);
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = model.Id, OptType = UserOptType.UpdateUser });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var success = await _userRepository.SaveChangesAsync();
|
var success = await _userRepository.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -692,12 +705,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
|
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
|
||||||
{
|
{
|
||||||
|
|
||||||
const string cachePrefix = "login-failures:";
|
|
||||||
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;
|
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;
|
||||||
int lockoutMinutes = _verifyConfig.CurrentValue.LoginFailLockMinutes;
|
int lockoutMinutes = _verifyConfig.CurrentValue.LoginFailLockMinutes;
|
||||||
|
|
||||||
// 生成缓存键
|
// 生成缓存键
|
||||||
string cacheKey = $"{cachePrefix}{userName}";
|
string cacheKey = CacheKeys.UserLoginError(userName);
|
||||||
|
|
||||||
// 从缓存中获取登录失败次数
|
// 从缓存中获取登录失败次数
|
||||||
int? failCount = await _fusionCache.GetOrDefaultAsync<int?>(cacheKey);
|
int? failCount = await _fusionCache.GetOrDefaultAsync<int?>(cacheKey);
|
||||||
@@ -799,7 +811,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
|
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
|
||||||
|
|
||||||
var userLogQueryable =
|
var userLogQueryable =
|
||||||
_userLogRepository
|
_userLogRepository.AsQueryable().IgnoreQueryFilters()
|
||||||
.WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && (c.UserId == t.LoginUserId || c.UserId == t.OptUserId)))
|
.WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && (c.UserId == t.LoginUserId || c.UserId == t.OptUserId)))
|
||||||
.WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime)
|
.WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime)
|
||||||
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
|
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.DTO;
|
||||||
|
|
||||||
|
public class TemplateTable
|
||||||
|
{
|
||||||
|
public string TableName { get; set; }
|
||||||
|
|
||||||
|
public string Comment { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<TemplateTableProperty> AddOrEditPropertyList => TablePropertyList.Where(t => !AddOrUpdateExcludeNameList.Contains(t.PropertyName)).ToList();
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<TemplateTableProperty> TablePropertyList { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<string> AddOrUpdateExcludeNameList = new List<string>() { "CreateUserId", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TemplateTableProperty
|
||||||
|
{
|
||||||
|
public string ColumnName { get; set; }
|
||||||
|
|
||||||
|
public string PropertyName { get; set; }
|
||||||
|
|
||||||
|
public string CSharpType { get; set; }
|
||||||
|
|
||||||
|
public bool IsNullable { get; set; }
|
||||||
|
|
||||||
|
public int? MaxLength { get; set; }
|
||||||
|
|
||||||
|
public bool IsPrimarykey { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Comment { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.Service.DTO;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using NPOI.HPSF;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
{
|
||||||
|
|
||||||
|
public class CodeTemplateService(IRepository<Dictionary> _dicRepository,IMapper _mapper, IConfiguration _configuration) : ServiceBase
|
||||||
|
{
|
||||||
|
|
||||||
|
static string GetCSharpType(Type type)
|
||||||
|
{
|
||||||
|
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||||
|
{
|
||||||
|
var underlyingType = Nullable.GetUnderlyingType(type);
|
||||||
|
return $"{GetCSharpType(underlyingType)}?";
|
||||||
|
}
|
||||||
|
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
_ when type == typeof(int) => "int",
|
||||||
|
_ when type == typeof(long) => "long",
|
||||||
|
_ when type == typeof(short) => "short",
|
||||||
|
_ when type == typeof(byte) => "byte",
|
||||||
|
_ when type == typeof(bool) => "bool",
|
||||||
|
_ when type == typeof(decimal) => "decimal",
|
||||||
|
_ when type == typeof(double) => "double",
|
||||||
|
_ when type == typeof(float) => "float",
|
||||||
|
_ when type == typeof(Guid) => "Guid",
|
||||||
|
_ when type == typeof(DateTime) => "DateTime",
|
||||||
|
_ when type == typeof(string) => "string",
|
||||||
|
_ => type.Name // 非常见类型,返回 .NET 类型名称
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取数据库的表信息 以及字段信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tableName"></param>
|
||||||
|
/// <param name="comment"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<TemplateTable> GetDataBaseTableList(string tableName, string comment)
|
||||||
|
{
|
||||||
|
var contextOptions = new DbContextOptionsBuilder<IRaCISDBContext>().UseSqlServer(_configuration.GetSection("ConnectionStrings:RemoteNew").Value).Options;
|
||||||
|
|
||||||
|
using var dbContext = new IRaCISDBContext(contextOptions);
|
||||||
|
var dbModel = dbContext.Model;
|
||||||
|
|
||||||
|
var list = dbModel.GetEntityTypes().Where(t => t.GetTableName().IsNotNullOrEmpty())
|
||||||
|
.WhereIf(tableName.IsNotNullOrEmpty(), t => t.GetTableName()!.Contains(tableName))
|
||||||
|
.WhereIf(comment.IsNotNullOrEmpty(), t => t.GetComment().Contains(comment))
|
||||||
|
.Select(t => new TemplateTable()
|
||||||
|
{
|
||||||
|
TableName = t.GetTableName()!,
|
||||||
|
TablePropertyList = t.GetProperties().Select(property => new TemplateTableProperty()
|
||||||
|
{
|
||||||
|
PropertyName = property.Name,
|
||||||
|
ColumnName = property.GetColumnName(),
|
||||||
|
IsNullable = property.IsNullable,
|
||||||
|
IsPrimarykey = property.IsKey(),
|
||||||
|
CSharpType = GetCSharpType(property.ClrType),
|
||||||
|
Comment = property.GetComment() ?? string.Empty
|
||||||
|
}).ToList()
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据字典名 code 生成枚举定义
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> GenerateEnumDefine(string code)
|
||||||
|
{
|
||||||
|
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
// StringBuilder 用于构建枚举代码字符串
|
||||||
|
var enumCode = new StringBuilder();
|
||||||
|
|
||||||
|
// 生成枚举定义
|
||||||
|
enumCode.AppendLine($"public enum {code}");
|
||||||
|
enumCode.AppendLine("{");
|
||||||
|
|
||||||
|
foreach (var item in searchList)
|
||||||
|
{
|
||||||
|
// 添加 XML 注释作为枚举描述
|
||||||
|
enumCode.AppendLine($" /// <summary>");
|
||||||
|
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
|
||||||
|
enumCode.AppendLine($" /// </summary>");
|
||||||
|
// 每个枚举值生成
|
||||||
|
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enumCode.AppendLine("}");
|
||||||
|
|
||||||
|
// 返回生成的枚举代码
|
||||||
|
var enumStr = enumCode.ToString();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(enumStr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
using IRaCIS.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Infrastructure.Encryption;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service;
|
||||||
|
|
||||||
|
public class HIRActivateService : ServiceBase
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取授权码明文信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="authorizationCode"></param>
|
||||||
|
/// <param name="_hospitalOption"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<IResponseOutput> GetAuthorizationCodeInfo(string authorizationCode, [FromServices] IOptionsMonitor<SystemHospitalOption> _hospitalOption)
|
||||||
|
{
|
||||||
|
// 解密 Base64 编码后的数据
|
||||||
|
byte[] base64DecodedBytes = Convert.FromBase64String(authorizationCode);
|
||||||
|
string decodedText = System.Text.Encoding.UTF8.GetString(base64DecodedBytes);
|
||||||
|
|
||||||
|
|
||||||
|
var authInfo = JsonConvert.DeserializeObject<TrialAuthorizationInfo>(decodedText);
|
||||||
|
|
||||||
|
if (authInfo == null)
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("不能解析该项目授权码");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(decodedText);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目激活码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_basicSystemConfigConfig"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[RoutePattern(HttpMethod = "get")]
|
||||||
|
public async Task<IResponseOutput> GetTrialActivationCode(TrialAuthorizationInfo authorizationInfo, [FromServices] IOptionsMonitor<ServiceVerifyConfigOption> _basicSystemConfigConfig)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (authorizationInfo != null)
|
||||||
|
{
|
||||||
|
//一周内激活
|
||||||
|
authorizationInfo.ActiveDeadLineDate = DateTime.Now.Date.AddDays(8).AddSeconds(-1);
|
||||||
|
|
||||||
|
var info = AesEncryption.Encrypt($"{JsonConvert.SerializeObject(authorizationInfo)}", "HIR_System_AES_Key_Info", "Trial_AuthorizationEncrypt");
|
||||||
|
|
||||||
|
Console.WriteLine("HIR_System_AES_Key_Info".PadRight(32, '0').Substring(0, 32) + " " + "Trial_AuthorizationEncrypt".PadRight(16, '0').Substring(0, 16));
|
||||||
|
|
||||||
|
//var dd = AesEncryption.Decrypt(info, "HIR_System_AES_Key_Info", "Trial_AuthorizationEncrypt");
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("激活码解密文本信息有误");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialAuthorizationInfo
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public string TrialCode { get; set; }
|
||||||
|
|
||||||
|
public string HospitalName { get; set; }
|
||||||
|
|
||||||
|
public string HospitalCode { get; set; }
|
||||||
|
|
||||||
|
public int PurchaseDuration { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<CriterionType> CriterionTypeList { get; set; }
|
||||||
|
|
||||||
|
public DateTime? AuthorizationDeadLineDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ActiveDeadLineDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ActiveTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
|
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace IRaCIS.Core.API.OAuth;
|
namespace IRaCIS.Core.Application.Service.OAuth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+8
-2
@@ -1,6 +1,7 @@
|
|||||||
using System.Text.Json.Serialization;
|
using Newtonsoft.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace IRaCIS.Core.API.OAuth;
|
namespace IRaCIS.Core.Application.Service.OAuth;
|
||||||
|
|
||||||
public class LogtoTokenResponse
|
public class LogtoTokenResponse
|
||||||
{
|
{
|
||||||
@@ -8,30 +9,35 @@ public class LogtoTokenResponse
|
|||||||
/// The access token issued by the Logto authorization server.
|
/// The access token issued by the Logto authorization server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("access_token")]
|
[JsonPropertyName("access_token")]
|
||||||
|
[JsonProperty("access_token")]
|
||||||
public string AccessToken { get; set; } = null!;
|
public string AccessToken { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of the token issued by the Logto authorization server.
|
/// The type of the token issued by the Logto authorization server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("token_type")]
|
[JsonPropertyName("token_type")]
|
||||||
|
[JsonProperty("token_type")]
|
||||||
public string TokenType { get; set; } = null!;
|
public string TokenType { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lifetime in seconds of the access token.
|
/// The lifetime in seconds of the access token.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("expires_in")]
|
[JsonPropertyName("expires_in")]
|
||||||
|
[JsonProperty("expires_in")]
|
||||||
public int ExpiresIn { get; set; }
|
public int ExpiresIn { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The refresh token, which can be used to obtain new access tokens using the same authorization grant.
|
/// The refresh token, which can be used to obtain new access tokens using the same authorization grant.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("refresh_token")]
|
[JsonPropertyName("refresh_token")]
|
||||||
|
[JsonProperty("refresh_token")]
|
||||||
public string? RefreshToken { get; set; } = null!;
|
public string? RefreshToken { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID token, which can be used to verify the identity of the user.
|
/// The ID token, which can be used to verify the identity of the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("id_token")]
|
[JsonPropertyName("id_token")]
|
||||||
|
[JsonProperty("id_token")]
|
||||||
public string? IdToken { get; set; } = null;
|
public string? IdToken { get; set; } = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
using Org.BouncyCastle.Tls;
|
using Org.BouncyCastle.Tls;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.API.OAuth;
|
namespace IRaCIS.Core.Application.Service.OAuth;
|
||||||
|
|
||||||
public class LogtoUser
|
public class LogtoUser
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,573 @@
|
|||||||
|
using Azure.Core;
|
||||||
|
using IdentityModel;
|
||||||
|
using IdentityModel.Client;
|
||||||
|
using IRaCIS.Core.Application.Service.OAuth;
|
||||||
|
using MassTransit;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using Org.BouncyCastle.Utilities.Net;
|
||||||
|
using RestSharp;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
{
|
||||||
|
public class OAuthService : ServiceBase
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region authorization_code 原生 PKCE
|
||||||
|
|
||||||
|
public IResponseOutput TestPCKEOrgin()
|
||||||
|
{
|
||||||
|
// 1. 生成 code_verifier 和 code_challenge
|
||||||
|
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
|
||||||
|
|
||||||
|
|
||||||
|
string codeChallenge = PkceUtil.GenerateCodeChallenge(codeVerifier);
|
||||||
|
|
||||||
|
Console.WriteLine(codeVerifier);
|
||||||
|
|
||||||
|
string clientId = "aj34vqrpvz8olsbxwtcog";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestPKCECallBack";
|
||||||
|
string state = "123456";
|
||||||
|
|
||||||
|
// 构造请求的 URL
|
||||||
|
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
|
||||||
|
$"?client_id={clientId}" +
|
||||||
|
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
|
||||||
|
$"&response_type=code" +
|
||||||
|
$"&scope=openid profile email phone" +
|
||||||
|
$"&code_challenge={codeChallenge}" +
|
||||||
|
$"&code_challenge_method=S256" +
|
||||||
|
$"&state={state}";
|
||||||
|
|
||||||
|
Console.WriteLine("请将以下 URL 复制到浏览器中,完成登录后获取 code:");
|
||||||
|
|
||||||
|
Console.WriteLine(authorizationUrl);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
[RoutePattern(HttpMethod = "Get")]
|
||||||
|
public async Task<IResponseOutput> TestPKCECallBackAsync(string code)
|
||||||
|
{
|
||||||
|
var httpClient = new HttpClient();
|
||||||
|
var disco = await httpClient.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
|
||||||
|
if (disco.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine(disco.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
|
||||||
|
// OIDC 配置,替换为您的 OIDC 提供者的配置
|
||||||
|
string tokenEndpoint = "https://logto.test.extimaging.com/oidc/token"; // 替换为实际 token 端点
|
||||||
|
string clientId = "aj34vqrpvz8olsbxwtcog";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestPKCECallBack"; // 替换为前端的回调 URL
|
||||||
|
|
||||||
|
var baseUrl = "https://logto.test.extimaging.com";
|
||||||
|
var opts = new RestClientOptions(baseUrl);
|
||||||
|
using var client = new RestClient(opts);
|
||||||
|
|
||||||
|
//https://blog.logto.io/troubleshoot-invalid-grant-error/
|
||||||
|
var request = new RestRequest("oidc/token", Method.Post)
|
||||||
|
.AddHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||||
|
|
||||||
|
request.AddParameter("grant_type", "authorization_code")
|
||||||
|
.AddParameter("code", code)
|
||||||
|
.AddParameter("redirect_uri", redirectUri)
|
||||||
|
.AddParameter("client_id", clientId)
|
||||||
|
.AddParameter("code_verifier", codeVerifier); // 使用 PKCE
|
||||||
|
|
||||||
|
|
||||||
|
// 发送请求并获取响应
|
||||||
|
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
|
||||||
|
|
||||||
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
var tokenResponse = response.Data;
|
||||||
|
|
||||||
|
Console.WriteLine(tokenResponse.ToJsonStr());
|
||||||
|
|
||||||
|
var userInfoRequest = new RestRequest($"oidc/me", Method.Get)
|
||||||
|
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
|
||||||
|
|
||||||
|
var userResponse = await client.ExecuteAsync(userInfoRequest);
|
||||||
|
|
||||||
|
Console.WriteLine(userResponse.Content);
|
||||||
|
|
||||||
|
//结束回话
|
||||||
|
|
||||||
|
var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin");
|
||||||
|
|
||||||
|
var _endHttpClient = new HttpClient();
|
||||||
|
|
||||||
|
var dd = await _endHttpClient.GetAsync(endUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region authorization_code OidcClient PKCE
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
[RoutePattern(HttpMethod = "Get")]
|
||||||
|
public IResponseOutput TestPKCE()
|
||||||
|
{
|
||||||
|
// 1. 生成 code_verifier 和 code_challenge
|
||||||
|
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
|
||||||
|
|
||||||
|
|
||||||
|
string codeChallenge = PkceUtil.GenerateCodeChallenge(codeVerifier);
|
||||||
|
|
||||||
|
Console.WriteLine(codeVerifier);
|
||||||
|
|
||||||
|
string clientId = "aj34vqrpvz8olsbxwtcog";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientPKCECallBack";
|
||||||
|
string state = "123456";
|
||||||
|
|
||||||
|
// 构造请求的 URL
|
||||||
|
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
|
||||||
|
$"?client_id={clientId}" +
|
||||||
|
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
|
||||||
|
$"&response_type=code" +
|
||||||
|
$"&scope=openid profile email phone" +
|
||||||
|
$"&code_challenge={codeChallenge}" +
|
||||||
|
$"&code_challenge_method=S256" +
|
||||||
|
$"&state={state}";
|
||||||
|
|
||||||
|
Console.WriteLine("请将以下 URL 复制到浏览器中,完成登录后获取 code:");
|
||||||
|
|
||||||
|
Console.WriteLine(authorizationUrl);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
[RoutePattern(HttpMethod = "Get")]
|
||||||
|
public async Task<IResponseOutput> TestOidcClientPKCECallBackAsync(string code)
|
||||||
|
{
|
||||||
|
//使用IdentityModel.OidcClient 测试
|
||||||
|
var client = new HttpClient();
|
||||||
|
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
|
||||||
|
if (disco.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine(disco.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OIDC 配置,替换为您的 OIDC 提供者的配置
|
||||||
|
string clientId = "aj34vqrpvz8olsbxwtcog";
|
||||||
|
string codeVerifier = "QMSBBxTQrpKPscvNNfmaQfmyk5Wd33GZS1FKSo3Shv8w-59vW1iTSlgAznYojkYv2DgR4XhTqySsBnDPq0";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientPKCECallBack"; // 替换为前端的回调 URL
|
||||||
|
|
||||||
|
var requestBody = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "grant_type", "authorization_code" },
|
||||||
|
{ "code", code },
|
||||||
|
{ "redirect_uri", redirectUri },
|
||||||
|
{ "client_id", clientId },
|
||||||
|
{ "code_verifier", codeVerifier } // 使用 PKCE
|
||||||
|
};
|
||||||
|
|
||||||
|
var _httpClient = new HttpClient();
|
||||||
|
var content = new FormUrlEncodedContent(requestBody);
|
||||||
|
// 发出 token 请求
|
||||||
|
var response = await _httpClient.PostAsync(disco.TokenEndpoint, content);
|
||||||
|
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
var responseBody = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// 解析 JSON
|
||||||
|
var jsonObject = JObject.Parse(responseBody);
|
||||||
|
|
||||||
|
// 格式化并输出 JSON
|
||||||
|
var formattedJson = jsonObject.ToString(Formatting.Indented);
|
||||||
|
|
||||||
|
Console.WriteLine(formattedJson);
|
||||||
|
|
||||||
|
var tokenResponse = JsonConvert.DeserializeObject<LogtoTokenResponse>(responseBody);
|
||||||
|
|
||||||
|
Console.WriteLine(tokenResponse);
|
||||||
|
|
||||||
|
//结束回话
|
||||||
|
var parameters = new Parameters();
|
||||||
|
|
||||||
|
parameters.Add("clientId", "aj34vqrpvz8olsbxwtcog");
|
||||||
|
var endUrl = new RequestUrl(disco.EndSessionEndpoint).CreateEndSessionUrl(tokenResponse.IdToken, "http://localhost:6100/OAuth/TestPCKEOrgin", extra: parameters);
|
||||||
|
|
||||||
|
|
||||||
|
Results.Redirect(endUrl);
|
||||||
|
//var _endHttpClient = new HttpClient();
|
||||||
|
|
||||||
|
//var dd = await _endHttpClient.GetAsync(endUrl);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errorContent = await response.Content.ReadAsStringAsync();
|
||||||
|
throw new Exception($"Error: {errorContent}");
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 提示必须要Secret
|
||||||
|
//// 准备请求内容
|
||||||
|
//var tokenRequest = new AuthorizationCodeTokenRequest
|
||||||
|
//{
|
||||||
|
// Address = disco.TokenEndpoint,
|
||||||
|
// ClientId = clientId,
|
||||||
|
// Code = code,
|
||||||
|
// RedirectUri = redirectUri,
|
||||||
|
// GrantType = "authorization_code",
|
||||||
|
// CodeVerifier = codeVerifier
|
||||||
|
|
||||||
|
//};
|
||||||
|
|
||||||
|
//var tokenResponse = await _httpClient.RequestTokenAsync(tokenRequest);
|
||||||
|
|
||||||
|
//if (tokenResponse.HttpStatusCode == HttpStatusCode.OK)
|
||||||
|
//{
|
||||||
|
// var apiClient = new HttpClient();
|
||||||
|
// apiClient.SetBearerToken(tokenResponse.AccessToken);
|
||||||
|
|
||||||
|
// var response = await apiClient.GetAsync(disco.UserInfoEndpoint);
|
||||||
|
// if (!response.IsSuccessStatusCode)
|
||||||
|
// {
|
||||||
|
// Console.WriteLine(response.StatusCode);
|
||||||
|
// Console.WriteLine(response.ReasonPhrase);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
|
||||||
|
// Console.WriteLine(JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
|
||||||
|
|
||||||
|
// //获取刷新token
|
||||||
|
// var refreshClient = new HttpClient();
|
||||||
|
// var refreshRequest = new RefreshTokenRequest
|
||||||
|
// {
|
||||||
|
// Address = disco.TokenEndpoint,
|
||||||
|
// ClientId = clientId,
|
||||||
|
// RefreshToken = tokenResponse.RefreshToken,
|
||||||
|
// };
|
||||||
|
|
||||||
|
// var refreshResponse = await refreshClient.RequestRefreshTokenAsync(refreshRequest);
|
||||||
|
|
||||||
|
// if (refreshResponse.IsError)
|
||||||
|
// {
|
||||||
|
// Console.WriteLine($"Error: {refreshResponse.Error}");
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// Console.WriteLine("获取刷新token 完成");
|
||||||
|
|
||||||
|
// Console.WriteLine("AccessToken:" + refreshResponse.AccessToken);
|
||||||
|
|
||||||
|
// Console.WriteLine("RefreshToken:" + refreshResponse.RefreshToken);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region OIDC authorization_code with client_secret
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
public IResponseOutput TestOidcClientWithSecret()
|
||||||
|
{
|
||||||
|
|
||||||
|
string clientId = "tl42rjin7obxtwqqgvkti";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientCallBack";
|
||||||
|
string state = "123456";
|
||||||
|
|
||||||
|
// 构造请求的 URL
|
||||||
|
string authorizationUrl = $"https://logto.test.extimaging.com/oidc/auth" +
|
||||||
|
$"?client_id={clientId}" +
|
||||||
|
$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +
|
||||||
|
$"&response_type=code" +
|
||||||
|
$"&scope=openid profile email phone" +
|
||||||
|
$"&state={state}";
|
||||||
|
|
||||||
|
Console.WriteLine(authorizationUrl);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
[RoutePattern(HttpMethod = "Get")]
|
||||||
|
public async Task<IResponseOutput> TestOidcClientCallBackAsync(string code)
|
||||||
|
{
|
||||||
|
//使用IdentityModel.OidcClient 测试
|
||||||
|
var client = new HttpClient();
|
||||||
|
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
|
||||||
|
if (disco.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine(disco.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OIDC 配置,替换为您的 OIDC 提供者的配置
|
||||||
|
string clientId = "tl42rjin7obxtwqqgvkti";
|
||||||
|
string clientSecret = "Pu9ig4rz44aLlxb0yKUaOiZaFk6Bcu51";
|
||||||
|
string redirectUri = "http://localhost:6100/OAuth/TestOidcClientCallBack"; // 替换为前端的回调 URL
|
||||||
|
string postLogoutRedirectUri = "http://localhost:6100/OAuth/TestPCKEOrgin"; //退出回话重定向到前端的url
|
||||||
|
// 准备请求内容
|
||||||
|
var tokenRequest = new AuthorizationCodeTokenRequest
|
||||||
|
{
|
||||||
|
Address = disco.TokenEndpoint,
|
||||||
|
ClientId = clientId,
|
||||||
|
ClientSecret = clientSecret,
|
||||||
|
Code = code,
|
||||||
|
RedirectUri = redirectUri,
|
||||||
|
GrantType = "authorization_code",
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var _httpClient = new HttpClient();
|
||||||
|
// 发出 token 请求
|
||||||
|
var tokenResponse = await _httpClient.RequestAuthorizationCodeTokenAsync(tokenRequest);
|
||||||
|
|
||||||
|
|
||||||
|
if (tokenResponse.HttpStatusCode == HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
var apiClient = new HttpClient();
|
||||||
|
apiClient.SetBearerToken(tokenResponse.AccessToken);
|
||||||
|
|
||||||
|
var response = await apiClient.GetAsync(disco.UserInfoEndpoint);
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
Console.WriteLine(response.StatusCode);
|
||||||
|
Console.WriteLine(response.ReasonPhrase);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
|
||||||
|
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
|
||||||
|
|
||||||
|
//获取刷新token
|
||||||
|
var refreshClient = new HttpClient();
|
||||||
|
var refreshRequest = new RefreshTokenRequest
|
||||||
|
{
|
||||||
|
Address = disco.TokenEndpoint,
|
||||||
|
ClientId = clientId,
|
||||||
|
ClientSecret = clientSecret,
|
||||||
|
RefreshToken = tokenResponse.RefreshToken,
|
||||||
|
};
|
||||||
|
|
||||||
|
var refreshResponse = await refreshClient.RequestRefreshTokenAsync(refreshRequest);
|
||||||
|
|
||||||
|
if (refreshResponse.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Error: {refreshResponse.Error}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("获取刷新token 完成");
|
||||||
|
|
||||||
|
Console.WriteLine("AccessToken:" + refreshResponse.AccessToken);
|
||||||
|
|
||||||
|
Console.WriteLine("RefreshToken:" + refreshResponse.RefreshToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 客户端凭证
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 测试客户端凭证代码
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> TestClientCredentialsAsync()
|
||||||
|
{
|
||||||
|
|
||||||
|
#region 使用IdentityModel.OidcClient 测试
|
||||||
|
|
||||||
|
// discover endpoints from metadata
|
||||||
|
var client = new HttpClient();
|
||||||
|
|
||||||
|
var disco = await client.GetDiscoveryDocumentAsync("https://logto.test.extimaging.com/oidc");
|
||||||
|
if (disco.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine(disco.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// request token
|
||||||
|
var tokenResponse = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
|
||||||
|
{
|
||||||
|
Address = disco.TokenEndpoint,
|
||||||
|
ClientId = "v2mr2ndxwkxz0xpsuc1th",
|
||||||
|
ClientSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q",
|
||||||
|
Resource = new List<string>() { "https://default.logto.app/api" },
|
||||||
|
Scope = "all"
|
||||||
|
});
|
||||||
|
|
||||||
|
if (tokenResponse.IsError)
|
||||||
|
{
|
||||||
|
Console.WriteLine(tokenResponse.Error);
|
||||||
|
Console.WriteLine(tokenResponse.ErrorDescription);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine(tokenResponse.AccessToken);
|
||||||
|
Console.WriteLine("\n\n");
|
||||||
|
|
||||||
|
// call api
|
||||||
|
var apiClient = new HttpClient();
|
||||||
|
apiClient.SetBearerToken(tokenResponse.AccessToken);
|
||||||
|
|
||||||
|
var response = await apiClient.GetAsync("https://logto.test.extimaging.com/api/applications");
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
Console.WriteLine(response.StatusCode);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var doc = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
|
||||||
|
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(doc, new JsonSerializerOptions { WriteIndented = true }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IResponseOutput> TestClientCredentialsOriginAsync()
|
||||||
|
{
|
||||||
|
#region 客户端方式获取logto 里面的信息
|
||||||
|
{
|
||||||
|
|
||||||
|
var baseUrl = "https://logto.test.extimaging.com";
|
||||||
|
var appId = "v2mr2ndxwkxz0xpsuc1th";
|
||||||
|
var appSecret = "yq9jUxl70QoOmwHxJ37h1rDoyJ5iz92Q";
|
||||||
|
var apiAddress = "https://default.logto.app/api"; //这里是个坑
|
||||||
|
var scope = "all";
|
||||||
|
|
||||||
|
var opts = new RestClientOptions(baseUrl);
|
||||||
|
using var client = new RestClient(opts);
|
||||||
|
|
||||||
|
//https://bump.sh/logto/doc/logto-management-api/authentication
|
||||||
|
var request = new RestRequest("oidc/token", Method.Post);
|
||||||
|
request
|
||||||
|
.AddHeader("Content-Type", "application/x-www-form-urlencoded")
|
||||||
|
.AddParameter("grant_type", "client_credentials")
|
||||||
|
.AddParameter("client_id", appId)
|
||||||
|
.AddParameter("client_secret", appSecret)
|
||||||
|
.AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别
|
||||||
|
.AddParameter("scope", scope);
|
||||||
|
|
||||||
|
|
||||||
|
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
|
||||||
|
|
||||||
|
if (response.StatusCode == HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
var tokenResponse = response.Data;
|
||||||
|
|
||||||
|
Console.WriteLine(tokenResponse.ToJsonStr());
|
||||||
|
|
||||||
|
#region 获取应用信息
|
||||||
|
|
||||||
|
var applicationRequest = new RestRequest($"/api/applications", Method.Get)
|
||||||
|
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
|
||||||
|
|
||||||
|
var applicationResponse = await client.ExecuteAsync(applicationRequest);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取用户信息
|
||||||
|
//curl \
|
||||||
|
// -X GET https://[tenant_id].logto.app/api/users/{userId} \
|
||||||
|
// -H "Authorization: Bearer $ACCESS_TOKEN"
|
||||||
|
|
||||||
|
var userId = "4fqx4cb3438k";
|
||||||
|
var userInfoRequest = new RestRequest($"api/users/{userId}", Method.Get)
|
||||||
|
.AddHeader("Authorization", $"Bearer {tokenResponse.AccessToken}");
|
||||||
|
|
||||||
|
|
||||||
|
var userResponse = await client.ExecuteAsync<LogtoUser>(userInfoRequest);
|
||||||
|
|
||||||
|
Console.WriteLine(userResponse.Content);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class PkceUtil
|
||||||
|
{
|
||||||
|
// 生成 code_verifier
|
||||||
|
public static string GenerateCodeVerifier()
|
||||||
|
{
|
||||||
|
var bytes = new byte[64];
|
||||||
|
using (var random = RandomNumberGenerator.Create())
|
||||||
|
{
|
||||||
|
random.GetBytes(bytes);
|
||||||
|
return Convert.ToBase64String(bytes)
|
||||||
|
.TrimEnd('=')
|
||||||
|
.Replace('+', '-')
|
||||||
|
.Replace('/', '_');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成 code_challenge
|
||||||
|
public static string GenerateCodeChallenge(string codeVerifier)
|
||||||
|
{
|
||||||
|
using (var sha256 = SHA256.Create())
|
||||||
|
{
|
||||||
|
var bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(codeVerifier));
|
||||||
|
return Convert.ToBase64String(bytes)
|
||||||
|
.TrimEnd('=')
|
||||||
|
.Replace('+', '-')
|
||||||
|
.Replace('/', '_');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,9 +21,62 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Institution")]
|
[ApiExplorerSettings(GroupName = "Institution")]
|
||||||
|
|
||||||
public class TestMinimalApiService(IUserInfo _userInfo) : ServiceBase
|
public class TestMinimalApiService(IUserInfo _userInfo, IRepository<TestLength> _testLengthRepository) : ServiceBase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 测试efcore json 列支持情况
|
||||||
|
/// https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> TestEfcoreJson()
|
||||||
|
{
|
||||||
|
|
||||||
|
var dateTime = DateTime.Parse("2024-11-08");
|
||||||
|
|
||||||
|
//await _testLengthRepository.AddAsync(new TestLength()
|
||||||
|
//{
|
||||||
|
// Name = "Testddd",
|
||||||
|
// TestJsonObjectLsit=new List<TestJsonObject>() { new TestJsonObject() { Name="name1",Description="des1"} , new TestJsonObject() { Name = "name1", Description = "des1" } }
|
||||||
|
//});
|
||||||
|
|
||||||
|
//await _testLengthRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
//对于json 对象 不能使用count any 操作,但是简单的类型可以的
|
||||||
|
var jobjectList = _testLengthRepository.AsQueryable().ToList();
|
||||||
|
|
||||||
|
var jobjectList1 = _testLengthRepository.AsQueryable().Where(t=>t.TestJsonObjectLsit.Any(c=>c.Name=="name1")).ToList();
|
||||||
|
|
||||||
|
var jobjectList2 = _testLengthRepository.AsQueryable().Where(t => t.TestJsonObjectLsit.Any(c => c.Name == "name1")).SelectMany(t=>t.TestJsonObjectLsit).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var d1 = _testLengthRepository.Where(t => t.StringList.Any(t => t == "string1")).ToList();
|
||||||
|
var d2 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
//selectMany 报错 不支持
|
||||||
|
//var d20 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).SelectMany(t => t.StringList).ToList();
|
||||||
|
|
||||||
|
var d3 = _testLengthRepository.Where(t => t.TestEnumList.Contains(TestEnum.Default)).ToList();
|
||||||
|
var d4 = _testLengthRepository.Where(t => t.TestEnumList.Any(t => t == TestEnum.Default)).ToList();
|
||||||
|
|
||||||
|
var d5 = _testLengthRepository.Where(t => t.DateTimeList.Contains(dateTime)).ToList();
|
||||||
|
var d6 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t == dateTime)).ToList();
|
||||||
|
|
||||||
|
var d7 = _testLengthRepository.Where(t=>t.DateTimeList.Any(t=>t.Year==2024)).ToList();
|
||||||
|
|
||||||
|
var d8 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Month == 11)).ToList();
|
||||||
|
|
||||||
|
var d90 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).Select(t => t.DateTimeList).ToList();
|
||||||
|
|
||||||
|
//selectMany 报错 不支持
|
||||||
|
//var d9 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t=>t.DateTimeList).ToList();
|
||||||
|
//var d10 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t => t.DateTimeList).Where(t=>t>dateTime.AddSeconds(1)).ToList();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[TrialGlobalLimit("AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
[TrialGlobalLimit("AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public Task<List<string>> GetProjectList1Async()
|
public Task<List<string>> GetProjectList1Async()
|
||||||
@@ -38,7 +91,7 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
|
|||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt")]
|
[TrialGlobalLimit("BeforeOngoingCantOpt")]
|
||||||
public IResponseOutput GetTest()
|
public IResponseOutput GetTest()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||||||
|
|
||||||
public class QCChallengeWithUser : QCChallengeCommand
|
public class QCChallengeWithUser : QCChallengeCommand
|
||||||
{
|
{
|
||||||
|
public bool IsBaseLine { get; set; }
|
||||||
public string VisitName { get; set; }
|
public string VisitName { get; set; }
|
||||||
public string BlindName { get; set; } = string.Empty;
|
public string BlindName { get; set; } = string.Empty;
|
||||||
public string SubjectCode { get; set; }
|
public string SubjectCode { get; set; }
|
||||||
@@ -222,6 +222,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||||||
public bool IsClosed { get; set; }
|
public bool IsClosed { get; set; }
|
||||||
public DateTime? ReUploadedTime { get; set; }
|
public DateTime? ReUploadedTime { get; set; }
|
||||||
public string CreateUserName { get; set; } = String.Empty;
|
public string CreateUserName { get; set; } = String.Empty;
|
||||||
|
public string CreateUserFullName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
public bool IsOverTime => IsClosed ? ClosedTime > DeadlineTime : DateTime.Now > DeadlineTime;
|
public bool IsOverTime => IsClosed ? ClosedTime > DeadlineTime : DateTime.Now > DeadlineTime;
|
||||||
|
|||||||
@@ -226,11 +226,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("Subject_Visit_Status")]
|
||||||
|
public SubjectStatus SubjectStatus { get; set; }
|
||||||
|
|
||||||
public String TrialSiteCode { get; set; } = String.Empty;
|
public String TrialSiteCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
public DateTime? EarliestScanDate { get; set; }
|
public DateTime? EarliestScanDate { get; set; }
|
||||||
public DateTime? LatestScanDate { get; set; }
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
|
public string EarliestScanDateStr => EarliestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
public string LatestScanDateStr => LatestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
public DateTime? SubmitTime { get; set; }
|
public DateTime? SubmitTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
@@ -293,7 +299,18 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public string LatestReplyUserName { get; set; } = String.Empty;
|
public string LatestReplyUserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string Content { get; set; } = string.Empty;
|
public string Content { get; set; } = string.Empty;
|
||||||
public string ContentReplaced => Content.Replace("<br>","").Replace("<br/>", "").Replace("<div style='margin-left:20px'>", "").Replace("</div>","");
|
public string ContentReplaced {
|
||||||
|
|
||||||
|
get {
|
||||||
|
|
||||||
|
var msg= Content.Replace("<div style='margin-left:20px'>", "").Replace("</div>", "");
|
||||||
|
|
||||||
|
string[] substrings = msg.Split(new string[] { "<br>", "<br/>" }, StringSplitOptions.None);
|
||||||
|
|
||||||
|
return string.Join("\n\n", substrings);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[DictionaryTranslateAttribute("ChallengeIsClosed")]
|
[DictionaryTranslateAttribute("ChallengeIsClosed")]
|
||||||
public bool IsClosed { get; set; }
|
public bool IsClosed { get; set; }
|
||||||
@@ -377,7 +394,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
//public bool IsUrgent { get; set; }
|
//public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
//[ExcelColumn(Name = "FirstGiveMedicineTime", Format = "yyyy-MM-dd")]
|
//[ExcelColumn(Name = "FirstGiveMedicineTime", Format = "yyyy-MM-dd")]
|
||||||
public DateTime? FirstGiveMedicineTime { get; set; }
|
public DateOnly? FirstGiveMedicineTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string FirstGiveMedicineTimeStr => FirstGiveMedicineTime?.ToString("yyyy-MM-dd");
|
public string FirstGiveMedicineTimeStr => FirstGiveMedicineTime?.ToString("yyyy-MM-dd");
|
||||||
@@ -740,6 +757,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public DateTime? LatestScanDate { get; set; }
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
|
public string LatestScanDateStr => LatestScanDate?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
public List<string> ModalityList { get; set; }
|
public List<string> ModalityList { get; set; }
|
||||||
|
|
||||||
public string Modalitys => string.Join(',', ModalityList);
|
public string Modalitys => string.Join(',', ModalityList);
|
||||||
@@ -1087,6 +1106,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
public bool? IsBaseline { get; set; }
|
public bool? IsBaseline { get; set; }
|
||||||
|
|
||||||
|
public ReadingCategory ReadingCategory { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自身一致性分析任务上会有这个值
|
/// 自身一致性分析任务上会有这个值
|
||||||
@@ -1150,6 +1170,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
{
|
{
|
||||||
public List<CommonQuesionInfo> QuestionAnswerList { get; set; }
|
public List<CommonQuesionInfo> QuestionAnswerList { get; set; }
|
||||||
|
|
||||||
|
public List<decimal> SubjectCriterionReadingPeriodVisitNumList { get; set; }
|
||||||
|
|
||||||
public String TrialSiteCode { get; set; } = String.Empty;
|
public String TrialSiteCode { get; set; } = String.Empty;
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
@@ -1183,8 +1205,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
|
|
||||||
//在当前访视触发裁判,或者在截止日期小于等于当前访视的阅片期触发裁判
|
//在当前访视触发裁判,或者在截止日期小于等于当前访视的阅片期触发裁判
|
||||||
[DictionaryTranslateAttribute("YesOrNo")]
|
[DictionaryTranslateAttribute("YesOrNoAudit")]
|
||||||
public bool IsTrigerJudge { get; set; }
|
public bool? IsTrigerJudge { get; set; }
|
||||||
|
|
||||||
//(如果是访视点裁判,则仅在所选阅片人对应访视 显示;如果是阅片期裁判,则在所选阅片人 阅片期内的所有访视 显示此原因)
|
//(如果是访视点裁判,则仅在所选阅片人对应访视 显示;如果是阅片期裁判,则在所选阅片人 阅片期内的所有访视 显示此原因)
|
||||||
public string JudgeNote { get; set; } = string.Empty;
|
public string JudgeNote { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) });
|
var pageList = await query.ToPagedListAsync(inQuery, new string[] { nameof(QCCRCChallengeViewModel.IsUrgent) + " desc", nameof(QCCRCChallengeViewModel.CreateTime) });
|
||||||
|
|
||||||
var config = await _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
var config = await _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||||
|
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == inQuery.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.Subject) && x.UploadRole == UploadRole.CRC);
|
||||||
|
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == inQuery.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.SubjectVisit) && x.UploadRole == UploadRole.CRC);
|
||||||
return ResponseOutput.Ok(pageList, config);
|
return ResponseOutput.Ok(pageList, config);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
||||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||||
|
.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
|
||||||
|
|
||||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||||
.ForMember(d => d.ClinicalInformationTransmissionEnum, u => u.MapFrom(s => s.Trial.ClinicalInformationTransmissionEnum))
|
.ForMember(d => d.ClinicalInformationTransmissionEnum, u => u.MapFrom(s => s.Trial.ClinicalInformationTransmissionEnum))
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<QCChallengeDialog, DialogInfo>()
|
CreateMap<QCChallengeDialog, DialogInfo>()
|
||||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||||
|
|
||||||
CreateMap<QCChallenge, QCChanllengeExportDto>()
|
CreateMap<QCChallenge, QCChanllengeExportDto>()
|
||||||
@@ -122,7 +124,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<CheckChallengeDialog, DialogInfo>()
|
CreateMap<CheckChallengeDialog, DialogInfo>()
|
||||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||||
|
|
||||||
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
|
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
|
||||||
@@ -253,8 +255,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
(arbitrationRule == ArbitrationRule.Reading ?
|
(arbitrationRule == ArbitrationRule.Reading ?
|
||||||
u.Subject.SubjectVisitTaskList.Any(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Judge && t.TrialReadingCriterionId == trialReadingCriterionId && u.VisitTaskNum < t.VisitTaskNum) :
|
u.Subject.SubjectVisitTaskList.Any(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Judge && t.TrialReadingCriterionId == trialReadingCriterionId && u.VisitTaskNum < t.VisitTaskNum) :
|
||||||
false)))
|
false)))
|
||||||
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.JudgeVisitTask.JudgeResultRemark))
|
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.ReadingCategory==ReadingCategory.Judge? u.JudgeResultRemark : u.JudgeVisitTask.JudgeResultRemark))
|
||||||
.ForMember(o => o.VisitNote, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.AdjustReason).FirstOrDefault()!.Answer))
|
.ForMember(o => o.VisitNote, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.AdjustReason).FirstOrDefault()!.Answer))
|
||||||
|
//.ForMember(o => o.IsSubjectHaveReadingPeriod, t => t.MapFrom(u => arbitrationRule == ArbitrationRule.Reading ?
|
||||||
|
//u.Subject.ReadModuleList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading) : false))
|
||||||
|
|
||||||
|
|
||||||
|
.ForMember(o => o.SubjectCriterionReadingPeriodVisitNumList, t => t.MapFrom(u =>
|
||||||
|
u.Subject.ReadModuleList.Where(t=>t.TrialReadingCriterionId == trialReadingCriterionId && t.ReadingSetType == ReadingSetType.ImageReading).Select(c=>c.SubjectVisit.VisitNum)))
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||||
@@ -276,7 +284,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<ReadingTableAnswerRowInfo, CommonLessionInfo>()
|
CreateMap<ReadingTableAnswerRowInfo, CommonLessionInfo>()
|
||||||
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
|
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
|
||||||
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||||
.ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList));
|
.ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString()))));
|
||||||
|
|
||||||
CreateMap<ReadingTableQuestionAnswer, CommonLessionQuestionAnswerInfo>()
|
CreateMap<ReadingTableQuestionAnswer, CommonLessionQuestionAnswerInfo>()
|
||||||
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
||||||
@@ -600,24 +608,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId));
|
.ForMember(d => d.IsCurrentUser, u => u.MapFrom(s => s.CreateUserId == currentUserId));
|
||||||
//质疑编号
|
//质疑编号
|
||||||
CreateMap<QCChallenge, QCChallengeWithUser>()
|
CreateMap<QCChallenge, QCChallengeWithUser>()
|
||||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
|
||||||
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
||||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName))
|
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
|
||||||
|
|
||||||
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
|
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
|
||||||
.ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode))
|
.ForMember(d => d.ChallengeCode, u => u.MapFrom(s => s.ChallengeCode))
|
||||||
|
|
||||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
||||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||||
|
.ForMember(d => d.IsBaseLine, u => u.MapFrom(s => s.SubjectVisit.IsBaseLine))
|
||||||
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName));
|
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName));
|
||||||
|
|
||||||
|
|
||||||
CreateMap<QCChallenge, ChallengeAndDialog>()
|
CreateMap<QCChallenge, ChallengeAndDialog>()
|
||||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.FullName))
|
||||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName))
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName))
|
||||||
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
.ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId))
|
||||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName))
|
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.FullName))
|
||||||
|
|
||||||
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
|
.ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId))
|
||||||
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList.OrderBy(t => t.CreateTime)))
|
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList.OrderBy(t => t.CreateTime)))
|
||||||
@@ -625,6 +634,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
||||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||||
|
.ForMember(d => d.IsBaseLine, u => u.MapFrom(s => s.SubjectVisit.IsBaseLine))
|
||||||
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName))
|
.ForMember(d => d.BlindName, u => u.MapFrom(s => s.SubjectVisit.BlindName))
|
||||||
|
|
||||||
;
|
;
|
||||||
@@ -691,14 +701,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||||
|
|
||||||
CreateMap<NoneDicomStudy, NoneDicomStudyView>()
|
CreateMap<NoneDicomStudy, NoneDicomStudyView>()
|
||||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)) : s.NoneDicomFileList))
|
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.FileType).ThenBy(t => t.FileName) : s.NoneDicomFileList.OrderBy(t => t.FileType).ThenBy(t => t.FileName)))
|
||||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||||
|
|
||||||
Guid? visiTaskId = null;
|
Guid? visiTaskId = null;
|
||||||
CreateMap<NoneDicomStudy, TaskDicomStudyView>()
|
CreateMap<NoneDicomStudy, TaskDicomStudyView>()
|
||||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ?
|
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ?
|
||||||
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip))
|
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.FileType).ThenBy(t=>t.FileName)
|
||||||
: s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true)))
|
: s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).OrderBy(t => t.FileType).ThenBy(t => t.FileName)))
|
||||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,10 +336,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
questions.ForEach(x => x.CreateTime = formInfo.CreateTime);
|
questions.ForEach(x => x.CreateTime = formInfo.CreateTime);
|
||||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
||||||
|
|||||||
+51
-26
@@ -36,6 +36,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
#region 临床数据基本增删改
|
#region 临床数据基本增删改
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新增或者修改
|
/// 新增或者修改
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -605,6 +607,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
#region 临床数据相关查询
|
#region 临床数据相关查询
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取访视临床数据名称
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<GetVisitClinicalDataNameOutDto> GetVisitClinicalDataName(GetVisitClinicalDataNameInDto inDto)
|
||||||
|
{
|
||||||
|
var clinicalDataNames = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.Id).Select(x =>
|
||||||
|
_userInfo.IsEn_Us ? x.ClinicalDataTrialSet.ClinicalDataSetEnName : x.ClinicalDataTrialSet.ClinicalDataSetName).Distinct().ToListAsync();
|
||||||
|
|
||||||
|
return new GetVisitClinicalDataNameOutDto()
|
||||||
|
{
|
||||||
|
ClinicalDataName = string.Join(_userInfo.IsEn_Us? ", ":",", clinicalDataNames),
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取下拉菜单
|
/// 获取下拉菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -701,23 +722,6 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var readingIds = result.Select(x => x.ReadingId).ToList();
|
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
foreach (var item in result)
|
|
||||||
{
|
|
||||||
item.ClinicalTableData = new ClinicalDataTable()
|
|
||||||
{
|
|
||||||
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
|
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
|
||||||
{ClinicalLevel.SubjectVisit,0 },
|
{ClinicalLevel.SubjectVisit,0 },
|
||||||
{ClinicalLevel.ImageRead,2 },
|
{ClinicalLevel.ImageRead,2 },
|
||||||
@@ -809,6 +813,27 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
isSelfAnalysis = true;
|
isSelfAnalysis = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//下面改用readingIdList筛选 不然
|
||||||
|
List<Guid> readingIdList = new List<Guid>() {};
|
||||||
|
if (inDto.VisitTaskId!=null)
|
||||||
|
{
|
||||||
|
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == inDto.ReadingId.Value).FirstOrDefaultAsync();
|
||||||
|
if (subjectVisit != null && !subjectVisit.IsBaseLine)
|
||||||
|
{
|
||||||
|
var baseId = await _subjectVisitRepository.Where(x => x.SubjectId == subjectVisit.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
readingIdList.Add(baseId);
|
||||||
|
}
|
||||||
|
|
||||||
|
var readModuleInfo = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId.Value).FirstOrDefaultAsync();
|
||||||
|
if (readModuleInfo != null && readModuleInfo.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
|
{
|
||||||
|
var baseId = await _subjectVisitRepository.Where(x => x.SubjectId == readModuleInfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
readingIdList.Add(baseId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 一致性分析
|
// 一致性分析
|
||||||
if (isSelfAnalysis)
|
if (isSelfAnalysis)
|
||||||
{
|
{
|
||||||
@@ -817,7 +842,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId||(readingIdList.Contains(x.ReadingId)&&x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
@@ -858,7 +883,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Where(x => x.ClinicalDataTrialSet.ClinicalUploadType != ClinicalUploadType.PDF || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study)
|
.Where(x => x.ClinicalDataTrialSet.ClinicalUploadType != ClinicalUploadType.PDF || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study)
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
@@ -901,7 +926,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
@@ -1061,17 +1086,17 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in result)
|
foreach (var item in result)
|
||||||
{
|
{
|
||||||
item.ClinicalTableData = new ClinicalDataTable()
|
item.ClinicalTableData = new ClinicalDataTable()
|
||||||
{
|
{
|
||||||
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
PreviousHistoryList = previousHistoryList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
|
||||||
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
PreviousOtherList = previousOtherList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
|
||||||
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
PreviousSurgeryList = previousSurgeryList.Where(x => x.SubjectVisitId == item.ReadingId).ToList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -556,6 +556,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据名称
|
||||||
|
/// </summary>
|
||||||
|
public class GetVisitClinicalDataNameInDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetVisitClinicalDataNameOutDto
|
||||||
|
{
|
||||||
|
public string ClinicalDataName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetTrialClinicalDataSelectIndto
|
public class GetTrialClinicalDataSelectIndto
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2436,6 +2436,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ParentId
|
/// ParentId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2499,7 +2501,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否显示
|
/// 是否显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大问题数
|
/// 最大问题数
|
||||||
@@ -2566,6 +2568,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ReadingQuestionCriterionSystemId { get; set; }
|
public Guid ReadingQuestionCriterionSystemId { get; set; }
|
||||||
|
|
||||||
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题类型
|
/// 问题类型
|
||||||
@@ -2666,7 +2669,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否显示
|
/// 是否显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大问题数
|
/// 最大问题数
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
public Guid? RelevanceId { get; set; }
|
public Guid? RelevanceId { get; set; }
|
||||||
public string RelevanceValue { get; set; } = string.Empty;
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
public string DataTableName { get; set; } = string.Empty;
|
public string DataTableName { get; set; } = string.Empty;
|
||||||
public string DataTableColumn { get; set; } = string.Empty;
|
public string DataTableColumn { get; set; } = string.Empty;
|
||||||
@@ -577,7 +577,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
public Guid? RelevanceId { get; set; }
|
public Guid? RelevanceId { get; set; }
|
||||||
public string RelevanceValue { get; set; } = string.Empty;
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
public string DataTableName { get; set; } = string.Empty;
|
public string DataTableName { get; set; } = string.Empty;
|
||||||
public string DataTableColumn { get; set; } = string.Empty;
|
public string DataTableColumn { get; set; } = string.Empty;
|
||||||
@@ -1707,7 +1707,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public string RelevanceValue { get; set; } = string.Empty;
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("是否显示")]
|
[Comment("是否显示")]
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
|
|
||||||
[Comment("最大问题数")]
|
[Comment("最大问题数")]
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
|
|||||||
+1
-1
@@ -244,7 +244,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
|
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
|
||||||
{
|
{
|
||||||
var existsQuery = _readingMedicineTrialQuestionRepository
|
var existsQuery = _readingMedicineTrialQuestionRepository
|
||||||
|
|||||||
@@ -578,7 +578,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
"select","radio","class",
|
"select","radio","class",
|
||||||
};
|
};
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
||||||
.Where(x => types.Contains(x.Type))
|
.Where(x => types.Contains(x.Type)||(x.Type=="number"&&x.TypeValue!=string.Empty))
|
||||||
|
|
||||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
||||||
|
|
||||||
@@ -672,10 +673,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var types = new List<string>()
|
var types = new List<string>()
|
||||||
{
|
{
|
||||||
"select","radio"
|
"select","radio","class"
|
||||||
};
|
};
|
||||||
var questionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
|
var questionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
|
||||||
.Where(x => types.Contains(x.Type))
|
.Where(x => types.Contains(x.Type) || (x.Type == "number" && x.TypeValue != string.Empty))
|
||||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||||
|
|
||||||
.Select(x => new CriterionOtherQuestionOutDto()
|
.Select(x => new CriterionOtherQuestionOutDto()
|
||||||
|
|||||||
+15
-33
@@ -1,4 +1,5 @@
|
|||||||
using IRaCIS.Core.Application.Contracts;
|
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
@@ -14,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NPOI.POIFS.Properties;
|
||||||
using NPOI.SS.Formula.Functions;
|
using NPOI.SS.Formula.Functions;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
using ZiggyCreatures.Caching.Fusion;
|
using ZiggyCreatures.Caching.Fusion;
|
||||||
@@ -1308,38 +1310,19 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
item.TableQuestions = new TrialReadTableQuestion();
|
item.TableQuestions = new TrialReadTableQuestion();
|
||||||
|
|
||||||
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();
|
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x => x.ShowOrder).ToList();
|
||||||
|
|
||||||
item.TableQuestions.Questions.ForEach(x =>
|
item.TableQuestions.Questions.ForEach(x =>
|
||||||
{
|
{
|
||||||
|
x.RelationQuestions= _mapper.Map<List<GetTrialReadingQuestionOutDto>>(tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id));
|
||||||
x.RelationQuestions = tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
|
x.RelationQuestions.ForEach(y =>
|
||||||
{
|
{
|
||||||
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
y.Childrens = new List<GetTrialReadingQuestionOutDto>();
|
||||||
ShowOrder = x.ShowOrder,
|
y.GroupName = string.Empty;
|
||||||
GroupName = string.Empty,
|
y.ImageCount = 0;
|
||||||
Id = x.Id,
|
y.ParentId = item.Id;
|
||||||
DictionaryCode = x.DictionaryCode,
|
y.LesionType = item.LesionType;
|
||||||
Type = x.Type,
|
y.RelationQuestions = new List<GetTrialReadingQuestionOutDto>();
|
||||||
TableQuestionType = x.TableQuestionType,
|
});
|
||||||
DependParentId = x.DependParentId,
|
|
||||||
IsDepend = x.IsDepend,
|
|
||||||
QuestionMark = x.QuestionMark,
|
|
||||||
TypeValue = x.TypeValue,
|
|
||||||
RelevanceId = x.RelevanceId,
|
|
||||||
RelevanceValue = x.RelevanceValue,
|
|
||||||
ImageCount = 0,
|
|
||||||
ParentId = item.Id,
|
|
||||||
DataTableColumn = x.DataTableColumn,
|
|
||||||
LesionType = item.LesionType,
|
|
||||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
|
||||||
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
|
||||||
Remark = x.Remark,
|
|
||||||
ValueType = x.ValueType,
|
|
||||||
Unit = x.Unit,
|
|
||||||
ClassifyAlgorithms=x.ClassifyAlgorithms,
|
|
||||||
IsCopy=x.IsCopy,
|
|
||||||
ClassifyTableQuestionId=x.ClassifyTableQuestionId,
|
|
||||||
}).ToList();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
||||||
@@ -2281,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
&& x.QuestionId == inDto.QuestionId
|
&& x.QuestionId == inDto.QuestionId
|
||||||
).CountAsync()) + 1))
|
).CountAsync()) + 1))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", questionInfo.MaxQuestionCount]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_MaxQuestion", _userInfo.IsEn_Us? questionInfo.QuestionEnName:questionInfo.QuestionName, questionInfo.MaxQuestionCount]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2597,8 +2580,6 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证访视提交
|
/// 验证访视提交
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2649,6 +2630,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_RequiredQuestion", string.Join(',', readingQuestionList.Select(x => x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)))]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_RequiredQuestion", string.Join(',', readingQuestionList.Select(x => x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)))]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 各个标准不同
|
||||||
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
||||||
|
|
||||||
var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||||
|
|||||||
+20
-54
@@ -1,9 +1,12 @@
|
|||||||
using IRaCIS.Core.Application.Contracts;
|
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using NPOI.POIFS.Properties;
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -265,62 +268,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
||||||
{
|
{
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
|
||||||
|
var itemChild = _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).ToList());
|
||||||
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetSystemReadingQuestionOutDto
|
itemChild.ForEach(x =>
|
||||||
{
|
{
|
||||||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
x.Childrens = new List<GetSystemReadingQuestionOutDto>();
|
||||||
ShowOrder = x.ShowOrder,
|
x.GroupName = string.Empty;
|
||||||
GroupName = string.Empty,
|
x.ImageCount = 0;
|
||||||
Id = x.Id,
|
var relationQuestions= _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).ToList());
|
||||||
Type = x.Type,
|
relationQuestions.ForEach(y =>
|
||||||
DictionaryCode = x.DictionaryCode,
|
|
||||||
TableQuestionType = x.TableQuestionType,
|
|
||||||
DependParentId = x.DependParentId,
|
|
||||||
IsDepend = x.IsDepend,
|
|
||||||
QuestionMark = x.QuestionMark,
|
|
||||||
TypeValue = x.TypeValue,
|
|
||||||
RelevanceId = x.RelevanceId,
|
|
||||||
IsRequired = x.IsRequired,
|
|
||||||
RelevanceValue = x.RelevanceValue,
|
|
||||||
ImageCount = 0,
|
|
||||||
ParentId = item.Id,
|
|
||||||
DataTableColumn = x.DataTableColumn,
|
|
||||||
LesionType = item.LesionType,
|
|
||||||
QuestionName = x.QuestionName,
|
|
||||||
IsCopy=x.IsCopy,
|
|
||||||
ClassifyTableQuestionId= x.ClassifyTableQuestionId,
|
|
||||||
ClassifyAlgorithms=x.ClassifyAlgorithms,
|
|
||||||
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetSystemReadingQuestionOutDto
|
|
||||||
{
|
{
|
||||||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
y.Childrens = new List<GetSystemReadingQuestionOutDto>();
|
||||||
ShowOrder = x.ShowOrder,
|
y.GroupName = string.Empty;
|
||||||
GroupName = string.Empty,
|
y.ImageCount = 0;
|
||||||
Id = x.Id,
|
y.LesionType = item.LesionType;
|
||||||
DictionaryCode = x.DictionaryCode,
|
y.RelationQuestions = new List<GetSystemReadingQuestionOutDto>();
|
||||||
Type = x.Type,
|
});
|
||||||
TableQuestionType = x.TableQuestionType,
|
|
||||||
DependParentId = x.DependParentId,
|
|
||||||
IsDepend = x.IsDepend,
|
|
||||||
QuestionMark = x.QuestionMark,
|
|
||||||
TypeValue = x.TypeValue,
|
|
||||||
RelevanceId = x.RelevanceId,
|
|
||||||
RelevanceValue = x.RelevanceValue,
|
|
||||||
ImageCount = 0,
|
|
||||||
ParentId = item.Id,
|
|
||||||
DataTableColumn = x.DataTableColumn,
|
|
||||||
LesionType = item.LesionType,
|
|
||||||
QuestionName = x.QuestionName,
|
|
||||||
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
|
|
||||||
Remark = x.Remark,
|
|
||||||
IsCopy = x.IsCopy,
|
|
||||||
ClassifyTableQuestionId = x.ClassifyTableQuestionId,
|
|
||||||
ClassifyAlgorithms = x.ClassifyAlgorithms,
|
|
||||||
|
|
||||||
}).ToList(),
|
|
||||||
Remark = x.Remark,
|
|
||||||
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
x.RelationQuestions= relationQuestions;
|
||||||
|
});
|
||||||
|
item.Childrens.AddRange(itemChild);
|
||||||
if (item.Childrens != null && item.Childrens.Count != 0)
|
if (item.Childrens != null && item.Childrens.Count != 0)
|
||||||
{
|
{
|
||||||
item.Childrens.ForEach(x =>
|
item.Childrens.ForEach(x =>
|
||||||
|
|||||||
@@ -211,6 +211,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
|
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
|
||||||
;
|
;
|
||||||
|
|
||||||
|
CreateMap<TableQuestionDataInfo, GetSystemReadingQuestionOutDto>();
|
||||||
|
|
||||||
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
|
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
|
||||||
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>()
|
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>()
|
||||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||||
@@ -351,6 +353,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
||||||
.ForMember(x => x.Id, y => y.MapFrom(z => z.Id));
|
.ForMember(x => x.Id, y => y.MapFrom(z => z.Id));
|
||||||
|
|
||||||
|
CreateMap<TableQuestionTrial, GetTrialReadingQuestionOutDto>();
|
||||||
|
|
||||||
|
|
||||||
//CreateMap<VisitTask, GetReadingPastResultListOutDto>()
|
//CreateMap<VisitTask, GetReadingPastResultListOutDto>()
|
||||||
// .ForMember(x => x.VisitTaskId, y => y.MapFrom(z => z.Id))
|
// .ForMember(x => x.VisitTaskId, y => y.MapFrom(z => z.Id))
|
||||||
// .ForMember(x => x.JudgeResultArm, y => y.MapFrom(z => (z.JudgeResultTask==null?null:z.JudgeResultTask.ArmEnum)));
|
// .ForMember(x => x.JudgeResultArm, y => y.MapFrom(z => (z.JudgeResultTask==null?null:z.JudgeResultTask.ArmEnum)));
|
||||||
|
|||||||
@@ -626,6 +626,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
||||||
}
|
}
|
||||||
|
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||||
|
decimal getdecimalData(string value)
|
||||||
|
{
|
||||||
|
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||||
|
};
|
||||||
|
|
||||||
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
||||||
|
|
||||||
@@ -638,8 +643,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||||
{
|
{
|
||||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||||
Emm = decimal.Parse(dataTable.Rows[i]["B"].ToString()),
|
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||||
Lumen = decimal.Parse(dataTable.Rows[i]["C"].ToString()),
|
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
@@ -703,7 +708,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
|
|
||||||
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
||||||
{
|
{
|
||||||
var digitPlaces= taskinfo.TrialReadingCriterion.DigitPlaces??0;
|
|
||||||
emm = decimal.Round(decimal.Parse(emm ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
emm = decimal.Round(decimal.Parse(emm ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||||
lumen = decimal.Round(decimal.Parse(lumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
lumen = decimal.Round(decimal.Parse(lumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||||
emmSubtractionLumen = decimal.Round(decimal.Parse(emmSubtractionLumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
emmSubtractionLumen = decimal.Round(decimal.Parse(emmSubtractionLumen ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||||
@@ -742,6 +747,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
RowIndex = maxnum,
|
RowIndex = maxnum,
|
||||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Id).FirstOrDefault(),
|
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.ElasticAreaDiffValue).Select(x => x.Id).FirstOrDefault(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 添加其他问题答案
|
||||||
|
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||||
|
{
|
||||||
|
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = string.Empty,
|
||||||
|
QuestionId = questionInfo.Id,
|
||||||
|
TrialId = taskinfo.TrialId,
|
||||||
|
VisitTaskId = taskinfo.Id,
|
||||||
|
RowId = newRowId,
|
||||||
|
RowIndex = maxnum,
|
||||||
|
TableQuestionId = otherQuestion.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -924,6 +945,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
RowIndex = item,
|
RowIndex = item,
|
||||||
TableQuestionId = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.EEMSubtractLumenSum).Select(x => x.Id).FirstOrDefault(),
|
TableQuestionId = tableQuestionList.Where(x => x.QuestionMark == QuestionMark.EEMSubtractLumenSum).Select(x => x.Id).FirstOrDefault(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 添加其他问题答案
|
||||||
|
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||||
|
{
|
||||||
|
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = string.Empty,
|
||||||
|
QuestionId = questionInfo!.QuestionId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
|
RowId = newRowId,
|
||||||
|
RowIndex = item,
|
||||||
|
TableQuestionId = otherQuestion.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
|
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
|
||||||
|
|||||||
@@ -609,6 +609,23 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
RowIndex = maxnum,
|
RowIndex = maxnum,
|
||||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(),
|
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 添加其他问题答案
|
||||||
|
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||||
|
{
|
||||||
|
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = string.Empty,
|
||||||
|
QuestionId = questionInfo.Id,
|
||||||
|
TrialId = taskinfo.TrialId,
|
||||||
|
VisitTaskId = taskinfo.Id,
|
||||||
|
RowId = newRowId,
|
||||||
|
RowIndex = maxnum,
|
||||||
|
TableQuestionId = otherQuestion.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
||||||
@@ -769,6 +786,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
RowIndex = maxnum,
|
RowIndex = maxnum,
|
||||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
|
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LipidAngle).Select(x => x.Id).FirstOrDefault(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 添加其他问题答案
|
||||||
|
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||||
|
{
|
||||||
|
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = string.Empty,
|
||||||
|
QuestionId = questionInfo.Id,
|
||||||
|
TrialId = taskinfo.TrialId,
|
||||||
|
VisitTaskId = taskinfo.Id,
|
||||||
|
RowId = newRowId,
|
||||||
|
RowIndex = maxnum,
|
||||||
|
TableQuestionId = otherQuestion.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == questionInfo.Id && x.VisitTaskId == taskinfo.Id);
|
||||||
@@ -1070,6 +1102,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 添加其他问题答案
|
||||||
|
foreach (var otherQuestion in patchDataTableQuestion.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||||
|
{
|
||||||
|
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = string.Empty,
|
||||||
|
QuestionId = patchDataStatisticsInfo.Id,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
|
RowId = newRowId,
|
||||||
|
RowIndex = item,
|
||||||
|
TableQuestionId = otherQuestion.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x =>x.QuestionId== patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
|
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x =>x.QuestionId== patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
|
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == patchDataStatisticsInfo.Id && x.VisitTaskId == inDto.VisitTaskId);
|
||||||
@@ -1120,6 +1168,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||||
{
|
{
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.PatchDataStatistics && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId== question.Id)
|
||||||
|
.Where(x => x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show).ToListAsync();
|
||||||
|
|
||||||
|
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).Include(x=>x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
|
||||||
|
|
||||||
|
var tableQuesionAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).ToListAsync();
|
||||||
|
|
||||||
|
foreach (var item in rowinfoList)
|
||||||
|
{
|
||||||
|
foreach (var tq in tableQuestions)
|
||||||
|
{
|
||||||
|
var answer = tableQuesionAnswerList.Where(x => x.TableQuestionId == tq.Id && x.RowId == item.Id).FirstOrDefault();
|
||||||
|
if (answer == null || answer.Answer.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["OCTTableRequired", item.ReadingQuestionTrial.OrderMark+ item.RowIndex.GetLesionMark()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
@@ -222,11 +223,25 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class UseEmialGetDoctorInfoOutDto
|
||||||
|
{
|
||||||
|
public Guid DoctorId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UseEmialGetDoctorInfoInDto
|
||||||
|
{
|
||||||
|
public string EmailOrPhone { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class VerifyEmialGetDoctorInfoInDto
|
public class VerifyEmialGetDoctorInfoInDto
|
||||||
{
|
{
|
||||||
public string VerificationCode { get; set; }
|
public string VerificationCode { get; set; }
|
||||||
|
|
||||||
public string EmailOrPhone { get; set; }
|
public string EmailOrPhone { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Newtonsoft.Json;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using static MassTransit.ValidationResultExtensions;
|
using static MassTransit.ValidationResultExtensions;
|
||||||
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
||||||
|
using IdentityModel.OidcClient;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
@@ -114,6 +115,56 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据邮箱获取DoctorId 没有的话创建一个
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<UseEmialGetDoctorInfoOutDto> UseEmialGetDoctorInfo(UseEmialGetDoctorInfoInDto inDto)
|
||||||
|
{
|
||||||
|
var dockerInfo = await _doctorRepository.Where(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (dockerInfo != null)
|
||||||
|
{
|
||||||
|
return new UseEmialGetDoctorInfoOutDto()
|
||||||
|
{
|
||||||
|
DoctorId = dockerInfo.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var isVirtual = true;
|
||||||
|
|
||||||
|
if (inDto.TrialId != null)
|
||||||
|
{
|
||||||
|
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
Doctor doctor = new Doctor()
|
||||||
|
{
|
||||||
|
EMail = inDto.EmailOrPhone,
|
||||||
|
IsVirtual = isVirtual,
|
||||||
|
AcceptingNewTrial = false,
|
||||||
|
ActivelyReading =false,
|
||||||
|
ResumeStatus = ResumeStatusEnum.Pass,
|
||||||
|
CooperateStatus = ContractorStatusEnum.Noncooperation,
|
||||||
|
|
||||||
|
ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse
|
||||||
|
};
|
||||||
|
|
||||||
|
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||||
|
|
||||||
|
return new UseEmialGetDoctorInfoOutDto()
|
||||||
|
{
|
||||||
|
DoctorId = info.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证邮箱验证码 获取医生信息Id
|
/// 验证邮箱验证码 获取医生信息Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -155,18 +206,36 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var isVirtual = true;
|
||||||
|
|
||||||
|
if (inDto.TrialId != null)
|
||||||
|
{
|
||||||
|
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
|
||||||
|
}
|
||||||
Doctor doctor = new Doctor()
|
Doctor doctor = new Doctor()
|
||||||
{
|
{
|
||||||
EMail = inDto.EmailOrPhone
|
EMail = inDto.EmailOrPhone,
|
||||||
|
IsVirtual = isVirtual,
|
||||||
|
AcceptingNewTrial=false,
|
||||||
|
ActivelyReading=false,
|
||||||
|
CooperateStatus= ContractorStatusEnum.Noncooperation,
|
||||||
|
|
||||||
|
ReviewStatus= ReviewerInformationConfirmStatus.ConfirmRefuse
|
||||||
};
|
};
|
||||||
|
|
||||||
var info=await _doctorRepository.AddAsync(doctor,true);
|
var info=await _doctorRepository.AddAsync(doctor,true);
|
||||||
|
|
||||||
|
//await _userRepository.BatchUpdateNoTrackingAsync(x => x.EMail == inDto.EmailOrPhone, x => new User()
|
||||||
|
//{
|
||||||
|
// DoctorId = info.DoctorId,
|
||||||
|
|
||||||
|
//});
|
||||||
|
|
||||||
result.DoctorId = info.Id;
|
result.DoctorId = info.Id;
|
||||||
result.ReviewStatus = info.ReviewStatus;
|
result.ReviewStatus = info.ReviewStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()));
|
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() { Id= Guid.NewGuid() }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -813,7 +813,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
LastName = doctorItem.LastName,
|
LastName = doctorItem.LastName,
|
||||||
ChineseName = doctorItem.ChineseName,
|
ChineseName = doctorItem.ChineseName,
|
||||||
|
|
||||||
TrialCode = trialItem.TrialCode
|
TrialCode = trialItem==null?"": trialItem.TrialCode
|
||||||
};
|
};
|
||||||
return reviewerList.ToList();
|
return reviewerList.ToList();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Domain.Share.Reading;
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
@@ -67,6 +69,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public List<string> ModalityList { get; set; } = new List<string>();
|
public List<string> ModalityList { get; set; } = new List<string>();
|
||||||
|
|
||||||
|
|
||||||
|
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConfigTrialProcessInfoVerificationInDto
|
public class ConfigTrialProcessInfoVerificationInDto
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
public string CriterionName { get; set; } = string.Empty;
|
public string CriterionName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; } = new List<TrialObjectNameConfig>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialModalitySelectDto
|
public class TrialModalitySelectDto
|
||||||
@@ -236,7 +236,48 @@ namespace IRaCIS.Application.Contracts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TrialExtraConfig
|
||||||
|
{
|
||||||
|
#region QC 影像下载
|
||||||
|
|
||||||
|
//QC质控
|
||||||
|
public bool IsSupportQCDownloadImage { get; set; } = false;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 中心调研
|
||||||
|
|
||||||
|
public List<string> NotShowFieldList { get; set; } = new List<string>();
|
||||||
|
|
||||||
|
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 项目术语配置
|
||||||
|
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialPacsInfo
|
||||||
|
{
|
||||||
|
public int Port { get; set; }
|
||||||
|
|
||||||
|
public string Ip { get; set; }
|
||||||
|
|
||||||
|
public string TrialCalledAE { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SiteSurveyModifyFiled
|
||||||
|
{
|
||||||
|
public string NeedModifyFiled { get; set; }
|
||||||
|
|
||||||
|
public string ReplaceContent { get; set; }
|
||||||
|
|
||||||
|
public string ReplaceContentCN { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,11 +88,14 @@ namespace IRaCIS.Application.Contracts
|
|||||||
[ExcelFormat("yyyy-MM-dd")]
|
[ExcelFormat("yyyy-MM-dd")]
|
||||||
public DateTime? RemoveTime { get; set; }
|
public DateTime? RemoveTime { get; set; }
|
||||||
|
|
||||||
|
public string RemoveTimeStr=> RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD")]
|
//[ExporterHeader(Format = "yyyy-mm-DD")]
|
||||||
[ExcelFormat("yyyy-MM-dd")]
|
[ExcelFormat("yyyy-MM-dd")]
|
||||||
public DateTime? JoinTime { get; set; }
|
public DateTime? JoinTime { get; set; }
|
||||||
|
|
||||||
|
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
|
//[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
|
||||||
[ExcelFormat("yyyy-MM-dd HH:mm:ss")]
|
[ExcelFormat("yyyy-MM-dd HH:mm:ss")]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Contracts;
|
||||||
|
using IRaCIS.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
@@ -319,7 +320,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -404,7 +405,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SetOncologySet(SetOncologySetInDto inDto)
|
public async Task<IResponseOutput> SetOncologySet(SetOncologySetInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -548,7 +549,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
ArbitrationRule arbitration = ArbitrationRule.NA;
|
ArbitrationRule arbitration = ArbitrationRule.NA;
|
||||||
@@ -898,7 +899,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig)
|
||||||
{
|
{
|
||||||
await VerifyOnlyInOngoingOrInitialIzingOptAsync(trialConfig.TrialId);
|
await VerifyOnlyInOngoingOrInitialIzingOptAsync(trialConfig.TrialId);
|
||||||
@@ -906,9 +907,11 @@ namespace IRaCIS.Core.Application
|
|||||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||||
|
|
||||||
trialConfig.Modalitys = $"{String.Join('|', trialConfig.ModalityList)}";
|
trialConfig.Modalitys = $"{String.Join('|', trialConfig.ModalityList)}";
|
||||||
|
|
||||||
_mapper.Map(trialConfig, trialInfo);
|
_mapper.Map(trialConfig, trialInfo);
|
||||||
trialInfo.UpdateTime = DateTime.Now;
|
trialInfo.UpdateTime = DateTime.Now;
|
||||||
|
|
||||||
|
//_trialRepository.MarkAsModified(trialInfo, nameof(trialInfo.TrialObjectNameList));
|
||||||
|
|
||||||
//await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialConfig.TrialId && t.IsSigned == false, u => new ReadingQuestionCriterionTrial() { CriterionModalitys = trialConfig.Modalitys });
|
//await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialConfig.TrialId && t.IsSigned == false, u => new ReadingQuestionCriterionTrial() { CriterionModalitys = trialConfig.Modalitys });
|
||||||
|
|
||||||
@@ -923,7 +926,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task ConfigTrialProcessInfoVerification(ConfigTrialProcessInfoVerificationInDto trialConfig)
|
public async Task ConfigTrialProcessInfoVerification(ConfigTrialProcessInfoVerificationInDto trialConfig)
|
||||||
{
|
{
|
||||||
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
|
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
|
||||||
@@ -950,7 +953,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> ConfigTrialProcessInfo(TrialProcessConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialProcessInfo(TrialProcessConfig trialConfig)
|
||||||
{
|
{
|
||||||
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
|
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
|
||||||
@@ -1078,7 +1081,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1113,7 +1116,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="trialConfig"></param>
|
/// <param name="trialConfig"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> ConfigTrialPACSInfo(TrialPACSConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialPACSInfo(TrialPACSConfig trialConfig)
|
||||||
{
|
{
|
||||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||||
@@ -1146,7 +1149,7 @@ namespace IRaCIS.Core.Application
|
|||||||
[HttpPut("{trialId:guid}/{trialStatusStr}/{reason?}")]
|
[HttpPut("{trialId:guid}/{trialStatusStr}/{reason?}")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
//[Authorize(Policy = IRaCISPolicy.PM)]
|
//[Authorize(Policy = IRaCISPolicy.PM)]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
|
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1221,7 +1224,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
|
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
|
||||||
//[Authorize(Policy = IRaCISPolicy.PM)]
|
//[Authorize(Policy = IRaCISPolicy.PM)]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1260,7 +1263,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="trialConfig"></param>
|
/// <param name="trialConfig"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||||
public async Task<IResponseOutput> ConfigTrialTaskInfo(TrialTaskConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialTaskInfo(TrialTaskConfig trialConfig)
|
||||||
{
|
{
|
||||||
@@ -1278,7 +1281,7 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <param name="trialConfig"></param>
|
/// <param name="trialConfig"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
|
||||||
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
//[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||||
public async Task<IResponseOutput> ConfigTrialReadingTaskViewRule(TrialReadingTaskViewConfig trialConfig)
|
public async Task<IResponseOutput> ConfigTrialReadingTaskViewRule(TrialReadingTaskViewConfig trialConfig)
|
||||||
{
|
{
|
||||||
@@ -1290,14 +1293,22 @@ namespace IRaCIS.Core.Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目部位配置列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput<List<TrialBodyPartView>>> GetTrialBodyPartList(Guid trialId)
|
public async Task<IResponseOutput<List<TrialBodyPartView>>> GetTrialBodyPartList(Guid trialId)
|
||||||
{
|
{
|
||||||
var list = await _trialRepository.Where(t => t.Id == trialId).SelectMany(t => t.TrialBodyPartList).Select(t => new TrialBodyPartView() { Code = t.Code, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, Id = t.Id, IsHandAdd = t.IsHandAdd }).ToListAsync();
|
var list = await _trialRepository.Where(t => t.Id == trialId).SelectMany(t => t.TrialBodyPartList).Select(t => new TrialBodyPartView() { Code = t.Code, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, Id = t.Id, IsHandAdd = t.IsHandAdd }).ToListAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(list);
|
return ResponseOutput.Ok(list);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 添加更新 项目部位配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="incommand"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand)
|
public async Task<IResponseOutput> AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1333,13 +1344,27 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目额外配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<TrialExtraConfig> GetTrialExtralConfig(Guid trialId)
|
public async Task<TrialExtraConfig> GetTrialExtralConfig(Guid trialId)
|
||||||
{
|
{
|
||||||
var extralConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList }).FirstOrDefault();
|
||||||
|
|
||||||
return JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
|
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
|
||||||
|
|
||||||
|
extralConfig.TrialObjectNameList = extralObj.TrialObjectNameList;
|
||||||
|
|
||||||
|
return extralConfig;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目Pacs 配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <param name="optionsMonitor"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<TrialPacsInfo> GetTrialPacsConfigInfo(Guid trialId, [FromServices] IOptionsMonitor<SystemPacsConfig> optionsMonitor)
|
public async Task<TrialPacsInfo> GetTrialPacsConfigInfo(Guid trialId, [FromServices] IOptionsMonitor<SystemPacsConfig> optionsMonitor)
|
||||||
{
|
{
|
||||||
var trialCode = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialCode).FirstOrDefaultAsync();
|
var trialCode = await _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialCode).FirstOrDefaultAsync();
|
||||||
|
|||||||
@@ -29,9 +29,13 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetVisitStageListInDto:PageInput
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
public class VisitPlanView
|
public class VisitPlanView
|
||||||
{
|
{
|
||||||
public List<VisitStageDTO> VisitPlanList = new List<VisitStageDTO>();
|
public PageOutput<VisitStageDTO> VisitPlanList { get; set; }
|
||||||
|
|
||||||
public decimal TimePointsPerPatient { get; set; }
|
public decimal TimePointsPerPatient { get; set; }
|
||||||
public bool VisitPlanConfirmed { get; set; }
|
public bool VisitPlanConfirmed { get; set; }
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ namespace IRaCIS.Application.Interfaces
|
|||||||
Task<List<VisitPlanInfluenceSubjectVisitStatDTO>> GetInfluenceHistoryList(Guid trialId, [FromServices] IRepository<VisitPlanInfluenceStat> _influnceStatRepository);
|
Task<List<VisitPlanInfluenceSubjectVisitStatDTO>> GetInfluenceHistoryList(Guid trialId, [FromServices] IRepository<VisitPlanInfluenceStat> _influnceStatRepository);
|
||||||
Task<PageOutput<VisitStageDTO>> GetTrialVisitStageList(VisitPlanQueryDTO param);
|
Task<PageOutput<VisitStageDTO>> GetTrialVisitStageList(VisitPlanQueryDTO param);
|
||||||
Task<IEnumerable<VisitStageSelectDTO>> GetTrialVisitStageSelect(Guid trialId);
|
Task<IEnumerable<VisitStageSelectDTO>> GetTrialVisitStageSelect(Guid trialId);
|
||||||
Task<VisitPlanView> GetVisitStageList(Guid trialId);
|
Task<VisitPlanView> GetVisitStageList(GetVisitStageListInDto inDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,16 +34,23 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 根据项目Id,获取项目访视计划(不分页)[New]</summary>
|
/// <summary>
|
||||||
[HttpGet("{trialId:guid}")]
|
/// 根据项目Id,获取项目访视计划
|
||||||
public async Task<VisitPlanView> GetVisitStageList(Guid trialId)
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<VisitPlanView> GetVisitStageList(GetVisitStageListInDto inDto)
|
||||||
{
|
{
|
||||||
var query = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == trialId)
|
var query = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == inDto.TrialId)
|
||||||
.ProjectTo<VisitStageDTO>(_mapper.ConfigurationProvider).OrderBy(t => t.VisitNum);
|
.ProjectTo<VisitStageDTO>(_mapper.ConfigurationProvider).OrderBy(t => t.VisitNum);
|
||||||
var list = await query.ToListAsync();
|
var list = await query.ToPagedListAsync(inDto);
|
||||||
var trial = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId)).IfNullThrowException();
|
var trial = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == inDto.TrialId)).IfNullThrowException();
|
||||||
|
|
||||||
var isHaveGeneratedTask = (await _visitTaskRepository.AnyAsync(t => t.TrialId == trialId));
|
|
||||||
|
|
||||||
|
|
||||||
|
var isHaveGeneratedTask = (await _visitTaskRepository.AnyAsync(t => t.TrialId == inDto.TrialId));
|
||||||
return new VisitPlanView()
|
return new VisitPlanView()
|
||||||
{
|
{
|
||||||
VisitPlanList = list,
|
VisitPlanList = list,
|
||||||
|
|||||||
@@ -472,11 +472,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IndicationTypeId= trial.IndicationTypeId,
|
IndicationTypeId= trial.IndicationTypeId,
|
||||||
ExperienceDataType = dataType,
|
ExperienceDataType = dataType,
|
||||||
TrialId = trial.Id,
|
TrialId = trial.Id,
|
||||||
|
OtherCriterion= item.CriterionType.GetEnumInt()=="0"? item.CriterionName:string.Empty,
|
||||||
VisitReadingCount = 0,
|
VisitReadingCount = 0,
|
||||||
ExperienceCriteriaList = new List<TrialExperienceCriteria>() {
|
ExperienceCriteriaList = new List<TrialExperienceCriteria>() {
|
||||||
|
|
||||||
new TrialExperienceCriteria()
|
new TrialExperienceCriteria()
|
||||||
{
|
{
|
||||||
|
DoctorId=doctorId,
|
||||||
EvaluationCriteriaId=criterionTypeList.Where(x=>x.Code==item.CriterionType.GetEnumInt()).Select(x=>x.Id).FirstOrDefault()
|
EvaluationCriteriaId=criterionTypeList.Where(x=>x.Code==item.CriterionType.GetEnumInt()).Select(x=>x.Id).FirstOrDefault()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,20 @@ namespace IRaCIS.Core.Application.Triggers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class UserAddTrigger(IUserInfo _userInfo, IRepository<UserLog> _userLogReposiotry) : IBeforeSaveTrigger<User>
|
||||||
|
{
|
||||||
|
public async Task BeforeSave(ITriggerContext<User> context, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var user = context.Entity;
|
||||||
|
|
||||||
|
if (context.ChangeType == ChangeType.Added)
|
||||||
|
{
|
||||||
|
await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,11 +55,9 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
{
|
{
|
||||||
not_sys = 0,
|
not_sys = 0,
|
||||||
|
|
||||||
//系统 不配置角色
|
//系统
|
||||||
sys_not_role = 1,
|
sys = 1
|
||||||
|
|
||||||
//系统需要配置角色的
|
|
||||||
sys_Config_role = 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FrontAudit
|
public enum FrontAudit
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ public enum UserOptType
|
|||||||
MFALogin = 12,
|
MFALogin = 12,
|
||||||
|
|
||||||
MFALoginFail = 13,
|
MFALoginFail = 13,
|
||||||
|
|
||||||
|
AddUser = 14
|
||||||
}
|
}
|
||||||
|
|
||||||
[Description("影像下载打包状态")]
|
[Description("影像下载打包状态")]
|
||||||
|
|||||||
@@ -466,17 +466,17 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
DetailedTableOfInterReaderAnalysisResults = 6,
|
DetailedTableOfInterReaderAnalysisResults = 6,
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 斑块表
|
||||||
|
/// </summary>
|
||||||
|
OCT_ReadingLession_Export = 7,
|
||||||
|
|
||||||
|
|
||||||
//访视一致率
|
//访视一致率
|
||||||
VisitJudgeRatio_Export = 7,
|
VisitJudgeRatio_Export = 17,
|
||||||
|
|
||||||
//阅片期一致率
|
//阅片期一致率
|
||||||
ReadingPeriodJudgeRatio_Export = 8,
|
ReadingPeriodJudgeRatio_Export = 18,
|
||||||
|
|
||||||
SelfAnalysis = 9,
|
|
||||||
|
|
||||||
GroupAnalysis = 10
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,46 +41,7 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialExtraConfig
|
|
||||||
{
|
|
||||||
#region MyRegion
|
|
||||||
|
|
||||||
//QC质控
|
|
||||||
public bool IsSupportQCDownloadImage { get; set; } = false;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 中心调研
|
|
||||||
|
|
||||||
public List<string> NotShowFieldList { get; set; } = new List<string>();
|
|
||||||
|
|
||||||
public List<SiteSurveyModifyFiled> ModifyFiledList { get; set; } = new List<SiteSurveyModifyFiled>();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TrialPacsInfo
|
|
||||||
{
|
|
||||||
public int Port { get; set; }
|
|
||||||
|
|
||||||
public string Ip { get; set; }
|
|
||||||
|
|
||||||
public string TrialCalledAE { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SiteSurveyModifyFiled
|
|
||||||
{
|
|
||||||
public string NeedModifyFiled { get; set; }
|
|
||||||
|
|
||||||
public string ReplaceContent { get; set; }
|
|
||||||
|
|
||||||
public string ReplaceContentCN { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum DeclarationType
|
public enum DeclarationType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -278,4 +278,7 @@ public class VisitTask : BaseFullAuditEntity
|
|||||||
[Comment("前序任务需要签名 但是未签名")]
|
[Comment("前序任务需要签名 但是未签名")]
|
||||||
public bool IsFrontTaskNeedSignButNotSign { get; set; }
|
public bool IsFrontTaskNeedSignButNotSign { get; set; }
|
||||||
public int ImageStudyState { get; set; }
|
public int ImageStudyState { get; set; }
|
||||||
|
|
||||||
|
[Comment("通知IR加急阅片时间")]
|
||||||
|
public DateTime? ExpetidEmailNoticeTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ public class EmailNoticeConfig : BaseFullDeleteAuditEntity
|
|||||||
public string AttachPath { get; set; } = null!;
|
public string AttachPath { get; set; } = null!;
|
||||||
|
|
||||||
[Comment("业务级别")]
|
[Comment("业务级别")]
|
||||||
public int BusinessLevelEnum { get; set; }
|
public BusinessLevel BusinessLevelEnum { get; set; }
|
||||||
|
|
||||||
[Comment("业务模块")]
|
[Comment("业务模块")]
|
||||||
public int BusinessModuleEnum { get; set; }
|
public BusinessModule BusinessModuleEnum { get; set; }
|
||||||
|
|
||||||
[Comment("业务场景")]
|
[Comment("业务场景")]
|
||||||
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
||||||
@@ -83,3 +83,70 @@ public class EmailNoticeUserType : Entity
|
|||||||
public EmailUserType EmailUserType { get; set; }
|
public EmailUserType EmailUserType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum BusinessLevel
|
||||||
|
{
|
||||||
|
Default=0,
|
||||||
|
|
||||||
|
|
||||||
|
System=1,
|
||||||
|
|
||||||
|
//需要手动添加到项目的邮件
|
||||||
|
Trial=2,
|
||||||
|
|
||||||
|
//项目默认发送的邮件,不需要手动添加到项目
|
||||||
|
TrialDefault=3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum BusinessModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 影像质控
|
||||||
|
/// </summary>
|
||||||
|
ImageQualityControl = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 影像阅片
|
||||||
|
/// </summary>
|
||||||
|
ImageReading = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 系统登录
|
||||||
|
/// </summary>
|
||||||
|
Login = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// 后台邮件
|
||||||
|
/// </summary>
|
||||||
|
BackstageEmail = 5,
|
||||||
|
/// <summary>
|
||||||
|
/// 账号信息
|
||||||
|
/// </summary>
|
||||||
|
UserAccount = 6,
|
||||||
|
/// <summary>
|
||||||
|
/// 中心调研
|
||||||
|
/// </summary>
|
||||||
|
SiteSurvey = 7,
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片人管理
|
||||||
|
/// </summary>
|
||||||
|
ReviewerManagement = 8,
|
||||||
|
/// <summary>
|
||||||
|
/// 问题反馈
|
||||||
|
/// </summary>
|
||||||
|
UsersSuggestions = 9,
|
||||||
|
/// <summary>
|
||||||
|
/// 入组确认
|
||||||
|
/// </summary>
|
||||||
|
EligibilityVerification = 10,
|
||||||
|
/// <summary>
|
||||||
|
/// PD确认
|
||||||
|
/// </summary>
|
||||||
|
PDVerification = 11,
|
||||||
|
/// <summary>
|
||||||
|
/// 医学反馈
|
||||||
|
/// </summary>
|
||||||
|
MedicalQC = 13,
|
||||||
|
/// <summary>
|
||||||
|
/// 入组/PD确认
|
||||||
|
/// </summary>
|
||||||
|
Eligibility_PDVerification = 12,
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public class Doctor : BaseFullAuditEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// GCP机构
|
/// GCP机构
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string GCPAgencies { get; set; }
|
public string GCPAgencies { get; set; }
|
||||||
|
|
||||||
public Guid GCPId { get; set; }
|
public Guid GCPId { get; set; }
|
||||||
@@ -167,16 +168,16 @@ public class Doctor : BaseFullAuditEntity
|
|||||||
|
|
||||||
public Guid? SpecialityId { get; set; }
|
public Guid? SpecialityId { get; set; }
|
||||||
|
|
||||||
|
[MaxLength]
|
||||||
public string SpecialityOther { get; set; } = string.Empty;
|
public string SpecialityOther { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[MaxLength]
|
||||||
public string SpecialityOtherCN { get; set; } = string.Empty;
|
public string SpecialityOtherCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[MaxLength]
|
||||||
public string SubspecialityOther { get; set; } = string.Empty;
|
public string SubspecialityOther { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[MaxLength]
|
||||||
public string SubspecialityOtherCN { get; set; } = string.Empty;
|
public string SubspecialityOtherCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
@@ -185,21 +186,25 @@ public class Doctor : BaseFullAuditEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工作兼职
|
/// 工作兼职
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string WorkPartTime { get; set; } = string.Empty;
|
public string WorkPartTime { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工作兼职En
|
/// 工作兼职En
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string WorkPartTimeEn { get; set; } = string.Empty;
|
public string WorkPartTimeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 概述
|
/// 概述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string Summarize { get; set; } = string.Empty;
|
public string Summarize { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 概述
|
/// 概述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string SummarizeEn { get; set; } = string.Empty;
|
public string SummarizeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
@@ -211,6 +216,7 @@ public class Doctor : BaseFullAuditEntity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 银行名称
|
/// 银行名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
public string BankName { get; set; } = string.Empty;
|
public string BankName { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Domain.Models;
|
||||||
|
|
||||||
|
[Comment("医生 - 概述")]
|
||||||
|
[Table("DoctorSummarize")]
|
||||||
|
public class DoctorSummarize : BaseFullAuditEntity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 医生Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid DoctorId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
|
public string Summarize { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
[MaxLength]
|
||||||
|
public string SummarizeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是主模板
|
||||||
|
/// </summary>
|
||||||
|
public bool IsMain { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适应症
|
||||||
|
/// </summary>
|
||||||
|
public string Indication { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适应症
|
||||||
|
/// </summary>
|
||||||
|
public string IndicationEn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,7 +5,9 @@ namespace IRaCIS.Core.Domain.Models;
|
|||||||
public class Postgraduate : BaseFullAuditEntity
|
public class Postgraduate : BaseFullAuditEntity
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("HospitalId")]
|
||||||
|
public Hospital HospitalEnt { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class TrialEmailNoticeConfig : BaseFullDeleteAuditEntity
|
|||||||
|
|
||||||
public int BusinessLevelEnum { get; set; }
|
public int BusinessLevelEnum { get; set; }
|
||||||
|
|
||||||
public int BusinessModuleEnum { get; set; }
|
public BusinessModule BusinessModuleEnum { get; set; }
|
||||||
|
|
||||||
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class UserLog : BaseAddAuditEntity
|
|||||||
public string LoginPassword { get; set; } = string.Empty;
|
public string LoginPassword { get; set; } = string.Empty;
|
||||||
public Guid? LoginUserId { get; set; }
|
public Guid? LoginUserId { get; set; }
|
||||||
|
|
||||||
|
[Comment("被操作的人,自己操作的就是自己")]
|
||||||
public Guid? OptUserId { get; set; }
|
public Guid? OptUserId { get; set; }
|
||||||
public string IPRegion { get; set; } = string.Empty;
|
public string IPRegion { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ public class PreviousHistory : BaseAddAuditEntity
|
|||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
public DateTime? StartTime { get; set; }
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ public class PreviousOther : BaseAddAuditEntity
|
|||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public DateTime? StartTime { get; set; }
|
public DateTime? StartTime { get; set; }
|
||||||
|
|||||||
@@ -6,10 +6,14 @@ public class PreviousSurgery : BaseAddAuditEntity
|
|||||||
{
|
{
|
||||||
|
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
public DateTime? OperationTime { get; set; }
|
public DateTime? OperationTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
public bool IsSubjectLevel { get; set; }
|
public bool IsSubjectLevel { get; set; }
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
|
|||||||
public string RelevanceValue { get; set; } = string.Empty;
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment("是否显示")]
|
[Comment("是否显示")]
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
|
|
||||||
[Comment("最大问题数")]
|
[Comment("最大问题数")]
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
|
|||||||
|
|
||||||
public string RelevanceValue { get; set; } = string.Empty;
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int ShowQuestion { get; set; }
|
public ShowQuestion ShowQuestion { get; set; }
|
||||||
public int? MaxRowCount { get; set; }
|
public int? MaxRowCount { get; set; }
|
||||||
|
|
||||||
[Comment("图片数量")]
|
[Comment("图片数量")]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ZstdSharp.Unsafe;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models;
|
namespace IRaCIS.Core.Domain.Models;
|
||||||
|
|
||||||
@@ -258,4 +259,19 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||||||
public bool IsPACSConnect { get; set; }
|
public bool IsPACSConnect { get; set; }
|
||||||
|
|
||||||
public bool IsTrialPACSConfirmed { get; set; }
|
public bool IsTrialPACSConfirmed { get; set; }
|
||||||
|
|
||||||
|
[Comment("项目术语配置Json字符串")]
|
||||||
|
[StringLength(2000)]
|
||||||
|
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[ComplexType]
|
||||||
|
public class TrialObjectNameConfig
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string TrialName { get; set; }
|
||||||
|
|
||||||
|
public bool IsDefault { get; set; }
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,9 @@ public class QCRepliedQCChallengeEvent : DomainEvent
|
|||||||
|
|
||||||
public bool IsPd { get; set; }
|
public bool IsPd { get; set; }
|
||||||
|
|
||||||
public Guid QCChallengeDialogId { get; set; }
|
public Guid? QCChallengeDialogId { get; set; }
|
||||||
|
|
||||||
|
public Guid? QCChallengeId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
@@ -52,6 +54,8 @@ public class QCRepliedQCChallengeEvent : DomainEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CRC 回复一致性核查质疑 通知PM
|
/// CRC 回复一致性核查质疑 通知PM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure.Encryption;
|
using IRaCIS.Core.Infrastructure.Encryption;
|
||||||
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -59,11 +61,28 @@ public class IRaCISDBContext : DbContext
|
|||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
|
||||||
modelBuilder.Entity<TestLength>(entity =>
|
modelBuilder.Entity<TestLength>(entity =>
|
||||||
{
|
{
|
||||||
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索
|
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索
|
||||||
entity.Property(e => e.Name)
|
entity.Property(e => e.Name).HasConversion(new PartialEncryptionConverter(2));
|
||||||
.HasConversion(new PartialEncryptionConverter(2));
|
|
||||||
|
//entity.OwnsMany(x => x.TestJsonObjectLsit, ownedNavigationBuilder =>
|
||||||
|
//{
|
||||||
|
// ownedNavigationBuilder.ToJson();
|
||||||
|
//});
|
||||||
|
|
||||||
|
entity.Property(e => e.TestJsonObjectLsit).HasConversion(v => v == null ? "[]" : JsonConvert.SerializeObject(v),
|
||||||
|
v => string.IsNullOrEmpty(v) ? null : JsonConvert.DeserializeObject<List<TestJsonObject>>(v));
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Trial>(entity =>
|
||||||
|
{
|
||||||
|
//项目术语配置
|
||||||
|
entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder =>
|
||||||
|
{
|
||||||
|
ownedNavigationBuilder.ToJson() ;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
#region pgsql codefirst 配置 暂时屏蔽
|
#region pgsql codefirst 配置 暂时屏蔽
|
||||||
@@ -211,6 +230,8 @@ public class IRaCISDBContext : DbContext
|
|||||||
public virtual DbSet<Dictionary> Dictionary { get; set; }
|
public virtual DbSet<Dictionary> Dictionary { get; set; }
|
||||||
public virtual DbSet<Doctor> Doctor { get; set; }
|
public virtual DbSet<Doctor> Doctor { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<DoctorSummarize> DoctorSummarize { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<DoctorCriterionFile> DoctorCriterionFile { get; set; }
|
public virtual DbSet<DoctorCriterionFile> DoctorCriterionFile { get; set; }
|
||||||
public virtual DbSet<DoctorDictionary> DoctorDictionary { get; set; }
|
public virtual DbSet<DoctorDictionary> DoctorDictionary { get; set; }
|
||||||
public virtual DbSet<Postgraduate> Postgraduate { get; set; }
|
public virtual DbSet<Postgraduate> Postgraduate { get; set; }
|
||||||
@@ -558,7 +579,7 @@ public class IRaCISDBContext : DbContext
|
|||||||
|
|
||||||
public virtual DbSet<TestLength> TestLength { get; set; }
|
public virtual DbSet<TestLength> TestLength { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<EventStoreRecord> EventStoreRecord { get; set; }
|
public virtual DbSet<EventStoreRecord> EventStoreRecord { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -567,6 +588,33 @@ public class IRaCISDBContext : DbContext
|
|||||||
public class TestLength : Entity
|
public class TestLength : Entity
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[StringLength(1000)]
|
||||||
|
public string[] StringList { get; set; }=new string[] { };
|
||||||
|
|
||||||
|
public List<DateTime> DateTimeList { get; set; } = new List<DateTime>();
|
||||||
|
|
||||||
|
[StringLength(1000)]
|
||||||
|
public List<TestEnum> TestEnumList { get; set; } = new List<TestEnum>();
|
||||||
|
|
||||||
|
public List<TestJsonObject> TestJsonObjectLsit { get; set; }
|
||||||
|
|
||||||
|
public DateOnly? TestDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public record TestJsonObject
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TestEnum
|
||||||
|
{
|
||||||
|
Default = 0,
|
||||||
|
|
||||||
|
First = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public static class DBContext_Ext
|
|||||||
originAuditState == AuditStateEnum.None && subjectVisit.AuditState == AuditStateEnum.ToAudit
|
originAuditState == AuditStateEnum.None && subjectVisit.AuditState == AuditStateEnum.ToAudit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
subjectVisit.AddDomainEvent(new CRCSubmitedAndQCToAuditEvent() { SubjectVisitId = subjectVisit.Id,IsPd= subjectVisit.PDState == PDStateEnum.PDProgress });
|
subjectVisit.AddDomainEvent(new CRCSubmitedAndQCToAuditEvent() { SubjectVisitId = subjectVisit.Id, IsPd = subjectVisit.PDState == PDStateEnum.PDProgress });
|
||||||
}
|
}
|
||||||
|
|
||||||
//一致性核查通知PM发送邮件
|
//一致性核查通知PM发送邮件
|
||||||
@@ -96,11 +96,16 @@ public static class DBContext_Ext
|
|||||||
{
|
{
|
||||||
var businessEnum = subjectVisit.IsEnrollmentConfirm ? EmailBusinessScenario.EligibilityVerification_PendingImageQC : EmailBusinessScenario.PDVerification_PendingImageQC;
|
var businessEnum = subjectVisit.IsEnrollmentConfirm ? EmailBusinessScenario.EligibilityVerification_PendingImageQC : EmailBusinessScenario.PDVerification_PendingImageQC;
|
||||||
|
|
||||||
var delaySeconds = dbContext.TrialEmailNoticeConfig.Where(t => t.BusinessScenarioEnum == businessEnum)
|
var delaySeconds = dbContext.TrialEmailNoticeConfig.Where(t => t.TrialId==subjectVisit.TrialId && t.BusinessScenarioEnum == businessEnum)
|
||||||
.Select(t => t.EmailDelaySeconds).FirstOrDefault();
|
.Select(t => t.EmailDelaySeconds).FirstOrDefault();
|
||||||
|
|
||||||
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id, DelaySeconds= delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
|
Console.WriteLine("qc领取任务:" + DateTime.Now.ToShortTimeString() + $"延时{delaySeconds}");
|
||||||
|
|
||||||
|
if (delaySeconds > 0)
|
||||||
|
{
|
||||||
|
subjectVisit.AddDomainEvent(new QCClaimTaskEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id, DelaySeconds = delaySeconds, CurrentActionUserId = (Guid)subjectVisit.CurrentActionUserId });
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -110,6 +115,30 @@ public static class DBContext_Ext
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var entry in changeTracker.Entries<QCChallenge>())
|
||||||
|
{
|
||||||
|
var qCChallenge = entry.Entity;
|
||||||
|
|
||||||
|
var findSubjectVisit = dbContext.SubjectVisit.Where(t => t.Id == qCChallenge.SubjectVisitId)
|
||||||
|
.Select(t => new { IsEnrollmentConfirm = t.IsEnrollmentConfirm, PDState = t.PDState, t.Id, t.TrialId }).FirstOrDefault().IfNullThrowException();
|
||||||
|
|
||||||
|
//入组或者PD 才执行下面的逻辑
|
||||||
|
if ((findSubjectVisit.IsEnrollmentConfirm || findSubjectVisit.PDState == PDStateEnum.PDProgress))
|
||||||
|
{
|
||||||
|
|
||||||
|
if (entry.State == EntityState.Added)
|
||||||
|
{
|
||||||
|
qCChallenge.AddDomainEvent(new QCRepliedQCChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress,
|
||||||
|
QCChallengeId = qCChallenge.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加进记录
|
||||||
|
eventStoreList.AddRange(GetStoreEvents(qCChallenge.DomainEvents));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var entry in changeTracker.Entries<QCChallengeDialog>())
|
foreach (var entry in changeTracker.Entries<QCChallengeDialog>())
|
||||||
{
|
{
|
||||||
var qCChallengeDialog = entry.Entity;
|
var qCChallengeDialog = entry.Entity;
|
||||||
|
|||||||
@@ -3,11 +3,14 @@ using IRaCIS.Core.Domain.BaseModel;
|
|||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using MassTransit.Mediator;
|
using MassTransit.Mediator;
|
||||||
using MassTransit.Transports;
|
using MassTransit.Transports;
|
||||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualBasic;
|
||||||
|
using System.Collections;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
||||||
|
|
||||||
@@ -75,9 +78,18 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||||||
//.Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType()))
|
//.Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType()))
|
||||||
.ToList())
|
.ToList())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//foreach (var property in entry.Navigations.Where(t => typeof(IEnumerable).IsAssignableFrom(t.Metadata.ClrType) && t.Metadata.ClrType !=typeof(string) /*&& t.CurrentValue == null*/))
|
||||||
|
//{
|
||||||
|
// Console.WriteLine($"属性名{property.Metadata.Name} 现在值:{property.CurrentValue.ToJsonStr()}");
|
||||||
|
//}
|
||||||
|
|
||||||
// 检查属性是否为string类型,并且值为null
|
// 检查属性是否为string类型,并且值为null
|
||||||
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && t.CurrentValue == null))
|
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && t.CurrentValue == null))
|
||||||
{
|
{
|
||||||
|
|
||||||
property.CurrentValue = string.Empty;
|
property.CurrentValue = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +154,8 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||||||
var inspectionGeneralIdList = context.ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
|
var inspectionGeneralIdList = context.ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
|
||||||
|
|
||||||
var entities = context.ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
|
var entities = context.ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
|
||||||
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
|
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && typeof(Entity).IsAssignableFrom(t.Entity.GetType())
|
||||||
|
&& !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
|
||||||
.ToList();
|
.ToList();
|
||||||
AuditingData auditingData = new AuditingData((IRaCISDBContext)context, _userInfo);
|
AuditingData auditingData = new AuditingData((IRaCISDBContext)context, _userInfo);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user