duhe
2025-03-21 07f32fa7617e34c28773a0aa921e33aea44d1c12
物料删除保存问题修复
增加获取公司名称的接口
1个文件已修改
45 ■■■■■ 已修改文件
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1120,12 +1120,11 @@
        [HttpGet]
        public object DeltetGy_Material(string HItemID, string user)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            oCN.BeginTran();//开始事务
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (user == "10000")//api同步方式
                {
                    oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID);
@@ -1387,7 +1386,49 @@
        }
        #endregion
        #region 获取当前公司名
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Xt_getInfo/getCompanyName")]
        [HttpGet]
        public object getCompanyName()
        {
            try
            {
                string sErr = "";
                if(oSystemParameter.ShowBill(ref sErr))
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = oSystemParameter.omodel.WMS_CampanyName;
                    objJsonResult.data = oSystemParameter.omodel.WMS_CampanyName;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "当前公司名获取失败!" ;
                    objJsonResult.data = null;
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        /// <summary>