public static QueryPageModel <FollowQuery> GetFollow(FollowSearch queryModel) { var data = _followwService.SearchFollow(queryModel); return(new QueryPageModel <FollowQuery>() { Models = data.Models.ToList().Map <List <FollowQuery> >(), Total = data.Total }); }
public JsonResult ListDoctorContent(FollowSearch queryModel, long id, int page, int rows) { queryModel.PageSize = rows; queryModel.PageNumber = page; queryModel.shopId = base.CurrentSellerManager.ShopId; QueryPageModel <DoctorContentQuery> followcontent = FollowManagerApplication.ListDoctorContent(queryModel, id); DataGridModel <DoctorContentQuery> data = new DataGridModel <DoctorContentQuery> { total = followcontent.Total, rows = followcontent.Models.ToList() }; return(base.Json(data)); }
public JsonResult doctorlist(FollowSearch queryModel, string auditStatuses, int page, int rows) { queryModel.PageSize = rows; queryModel.PageNumber = page; queryModel.AuditStatus = (queryModel.AuditStatus == null ? auditStatuses : queryModel.AuditStatus); queryModel.shopId = base.CurrentSellerManager.ShopId; QueryPageModel <FollowDoctorQuery> followcontent = FollowManagerApplication.GetFollowDoctor(queryModel); DataGridModel <FollowDoctorQuery> data = new DataGridModel <FollowDoctorQuery> { total = followcontent.Total, rows = followcontent.Models.ToList() }; return(base.Json(data)); }
public QueryPageModel <FollowDoctorQuery> GetFollowDoctor(FollowSearch search) { StringBuilder sqlQuery = new StringBuilder(); sqlQuery.Append("SELECT HAA_ID, HFT_ID, HAA_Title,HAA_PicUrl,HAA_Content, b.NAME CategoryName, HAA_State," + "( CASE HAA_State WHEN 0 THEN '未启用' ELSE '已启用' END) State FROM HPYL_AdviceArticle a " + " INNER JOIN himall_shopcategories b ON a.HFT_ID = b.Id WHERE ShopId =" + search.shopId + ""); if (search.ShopCategoryId > 0) { sqlQuery.Append(" and HFT_ID=" + search.ShopCategoryId + ""); } if (!string.IsNullOrEmpty(search.keyWords)) { sqlQuery.Append(" and HAA_Title like '%" + search.keyWords + "%'"); } if (!string.IsNullOrEmpty(search.AuditStatus.ToString())) { sqlQuery.Append(" and HAA_State=" + search.AuditStatus + ""); } var total = new Repository <FollowDoctorQuery>().FindList(sqlQuery.ToString()); Pagination pagination = new Pagination(); pagination.page = search.PageNumber; pagination.rows = search.PageSize; pagination.sidx = "HAA_ID"; pagination.sord = "desc"; var result = new Repository <FollowDoctorQuery>().FindList(sqlQuery.ToString(), pagination).ToList(); QueryPageModel <FollowDoctorQuery> pageModel = new QueryPageModel <FollowDoctorQuery>() { Total = (total == null ? 0 : total.Count()), Models = result }; return(pageModel); }
/// <summary> /// 获取医嘱模板内容 /// </summary> /// <param name="queryModel"></param> /// <param name="id"></param> /// <returns></returns> public QueryPageModel <DoctorContentQuery> ListDoctorContent(FollowSearch queryModel, long id) { string sql = "SELECT HDC_ID,a.HAA_ID, CONCAT(HDC_Days, '天') Days,HDC_Days, HDC_Content,b.HAA_Title FollowName, c.NAME CategoryName FROM HPYL_DoctorFollowContent a " + " inner join HPYL_AdviceArticle b on a.HAA_ID = b.HAA_ID " + " INNER JOIN himall_shopcategories c ON b.HFT_ID = c.Id " + " WHERE ShopId =" + queryModel.shopId + " and a.HAA_ID =" + id + ""; var total = new Repository <FollowContentQuery>().FindList(sql); Pagination pagination = new Pagination(); pagination.page = queryModel.PageNumber; pagination.rows = queryModel.PageSize; pagination.sidx = "HDC_Days"; pagination.sord = "asc"; var result = new Repository <DoctorContentQuery>().FindList(sql, pagination).ToList(); QueryPageModel <DoctorContentQuery> pageModel = new QueryPageModel <DoctorContentQuery>() { Total = (total == null ? 0 : total.Count()), Models = result }; return(pageModel); }
public ObsoletePageModel <FollowQuery> SearchFollow(FollowSearch search) { StringBuilder sqlQuery = new StringBuilder(); sqlQuery.Append("SELECT HTP_ID,HFT_ID,HTP_Name,b.Name, HTP_State,(CASE HTP_State when 0 then '未启用' else '已启用' end )State,date_format(HTP_CreateTime, '%Y-%m-%d %H:%i' )Time,HTP_UserId from HPYL_FollowTemPlate a inner join himall_shopcategories b on a.HFT_ID=b.Id where ShopId =" + search.shopId + ""); if (search.ShopCategoryId > 0) { sqlQuery.Append(" and HFT_ID=" + search.ShopCategoryId + ""); } if (!string.IsNullOrEmpty(search.keyWords)) { sqlQuery.Append(" and HTP_Name like '%" + search.keyWords + "%'"); } if (!string.IsNullOrEmpty(search.AuditStatus.ToString())) { sqlQuery.Append(" and HTP_State=" + search.AuditStatus + ""); } var total = new Repository <FollowQuery>().FindList(sqlQuery.ToString()); Pagination pagination = new Pagination(); pagination.page = search.PageNumber; pagination.rows = search.PageSize; pagination.sidx = "HTP_ID"; pagination.sord = "desc"; var result = new Repository <FollowQuery>().FindList(sqlQuery.ToString(), pagination).AsQueryable(); ObsoletePageModel <FollowQuery> pageModel = new ObsoletePageModel <FollowQuery>() { Total = (total == null ? 0 : total.Count()), Models = result }; return(pageModel); }
public static QueryPageModel <FollowContentQuery> GetFollowContent(FollowSearch queryModel, long id) { return(_followwService.GetFollowContent(queryModel, id)); }
public static QueryPageModel <DoctorContentQuery> ListDoctorContent(FollowSearch queryModel, long id) { return(_followwService.ListDoctorContent(queryModel, id)); }
public static QueryPageModel <FollowDoctorQuery> GetFollowDoctor(FollowSearch queryModel) { return(_followwService.GetFollowDoctor(queryModel)); }