杨乐
2022-02-07 25849768b45e51a2f5ac0bd4df7bb98b24da9cd7
WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs
@@ -25,7 +25,7 @@
        /// </summary>
        [Route("Xt_ORGANIZATIONS/list")]
        [HttpGet]
        public object list(string sWhere,string Organization)
        public object list(string sWhere, string Organization)
        {
            try
            {
@@ -39,22 +39,11 @@
                    string sql = sql1 + sWhere + "order by HItemID desc";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
@@ -85,12 +74,12 @@
                long HItemID = list[0].HItemID;
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                long HParentID = list[0].HParentID;
                string HRemark = list[0].HRemark;
                bool HStopflag = list[0].HStopflag;
                if (!DBUtility.ClsPub.AllowNumber(HNumber))
                {
                    objJsonResult.code = "0";
@@ -167,7 +156,7 @@
                bool HStopflag = list[0].HStopflag;
                ////判断权限
                //if (!ClsPub.Security_Log(msg5, 1, true, msg4))
                //if (!ClsPub.Security_Log(msg5, 1, false, msg4))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
@@ -203,7 +192,7 @@
                   ",HStopflag,HMakeTime" +
                   ",HRemark) " +
                   " Values('" + HNumber + "','" + HName + "'," + HParentID.ToString() +
                   "," + HStopflag + "getdate()"+
                   "," + HStopflag + "getdate()" +
                   ",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改上级为非末级代码
@@ -246,7 +235,7 @@
        /// </summary>
        /// <returns></returns>
        [Route("DeltetXt_ORGANIZATIONSList")]
        [HttpGet]
        public object DeltetXt_ORGANIZATIONSList(string HItemID)
        {
@@ -255,7 +244,7 @@
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;