BusEquipmentMaintainRecordDetailController.cs 1.63 KB
using Hh.Mes.Common.Request;
using Hh.Mes.POJO.Entity;
using Hh.Mes.Service;
using Hh.Mes.Service.Equipment;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Hh.Mes.Service.SystemAuth;
using WebMvc.Aop;

namespace WebMvc.Areas.Equipment.Controllers
{
    /// <summary>
    /// 设备保养明细(保养和未保养)-部件维度详情
    /// </summary>
    [Area("Equipment")]
    public class BusEquipmentMaintainRecordDetailController : BaseController
    {
        private readonly BusEquipmentMaintainRecordDetailService _service;

        public BusEquipmentMaintainRecordDetailController(IAuth authUtil, BusEquipmentMaintainRecordDetailService service) : base(authUtil)
        {
            _service = service;
            if (_loginInfo != null) _service.sysWebUser = _loginInfo;
        }
 
        #region 视图功能
        /// <summary>
        /// 默认视图Action
        /// </summary>
        /// <returns></returns>
        [Authenticate]
        public ActionResult Index()
        {
            if (_loginInfo == null) return Redirect("/Login/Index");
            return View();
        }
        #endregion

        #region 数据操作

        /// <summary>
        /// 加载及分页查询
        /// </summary>
        /// <param name="pageRequest">表单请求信息</param>
        /// <param name="entity">请求条件实例</param>
        /// <returns></returns>
        [HttpPost]
        public string LoadDesc(PageReq pageRequest, bus_equipment_maintain_record_head entity)
        {
            return Serialize(_service.LoadDesc(pageRequest, entity));
        }
 
        #endregion
 
        
 
    }
}