12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 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
- {
-
-
-
- [RoutePrefix("api/device")]
- public class DeviceController : ApiController
- {
- private readonly IDeviceService _deviceService;
-
-
-
-
- public DeviceController(IDeviceService deviceService)
- {
- _deviceService = deviceService;
- }
-
-
-
-
- [HttpGet]
- [Route("deviceproduct")]
- public ApiResult<DeviceProductResponseDto> GetDeviceProduct()
- {
- return _deviceService.GetDeviceProduct();
- }
-
-
-
-
-
- [HttpPost]
- [Route("deviceproduct")]
- public ApiResult SaveDeviceProduct(DeviceProductRequestDto req)
- {
- return _deviceService.SaveDeviceProduct(req);
- }
-
-
-
-
- [HttpGet]
- [Route("devicepacking")]
- public ApiResult<DevicePackingResponseDto> GetDevicePacking()
- {
- return _deviceService.GetDevicePacking();
- }
-
-
-
-
-
-
-
- [HttpGet]
- [Route("devicecanusepackings")]
- public PagedApiResult<DeviceCanUsePackingResponseDto> GetDeviceCanUsePackings(string kw = "", int skip = 0, int limit = 1)
- {
- return _deviceService.GetDeviceCanUsePackings(kw, skip, limit);
- }
-
-
-
-
-
- [HttpPost]
- [Route("devicepacking")]
- public ApiResult SaveDevicePacking(DevicePackingRequestDto req)
- {
- return _deviceService.SaveDevicePacking(req);
- }
- }
- }
|