VueWebApi/Controllers/ProductModelController.cs
@@ -508,6 +508,49 @@
        }
        #endregion
        #region[工艺路线关联产品查询]
        /// <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>
        /// <returns></returns>
        [Route(template: "RputeInventorySearch")]
        [HttpGet]
        public HttpResponseMessage RputeInventorySearch(string partcode = null, string partname = null, string partspec = null, string stocktypecode = null, string materialtypecode = null, string storehousecode = null)
        {
            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织
            var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //所属组织类型
            mes = ProductModelBLL.RputeInventorySearch(stu_torgcode, stu_torgtypecode, partcode, partname, partspec, stocktypecode, materialtypecode, storehousecode);
            return TJson.toJson(mes);
        }
        #endregion
        #region[工艺路线批量指定物料保存]
        /// <summary>
        /// 工艺路线批量指定物料保存
        /// </summary>
        /// <param name="obj">提交数据</param>
        /// <returns></returns>
        [Route(template: "RouteBatchPartSave")]
        [HttpPost]
        public HttpResponseMessage RouteBatchPartSave([FromBody] JObject obj)
        {
            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织
            var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //所属组织类型
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            string routecode = obj["routecode"].ToString(); //工艺路线编码
            string routepart = obj["routepart"].ToString(); //工艺路线绑定产品编码
            string[] rolebatchpartcode = Array.ConvertAll<string, string>(routepart.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string分割转string[]
            mes = ProductModelBLL.RouteBatchPartSave(stu_torgcode, stu_torgtypecode, username, routecode, rolebatchpartcode);
            return TJson.toJson(mes);
        }
        #endregion
        #region[工序查询]