fix 解决合并冲突1
This commit is contained in:
@@ -14,8 +14,6 @@ using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Basic.Organization.Services.Implements;
|
||||
@@ -50,8 +48,8 @@ public class GainfoPermissions : IGainfoPermissions
|
||||
return await _dbContext.Queryable<DeviceEntity>()
|
||||
.LeftJoin<DeviceRegistryEntity>((x, dr) => x.UniqueNo == dr.DeviceUniqueNo)
|
||||
.LeftJoin<BusinessPlaceEntity>((x, dr, place) => dr.BusinessPlaceCode == place.Code)
|
||||
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((x,dr,place, ps) => x.Code == ps.PlaceCode)
|
||||
.LeftJoin<BusinessShiftEntity>((x, dr, place, ps,s) => s.Code == ps.ShiftCode)
|
||||
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((x, dr, place, ps) => x.Code == ps.PlaceCode)
|
||||
.LeftJoin<BusinessShiftEntity>((x, dr, place, ps, s) => s.Code == ps.ShiftCode)
|
||||
.Where(x => x.Type == DeviceTypeEnumType.Meal)
|
||||
.Where(x => deviceCodes.Contains(x.Code))
|
||||
.Where((x, dr) => !string.IsNullOrEmpty(dr.BusinessPlaceCustomCode))
|
||||
@@ -72,11 +70,14 @@ public class GainfoPermissions : IGainfoPermissions
|
||||
.ToPageListAsync(request);
|
||||
}
|
||||
|
||||
public async Task<List<GetDevicesUnderGroupByUserNoResponse>> GetDevicesUnderGroupByUserNoAsync(string userNo, string deviceGroupCode)
|
||||
public async Task<List<GetDevicesUnderGroupByUserNoResponse>> GetDevicesUnderGroupByUserNoAsync(string userNo, Guid deviceGroupCode)
|
||||
{
|
||||
var deviceGroups = await _dbContext.Queryable<DeviceGroupEntity>().ToListAsync();
|
||||
var currentGroup = deviceGroups.Where(x => x.Code.ToString() == deviceGroupCode).FirstOrDefault();
|
||||
currentGroup.ThrowIfNull($"{deviceGroupCode}在设备组中不存在");
|
||||
var currentGroup = deviceGroups.Where(x => x.Code == deviceGroupCode).FirstOrDefault();
|
||||
if (currentGroup == null)
|
||||
{
|
||||
return new List<GetDevicesUnderGroupByUserNoResponse>();
|
||||
}
|
||||
|
||||
var groups = RecursionGetNext(currentGroup, deviceGroups).ToList();
|
||||
|
||||
@@ -98,21 +99,21 @@ public class GainfoPermissions : IGainfoPermissions
|
||||
.LeftJoin<BusinessPlaceEntity>((d, dt, dr, bp) => dr.BusinessPlaceCode == bp.Code)
|
||||
.Where(d => nos.Contains(d.UniqueNo))
|
||||
.Select((d, dt, dr, bp) => new DevicePageResponse
|
||||
{
|
||||
FuncsStr = d.Funcs.ToString(),
|
||||
Brand = dt.Brand,
|
||||
Type = d.Type,
|
||||
BusinessPlaceCode = bp.Code,
|
||||
BusinessPlaceName = bp.Name,
|
||||
LastHeartbeatTime = dr.LastHeartbeatTime,
|
||||
UniqueNo = d.UniqueNo,
|
||||
Supplier = d.Supplier,
|
||||
DeployPlace = d.DeployPlace,
|
||||
DeployPosition = d.DeployPosition,
|
||||
DeployDirection = d.DeployDirection,
|
||||
TemplateCode = dt.Code,
|
||||
ConnectionInfo = d.ConnectionInfo,
|
||||
Enable = d.Enable,
|
||||
{
|
||||
FuncsStr = d.Funcs.ToString(),
|
||||
Brand = dt.Brand,
|
||||
Type = d.Type,
|
||||
BusinessPlaceCode = bp.Code,
|
||||
BusinessPlaceName = bp.Name,
|
||||
LastHeartbeatTime = dr.LastHeartbeatTime,
|
||||
UniqueNo = d.UniqueNo,
|
||||
Supplier = d.Supplier,
|
||||
DeployPlace = d.DeployPlace,
|
||||
DeployPosition = d.DeployPosition,
|
||||
DeployDirection = d.DeployDirection,
|
||||
TemplateCode = dt.Code,
|
||||
ConnectionInfo = d.ConnectionInfo,
|
||||
Enable = d.Enable,
|
||||
})
|
||||
.ToListAsync();
|
||||
var deviceUniqueNos = page.Select(x => x.UniqueNo).ToList();
|
||||
@@ -148,9 +149,9 @@ public class GainfoPermissions : IGainfoPermissions
|
||||
return lst;
|
||||
}
|
||||
|
||||
public async Task<Pagination<DevicePageResponse>> GetAssignDeviceCodesAsync(DeviceAssRequest request)
|
||||
public async Task<Pagination<DevicePageResponse>> GetAssignDeviceCodesAsync(DeviceAssRequest request)
|
||||
{
|
||||
var ids = await _devicePermissionService.GetAssignDeviceCodesAsync(request.UserNo);
|
||||
var ids = await _devicePermissionService.GetAssignDeviceCodesAsync(request.UserNo);
|
||||
|
||||
var page = await _dbContext.Queryable<DeviceEntity>()
|
||||
.LeftJoin<DeviceTemplateEntity>((d, dt) => d.TemplateCode == dt.Code)
|
||||
|
||||
Reference in New Issue
Block a user