wangyi
7 天以前 2e9a6c1af752037c756296e24571797d0d42453f
增加生产入库分页
1个文件已修改
57 ■■■■■ 已修改文件
WebAPI/Controllers/仓存管理/验收入库/Kf_ProductInBillController.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÑéÊÕÈë¿â/Kf_ProductInBillController.cs
@@ -87,6 +87,63 @@
        }
        #endregion
        #region ç”Ÿäº§å…¥åº“单列表分页列表
        [Route("Kf_ProductInBillController/page")]
        [HttpGet]
        public json Sc_MouldProdOutBillPage(string sWhere, string user, int page, int size, string Type)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //列表进入时判断权限,选源单进入不判断权限
                if (Type == ModName)
                {
                    if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, user))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBillList " + page + "," + size + ",'','" + Type + "'", "h_p_Kf_ProductInBillList");
                }
                else
                {
                    ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBillList " + page + "," + size + ",'" + sWhere + "','" + Type + "'", "h_p_Kf_ProductInBillList");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç”Ÿäº§å…¥åº“单 åˆ é™¤
        /// <summary>
        /// åˆ é™¤ç”Ÿäº§å…¥åº“单