|
@ -141,7 +141,9 @@ public class BaseMenuManageService {
|
|
|
}
|
|
|
for (Map<String,Object> mapchild:list){
|
|
|
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);
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:effect){
|
|
|
if (mapchild.get("status").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
@ -635,26 +637,30 @@ public class BaseMenuManageService {
|
|
|
" t.menu_img as \"menuImg\" " +
|
|
|
"from base_menu_dict t where 1=1 and t.is_del ='1' ";
|
|
|
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){
|
|
|
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);
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
public MixEnvelop findArticleByMenuId(String menuId,Integer page,Integer 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.setTotalCount(count);
|
|
|
mixEnvelop.setDetailModelList(list);
|