yl
2023-11-22 bfa0a4079b2ac3f363826b7e329115f88b4bf0f5
VueWebApi/Controllers/ProductModelController.cs
@@ -216,9 +216,11 @@
        [HttpGet]
        public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null, string partspec = null, string stocktypecode = null, string materialtypecode = null, string storehousecode = null, int page = 0, int rows = 0, string prop = null, string order = null)
        {
            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //所属组织
            var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //所属组织类型
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ProductModelBLL.InventoryFileSelect(partcode, partname, partspec, stocktypecode, materialtypecode, storehousecode, startNum, endNum, prop, order);
            mes = ProductModelBLL.InventoryFileSelect(stu_torgcode, stu_torgtypecode,partcode, partname, partspec, stocktypecode, materialtypecode, storehousecode, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
@@ -240,7 +242,6 @@
            string uomcode = obj["uomcode"].ToString();           //单位编码
            string warehousecode = obj["warehousecode"].ToString(); //所属仓库编码
            string stocktypecode = obj["stocktypecode"].ToString(); //存货类型编码
            string materialtypecode = obj["materialtypecode"].ToString(); //物料类型编码
            string minstockqty = obj["minstockqty"].ToString(); //最小库存
            string maxstockqty = obj["maxstockqty"].ToString(); //最大库存
            string is_batchno = obj["is_batchno"].ToString();   //是否批次管理
@@ -249,7 +250,7 @@
            string is_outcheck = obj["is_outcheck"].ToString(); //是否出厂检验
            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //操作人员
            string OperType = obj["OperType"].ToString();  //操作类型
            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty,is_batchno,is_fifo,is_incheck,is_outcheck, username, OperType);
            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, minstockqty, maxstockqty,is_batchno,is_fifo,is_incheck,is_outcheck, username, OperType);
            return TJson.toJson(mes);
        }
        #endregion
@@ -507,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[工序查询]