Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
5712ad76
提交
5712ad76
authored
5月 12, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
资讯列表增加报告的筛选条件
上级
b9e2a878
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
80 行增加
和
9 行删除
+80
-9
EsService.java
src/main/java/com/zzsn/event/es/EsService.java
+4
-4
CommonMapper.java
src/main/java/com/zzsn/event/mapper/CommonMapper.java
+9
-0
CommonMapper.xml
src/main/java/com/zzsn/event/mapper/xml/CommonMapper.xml
+7
-0
CommonService.java
src/main/java/com/zzsn/event/service/CommonService.java
+10
-1
CommonServiceImpl.java
...n/java/com/zzsn/event/service/impl/CommonServiceImpl.java
+5
-0
InformationServiceImpl.java
...a/com/zzsn/event/service/impl/InformationServiceImpl.java
+18
-0
SubjectServiceImpl.java
.../java/com/zzsn/event/service/impl/SubjectServiceImpl.java
+1
-1
InfoDataSearchCondition.java
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
+5
-1
ReportConditionVO.java
src/main/java/com/zzsn/event/vo/ReportConditionVO.java
+19
-0
application-nacos.yml
src/main/resources/application-nacos.yml
+2
-2
没有找到文件。
src/main/java/com/zzsn/event/es/EsService.java
浏览文件 @
5712ad76
...
...
@@ -1855,20 +1855,20 @@ public class EsService {
* 专题信息数量统计
*
* @param subjectIds 专题id集合
* @param
check
Status 审核状态
* @param
audit
Status 审核状态
* @param type 是否多层聚合(先按专题,再按发布时间)
* @author lkg
* @date 2025/3/25
*/
public
List
<
StatisticVO
>
subjectStatisticInfo
(
List
<
String
>
subjectIds
,
Integer
check
Status
,
Integer
type
)
{
public
List
<
StatisticVO
>
subjectStatisticInfo
(
List
<
String
>
subjectIds
,
Integer
audit
Status
,
Integer
type
)
{
List
<
StatisticVO
>
list
=
new
ArrayList
<>();
SearchRequest
searchRequest
=
new
SearchRequest
(
Constants
.
SUBJECT_INDEX
);
SearchSourceBuilder
searchSourceBuilder
=
new
SearchSourceBuilder
();
searchSourceBuilder
.
trackTotalHits
(
true
);
searchSourceBuilder
.
size
(
0
);
InfoDataSearchCondition
searchCondition
=
new
InfoDataSearchCondition
();
if
(
check
Status
!=
null
)
{
searchCondition
.
set
CheckStatus
(
check
Status
);
if
(
audit
Status
!=
null
)
{
searchCondition
.
set
AuditStatus
(
audit
Status
);
}
BoolQueryBuilder
boolQuery
=
buildQuery
(
searchCondition
,
subjectIds
);
searchSourceBuilder
.
query
(
boolQuery
);
...
...
src/main/java/com/zzsn/event/mapper/CommonMapper.java
浏览文件 @
5712ad76
...
...
@@ -108,4 +108,13 @@ public interface CommonMapper {
List
<
SysDict
>
selectOldLabelTypeList
();
List
<
SysDict
>
selectLeaderTypeList
();
/**
* 获取报告资讯的(基础)筛选条件
*
* @param reportId 报告id
* @author lkg
* @date 2025/5/12
*/
ReportConditionVO
getReportCondition
(
@Param
(
"reportId"
)
String
reportId
);
}
src/main/java/com/zzsn/event/mapper/xml/CommonMapper.xml
浏览文件 @
5712ad76
...
...
@@ -256,4 +256,11 @@
select id,if(pid='0','2',pid) parentId,type_name dictName,has_child hasChild,if(has_child=0,'1',null) isDict
from character_category_structure where category = 2
</select>
<select
id=
"getReportCondition"
resultType=
"com.zzsn.event.vo.ReportConditionVO"
>
select r.start_time,r.end_time,t.data_base_condition from clb_report r
inner join clb_report_task t on r.task_id = t.id
where r.id = #{reportId}
</select>
</mapper>
src/main/java/com/zzsn/event/service/CommonService.java
浏览文件 @
5712ad76
package
com
.
zzsn
.
event
.
service
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.zzsn.event.entity.ClbLabelItem
;
import
com.zzsn.event.feign.entity.SysDict
;
import
com.zzsn.event.util.tree.Node
;
import
com.zzsn.event.vo.*
;
...
...
@@ -121,4 +120,14 @@ public interface CommonService {
List
<
SysDict
>
selectOldLabelTypeList
();
List
<
SysDict
>
selectLeaderTypeList
();
/**
* 获取报告资讯的(基础)筛选条件
*
* @param reportId 报告id
* @author lkg
* @date 2025/5/12
*/
ReportConditionVO
getReportCondition
(
String
reportId
);
}
src/main/java/com/zzsn/event/service/impl/CommonServiceImpl.java
浏览文件 @
5712ad76
...
...
@@ -373,6 +373,11 @@ public class CommonServiceImpl implements CommonService {
return
commonMapper
.
selectLeaderTypeList
();
}
@Override
public
ReportConditionVO
getReportCondition
(
String
reportId
)
{
return
commonMapper
.
getReportCondition
(
reportId
);
}
//获取树状结构
private
List
<
ModelVO
>
getTreeList
(
List
<
ModelVO
>
authTypeList
){
List
<
ModelVO
>
topList
=
new
ArrayList
<>();
...
...
src/main/java/com/zzsn/event/service/impl/InformationServiceImpl.java
浏览文件 @
5712ad76
...
...
@@ -127,6 +127,24 @@ public class InformationServiceImpl implements InformationService {
if
(
CollectionUtils
.
isEmpty
(
subjectIdList
))
{
return
page
;
}
String
reportId
=
searchCondition
.
getReportId
();
if
(
StringUtils
.
isNotEmpty
(
reportId
))
{
ReportConditionVO
reportCondition
=
commonService
.
getReportCondition
(
reportId
);
String
dataBaseCondition
=
reportCondition
.
getDataBaseCondition
();
if
(
StringUtils
.
isNotEmpty
(
dataBaseCondition
))
{
dataBaseCondition
=
"{}"
;
}
JSONObject
reportBaseCondition
=
JSONObject
.
parseObject
(
dataBaseCondition
);
reportBaseCondition
.
put
(
"startTime"
,
reportCondition
.
getStartTime
());
reportBaseCondition
.
put
(
"endTime"
,
reportCondition
.
getEndTime
());
JSONObject
searchConditionJsonObject
=
ObjectUtil
.
objectToJSONObject
(
searchCondition
);
reportBaseCondition
.
forEach
((
key
,
value
)
->
{
if
(!
searchConditionJsonObject
.
containsKey
(
key
))
{
searchConditionJsonObject
.
put
(
key
,
value
);
}
});
searchCondition
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
searchConditionJsonObject
),
InfoDataSearchCondition
.
class
);
}
try
{
IPage
<
SpecialInformation
>
specialInformationIPage
=
esService
.
pageListByCondition
(
searchCondition
,
subjectIdList
);
long
total
=
specialInformationIPage
.
getTotal
();
...
...
src/main/java/com/zzsn/event/service/impl/SubjectServiceImpl.java
浏览文件 @
5712ad76
...
...
@@ -209,7 +209,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
List
<
StatisticVO
>
totalAndLatestDateList
=
esService
.
subjectStatisticInfo
(
subjectIds
,
null
,
1
);
Map
<
String
,
StatisticVO
>
totalAndLatestDateMap
=
totalAndLatestDateList
.
stream
().
collect
(
Collectors
.
toMap
(
StatisticVO:
:
getSubjectId
,
e
->
e
));
//专题统计信息-待审核数量
List
<
StatisticVO
>
unCheckNumList
=
esService
.
subjectStatisticInfo
(
subjectIds
,
0
,
null
);
List
<
StatisticVO
>
unCheckNumList
=
esService
.
subjectStatisticInfo
(
subjectIds
,
2
,
null
);
Map
<
String
,
StatisticVO
>
unCheckNumMap
=
unCheckNumList
.
stream
().
collect
(
Collectors
.
toMap
(
StatisticVO:
:
getSubjectId
,
e
->
e
));
//绑定全部信息源的专题
...
...
src/main/java/com/zzsn/event/vo/InfoDataSearchCondition.java
浏览文件 @
5712ad76
...
...
@@ -64,7 +64,7 @@ public class InfoDataSearchCondition {
//审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0)
private
Integer
checkStatus
;
//删除标记(1:删除;0:未删除)
private
Integer
deleteFlag
;
private
Integer
deleteFlag
=
0
;
//是否免审核(1-是;0-否)
private
Integer
isFreeCheck
;
...
...
@@ -110,6 +110,10 @@ public class InfoDataSearchCondition {
private
String
superQueryParams
;
/*------高级查询条件---end-------------------*/
//报告id (报告任务场景,根据报告id获取资讯的查询条件)
private
String
reportId
;
//数据集id,保存数据集时使用-研究中心
private
String
dataSetId
;
...
...
src/main/java/com/zzsn/event/vo/ReportConditionVO.java
0 → 100644
浏览文件 @
5712ad76
package
com
.
zzsn
.
event
.
vo
;
import
lombok.Data
;
/**
* 报告资讯条件
*
* @author lkg
* @date 2025/5/12
*/
@Data
public
class
ReportConditionVO
{
private
String
startTime
;
private
String
endTime
;
private
String
dataBaseCondition
;
}
src/main/resources/application-nacos.yml
浏览文件 @
5712ad76
...
...
@@ -7,13 +7,13 @@ spring:
# nacos 服务注册
discovery
:
enabled
:
true
server-addr
:
nacos
:8848
server-addr
:
127.0.0.1
:8848
namespace
:
# 命名空间
# nacos 配置中心
config
:
username
:
nacos
password
:
nacos
server-addr
:
nacos
:8848
server-addr
:
127.0.0.1
:8848
namespace
:
# 命名空间
group
:
clb-service
prefix
:
${spring.application.name}
# 配置前缀,默认是应用名
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论