ForkWindingDetectionLogController.cs 2.26 KB
using HHECS.Application.Service;
using HHECS.Model.Entities;
using HHECS.Model.ViewEntity;
using HHECS.WebCommon;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;

namespace HHECS.Web.Areas.EquipmentInfo.Controllers
{
    /// <summary>
    ///  货叉绕度检测记录
    /// </summary>
    [Area("EquipmentInfo")]
    public class ForkWindingDetectionLogController : BaseController
    {
        private readonly ForkWindingDetectionLogService _forkWindingDetectionLogService;

        public ForkWindingDetectionLogController(ForkWindingDetectionLogService forkWindingDetectionLogService)
        {
            _forkWindingDetectionLogService = forkWindingDetectionLogService;
        }

        [ServiceFilter(typeof(OperLogFilter))]
        public IActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public string Load(PageReq pageRequest, ForkWindingDetectionLog entity)
        {
            return _forkWindingDetectionLogService.Load(entity, pageRequest);
        }

        [HttpPost]
        [XSSFilter]
        [ServiceFilter(typeof(OperLogFilter))]
        public string Ins(ForkWindingDetectionLog entity)
        {
            return _forkWindingDetectionLogService.Ins(entity, User);
        }


        [HttpPost]
        [XSSFilter]
        [ServiceFilter(typeof(OperLogFilter))]
        public string Upd(ForkWindingDetectionLog entity)
        {
            return _forkWindingDetectionLogService.Upd(entity, User);
        }

        [HttpPost]
        [ServiceFilter(typeof(OperLogFilter))]
        public string DelByIds(int[] ids)
        {
            return _forkWindingDetectionLogService.DelByIds(ids);
        }

        /// <summary>
        /// 导出数据
        /// </summary>
        /// <param name="entity">请求条件实例</param>
        /// <returns></returns>
        [HttpPost]
        public string Export(ForkWindingDetectionLog entity)
        {
            return _forkWindingDetectionLogService.Export(entity);
        }

        /// <summary>
        /// 仓库查询设备
        /// </summary>
        [HttpPost]
        public string QueryEquipmentByWarehouse(string warehouseCode)
        {
            return _forkWindingDetectionLogService.QueryEqByWare(warehouseCode);
        }
    }
}