public ActionResult GetMdmBuMstrPageList(MdmBuMstrQuery query) { try { var result = _mdmBuMstrRepository.GetMdmBuMstrPageList(query); return(Page(result.Data, result.Page)); } catch (Exception ex) { return(Fail(ex.Message)); } }
public ActionResult GetMdmBuMstrList(MdmBuMstrQuery query) { try { var result = _mdmBuMstrRepository.GetMdmBuMstrList(query); return(Success("获取成功", result)); } catch (Exception ex) { return(Fail(ex.Message)); } }
/// <summary> /// 获取机构分页列表 /// </summary> /// <returns></returns> public PagerList <dynamic> GetMdmBuMstrPageList(MdmBuMstrQuery query) { var perssion = _permissionHelper.GetCondition(AbpSession.USR_TYPE, AbpSession.USR_SCOPE, "BU_NO", AbpSession.ORG_NO, AbpSession.BG_NO); perssion = query.BU_TYPE != 0 ? perssion + " and BU_TYPE=" + query.BU_TYPE + "" : perssion; return(_sqlQuery.Select(@"*") .Filter("BU_NO", query.BU_NO) .Filter("BU_NAME", query.BU_NAME, Operator.Contains) .Filter("DEL_FLAG", "1") .And(perssion) .OrderBy("BU_TYPE") .GetPageList <dynamic>("MDM_BU_MSTR", Context.Database.GetDbConnection(), query)); }
/// <summary> /// 获取机构列表 /// </summary> /// <returns></returns> public List <dynamic> GetMdmBuMstrList(MdmBuMstrQuery query) { var perssion = _permissionHelper.GetCondition(AbpSession.USR_TYPE, AbpSession.USR_SCOPE, "BU_NO", AbpSession.ORG_NO, AbpSession.BG_NO); perssion = query.BU_TYPE != 0 ? string.IsNullOrEmpty(perssion) ? "BU_TYPE=" + query.BU_TYPE + "" : perssion + " and BU_TYPE=" + query.BU_TYPE + "" : perssion; return(_sqlQuery.Select(@"BU_NO,BU_NAME") .Filter("PARENT_BU_NO", query.PARENT_BU_NO) .Filter("BU_STATUS", "1") .Filter("DEL_FLAG", "1") .And(perssion) .OrderBy("BU_TYPE") .GetList <dynamic>("MDM_BU_MSTR", Context.Database.GetDbConnection())); }