wxd 1 year ago
parent
commit
e648992ea6
  1. 13
      src/Shentun.WebPeis.Application.Contracts/AppointSchedules/AppointScheduleDateDto.cs
  2. 71
      src/Shentun.WebPeis.Application/AppointSchedules/AppointScheduleAppService.cs
  3. 1
      src/Shentun.WebPeis.Application/Asbitems/AsbitemAppService.cs
  4. 2
      src/Shentun.WebPeis.Application/MedicalPackages/MedicalPackageAppservice.cs

13
src/Shentun.WebPeis.Application.Contracts/AppointSchedules/AppointScheduleDateDto.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.WebPeis.AppointSchedules
{
public class AppointScheduleDateDto
{
public DateTime AppointDate { get; set; }
public char IsWork { get; set; } = 'Y';
public char IsFull { get; set; } = 'N';
}
}

71
src/Shentun.WebPeis.Application/AppointSchedules/AppointScheduleAppService.cs

@ -0,0 +1,71 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shentun.WebPeis.Models;
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.WebPeis.AppointSchedules
{
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
public class AppointScheduleAppService : ApplicationService
{
private readonly IRepository<AppointSchedule> _repository;
private readonly CacheService _cacheService;
public AppointScheduleAppService(IRepository<AppointSchedule> repository,
CacheService cacheService
)
{
_repository = repository;
_cacheService = cacheService;
}
/// <summary>
/// 获取预约日期列表
/// </summary>
/// <returns></returns>
[HttpPost("api/app/AppointSchedule/GetAppointScheduleDateList")]
public async Task<List<AppointScheduleDateDto>> GetAppointScheduleDateListAsync()
{
var appointScheduleDateDtos = await GetAppointScheduleDateTestListAsync();
return appointScheduleDateDtos;
}
private async Task<List<AppointScheduleDateDto>> GetAppointScheduleDateTestListAsync()
{
var appointScheduleDateDtos = new List<AppointScheduleDateDto>();
DateTime startDate = DateTime.Now.Date;
for (var i = 0; i < 60; i++)
{
var appointScheduleDateDto = new AppointScheduleDateDto()
{
AppointDate = startDate.AddDays(i),
};
appointScheduleDateDtos.Add(new AppointScheduleDateDto()
{
AppointDate = startDate.AddDays(i),
});
if (appointScheduleDateDto.AppointDate.DayOfWeek == DayOfWeek.Sunday)
{
appointScheduleDateDto.IsWork = 'N';
}
else if (appointScheduleDateDto.AppointDate.DayOfWeek == DayOfWeek.Wednesday)
{
appointScheduleDateDto.IsFull = 'Y';
}
}
return appointScheduleDateDtos;
}
}
}

1
src/Shentun.WebPeis.Application/Asbitems/AsbitemAppService.cs

@ -37,6 +37,7 @@ namespace Shentun.WebPeis.Asbitems
}
[HttpPost("api/app/Asbitem/GetDiseaseScreeningTypeAsbitemList")]
//[AllowAnonymous]
public async Task<List<DiseaseScreeningTypeAsbitemDto>> GetDiseaseScreeningTypeAsbitemListAsync()
{
var asbitems = (await _repository.GetListAsync(o => o.IsActive == 'Y' && o.IsWebAppoint == 'Y'))

2
src/Shentun.WebPeis.Application/MedicalPackages/MedicalPackageAppservice.cs

@ -42,6 +42,7 @@ namespace Shentun.WebPeis.MedicalPackages
/// </summary>
/// <returns></returns>
[HttpPost("api/app/MedicalPackage/GetCanAppointList")]
//[AllowAnonymous]
public async Task<List<MedicalPackageDto>> GetCanAppointListAsync()
{
var list = (await _repository.GetListAsync(o => o.IsActive == 'Y' && o.IsWebAppoint == 'Y'))
@ -61,6 +62,7 @@ namespace Shentun.WebPeis.MedicalPackages
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/MedicalPackage/GetCheckTypeWithAsbitemsListByMedicalPackageId")]
//[AllowAnonymous]
public async Task<List<MedicalPackageCheckTypeWithAsbitemsDto>> GetCheckTypeWithAsbitemsListByMedicalPackageIdAsync(MedicalPackageIdInput input)
{
//获取套餐所有组合项目

Loading…
Cancel
Save