Uat_Study
hang 2022-04-28 17:34:57 +08:00
parent 732271121d
commit 07d9afdd29
5 changed files with 35 additions and 30 deletions

View File

@ -1144,11 +1144,6 @@ namespace IRaCIS.Core.Application.Image.QA
#region 处理验证 #region 处理验证
if (dbSubjectVisit.IsTake && dbSubjectVisit.CurrentActionUserId != _userInfo.Id)
{
return ResponseOutput.NotOk("当前已被领取,不允许领取");
}
if (trialConfig.QCProcessEnum == TrialQCProcess.NotAudit) if (trialConfig.QCProcessEnum == TrialQCProcess.NotAudit)
{ {
return ResponseOutput.NotOk("项目配置为不审没有领取QC Task"); return ResponseOutput.NotOk("项目配置为不审没有领取QC Task");

View File

@ -11,9 +11,9 @@ namespace IRaCIS.Application.Services
public class TestService : BaseService public class TestService : BaseService
{ {
private readonly IRepository<Dictionary> _dicRepository; private readonly IRepository<Dictionary> _dicRepository;
private readonly IRepository<SubjectVisit> _trialRepository; private readonly IRepository<Trial> _trialRepository;
public TestService(IRepository<Dictionary> dicRepository, IRepository<SubjectVisit> trialRepository) public TestService(IRepository<Dictionary> dicRepository, IRepository<Trial> trialRepository)
{ {
_dicRepository = dicRepository; _dicRepository = dicRepository;
_trialRepository = trialRepository; _trialRepository = trialRepository;
@ -23,20 +23,30 @@ namespace IRaCIS.Application.Services
public string Get(testModel testModel) public string Get(testModel testModel)
{ {
var waitModifyEntity= _dicRepository.FirstOrDefaultAsync(t=>t.Id== Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff")).GetAwaiter().GetResult(); var aaabb = _trialRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
var tt= _dicRepository.UpdateAsync(waitModifyEntity, t => new Dictionary() { Description = "xxxxx"}, true).Result;
//var d = _repository.Where<User>(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
//var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
//CultureInfo culture = CultureInfo.CurrentUICulture;
//var dd = _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
// u => new Dictionary() { ParentId = null, Code = "test" }, true);
var aaaa = _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result; var aaaa = _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;
var waitModifyEntity = _dicRepository.FirstOrDefaultAsync(t => t.Id == Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff")).GetAwaiter().GetResult();
var tt = _dicRepository.UpdateAsync(waitModifyEntity, t => new Dictionary() { Description = "xxxxx" }, true).Result;
var tt2 = _trialRepository.UpdateFromQueryAsync(Guid.Parse("543d0000-3e10-0016-77e9-08da2827228a"), t => new Trial() { Indication = "WCH测试稽查002" }, true).Result;
//var d = _repository.Where<User>(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
//var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
//CultureInfo culture = CultureInfo.CurrentUICulture;
//var dd = _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
// u => new Dictionary() { ParentId = null, Code = "test" }, true);
//var ggggg = _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), u=>new Dictionary(){Code = "test"}).Result; //var ggggg = _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), u=>new Dictionary(){Code = "test"}).Result;
//var ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), //var ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),

View File

@ -59,8 +59,8 @@ namespace IRaCIS.Core.Domain.Models
public string KeyName { get; set; } = string.Empty; public string KeyName { get; set; } = string.Empty;
[NotMapped] // [NotMapped]
public string MappedValue { get; set; } //public string MappedValue { get; set; }
} }

View File

@ -82,14 +82,14 @@ namespace IRaCIS.Core.Infra.EFCore
//modelBuilder.HasDbFunction(typeof(DbContext).GetMethod(nameof(GetTableList))); //modelBuilder.HasDbFunction(typeof(DbContext).GetMethod(nameof(GetTableList)));
if (_userInfo.IsEn_Us) //if (_userInfo.IsEn_Us)
{ //{
modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.Value)); // modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.Value));
} //}
else //else
{ //{
modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.ValueCN)); // modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.ValueCN));
} //}
//遍历实体模型手动配置 //遍历实体模型手动配置

View File

@ -30,8 +30,8 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
public void Configure(EntityTypeBuilder<Dictionary> builder) public void Configure(EntityTypeBuilder<Dictionary> builder)
{ {
builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore); //builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore);
builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); //builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
} }
} }