1
zrg
昨天 c4c02944532a9bfda6de9a0cd85a9dfa631ed003
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -570,6 +570,7 @@
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oItem.HMakeEmp = msg2;
                    oBill.oModel = oItem;
                }
                //保存
@@ -1120,11 +1121,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 +1153,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 +1387,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>