修改国际化查询
parent
4c4905e60b
commit
be6affb2c6
|
@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
///<summary>InternationalizationQuery 列表查询参数模型</summary>
|
///<summary>InternationalizationQuery 列表查询参数模型</summary>
|
||||||
public class InternationalizationQuery : PageInput
|
public class InternationalizationQuery : PageInput
|
||||||
{
|
{
|
||||||
|
public int? State { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
public string? Code { get; set; }
|
public string? Code { get; set; }
|
||||||
public string? Value { get; set; }
|
public string? Value { get; set; }
|
||||||
|
@ -36,10 +36,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public int State { get; set; }
|
public int State { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; } = string.Empty;
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; } = string.Empty;
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int InternationalizationType { get; set; }
|
public int InternationalizationType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var internationalizationQueryable =_internationalizationRepository
|
var internationalizationQueryable =_internationalizationRepository
|
||||||
.WhereIf(inQuery.Description!=null,t=>t.Description.Contains(inQuery.Description))
|
.WhereIf(inQuery.Description!=null,t=>t.Description.Contains(inQuery.Description))
|
||||||
.WhereIf(inQuery.Code != null, t => t.Code.Contains(inQuery.Code))
|
.WhereIf(inQuery.Code != null, t => t.Code.Contains(inQuery.Code))
|
||||||
|
.WhereIf(inQuery.State != null, t => t.State==inQuery.State)
|
||||||
|
.WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType)
|
||||||
|
|
||||||
.WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value))
|
.WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value))
|
||||||
.WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
|
.WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
|
||||||
.ProjectTo<InternationalizationView>(_mapper.ConfigurationProvider);
|
.ProjectTo<InternationalizationView>(_mapper.ConfigurationProvider);
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace IRaCIS.Application.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
|
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp,exp1);
|
||||||
|
|
||||||
return ResponseOutput.Ok(hospital.Id.ToString());
|
return ResponseOutput.Ok(hospital.Id.ToString());
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using BeetleX.BNR;
|
using BeetleX.BNR;
|
||||||
using IRaCIS.Core.Application.Service;
|
using IRaCIS.Core.Application.Service;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
@ -7,6 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Caching.Distributed;
|
using Microsoft.Extensions.Caching.Distributed;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using MiniExcelLibs;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -43,6 +45,27 @@ namespace IRaCIS.Application.Services
|
||||||
//_cache = cache;
|
//_cache = cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<IResponseOutput> InternationazitionInit()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var rows = await MiniExcel.QueryAsync<InternationalizationAddOrEdit>(@"C:\Users\Administrator\Desktop\Export\NetCore.xlsx");
|
||||||
|
|
||||||
|
foreach (var row in rows)
|
||||||
|
{
|
||||||
|
await _repository.InsertOrUpdateAsync<Internationalization, InternationalizationAddOrEdit>(row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<string> Get()
|
public async Task<string> Get()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue