From 7e518bf3ab25518c7cc065ac5c1f3d05956055a3 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 8 Aug 2023 14:53:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E5=BF=83=E8=B0=83?=
=?UTF-8?q?=E7=A0=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 18 +++++-------------
.../Service/Common/ExcelExportService.cs | 1 -
.../SiteSurvey/DTO/TrialSiteSurveyViewModel.cs | 1 -
.../DTO/TrialSiteUserSurveyViewModel.cs | 4 +---
.../SiteSurvey/TrialSiteSurveyService.cs | 10 +++++-----
.../SiteSurvey/TrialSiteUserSurveyService.cs | 1 -
.../Service/SiteSurvey/_MapConfig.cs | 3 ---
.../Service/TrialSiteUser/_MapConfig.cs | 1 -
IRaCIS.Core.Domain/SQLFile/20220808.sql | 2 ++
.../SiteSurvey/TrialSiteUserSurvey.cs | 6 +++---
.../_IRaCIS/Output/ApiResponseCodeEnum.cs | 7 -------
11 files changed, 16 insertions(+), 38 deletions(-)
create mode 100644 IRaCIS.Core.Domain/SQLFile/20220808.sql
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 5fd42050b..e666c4b8e 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -9460,11 +9460,11 @@
-
- 发送验证码
-
-
-
+
+ site 调研 发送验证码
+
+
+
@@ -9520,14 +9520,6 @@
-
-
- 驳回
-
-
-
-
-
提交 后台自动识别是谁提交
diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
index 33cc8d6a6..ab17ac18a 100644
--- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
+++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
@@ -155,7 +155,6 @@ namespace IRaCIS.Core.Application.Service.Common
.Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId))
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
- .WhereIf(queryParam.TrialRoleNameId != null, t => t.TrialRoleNameId == queryParam.TrialRoleNameId)
.WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)
.WhereIf(queryParam.State != null && queryParam.State == TrialSiteUserStateEnum.OverTime, t => t.InviteState == TrialSiteUserStateEnum.HasSend && t.ExpireTime < DateTime.Now)
.WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName))
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
index c6cecba91..613550431 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
@@ -84,7 +84,6 @@ namespace IRaCIS.Core.Application.Contracts
public bool? IsGenerateAccount { get; set; }
- public Guid? TrialRoleNameId { get; set; }
public TrialSiteUserStateEnum? State { get; set; }
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs
index f3e868457..949d7f0e7 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteUserSurveyViewModel.cs
@@ -48,9 +48,7 @@ namespace IRaCIS.Core.Application.Contracts
}
}
- public string TrialRoleName { get; set; }
- public string TrialRoleCode { get; set; }
public UserTypeEnum? UserTypeEnum { get; set; }
@@ -98,7 +96,7 @@ namespace IRaCIS.Core.Application.Contracts
[DictionaryTranslateAttribute("YesOrNo")]
public bool IsGenerateAccount { get; set; }
- public Guid TrialRoleNameId { get; set; }
+ public int TrialRoleCode { get; set; }
public string OrganizationName { get; set; } = string.Empty;
}
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
index 9a9dbab04..da2aa69b1 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
@@ -263,7 +263,8 @@ namespace IRaCIS.Core.Application.Contracts
{
//找到最新的调研表
- var currentLatest = await _trialSiteSurveyRepository.Where(t => t.TrialId == userInfo.TrialId && t.SiteId == userInfo.SiteId, true).OrderByDescending(t => t.CreateTime).FirstOrDefaultAsync();
+ var currentLatest = await _trialSiteSurveyRepository.Where(t => t.TrialId == userInfo.TrialId && t.SiteId == userInfo.SiteId, true)
+ .Include(u => u.TrialSiteEquipmentSurveyList).Include(u => u.TrialSiteUserSurveyList).OrderByDescending(t => t.CreateTime).FirstOrDefaultAsync();
if (currentLatest == null)
{
@@ -304,7 +305,7 @@ namespace IRaCIS.Core.Application.Contracts
copy.TrialSiteEquipmentSurveyList.ForEach(t => t.Id = Guid.Empty);
copy.TrialSiteUserSurveyList.ForEach(t => { t.Id = Guid.Empty; t.IsGenerateSuccess = false; });
- currentEntity = await _repository.AddAsync(copy);
+ currentEntity = await _trialSiteSurveyRepository.AddAsync(copy);
}
@@ -448,7 +449,6 @@ namespace IRaCIS.Core.Application.Contracts
.Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId))
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
- .WhereIf(queryParam.TrialRoleNameId != null, t => t.TrialRoleNameId == queryParam.TrialRoleNameId)
.WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)
.WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName))
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
@@ -619,7 +619,7 @@ namespace IRaCIS.Core.Application.Contracts
t.IsGenerateSuccess,
t.UserTypeId,
UserTypeEnum = (UserTypeEnum?)t.UserTypeRole.UserTypeEnum,
- t.TrialRoleName.Code,
+ t.TrialRoleCode,
t.Email
}).ToListAsync();
@@ -629,7 +629,7 @@ namespace IRaCIS.Core.Application.Contracts
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
- if (!currentUserList.Any(t => t.Code == "1") || !currentUserList.Any(t => t.Code == "5"))
+ if (!currentUserList.Any(t => t.TrialRoleCode == 1) || !currentUserList.Any(t => t.TrialRoleCode == 5))
{
throw new BusinessValidationFailedException("本次提交,必须有CRC和影像阅片人信息");
}
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
index 248db3de0..5a375ecee 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
@@ -62,7 +62,6 @@ namespace IRaCIS.Core.Application.Contracts
}
}
-
}
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs
index 311a8fda6..51c756067 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs
@@ -36,8 +36,6 @@ namespace IRaCIS.Core.Application.AutoMapper
var isEn_Us = false;
CreateMap()
- .ForMember(t => t.TrialRoleName, u => u.MapFrom(d => isEn_Us? d.TrialRoleName.Value:d.TrialRoleName.ValueCN))
- .ForMember(t => t.TrialRoleCode, u => u.MapFrom(d => d.TrialRoleName.Code))
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum));
@@ -70,7 +68,6 @@ namespace IRaCIS.Core.Application.AutoMapper
CreateMap()
.ForMember(t=>t.TrialSiteSurvey,u=>u.MapFrom(c=>c.TrialSiteSurvey))
- .ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum));
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs
index 00a6a8be6..13bdab22a 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs
@@ -285,7 +285,6 @@ namespace IRaCIS.Core.Application.Service
.ForMember(t => t.TrialSiteUserList, u => u.Ignore());
CreateMap()
- .ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum))
.ForMember(t => t.TrialSiteCode, u => u.MapFrom(d => d.TrialSiteSurvey.TrialSite.TrialSiteCode))
diff --git a/IRaCIS.Core.Domain/SQLFile/20220808.sql b/IRaCIS.Core.Domain/SQLFile/20220808.sql
new file mode 100644
index 000000000..639ad02c0
--- /dev/null
+++ b/IRaCIS.Core.Domain/SQLFile/20220808.sql
@@ -0,0 +1,2 @@
+
+update TrialSiteUserSurvey set TrialRoleCode= (select Code from Dictionary where Id=TrialSiteUserSurvey.TrialRoleNameId)
\ No newline at end of file
diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs
index 9600b3c91..78ebde226 100644
--- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs
+++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteUserSurvey.cs
@@ -28,11 +28,11 @@ namespace IRaCIS.Core.Domain.Models
public Guid? UserTypeId { get; set; }
- public Guid TrialRoleNameId { get; set; }
-
- public Dictionary TrialRoleName { get; set; }
+ //public Guid TrialRoleNameId { get; set; }
+ //public Dictionary TrialRoleName { get; set; }
+ public int? TrialRoleCode { get; set; }
///
diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs
index 0fb88dff2..73b9597ae 100644
--- a/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs
+++ b/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs
@@ -23,17 +23,10 @@ namespace IRaCIS.Core.Infrastructure.Extention
//程序异常 相当于之前的 IsSuccess = false
ProgramException = 4,
-
-
-
//需要提示 ,需要提示 从Result 取数据 ( 0 可以继续处理提交 ,1 不能进行继续处理提交 ,2 刷新列表 )
NeedTips = 5,
-
-
-
-
//在其他地方登陆,被迫下线
LoginInOtherPlace = -1,