yl
2022-09-10 3d38eee51b81e372418b891fe9282fbcd01c9df8
VueWebApi/Controllers/DeviceManagerController.cs
@@ -665,7 +665,7 @@
        }
        #endregion
        #region[设备保养记录明细查询]
        #region[设备点检记录明细查询]
        /// <summary>
        /// 设备保养记录明细查询
        /// </summary>
@@ -680,5 +680,109 @@
        }
        #endregion
        #region[设备点检记录导出]
        /// <summary>
        /// 设备点检记录导出
        /// </summary>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="eqpcode">设备编号</param>
        /// <param name="eqpname">设备名称</param>
        /// <param name="stanedname">标准名称</param>
        /// <param name="checkuser">点检人员</param>
        /// <param name="checkdate">点检时间</param>
        /// <returns></returns>
        [Route(template: "DeviceCheckTakeOutExcel")]
        [HttpGet]
        public HttpResponseMessage DeviceCheckTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string checkuser = null, string checkdate = null)
        {
            string checkopendate = "";  //点检开始时间
            string checkclosedate = "";    //点检结束时间
            if (checkdate != "" && checkdate != null)
            {
                checkopendate = checkdate.Split('~')[0].ToString();
                checkclosedate = checkdate.Split('~')[1].ToString();
            }
            mes = DeviceManagerBLL.DeviceCheckTakeOutExcel(wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养记录查询]
        /// <summary>
        /// 设备保养记录查询
        /// </summary>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="eqpcode">设备编号</param>
        /// <param name="eqpname">设备名称</param>
        /// <param name="stanedname">标准名称</param>
        /// <param name="repairuser">保养人员</param>
        /// <param name="repairdate">保养时间</param>
        /// <param name="repairresult">保养结果</param>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairTakeSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string repairuser = null, string repairdate = null,string repairresult=null)
        {
            string repairopendate = "";  //点检开始时间
            string repairclosedate = "";    //点检结束时间
            if (repairdate != "" && repairdate != null)
            {
                repairopendate = repairdate.Split('~')[0].ToString();
                repairclosedate = repairdate.Split('~')[1].ToString();
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = DeviceManagerBLL.DeviceRepairTakeSearch(wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养记录明细查询]
        /// <summary>
        /// 设备保养记录明细查询
        /// </summary>
        /// <param name="bywo">设备保养单号</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairSubTakeSearch")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairSubTakeSearch(string bywo)
        {
            mes = DeviceManagerBLL.DeviceRepairSubTakeSearch(bywo);
            return TJson.toJson(mes);
        }
        #endregion
        #region[设备保养记录导出]
        /// <summary>
        /// 设备保养记录导出
        /// </summary>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="eqpcode">设备编号</param>
        /// <param name="eqpname">设备名称</param>
        /// <param name="stanedname">标准名称</param>
        /// <param name="repairuser">保养人员</param>
        /// <param name="repairdate">保养时间</param>
        /// <param name="repairresult">保养结果</param>
        /// <returns></returns>
        [Route(template: "DeviceRepairTakeOutExcel")]
        [HttpGet]
        public HttpResponseMessage DeviceRepairTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string repairuser = null, string repairdate = null, string repairresult = null)
        {
            string repairopendate = "";  //点检开始时间
            string repairclosedate = "";    //点检结束时间
            if (repairdate != "" && repairdate != null)
            {
                repairopendate = repairdate.Split('~')[0].ToString();
                repairclosedate = repairdate.Split('~')[1].ToString();
            }
            mes = DeviceManagerBLL.DeviceRepairTakeOutExcel(wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult);
            return TJson.toJson(mes);
        }
        #endregion
    }
}