修改国际化查询
parent
4c4905e60b
commit
be6affb2c6
|
@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
///<summary>InternationalizationQuery 列表查询参数模型</summary>
|
||||
public class InternationalizationQuery : PageInput
|
||||
{
|
||||
|
||||
public int? State { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? Code { get; set; }
|
||||
public string? Value { get; set; }
|
||||
|
@ -36,10 +36,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
{
|
||||
public Guid? Id { 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 Value { get; set; }
|
||||
public string ValueCN { get; set; }
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
|
||||
public int InternationalizationType { get; set; }
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
var internationalizationQueryable =_internationalizationRepository
|
||||
.WhereIf(inQuery.Description!=null,t=>t.Description.Contains(inQuery.Description))
|
||||
.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.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
|
||||
.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());
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using BeetleX.BNR;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -7,6 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MiniExcelLibs;
|
||||
using System.Linq.Expressions;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
@ -43,6 +45,27 @@ namespace IRaCIS.Application.Services
|
|||
//_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]
|
||||
public async Task<string> Get()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue