55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using Furion.DynamicApiController;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Nirvana.Common;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Waste.Domain;
|
|
|
|
namespace Waste.Application
|
|
{
|
|
/// <summary>
|
|
/// 设备接口
|
|
/// </summary>
|
|
public class DeviceAppService:IDynamicApiController
|
|
{
|
|
private readonly IDeviceService _deviceService;
|
|
public DeviceAppService(IDeviceService deviceService)
|
|
{
|
|
_deviceService = deviceService;
|
|
}
|
|
/// <summary>
|
|
/// 设备列表
|
|
/// </summary>
|
|
/// <param name="param"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<PageParms<DeviceList>> GetListAsync(QueryParams param)
|
|
{
|
|
return await _deviceService.GetListAsync(param);
|
|
}
|
|
/// <summary>
|
|
/// 信息提交
|
|
/// </summary>
|
|
/// <param name="role"></param>
|
|
/// <returns></returns>
|
|
public async Task<ResultInfo> SubmitFormAsync(DeviceSubmit role)
|
|
{
|
|
return await _deviceService.SubmitFormAsync(role);
|
|
}
|
|
/// <summary>
|
|
/// 批量操作
|
|
/// </summary>
|
|
/// <param name="deviceBatchModel"></param>
|
|
/// <returns></returns>
|
|
public async Task<ResultInfo> BatchSetAsync(DeviceBatchModel deviceBatchModel)
|
|
{
|
|
return await _deviceService.BatchSetAsync(deviceBatchModel);
|
|
}
|
|
|
|
}
|
|
}
|