mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 09:56:47 +08:00
专业分类查询
This commit is contained in:
@@ -899,8 +899,22 @@ public class CasesServiceImpl implements ICasesService {
|
||||
@Override
|
||||
public List<DictItem> majorTypes() {
|
||||
List<DictItem> major_type = sysDictionaryDao.findByKey("major_type");
|
||||
//cm.caseId=c.id and
|
||||
String hql = "select cm.majorId,count(cm.caseId) from CasesMajorType cm,Cases c where cm.caseId=c.id and c.deleted=false and (c.filePath is not null and c.filePath != '') group by cm.majorId";
|
||||
String hql1 = "select major_type from Cases c where c.deleted=false and (c.filePath is not null and c.filePath != '')";
|
||||
List<Object[]> listByHql = casesDao.findListByHql(hql1);
|
||||
List<DictItem> dictItems = new ArrayList<>();
|
||||
log.debug("--listByHql :{}", listByHql.size());
|
||||
for (DictItem d : major_type) {
|
||||
int i = 0;
|
||||
for (Object[] objs : listByHql) {
|
||||
String s = (String) objs[0];
|
||||
if (s.contains(d.getCode())) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
d.setExplanation(String.valueOf(i));
|
||||
dictItems.add(d);
|
||||
}
|
||||
/* String hql = "select cm.majorId,count(cm.caseId) from CasesMajorType cm,Cases c where cm.caseId=c.id and c.deleted=false and (c.filePath is not null and c.filePath != '') group by cm.majorId";
|
||||
List<Object[]> listByHql = casesDao.findListByHql(hql);
|
||||
List<DictItem> dictItems = new ArrayList<>();
|
||||
for (DictItem d : major_type) {
|
||||
@@ -911,7 +925,7 @@ public class CasesServiceImpl implements ICasesService {
|
||||
dictItems.add(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return dictItems;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user