zrg
2025-04-10 f2ea3997112e66bf0d8d9bcf5dd34b25ecb50dd6
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1120,11 +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);
@@ -1152,7 +1152,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
@@ -1386,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>