You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.SecurityModule.Dtos;
using DS.WMS.Core.SecurityModule.Entity;
using DS.WMS.Core.SecurityModule.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.WebApi.Controllers;
/// <summary>
/// 巡检服务
/// </summary>
public class PatrolRecordController : ApiController
{
private readonly IPatrolRecordService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeRecordService"></param>
public PatrolRecordController(IPatrolRecordService invokeRecordService)
{
_invokeService = invokeRecordService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetPatrolRecordList")]
public DataResult<List<tb_PatrolRecord>> GetPatrolRecordList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 导入
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("ImportInfo")]
public DataResult ImportInfo([FromBody]List<PatrolRecordImportModel> model)
{
return _invokeService.ImportInfo(model);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("DelPatrolRecord")]
public DataResult DelPatrolRecord([FromQuery]string id)
{
var res = _invokeService.DelPatrolRecord(id);
return res;
}
}