27 lines
928 B
C#
27 lines
928 B
C#
using Brizco.Domain.CommandQueries.Queries;
|
|
|
|
namespace Brizco.Core.EntityServices;
|
|
|
|
public class ShiftPlanService : IShiftPlanService
|
|
{
|
|
private readonly ISender _sender;
|
|
private readonly IActivityService _activityService;
|
|
|
|
public ShiftPlanService(ISender sender,IActivityService activityService)
|
|
{
|
|
_sender = sender;
|
|
_activityService = activityService;
|
|
}
|
|
public async Task ChangeShiftPlanTaskStatusAsync(Guid shiftPlanId, bool isChangeToShift, bool isDisable)
|
|
{
|
|
var shiftPlan = await _sender.Send(new GetShiftPlanQuery(shiftPlanId));
|
|
|
|
}
|
|
|
|
public async Task<bool> CreateAsync(CreateShiftPlanCommand createShiftPlanCommand, CancellationToken cancellationToken)
|
|
{
|
|
var shiftPlan = await _sender.Send(createShiftPlanCommand, cancellationToken);
|
|
_activityService.CreateActivitiesByShiftPlan(shiftPlan.Id, cancellationToken);
|
|
return true;
|
|
}
|
|
} |