| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设备点检项列表查询] |
| | | /// <summary> |
| | | /// 设备点检项列表查询 |
| | | /// </summary> |
| | | /// <param name="checkitemcode">点检部位编码</param> |
| | | /// <param name="checkitemname">点检部位名称</param> |
| | | /// <param name="checkdescr">点检要求</param> |
| | | /// <param name="isqrcode">选中扫码</param> |
| | | /// <param name="cycle">点检周期</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceCheckItemSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage DeviceCheckItemSearch(string checkitemcode = null, string checkitemname = null, string checkdescr = null, string isqrcode = null,string cycle=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.DeviceCheckItemSearch(checkitemcode, checkitemname, checkdescr, isqrcode, cycle, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设备点检项新增编辑] |
| | | /// <summary> |
| | | /// 设备点检项新增编辑 |
| | | /// </summary> |
| | | /// <param name="obj">提交数据对象</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceCheckItem")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateDeviceCheckItem([FromBody] JObject obj) |
| | | { |
| | | string checkitemid = obj["id"].ToString(); //设备点检项id(主键) |
| | | string checkitemcode = obj["checkitemcode"].ToString(); //设备点检部位编码 |
| | | string checkitemname = obj["checkitemname"].ToString(); //设备点检部位名称 |
| | | string checkitemdescr = obj["checkitemdescr"].ToString(); //设备点检部位要求 |
| | | string cycle = obj["cycle"].ToString(); //设备点检部位周期 |
| | | string isqrcode = obj["isqrcode"].ToString(); //是否扫码 |
| | | var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = DeviceManagerBLL.AddUpdateDeviceCheckItem(checkitemid, checkitemcode, checkitemname, checkitemdescr, cycle, isqrcode, usercode, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设备点检项删除] |
| | | /// <summary> |
| | | /// 设备点检项删除 |
| | | /// </summary> |
| | | /// <param name="checkitemcode">设备点检项目(部位)编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceCheckItem")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteDeviceCheckItem(string checkitemcode) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceCheckItem(checkitemcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[设备保养项列表查询] |
| | | /// <summary> |
| | | /// 设备保养项列表查询 |
| | | /// </summary> |
| | | /// <param name="maiitemcode">保养部位编码</param> |
| | | /// <param name="maiitemname">保养部位名称</param> |
| | | /// <param name="maidescr">保养要求</param> |
| | | /// <param name="isqrcode">选中扫码</param> |
| | | /// <param name="cycle">保养周期</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeviceMaiItemSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage DeviceMaiItemSearch(string maiitemcode = null, string maiitemname = null, string maidescr = null, string isqrcode = null, string cycle = 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.DeviceMaiItemSearch(maiitemcode, maiitemname, maidescr, isqrcode, cycle, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设备保养项新增编辑] |
| | | /// <summary> |
| | | /// 设备保养项新增编辑 |
| | | /// </summary> |
| | | /// <param name="obj">提交数据对象</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateDeviceMaiItem")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateDeviceMaiItem([FromBody] JObject obj) |
| | | { |
| | | string maiitemid = obj["id"].ToString(); //设备保养项id(主键) |
| | | string maiitemcode = obj["maiitemcode"].ToString(); //设备保养部位编码 |
| | | string maiitemname = obj["maiitemname"].ToString(); //设备保养部位名称 |
| | | string maiitemdescr = obj["maiitemdescr"].ToString(); //设备保养部位要求 |
| | | string cycle = obj["cycle"].ToString(); //设备点检部位周期 |
| | | string isqrcode = obj["isqrcode"].ToString(); //是否扫码 |
| | | var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = DeviceManagerBLL.AddUpdateDeviceMaiItem(maiitemid, maiitemcode, maiitemname, maiitemdescr, cycle, isqrcode, usercode, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[设备保养项删除] |
| | | /// <summary> |
| | | /// 设备保养项删除 |
| | | /// </summary> |
| | | /// <param name="maiitemcode">设备保养项目(部位)编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteDeviceMaiItem")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteDeviceMaiItem(string maiitemcode) |
| | | { |
| | | mes = DeviceManagerBLL.DeleteDeviceMaiItem(maiitemcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |