yl
2022-08-22 facb807b19e232c44852a91b6b442285eddfb0f5
VueWebApi/Controllers/DeviceManagerController.cs
@@ -14,6 +14,7 @@
{
    [RoutePrefix(prefix: "api/DeviceManager")]
    [ControllerGroup("设备管理", "在线接口")]
    [ChannelActionFilter]
    public class DeviceManagerController : ApiController
    {
        //定义全局信息返回变量
@@ -482,5 +483,155 @@
        }
        #endregion
        #region[设备点检标准关联工作站查询]
        /// <summary>
        /// 设备点检标准关联工作站查询
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <returns></returns>
        [Route(template: "DeviceCheckStanedAssociationEqp")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckStanedAssociationEqp(string checkstand_code)
        {
            mes = DeviceManagerBLL.DeviceCheckStanedAssociationEqp(checkstand_code);
            return TJson.toJson(mes);
        }
        #endregion
        #region [设备点检标准关联工作站提交]
        /// <summary>
        /// 设备点检标准关联工作站提交
        /// </summary>
        /// <param name="checkstand_code">设备点检标准编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "SaveDeviceCheckStanedAssociationEqp")]
        [HttpPost]
        public HttpResponseMessage SaveDeviceCheckStanedAssociationEqp(string checkstand_code, List<ObjectData> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.SaveDeviceCheckStanedAssociationEqp(checkstand_code, username, json);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准列表查询]
        /// <summary>
        /// 设备保养标准列表查询
        /// </summary>
        /// <param name="repairstandcode">保养标准编码</param>
        /// <param name="repairstandname">保养标准名称</param>
        /// <param name="repairstanddescr">保养标准描述</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairStandArdSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairStandArdSearch(string repairstandcode = null, string repairstandname = null, string repairstanddescr = null, int page = 0, int rows = 0, string prop = null, string order = null)
        {
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceRepairStandArdSearch(repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准新增、编辑获取保养项目下拉列表]
        /// <summary>
        /// 设备保养标准新增、编辑获取保养项目下拉列表
        /// </summary>
        /// <returns></returns>
        [Route(template: "DeviceRepairItemSelect")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairItemSelect()
        {
            mes = DeviceManagerBLL.DeviceRepairItemSelect();
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准编辑/查看获取数据]
        /// <summary>
        /// 设备保养标准编辑/查看获取数据
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "ViewDeviceRepairStanedSearch")]
        [HttpPost]
        public HttpResponseMessage ViewDeviceRepairStanedSearch(string repairstand_code)
        {
            mes = DeviceManagerBLL.ViewDeviceRepairStanedSearch(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准新增编辑]
        /// <summary>
        /// 设备保养标准新增编辑
        /// </summary>
        /// <param name="opertype">操作类型</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "AddUpdateDeviceRepairStandArd")]
        [HttpPost]
        public HttpResponseMessage AddUpdateDeviceRepairStandArd(string opertype, RoutEdit json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.AddUpdateDeviceRepairStandArd(opertype, json, username);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准删除]
        /// <summary>
        /// 设备保养标准删除
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "DeleteDeviceRepairStaned")]
        [HttpPost]
        public HttpResponseMessage DeleteDeviceRepairStaned(string repairstand_code)
        {
            mes = DeviceManagerBLL.DeleteDeviceRepairStaned(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养标准关联工作站查询]
        /// <summary>
        /// 设备保养标准关联工作站查询
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairStanedAssociationEqp")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairStanedAssociationEqp(string repairstand_code)
        {
            mes = DeviceManagerBLL.DeviceRepairStanedAssociationEqp(repairstand_code);
            return TJson.toJson(mes);
        }
        #endregion
        #region [设备保养标准关联工作站提交]
        /// <summary>
        /// 设备保养标准关联工作站提交
        /// </summary>
        /// <param name="repairstand_code">设备保养标准编码</param>
        /// <param name="json">提交数据</param>
        /// <returns></returns>
        [Route(template: "SaveDeviceRepairStanedAssociationEqp")]
        [HttpPost]
        public HttpResponseMessage SaveDeviceRepairStanedAssociationEqp(string repairstand_code, List<ObjectData> json)
        {
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            mes = DeviceManagerBLL.SaveDeviceRepairStanedAssociationEqp(repairstand_code, username, json);
            return TJson.toJson(mes);
        }
        #endregion
    }
}