| | |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[系统设置,工单SOP查询] |
| | | /// <summary> |
| | | /// 系统设置,工单SOP查询 |
| | | /// </summary> |
| | | /// <param name="search">搜索关键字</param> |
| | | /// <param name="check">是否选中最高版本</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "WrkOrderSearch")] |
| | | [HttpGet] |
| | | public JsonResult WrkOrderSearch(string search = null, string check = 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 = SopManageMentBLL.WrkOrderSearch(search, check, startNum, endNum, prop, order); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[系统设置,工单SOP上传获取最大版本号] |
| | | /// <summary> |
| | | /// 系统设置,工单SOP上传获取最大版本号 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">物料编码</param> |
| | | /// <param name="filetypecode">文件类型编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "WrkOrderSopMaxVersion")] |
| | | [HttpGet] |
| | | public JsonResult WrkOrderSopMaxVersion(string wocode, string partcode, string filetypecode) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = SopManageMentBLL.WrkOrderSopMaxVersion(wocode, partcode, filetypecode, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[系统设置,工单SOP新增] |
| | | /// <summary> |
| | | /// 系统设置,工单SOP新增 |
| | | /// </summary> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">物料编码</param> |
| | | /// <param name="filename">文件名称</param> |
| | | /// <param name="filetypecode">文件类型编码</param> |
| | | /// <param name="file">上传文件</param> |
| | | /// <param name="version">版本号</param> |
| | | /// <returns></returns> |
| | | [Route(template: "WrkOrderSopAddSeave")] |
| | | [HttpPost] |
| | | public JsonResult WrkOrderSopAddSeave([FromForm] string wocode, [FromForm] string partcode, [FromForm] string filename, [FromForm] string filetypecode, [FromForm] string version, IFormFile file) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = SopManageMentBLL.WrkOrderSopAddSeave(wocode, partcode, filename, filetypecode, version, file, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[系统设置,工单SOP删除] |
| | | /// <summary> |
| | | /// 系统设置,工单SOP删除 |
| | | /// </summary> |
| | | /// <param name="id">数据id</param> |
| | | /// <param name="wocode">工单编号</param> |
| | | /// <param name="partcode">物料编码</param> |
| | | /// <param name="filepath">文件路径</param> |
| | | /// <returns></returns> |
| | | [Route(template: "WrkOrderSopDeleteSeave")] |
| | | [HttpPost] |
| | | public JsonResult WrkOrderSopDeleteSeave(string id, string wocode, string partcode, string filepath) |
| | | { |
| | | var token = HttpContext.Request.Headers["Token"].ToString(); |
| | | User us = JwtTools.Denocode(token.ToString()); |
| | | mes = SopManageMentBLL.WrkOrderSopDeleteSeave(id, wocode, partcode, filepath, us); |
| | | return Json(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |