duhe
2024-10-29 a2fdf7753324a8888dc0bb642998f70bae2f05a5
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillController.cs
@@ -4097,42 +4097,42 @@
        #region è‡ªåŠ¨åŠ è½½é¡µé¢è¡¨å¤´
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xt_DefineBillMainSet/getDefineBillMainSet")]
        [HttpGet]
        public object getDefineBillMainSet(string HModName, string user)
        {
            try
            {
                string sql = "select b.* from Xt_DefineBillMainSetMain as a inner join Xt_DefineBillMainSetSub as b on a.HInterID = b.HInterID  where a.HModName ='" + HModName + "' and a.HUser ='" + user + "' order by b.HArrangeOrder,b.HArrangeOrderSub";
                ds = oCN.RunProcReturn(sql, "Xt_DefineBillMainSet");
        //#region è‡ªåŠ¨åŠ è½½é¡µé¢è¡¨å¤´
        ///// <summary>
        ///// è¿”回项目阶段列表
        /////参数:string sql。
        /////返回值:object。
        ///// </summary>
        //[Route("Xt_DefineBillMainSet/getDefineBillMainSet")]
        //[HttpGet]
        //public object getDefineBillMainSet(string HModName, string user)
        //{
        //    try
        //    {
        //        string sql = "select * from h_v_Xt_DefineBillMainSet_AutoLoadList where HModName ='" + HModName + "' and HUser ='" + user + "' order by HArrangeOrder,HArrangeOrderSub";
        //        ds = oCN.RunProcReturn(sql, "Xt_DefineBillMainSet");
                if(ds!=null && ds.Tables[0].Rows.Count == 0)
                {
                    sql = "select b.* from Xt_DefineBillMainSetMain as a inner join Xt_DefineBillMainSetSub as b on a.HInterID = b.HInterID  where a.HModName ='" + HModName + "' and a.HUser ='admin' order by b.HArrangeOrder,b.HArrangeOrderSub";
                    ds = oCN.RunProcReturn(sql, "Xt_DefineBillMainSet");
                }
        //        if(ds!=null && ds.Tables[0].Rows.Count == 0)
        //        {
        //            sql = "select * from h_v_Xt_DefineBillMainSet_AutoLoadList where HModName ='" + HModName + "' and HUser ='admin' order by HArrangeOrder,HArrangeOrderSub";
        //            ds = oCN.RunProcReturn(sql, "h_v_Xt_DefineBillMainSet_AutoLoadList");
        //        }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        //        objJsonResult.code = "1";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = "Sucess!";
        //        objJsonResult.data = ds.Tables[0];
        //        return objJsonResult;
        //    }
        //    catch (Exception e)
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = "Exception!" + e.ToString();
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        //#endregion
    }
}