DESKTOP-G961P6V\Zhh 1 year ago
parent
commit
bc966d4683
  1. 31
      src/Shentun.WebPeis.Application/AppointScheduleTemplates/AppointScheduleTemplateAppService.cs
  2. 2
      src/Shentun.WebPeis.Domain/Models/AppointSchedule.cs
  3. 12
      src/Shentun.WebPeis.HttpApi.Host/appsettings.json

31
src/Shentun.WebPeis.Application/AppointScheduleTemplates/AppointScheduleTemplateAppService.cs

@ -1,14 +1,17 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using NPOI.DDF;
using Shentun.WebPeis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
namespace Shentun.WebPeis.AppointScheduleTemplates
{
@ -80,6 +83,34 @@ namespace Shentun.WebPeis.AppointScheduleTemplates
return entListDto;
}
/// <summary>
/// 保存预约计划模板 整合到一起
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<List<AppointScheduleTemplateDto>> CreateOrUpdateAppointScheduleTemplateAsync(List<CreateAppointScheduleTemplateDto> input)
{
List<AppointScheduleTemplateDto> entListDto = new List<AppointScheduleTemplateDto>();
var deleteList = await _appointScheduleTemplateRepository.GetListAsync();
await _appointScheduleTemplateRepository.DeleteManyAsync(deleteList,true);
List<AppointScheduleTemplate> appointScheduleTemplateList = new List<AppointScheduleTemplate>();
foreach (var item in input)
{
var createEntity = ObjectMapper.Map<CreateAppointScheduleTemplateDto, AppointScheduleTemplate>(item);
createEntity.AppointScheduleTemplateId = GuidGenerator.Create();
createEntity = await _appointScheduleTemplateManager.CreateAsync(createEntity);
await _appointScheduleTemplateRepository.InsertAsync(createEntity,true);
}
entListDto = await GetListAsync();
return entListDto;
}
/// <summary>
/// 创建预约计划模板

2
src/Shentun.WebPeis.Domain/Models/AppointSchedule.cs

@ -14,10 +14,10 @@ public partial class AppointSchedule : AuditedEntity, IHasConcurrencyStamp
/// 预约日期
/// </summary>
public DateTime? AppointDate { get; set; }
/// <summary>
/// 上午数量限制
/// </summary>
public int AmNumberLimit { get; set; }
/// <summary>
/// 下午数量限制

12
src/Shentun.WebPeis.HttpApi.Host/appsettings.json

@ -2,10 +2,10 @@
"Kestrel": {
"Endpoints": {
//"Http": {
// "Url": "http://localhost:44382"
// "Url": "http://localhost:44322"
//}
"Https": {
"Url": "https://localhost:44382",
"Url": "https://localhost:44322",
"Certificate": {
"Path": "shentun.pfx",
"Password": "Shentun2024"
@ -13,10 +13,10 @@
}
}
},
//"urls": "https://10.1.12.140:44382",
//"urls": "https://10.1.12.140:44322",
"AdminId": "3a12a8a6-beb9-fc29-b4e7-4acfb00d8370",
"App": {
"SelfUrl": "https://localhost:44382",
"SelfUrl": "https://localhost:44322",
"CorsOrigins": "https://*.WebPeis.com",
"RedirectAllowedUrls": ""
},
@ -25,9 +25,9 @@
"Default": "Host=62.156.10.86;Port=5432;Database=WebPeis0520;User ID=postgres;Password=st123;"
},
"AuthServer": {
"Authority": "https://localhost:44382",
"Authority": "https://localhost:44322",
"RequireHttpsMetadata": false,
"SwaggerClientId": "WebPeis_Swagger",
"SwaggerClientId": "Localhost_Swagger",
"SwaggerClientSecret": "",
"WeChatClientId": "WeChatApp",
"WeChatClientSecret": "1q2w3e*"

Loading…
Cancel
Save