| | |
| | | /// <summary> |
| | | /// 存货档案查询 |
| | | /// </summary> |
| | | /// <param name="partcode"></param> |
| | | /// <param name="partname"></param> |
| | | /// <param name="partspec"></param> |
| | | /// <param name="stocktypecode"></param> |
| | | /// <param name="materialtypecode"></param> |
| | | /// <param name="storehousecode"></param> |
| | | /// <param name="page"></param> |
| | | /// <param name="rows"></param> |
| | | /// <param name="prop"></param> |
| | | /// <param name="order"></param> |
| | | /// <param name="partcode">物料编码</param> |
| | | /// <param name="partname">物料名称</param> |
| | | /// <param name="partspec">物料规格</param> |
| | | /// <param name="stocktypecode">存货类型编码</param> |
| | | /// <param name="materialtypecode">物料类型编码</param> |
| | | /// <param name="storehousecode">所属仓库编码</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "InventoryFileSelect")] |
| | | [HttpGet] |
| | |
| | | #endregion |
| | | |
| | | #region[存货档案关联工艺路线提交] |
| | | |
| | | /// <summary> |
| | | /// 存货档案关联工艺路线提交 |
| | | /// </summary> |
| | | /// <param name="partcode">物料编码</param> |
| | | /// <param name="json">提交数据对象</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SaveInventoryFile")] |
| | | [HttpPost] |
| | | public HttpResponseMessage SaveInventoryFile(string partcode, List<ObjectData> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.SaveInventoryFile(partcode, username,json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region[工艺路线查询] |
| | | /// <summary> |
| | | /// 工艺路线查询 |
| | | /// </summary> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <param name="routename">工艺路线名称</param> |
| | | /// <param name="description">工艺路线描述</param> |
| | | /// <param name="createuser">创建人员</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "RouteSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage RouteSearch(string routecode = null, string routename = null, string description = null, string createuser = 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 = ProductModelBLL.RouteSearch(routecode, routename, description, createuser, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工艺路线预览] |
| | | /// <summary> |
| | | /// 工艺路线预览 |
| | | /// </summary> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "ViewRoute")] |
| | | [HttpGet] |
| | | public HttpResponseMessage ViewRoute(string routecode) |
| | | { |
| | | mes = ProductModelBLL.ViewRoute(routecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工艺路线新增] |
| | | /// <summary> |
| | | /// 工艺路线新增编辑 |
| | | /// </summary> |
| | | /// <param name="id">工艺路线id</param> |
| | | /// <param name="opertype">操作类型(新增)</param> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateRoute")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateRoute(string id,string opertype, RoutEdit json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.AddUpdateRoute(id, opertype, username, json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工艺路线删除] |
| | | /// <summary> |
| | | /// 工艺路线删除 |
| | | /// </summary> |
| | | /// <param name="routecode">工艺路线编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteRoute")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteRoute(string routecode) |
| | | { |
| | | mes = ProductModelBLL.DeleteRoute(routecode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[工序查询] |
| | | /// <summary> |
| | | /// 工序查询 |
| | | /// </summary> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <param name="stepname">工序名称</param> |
| | | /// <param name="enable">启用状态</param> |
| | | /// <param name="steptypecode">工序类型编码</param> |
| | | /// <param name="createuser">创建人员</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null,string steptypecode=null, string createuser = 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 = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode,createuser, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序新增编辑] |
| | | /// <summary> |
| | | /// 工序新增编辑 |
| | | /// </summary> |
| | | /// <param name="obj">提交数据对象</param> |
| | | /// <returns></returns> |
| | | [Route(template: "AddUpdateStep")] |
| | | [HttpPost] |
| | | public HttpResponseMessage AddUpdateStep([FromBody] JObject obj) |
| | | { |
| | | string stepid = obj["id"].ToString(); //工序id(主键) |
| | | string stepcode = obj["stepcode"].ToString(); //工序编码 |
| | | string stepname = obj["stepname"].ToString(); //工序名称 |
| | | string steptypecode = obj["steptypecode"].ToString(); //工序类型编码 |
| | | string enable = obj["enable"].ToString(); //启用状态 |
| | | string description = obj["description"].ToString(); //工序描述 |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | string OperType = obj["OperType"].ToString(); //操作类型 |
| | | mes = ProductModelBLL.AddUpdateStep(stepid, stepcode, stepname, steptypecode, enable, description, username, OperType); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序删除] |
| | | /// <summary> |
| | | /// 工序删除 |
| | | /// </summary> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "DeleteStep")] |
| | | [HttpPost] |
| | | public HttpResponseMessage DeleteStep(string stepcode) |
| | | { |
| | | mes = ProductModelBLL.DeleteStep(stepcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[工序定义关联工作站查询] |
| | | /// <summary> |
| | | /// 工序定义关联工作站查询 |
| | | /// </summary> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "StepAssociationEqp")] |
| | | [HttpGet] |
| | | public HttpResponseMessage StepAssociationEqp(string stepcode) |
| | | { |
| | | mes = ProductModelBLL.StepAssociationEqp(stepcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region [工序定义关联工作站提交] |
| | | /// <summary> |
| | | /// 工序定义关联工作站提交 |
| | | /// </summary> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <param name="json">提交数据</param> |
| | | /// <returns></returns> |
| | | [Route(template: "SaveStepAssociationEqp")] |
| | | [HttpPost] |
| | | public HttpResponseMessage SaveStepAssociationEqp(string stepcode, List<ObjectData> json) |
| | | { |
| | | var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员 |
| | | mes = ProductModelBLL.SaveStepAssociationEqp(stepcode, username, json); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |