Most működik az üzenetküldés Backenden
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using AutoMapper.Configuration.Conventions;
|
||||
using WorkFlowCheck.BL.Services.Interfaces;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.DL.Entities;
|
||||
|
||||
@@ -35,7 +36,14 @@ namespace WorkFlowCheck.BL.Mappings
|
||||
.ForMember(dest => dest.EquipmentDTO, opt => opt.MapFrom(src => src.Equipment))
|
||||
.ForMember(dest => dest.CheckPointDTO, opt => opt.MapFrom(src => src.CheckPoint));
|
||||
|
||||
CreateMap<CheckPoint, CheckPointDTO>().ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
||||
CreateMap<CheckPoint, CheckPointDTO>()
|
||||
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
||||
|
||||
CreateMap<CheckPoint, CheckPointDTO>()
|
||||
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<CheckPointDTO, CheckPoint>();
|
||||
|
||||
@@ -45,7 +53,7 @@ namespace WorkFlowCheck.BL.Mappings
|
||||
CreateMap<Equipment, EquipmentDTO>();
|
||||
CreateMap<EquipmentDTO, Equipment>();
|
||||
|
||||
CreateMap<DeviceMessage, DeviceMessageDTO>();
|
||||
CreateMap<DeviceMessage, DeviceMessageDTO>();
|
||||
CreateMap<DeviceMessageDTO, DeviceMessage>();
|
||||
|
||||
CreateMap<CheckListHeader, CheckListHeaderDTO>()
|
||||
|
||||
@@ -45,14 +45,17 @@ namespace WorkFlowCheck.BL.Services
|
||||
|
||||
try
|
||||
{
|
||||
var res = await _dbContext.CheckPoints
|
||||
var checkpoint = await _dbContext.CheckPoints
|
||||
.Include(i => i.CheckListTemplateRows)
|
||||
.Where(w => w.Id == id)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefaultAsync();
|
||||
if (res != null)
|
||||
if (checkpoint != null)
|
||||
{
|
||||
retVal = _mapper.Map<CheckPointDTO>(res);
|
||||
retVal = _mapper.Map<CheckPointDTO>(checkpoint);
|
||||
|
||||
var role = await _dbContext.Roles.Where(w => w.Id == retVal.RoleId).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -332,10 +335,8 @@ namespace WorkFlowCheck.BL.Services
|
||||
{
|
||||
var res = await _dbContext.CheckListHeaders
|
||||
.Where(w => w.IsEditable &&
|
||||
w.UserId == userId &&
|
||||
w.IsDeleted != true &&
|
||||
(w.CheckStatus == CheckStatus.InProgress ||
|
||||
w.CheckStatus == CheckStatus.Open))
|
||||
w.IsDeleted != true
|
||||
)
|
||||
.Include(i => i.CheckListRows)
|
||||
//.ThenInclude(i => i.CheckListTemplateRow)
|
||||
.AsNoTracking()
|
||||
|
||||
Reference in New Issue
Block a user