Browse Source

模板

master
wxd 1 year ago
parent
commit
01f9101398
  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.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using NPOI.DDF;
using Shentun.WebPeis.Models; using Shentun.WebPeis.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
namespace Shentun.WebPeis.AppointScheduleTemplates namespace Shentun.WebPeis.AppointScheduleTemplates
{ {
@ -80,6 +83,34 @@ namespace Shentun.WebPeis.AppointScheduleTemplates
return entListDto; 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> /// <summary>
/// 创建预约计划模板 /// 创建预约计划模板

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

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

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

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

Loading…
Cancel
Save