|
@ -71,7 +71,7 @@ public class BaseMenuManageService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//菜单词典查询
|
|
//菜单词典查询
|
|
public List<Map<String,Object>> findMenuDictByKey(String parentId, String name){
|
|
|
|
|
|
public List<Map<String,Object>> findMenuDictByKey(String parentId, String name,Integer status){
|
|
String sql = "select t.id as \"id\", " +
|
|
String sql = "select t.id as \"id\", " +
|
|
" t.parent_id as \"parentId\", " +
|
|
" t.parent_id as \"parentId\", " +
|
|
" t.name as \"name\", " +
|
|
" t.name as \"name\", " +
|
|
@ -118,6 +118,11 @@ public class BaseMenuManageService {
|
|
sql+=" and t.name like '%"+name+"%'";
|
|
sql+=" and t.name like '%"+name+"%'";
|
|
sqlParent+=" and t.name like '%"+name+"%'";
|
|
sqlParent+=" and t.name like '%"+name+"%'";
|
|
}
|
|
}
|
|
|
|
if (status!=null){
|
|
|
|
sql += " and t.status = '"+status+"' ";
|
|
|
|
sqlParent+=" and t.status = '"+status+"' " ;
|
|
|
|
}
|
|
|
|
|
|
sql+=" order by t.parent_id asc ,t.menu_sort asc ";
|
|
sql+=" order by t.parent_id asc ,t.menu_sort asc ";
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
|
|
List<Map<String,Object>> listParent = hibenateUtils.createSQLQuery(sqlParent);
|
|
List<Map<String,Object>> listParent = hibenateUtils.createSQLQuery(sqlParent);
|
|
@ -141,7 +146,9 @@ public class BaseMenuManageService {
|
|
}
|
|
}
|
|
for (Map<String,Object> mapchild:list){
|
|
for (Map<String,Object> mapchild:list){
|
|
if (mapchild.get("parentId").toString().equalsIgnoreCase(map.get("id").toString())){
|
|
if (mapchild.get("parentId").toString().equalsIgnoreCase(map.get("id").toString())){
|
|
Integer articleChildNum= knowledgeArticleDictDao.getCountByCategorySecond(mapchild.get("id").toString());
|
|
|
|
|
|
List<String> list1 = new ArrayList<>();
|
|
|
|
list1.add(mapchild.get("id").toString());
|
|
|
|
Integer articleChildNum= knowledgeArticleDictDao.getCountByCategorySecond(list1);
|
|
mapchild.put("articleNum",articleChildNum);
|
|
mapchild.put("articleNum",articleChildNum);
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:effect){
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:effect){
|
|
if (mapchild.get("status").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
if (mapchild.get("status").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
@ -481,11 +488,21 @@ public class BaseMenuManageService {
|
|
" m.bg_img as \"bgImg\"," +
|
|
" m.bg_img as \"bgImg\"," +
|
|
" m.menu_title as \"menuTitle\"," +
|
|
" m.menu_title as \"menuTitle\"," +
|
|
" m.describtion as \"describtion\"," +
|
|
" m.describtion as \"describtion\"," +
|
|
" t.style_name as \"styleName\" " +
|
|
|
|
|
|
" t.style_name as \"styleName\", " +
|
|
|
|
" m.parent_id as \"parentId\" " +
|
|
" from base_menu_show t left join " +
|
|
" from base_menu_show t left join " +
|
|
" base_menu_dict m on t.menu_id= m.id" +
|
|
" base_menu_dict m on t.menu_id= m.id" +
|
|
" where t.is_del ='1' order by t.model_id asc ,t.menu_sort asc ";
|
|
" where t.is_del ='1' order by t.model_id asc ,t.menu_sort asc ";
|
|
List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
|
|
List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
|
|
|
|
for (Map<String,Object> map:list){
|
|
|
|
if (map.get("parentId")!=null){
|
|
|
|
String parentId = map.get("parentId").toString();
|
|
|
|
BaseMenuDictDO parentDo= baseMenuDictDao.findOne(parentId);
|
|
|
|
if (parentDo!=null){
|
|
|
|
map.put("parentName",parentDo.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
String sqlLink =" select t.id as \"id\", " +
|
|
String sqlLink =" select t.id as \"id\", " +
|
|
" t.model_id as \"modelId\", " +
|
|
" t.model_id as \"modelId\", " +
|
|
@ -517,6 +534,7 @@ public class BaseMenuManageService {
|
|
map.put("childList",child);
|
|
map.put("childList",child);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
return listModel;
|
|
return listModel;
|
|
}
|
|
}
|
|
|
|
|
|
@ -635,26 +653,30 @@ public class BaseMenuManageService {
|
|
" t.menu_img as \"menuImg\" " +
|
|
" t.menu_img as \"menuImg\" " +
|
|
"from base_menu_dict t where 1=1 and t.is_del ='1' ";
|
|
"from base_menu_dict t where 1=1 and t.is_del ='1' ";
|
|
if (StringUtils.isNoneBlank(parentId)){
|
|
if (StringUtils.isNoneBlank(parentId)){
|
|
String str[]=parentId.split(",");
|
|
|
|
String parentIds = "";
|
|
|
|
for (int i=0;i<str.length;i++){
|
|
|
|
parentIds +="'"+str[i]+"',";
|
|
|
|
}
|
|
|
|
parentIds.substring(0,parentIds.length()-1);
|
|
|
|
sql+=" and t.parent_id in ("+parentIds+") ";
|
|
|
|
|
|
sql+=" and t.parent_id='"+parentId+"' ";
|
|
}
|
|
}
|
|
if (status!=null){
|
|
if (status!=null){
|
|
sql+=" and t.status="+status+"";
|
|
sql+=" and t.status="+status+"";
|
|
}
|
|
}
|
|
sql+="order by t.menu_sort asc";
|
|
|
|
|
|
sql+=" order by t.menu_sort asc";
|
|
|
|
System.out.print("sql"+sql);
|
|
List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
|
|
List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
public MixEnvelop findArticleByMenuId(String menuId,Integer page,Integer pageSize){
|
|
public MixEnvelop findArticleByMenuId(String menuId,Integer page,Integer pageSize){
|
|
Pageable pageRequest = new PageRequest(page-1,pageSize);
|
|
Pageable pageRequest = new PageRequest(page-1,pageSize);
|
|
List<KnowledgeArticleDictDO> list=knowledgeArticleDictDao.findByCategorySecondAndPage(menuId,pageRequest);
|
|
|
|
Integer count = knowledgeArticleDictDao.getCountByCategorySecond(menuId);
|
|
|
|
|
|
List<String> menuIds = new ArrayList<>();
|
|
|
|
if (StringUtils.isNoneBlank(menuId)){
|
|
|
|
String str[]= menuId.split(",");
|
|
|
|
for (int i=0;i<str.length;i++){
|
|
|
|
menuIds.add(str[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.print("menuId"+menuId);
|
|
|
|
List<KnowledgeArticleDictDO> list=knowledgeArticleDictDao.findByCategorySecondAndPage(menuIds,pageRequest);
|
|
|
|
Integer count = knowledgeArticleDictDao.getCountByCategorySecond(menuIds);
|
|
MixEnvelop mixEnvelop = new MixEnvelop();
|
|
MixEnvelop mixEnvelop = new MixEnvelop();
|
|
mixEnvelop.setTotalCount(count);
|
|
mixEnvelop.setTotalCount(count);
|
|
mixEnvelop.setDetailModelList(list);
|
|
mixEnvelop.setDetailModelList(list);
|