fix:79096
This commit is contained in:
+21
-7
@@ -17,7 +17,6 @@
|
||||
when standard_state = 7 then 3
|
||||
else ''
|
||||
end as standard_state_order,
|
||||
standard_state
|
||||
standard_class,dynamic_type,applicable_vehicle,standard_property,standard_state,'' as standard_code,'' as grade_classification,
|
||||
implementation_date
|
||||
from laws_domestic_standard where del_flag = 0
|
||||
@@ -53,11 +52,21 @@
|
||||
select 'standard_class' as field_name,standard_class as dict,count(*) as count from laws_domestic_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_class
|
||||
union all
|
||||
select 'dynamic_type' as field_name,dynamic_type,count(*) from laws_domestic_standard
|
||||
<where>${ew.sqlSegment}</where> group by dynamic_type
|
||||
select 'dynamic_type' as field_name,dynamic_type,count(*) from
|
||||
(SELECT SUBSTRING_INDEX( SUBSTRING_INDEX( T1.dynamic_type, ',', T2.help_topic_id + 1 ), ',', - 1 ) AS dynamic_type ,standard_number,standard_name
|
||||
FROM laws_domestic_standard T1
|
||||
JOIN mysql.help_topic T2 ON T2.help_topic_id < ( LENGTH( T1.dynamic_type ) - LENGTH( REPLACE ( T1.dynamic_type, ',', '' )) + 1)
|
||||
<where>${ew.sqlSegment}</where>
|
||||
) a
|
||||
group by dynamic_type
|
||||
union all
|
||||
select 'applicable_vehicle' as field_name,applicable_vehicle,count(*) from laws_domestic_standard
|
||||
<where>${ew.sqlSegment}</where> group by applicable_vehicle
|
||||
select 'applicable_vehicle' as field_name,applicable_vehicle,count(*) from
|
||||
(SELECT SUBSTRING_INDEX( SUBSTRING_INDEX( T1.applicable_vehicle, ',', T2.help_topic_id + 1 ), ',', - 1 ) AS applicable_vehicle ,standard_number,standard_name
|
||||
FROM laws_domestic_standard T1
|
||||
JOIN mysql.help_topic T2 ON T2.help_topic_id < ( LENGTH( T1.applicable_vehicle ) - LENGTH( REPLACE ( T1.applicable_vehicle, ',', '' )) + 1)
|
||||
<where>${ew.sqlSegment}</where>
|
||||
) a
|
||||
group by applicable_vehicle
|
||||
union all
|
||||
select 'standard_property' as field_name,standard_property,count(*) from laws_domestic_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_property
|
||||
@@ -69,8 +78,13 @@
|
||||
select 'standard_class' as field_name,standard_class as dict,count(*) as count from laws_overseas_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_class
|
||||
union all
|
||||
select 'applicable_vehicle' as field_name,applicable_vehicle,count(*) from laws_overseas_standard
|
||||
<where>${ew.sqlSegment}</where> group by applicable_vehicle
|
||||
select 'applicable_vehicle' as field_name,applicable_vehicle,count(*) from
|
||||
(SELECT SUBSTRING_INDEX( SUBSTRING_INDEX( T1.applicable_vehicle, ',', T2.help_topic_id + 1 ), ',', - 1 ) AS applicable_vehicle ,standard_number,standard_name
|
||||
FROM laws_overseas_standard T1
|
||||
JOIN mysql.help_topic T2 ON T2.help_topic_id < ( LENGTH( T1.applicable_vehicle ) - LENGTH( REPLACE ( T1.applicable_vehicle, ',', '' )) + 1)
|
||||
<where>${ew.sqlSegment}</where>
|
||||
) a
|
||||
group by applicable_vehicle
|
||||
union all
|
||||
select 'standard_state' as field_name,standard_state,count(*) from laws_overseas_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_state
|
||||
|
||||
+1
-15
@@ -231,20 +231,6 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
pageList.setRecords(list);
|
||||
}
|
||||
|
||||
private List<SysDictItemCore> getSysDictItemCores(List<LawsTag> listLawsTag) {
|
||||
List<SysDictItemCore> listSysDict = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(listLawsTag)){
|
||||
List<LawsTag> listLawsTagDict = listLawsTag.stream().filter(o->!StringUtils.isBlank(o.getDictFieldSearch()) && StringUtils.isBlank(o.getDictTableSearch())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listLawsTagDict)){
|
||||
List<String> listDict = listLawsTagDict.stream().map(LawsTag::getDictFieldSearch).collect(Collectors.toList());
|
||||
QueryWrapper<SysDict> querySysDict = new QueryWrapper<>();
|
||||
querySysDict.in("sys_dict.dict_code",listDict);
|
||||
listSysDict = lawsHomeSearchMapper.translateManyDict(querySysDict);
|
||||
}
|
||||
}
|
||||
return listSysDict;
|
||||
}
|
||||
|
||||
private void addLawsNewsFeed(String searchContent, List<LawsNewsFeed> listLawsNewsFeed, LawsHomeNormalSearchVO p) {
|
||||
if(!CollectionUtils.isEmpty(listLawsNewsFeed)){
|
||||
Optional<LawsNewsFeed> op = listLawsNewsFeed.stream().filter(o-> Objects.equals(o.getId(),p.getId())).findFirst();
|
||||
@@ -490,7 +476,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
count2(list2,obj);
|
||||
break;
|
||||
case LawsHomeSearchCommon.LAWS_ENTERPRISE_STANDARD:
|
||||
List<LawsHomeNormalSearchCountVO> list3 = lawsHomeSearchMapper.getCount2(queryWrapper);
|
||||
List<LawsHomeNormalSearchCountVO> list3 = lawsHomeSearchMapper.getCount3(queryWrapper);
|
||||
count3(list3,obj);
|
||||
break;
|
||||
default:break;
|
||||
|
||||
Reference in New Issue
Block a user