7 changed files with 191 additions and 29 deletions
-
29src/Shentun.Peis.Application.Contracts/CriticalFollowValueTypes/CriticalFollowValueTypeDto.cs
-
11src/Shentun.Peis.Application.Contracts/CriticalFollowValueTypes/CriticalFollowValueTypeIdInputDto.cs
-
72src/Shentun.Peis.Application/CriticalFollowValueTypes/CriticalFollowValueTypeAppService.cs
-
18src/Shentun.Peis.Application/CustomerOrgGroups/BasicCustomerOrgGroupDto.cs
-
75src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs
-
13src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
-
2src/Shentun.Peis.Domain/CriticalFollowValueTypes/CriticalFollowValueType.cs
@ -0,0 +1,29 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis.CriticalFollowValueTypes |
||||
|
{ |
||||
|
public class CriticalFollowValueTypeDto:AuditedEntityDtoName |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 名称
|
||||
|
/// </summary>
|
||||
|
public string DisplayName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 父编号
|
||||
|
/// </summary>
|
||||
|
public Guid ParentId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 路径编码
|
||||
|
/// </summary>
|
||||
|
public string PathCode { get; set; } |
||||
|
|
||||
|
|
||||
|
public int DisplayOrder { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis.CriticalFollowValueTypes |
||||
|
{ |
||||
|
public class CriticalFollowValueTypeIdInputDto |
||||
|
{ |
||||
|
public Guid CriticalFollowValueTypeId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,72 @@ |
|||||
|
using AutoMapper.Internal.Mappers; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Shentun.Peis.ItemTypes; |
||||
|
using Shentun.Peis.Models; |
||||
|
using SqlSugar; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace Shentun.Peis.CriticalFollowValueTypes |
||||
|
{ |
||||
|
public class CriticalFollowValueTypeAppService : ApplicationService |
||||
|
{ |
||||
|
private readonly IRepository<CriticalFollowValueType, Guid> _criticalFollowValueTypeRepository; |
||||
|
private readonly CacheService _cacheService; |
||||
|
|
||||
|
|
||||
|
public CriticalFollowValueTypeAppService( |
||||
|
IRepository<CriticalFollowValueType, Guid> criticalFollowValueTypeRepository, |
||||
|
CacheService cacheService) |
||||
|
{ |
||||
|
_criticalFollowValueTypeRepository = criticalFollowValueTypeRepository; |
||||
|
_cacheService = cacheService; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据ID查询信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/app/CriticalFollowValueType/Get")] |
||||
|
public async Task<CriticalFollowValueTypeDto> GetAsync(CriticalFollowValueTypeIdInputDto input) |
||||
|
{ |
||||
|
var entity = await _criticalFollowValueTypeRepository.FindAsync(o => o.Id == input.CriticalFollowValueTypeId); |
||||
|
if (entity == null) |
||||
|
return null; |
||||
|
var entDto = ObjectMapper.Map<CriticalFollowValueType, CriticalFollowValueTypeDto>(entity); |
||||
|
entDto.CreatorName = await _cacheService.GetSurnameAsync(entDto.CreatorId); |
||||
|
entDto.LastModifierName = await _cacheService.GetSurnameAsync(entDto.LastModifierId); |
||||
|
return entDto; |
||||
|
} |
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 更新
|
||||
|
///// </summary>
|
||||
|
///// <param name="input"></param>
|
||||
|
///// <returns></returns>
|
||||
|
//[HttpPost("api/app/CriticalFollowValueType/Update")]
|
||||
|
//public override async Task<CriticalFollowValueTypeDto> UpdateAsync(UpdateCriticalFollowValueTypeDto input)
|
||||
|
//{
|
||||
|
// var entity = await Repository.GetAsync(id);
|
||||
|
// var sourceEntity = ObjectMapper.Map<UpdateItemTypeDto, ItemType>(input);
|
||||
|
// await _manager.UpdateAsync(sourceEntity, entity);
|
||||
|
// entity = await Repository.UpdateAsync(entity);
|
||||
|
// _itemTypeCache.Set(entity.Id, entity);
|
||||
|
// return ObjectMapper.Map<ItemType, ItemTypeDto>(entity);
|
||||
|
//}
|
||||
|
///// <summary>
|
||||
|
///// 删除
|
||||
|
///// </summary>
|
||||
|
///// <param name="id"></param>
|
||||
|
///// <returns></returns>
|
||||
|
//public override async Task DeleteAsync(Guid id)
|
||||
|
//{
|
||||
|
// await _manager.CheckAndDeleteAsync(id);
|
||||
|
//}
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Shentun.Peis.CustomerOrgGroups |
||||
|
{ |
||||
|
public class BasicCustomerOrgGroupDto |
||||
|
{ |
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 分组名称
|
||||
|
/// </summary>
|
||||
|
public string DisplayName { get; set; } |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue