123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using Ant.Core.WebApi.Model;
- using Central.Control.WebApi.Models.Request;
- using Central.Control.WebApi.Models.Response;
- using Central.Control.WebApi.Service.Interface;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Http;
- namespace Central.Control.WebApi.Controllers
- {
- /// <summary>
- /// 设备相关接口
- /// </summary>
- [RoutePrefix("api/device")]
- public class DeviceController : ApiController
- {
- private readonly IDeviceService _deviceService;
- /// <summary>
- ///
- /// </summary>
- /// <param name="deviceService"></param>
- public DeviceController(IDeviceService deviceService)
- {
- _deviceService = deviceService;
- }
- /// <summary>
- /// 设备包装盒表
- /// </summary>
- /// <param name="kw"></param>
- /// <param name="skip"></param>
- /// <param name="limit"></param>
- /// <returns></returns>
- [HttpGet]
- [Route("devicepacking")]
- public PagedApiResult<DevicePackingResponseDto> GetDevicePackings(string kw = "", int skip = 0, int limit = 1)
- {
- return _deviceService.GetDevicePackings(kw, skip, limit);
- }
- /// <summary>
- /// 设备包装盒保存
- /// </summary>
- /// <param name="req"></param>
- /// <returns></returns>
- [HttpPost]
- [Route("devicepacking")]
- public ApiResult SaveDevicePacking(DevicePackingRequestDto req)
- {
- return _deviceService.SaveDevicePacking(req);
- }
- }
- }
|