1
yusijie
2023-05-25 c14d65aa45f6fe0eedd558bc0de345a0ccd6e22a
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MaterTypeBillController.cs
@@ -362,21 +362,21 @@
        /// 
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">禁用(0),反禁用(1)</param>
        /// <param name="IsStop">禁用(0),反禁用(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_MaterType/StopGy_MaterType")]
        [HttpGet]
        public object StopGy_MaterType(int HInterID, int IsAudit, string CurUserName)
        public object StopGy_MaterType(int HInterID, int IsStop, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName))
                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Stop", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.Message = "禁用失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -384,7 +384,7 @@
                var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //禁用判断
                    if (IsStop == 0)  //禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                        {
@@ -395,7 +395,7 @@
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反禁用判断
                    if (IsStop == 1) //反禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
                        {
@@ -418,7 +418,7 @@
                oCN.BeginTran();
                if (IsAudit == 0)  //禁用判断
                if (IsStop == 0)  //禁用判断
                {
                    oCN.RunProc("update Gy_MaterType set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
@@ -427,7 +427,7 @@
                    objJsonResult.Message = "禁用成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反禁用判断
                if (IsStop == 1) //反禁用判断
                {
                    oCN.RunProc("update Gy_MaterType set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
@@ -518,7 +518,7 @@
                    if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + "."))
                    {
                        TreeModel tbjson = new TreeModel();
                        tbjson.id = dt.Rows[i]["hnumber"].ToString();
                        tbjson.id = dt.Rows[i]["hitemid"].ToString();
                        tbjson.title = dt.Rows[i]["hname"].ToString();
                        tree[m].children.Add(tbjson);
                    }