xxx
parent
732271121d
commit
07d9afdd29
|
@ -1144,11 +1144,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
#region 处理验证
|
||||
|
||||
if (dbSubjectVisit.IsTake && dbSubjectVisit.CurrentActionUserId != _userInfo.Id)
|
||||
{
|
||||
return ResponseOutput.NotOk("当前已被领取,不允许领取");
|
||||
}
|
||||
|
||||
if (trialConfig.QCProcessEnum == TrialQCProcess.NotAudit)
|
||||
{
|
||||
return ResponseOutput.NotOk("项目配置为不审,没有领取QC Task");
|
||||
|
|
|
@ -11,9 +11,9 @@ namespace IRaCIS.Application.Services
|
|||
public class TestService : BaseService
|
||||
{
|
||||
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;
|
||||
_trialRepository = trialRepository;
|
||||
|
@ -23,20 +23,30 @@ namespace IRaCIS.Application.Services
|
|||
public string Get(testModel testModel)
|
||||
{
|
||||
|
||||
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 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 aaabb = _trialRepository.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 ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
|
||||
|
|
|
@ -59,8 +59,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public string KeyName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public string MappedValue { get; set; }
|
||||
// [NotMapped]
|
||||
//public string MappedValue { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -82,14 +82,14 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
//modelBuilder.HasDbFunction(typeof(DbContext).GetMethod(nameof(GetTableList)));
|
||||
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.ValueCN));
|
||||
}
|
||||
//if (_userInfo.IsEn_Us)
|
||||
//{
|
||||
// modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.Value));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// modelBuilder.Entity<Dictionary>().Property(t => t.MappedValue).HasColumnName(nameof(Domain.Models.Dictionary.ValueCN));
|
||||
//}
|
||||
|
||||
|
||||
//遍历实体模型手动配置
|
||||
|
|
|
@ -30,8 +30,8 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
|||
|
||||
public void Configure(EntityTypeBuilder<Dictionary> builder)
|
||||
{
|
||||
builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore);
|
||||
builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
|
||||
//builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore);
|
||||
//builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue