修改参与用户的JoinTime
parent
6ec64c9744
commit
91227c1a67
|
@ -187,7 +187,6 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
section = await reader.ReadNextSectionAsync();
|
section = await reader.ReadNextSectionAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
//return fileCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,12 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)
|
var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)
|
||||||
.WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId)
|
.WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId)
|
||||||
.WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId)
|
.WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId)
|
||||||
.WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true)
|
.WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true)
|
||||||
.WhereIf(selectionQuery.HospitalId != null, t => t.HospitalId == selectionQuery.HospitalId)
|
.WhereIf(selectionQuery.HospitalId != null, t => t.HospitalId == selectionQuery.HospitalId)
|
||||||
.WhereIf(selectionQuery.PositionId != null, t => t.PositionId == selectionQuery.PositionId)
|
.WhereIf(selectionQuery.PositionId != null, t => t.PositionId == selectionQuery.PositionId)
|
||||||
.WhereIf(selectionQuery.RankId != null, t => t.RankId == selectionQuery.RankId)
|
.WhereIf(selectionQuery.RankId != null, t => t.RankId == selectionQuery.RankId)
|
||||||
.WhereIf(selectionQuery.ContractorStatus != null, t => t.CooperateStatus == selectionQuery.ContractorStatus)
|
.WhereIf(selectionQuery.ContractorStatus != null, t => t.CooperateStatus == selectionQuery.ContractorStatus )
|
||||||
.WhereIf(selectionQuery.InformationConfirmed != null, t => t.ResumeStatus == selectionQuery.InformationConfirmed)
|
.WhereIf(selectionQuery.InformationConfirmed != null, t => t.ResumeStatus == selectionQuery.InformationConfirmed)
|
||||||
.WhereIf(selectionQuery.AcceptingNewTrial != null, t => t.AcceptingNewTrial == selectionQuery.AcceptingNewTrial)
|
.WhereIf(selectionQuery.AcceptingNewTrial != null, t => t.AcceptingNewTrial == selectionQuery.AcceptingNewTrial)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name))
|
.WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name))
|
||||||
|
|
|
@ -5,6 +5,7 @@ using MassTransit;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -222,6 +223,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
|
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
|
||||||
{
|
{
|
||||||
var existsQuery = _readingMedicineTrialQuestionRepository
|
var existsQuery = _readingMedicineTrialQuestionRepository
|
||||||
|
@ -245,6 +247,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput> DeleteReadingMedicineTrialQuestion(DeleteReadingMedicineTrialQuestion inDto)
|
public async Task<IResponseOutput> DeleteReadingMedicineTrialQuestion(DeleteReadingMedicineTrialQuestion inDto)
|
||||||
{
|
{
|
||||||
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id))
|
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id))
|
||||||
|
|
|
@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
|
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
|
||||||
{
|
{
|
||||||
|
|
||||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
|
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now });
|
||||||
|
|
||||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//判断TrialUser中是否存在 不存在就插入
|
//判断TrialUser中是否存在 不存在就插入
|
||||||
if (!await _repository.AnyAsync<TrialUser>(t => t.TrialId == trialId && t.UserId == externalUser.SystemUserId))
|
if (!await _repository.AnyAsync<TrialUser>(t => t.TrialId == trialId && t.UserId == externalUser.SystemUserId))
|
||||||
{
|
{
|
||||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId });
|
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId, JoinTime = DateTime.Now });
|
||||||
|
|
||||||
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId,
|
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId,
|
||||||
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
|
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
|
||||||
|
|
|
@ -387,7 +387,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if( !await _trialUserRepository.AnyAsync(t=>t.TrialId==trialId && t.UserId== userId, true))
|
if( !await _trialUserRepository.AnyAsync(t=>t.TrialId==trialId && t.UserId== userId, true))
|
||||||
{
|
{
|
||||||
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
|
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now });
|
||||||
}
|
}
|
||||||
|
|
||||||
await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId });
|
await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId });
|
||||||
|
|
Loading…
Reference in New Issue