zrg
2024-04-02 7eec29ace1b0fd5e8e9671c7b13120b36d14b596
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -243,6 +243,59 @@
        #endregion
        #region èŽ·å–æœ€å¤§å•æ®å·
        /// <summary>
        /// èŽ·å–æœ€å¤§å•æ®å·
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetMaxBillNo_Json")]
        [HttpGet]
        public object GetMaxBillNo_Json(string HBillType)
        {
            try
            {
                string sErrMsg = "";
                string HBillNo = "";
                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
                //----------创建虚表------------------------
                DataTable dt_Main = new DataTable("Json");
                dt_Main.Columns.Add("HBillNo", typeof(string));
                //---------创建新行------------------------
                DataRow dr_main = dt_Main.NewRow(); //创建新行
                dt_Main.Rows.Add(dr_main);          //将新行加入到表中
                dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
                //返回数据
                if (HBillNo == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "最大单据号获取失败";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取成功";
                    objJsonResult.data = dt_Main;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取最大单据号失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ ¹æ®æ¡ç ï¼Œè¿”回条码档案中条码信息