fix 修复已知问题
This commit is contained in:
@@ -14,7 +14,6 @@ using Dlhis.ScheduledTask.TaskAssignment.Dto;
|
||||
using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
using Mapster;
|
||||
|
||||
namespace Dlhis.ScheduledTask.TaskAssignment.Services.Implements;
|
||||
|
||||
@@ -112,8 +111,8 @@ public class AssignmentService : IAssignmentService
|
||||
dto.Info = item.TimePeriods.Select(t => new TimePeriodToDeviceResponse
|
||||
{
|
||||
Id = t.CardType,
|
||||
Name = t.CardType == 2 ? "行政卡" : "车间卡",
|
||||
Enable = true,
|
||||
Name = t.CardName,
|
||||
Enable = item.EnableTimePeriod,
|
||||
Sections = t.Sections.Select(s => new TimePeriodWeekDaySection
|
||||
{
|
||||
DayOfWeek = s.DayOfWeek,
|
||||
@@ -121,7 +120,7 @@ public class AssignmentService : IAssignmentService
|
||||
{
|
||||
Enable = p.Enable,
|
||||
Start = p.Enable ? p.Start : new TimeOnly(00, 00, 00),
|
||||
End = p.Enable ? p.End : new TimeOnly(00, 00, 00),
|
||||
End = p.Enable ? p.End : new TimeOnly(00, 00, 00)
|
||||
}).ToList()
|
||||
}).ToList()
|
||||
});
|
||||
@@ -387,8 +386,13 @@ public class AssignmentService : IAssignmentService
|
||||
var templateCodes = devices.Select(x => x.TemplateCode).Distinct().ToList();
|
||||
var deviceCodes = devices.Select(x => x.Code).Distinct().ToList();
|
||||
var settings = await _dbContext.Queryable<DeviceTimePeriodEntity>()
|
||||
.LeftJoin<BasicTypeEntity>((x, type) => x.CardType.ToString() == type.Code && type.Type == "timeperiod")
|
||||
.Where(x => (x.AssignType == DeviceTimePeriodAssignEnumType.Template && templateCodes.Contains(x.Value))
|
||||
|| (x.AssignType == DeviceTimePeriodAssignEnumType.Device && deviceCodes.Contains(x.Value)))
|
||||
.Select((x, type) => new DeviceTimePeriodDto()
|
||||
{
|
||||
CardName = type.Display
|
||||
}, true)
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user