fix 根据档案号 设备组查询设备优化

This commit is contained in:
cheche
2024-03-12 10:34:31 +08:00
parent 15f89a82a2
commit 7bf97dbe5e
5 changed files with 170 additions and 38 deletions

View File

@@ -1,7 +1,11 @@
using System.ComponentModel.DataAnnotations;
using Dlhis.Basic.BusinessPlace.Response;
using Dlhis.Basic.Device.Response;
using Dlhis.Basic.Organization.Request;
using Dlhis.Basic.Organization.Response;
using Dlhis.Basic.Organization.Services;
using Dlhis.Basic.Organization.Services.Implements;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -23,12 +27,12 @@ public class GainfoPermissionsController : ControllerBase
/// <summary>
/// 根据用户查看餐饮点
/// </summary>
/// <param name="userNo"></param>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("placesByGainfo")]
public async Task<List<GetPlaceByGainfoResponse>> GetPlaceByGainfoAsync([Required] string userNo)
public async Task<Pagination<BusinessPlaceResponse>> GetPlaceByGainfoAsync([FromQuery]DeviceAssRequest request)
{
return await _gainfoPermissions.GetPlaceByGainfoAsync(userNo);
return await _gainfoPermissions.GetPlaceByGainfoAsync(request);
}
/// <summary>
@@ -38,7 +42,7 @@ public class GainfoPermissionsController : ControllerBase
/// <param name="deviceGroupCode"></param>
/// <returns></returns>
[HttpGet("devicesUnderGroupByUserNo")]
public async Task<List<KeyValue<string>>> GetDevicesUnderGroupByUserNoAsync([Required] string userNo, [Required] string deviceGroupCode)
public async Task<List<GetDevicesUnderGroupByUserNoResponse>> GetDevicesUnderGroupByUserNoAsync(string userNo, string deviceGroupCode)
{
return await _gainfoPermissions.GetDevicesUnderGroupByUserNoAsync(userNo, deviceGroupCode);
}
@@ -46,11 +50,11 @@ public class GainfoPermissionsController : ControllerBase
/// <summary>
/// 获取用户所有设备权限
/// </summary>
/// <param name="userNo"></param>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("assignDeviceCodes")]
public async Task<List<Guid>> GetAssignDeviceCodesAsync(string userNo)
public async Task<Pagination<DevicePageResponse>> GetAssignDeviceCodesAsync([FromQuery]DeviceAssRequest request)
{
return await _gainfoPermissions.GetAssignDeviceCodesAsync(userNo);
return await _gainfoPermissions.GetAssignDeviceCodesAsync(request);
}
}