Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
event
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
陈世强
event
Commits
b3c4febe
提交
b3c4febe
authored
2月 28, 2025
作者:
925993793@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【fix】已入库资讯导出逻辑修改以及其他bug修改
上级
b7bd8c2f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
99 行增加
和
18 行删除
+99
-18
FileController.java
src/main/java/com/zzsn/event/controller/FileController.java
+0
-0
SubjectManageController.java
...va/com/zzsn/event/controller/SubjectManageController.java
+1
-1
InformationController.java
...m/zzsn/event/controller/common/InformationController.java
+3
-0
EsService.java
src/main/java/com/zzsn/event/es/EsService.java
+38
-6
CustomExceptionHandler.java
...java/com/zzsn/event/exception/CustomExceptionHandler.java
+22
-0
FileExportException.java
...in/java/com/zzsn/event/exception/FileExportException.java
+19
-0
InformationServiceImpl.java
...a/com/zzsn/event/service/impl/InformationServiceImpl.java
+15
-10
SubjectSimpleServiceImpl.java
...com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
+1
-1
没有找到文件。
src/main/java/com/zzsn/event/controller/FileController.java
浏览文件 @
b3c4febe
差异被折叠。
点击展开。
src/main/java/com/zzsn/event/controller/SubjectManageController.java
浏览文件 @
b3c4febe
...
@@ -99,7 +99,7 @@ public class SubjectManageController {
...
@@ -99,7 +99,7 @@ public class SubjectManageController {
private
KafkaTemplate
<
String
,
String
>
kafkaTemplate
;
private
KafkaTemplate
<
String
,
String
>
kafkaTemplate
;
@Autowired
@Autowired
private
PythonUtil
pythonUtil
;
private
PythonUtil
pythonUtil
;
@Autowired
@Autowired
(
required
=
false
)
private
RemoteModelService
remoteModelService
;
private
RemoteModelService
remoteModelService
;
@Autowired
@Autowired
private
ConfigurationMessageService
configurationMessageService
;
private
ConfigurationMessageService
configurationMessageService
;
...
...
src/main/java/com/zzsn/event/controller/common/InformationController.java
浏览文件 @
b3c4febe
...
@@ -222,6 +222,9 @@ public class InformationController {
...
@@ -222,6 +222,9 @@ public class InformationController {
if
(
StringUtils
.
isEmpty
(
searchCondition
.
getSubjectId
()))
{
if
(
StringUtils
.
isEmpty
(
searchCondition
.
getSubjectId
()))
{
return
Result
.
FAIL
(
"专题id/专题分类id不能为空"
);
return
Result
.
FAIL
(
"专题id/专题分类id不能为空"
);
}
}
if
(
searchCondition
.
getCategory
()
==
null
)
{
return
Result
.
FAIL
(
"专题类型不能为空"
);
}
UserVo
userVo
=
UserUtil
.
getLoginUser
();
UserVo
userVo
=
UserUtil
.
getLoginUser
();
return
informationService
.
subjectPageListGroupByLabel
(
userVo
,
searchCondition
);
return
informationService
.
subjectPageListGroupByLabel
(
userVo
,
searchCondition
);
}
}
...
...
src/main/java/com/zzsn/event/es/EsService.java
浏览文件 @
b3c4febe
...
@@ -1089,9 +1089,25 @@ public class EsService {
...
@@ -1089,9 +1089,25 @@ public class EsService {
searchSourceBuilder
.
trackTotalHits
(
true
);
searchSourceBuilder
.
trackTotalHits
(
true
);
searchSourceBuilder
.
size
(
0
);
searchSourceBuilder
.
size
(
0
);
//创建查询对象
//创建查询对象
List
<
String
>
subjectIds
=
new
ArrayList
<>();
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
subjectIds
.
add
(
searchCondition
.
getSubjectId
());
//判断是否是专题
BoolQueryBuilder
boolQuery
=
buildQuery
(
searchCondition
,
subjectIds
);
if
(
"1"
.
equals
(
searchCondition
.
getIsSubject
()))
{
if
(
StringUtils
.
isNotEmpty
(
searchCondition
.
getSubjectId
()))
{
subjectIdList
.
add
(
searchCondition
.
getSubjectId
());
}
}
else
{
//该id其实是专题类别id
//查询类别id的所有明细id
Integer
category
=
searchCondition
.
getCategory
();
String
subjectTypeId
=
searchCondition
.
getSubjectId
();
List
<
String
>
typeIds
=
subjectTypeService
.
belowIdList
(
subjectTypeId
,
category
);
if
(
category
==
1
)
{
subjectIdList
=
subjectTypeMapService
.
selectSubjectByTypeIds
(
typeIds
);
}
else
if
(
category
==
2
)
{
subjectIdList
=
subjectTypeMapService
.
selectEventByTypeIds
(
typeIds
);
}
}
BoolQueryBuilder
boolQuery
=
buildQuery
(
searchCondition
,
subjectIdList
);
searchSourceBuilder
.
query
(
boolQuery
);
searchSourceBuilder
.
query
(
boolQuery
);
searchRequest
.
source
(
searchSourceBuilder
);
searchRequest
.
source
(
searchSourceBuilder
);
try
{
try
{
...
@@ -1163,9 +1179,25 @@ public class EsService {
...
@@ -1163,9 +1179,25 @@ public class EsService {
}
}
searchSourceBuilder
.
size
(
pageSize
);
searchSourceBuilder
.
size
(
pageSize
);
searchSourceBuilder
.
from
((
pageNo
-
1
)
*
pageSize
);
searchSourceBuilder
.
from
((
pageNo
-
1
)
*
pageSize
);
List
<
String
>
subjectIds
=
new
ArrayList
<>();
List
<
String
>
subjectIdList
=
new
ArrayList
<>();
subjectIds
.
add
(
searchCondition
.
getSubjectId
());
//判断是否是专题
boolQuery
=
buildQuery
(
searchCondition
,
subjectIds
);
if
(
"1"
.
equals
(
searchCondition
.
getIsSubject
()))
{
if
(
StringUtils
.
isNotEmpty
(
searchCondition
.
getSubjectId
()))
{
subjectIdList
.
add
(
searchCondition
.
getSubjectId
());
}
}
else
{
//该id其实是专题类别id
//查询类别id的所有明细id
Integer
category
=
searchCondition
.
getCategory
();
String
subjectTypeId
=
searchCondition
.
getSubjectId
();
List
<
String
>
typeIds
=
subjectTypeService
.
belowIdList
(
subjectTypeId
,
category
);
if
(
category
==
1
)
{
subjectIdList
=
subjectTypeMapService
.
selectSubjectByTypeIds
(
typeIds
);
}
else
if
(
category
==
2
)
{
subjectIdList
=
subjectTypeMapService
.
selectEventByTypeIds
(
typeIds
);
}
}
boolQuery
=
buildQuery
(
searchCondition
,
subjectIdList
);
}
}
searchSourceBuilder
.
query
(
boolQuery
);
searchSourceBuilder
.
query
(
boolQuery
);
searchRequest
.
source
(
searchSourceBuilder
);
searchRequest
.
source
(
searchSourceBuilder
);
...
...
src/main/java/com/zzsn/event/exception/CustomExceptionHandler.java
0 → 100644
浏览文件 @
b3c4febe
package
com
.
zzsn
.
event
.
exception
;
import
com.zzsn.event.constant.Result
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
/**
* 异常拦截
*
* @author lkg
* @date 2025/2/28
*/
@RestControllerAdvice
public
class
CustomExceptionHandler
{
@ExceptionHandler
(
FileExportException
.
class
)
public
ResponseEntity
<
Object
>
handleFileExportException
(
FileExportException
ex
)
{
return
new
ResponseEntity
<>(
Result
.
FAIL
(
ex
.
getMessage
()),
HttpStatus
.
valueOf
(
ex
.
getStatusCode
()));
}
}
src/main/java/com/zzsn/event/exception/FileExportException.java
0 → 100644
浏览文件 @
b3c4febe
package
com
.
zzsn
.
event
.
exception
;
import
lombok.Data
;
/**
* 文件导出异常
*
* @author lkg
* @date 2025/2/28
*/
@Data
public
class
FileExportException
extends
RuntimeException
{
private
int
statusCode
=
500
;
public
FileExportException
(
String
message
)
{
super
(
message
);
}
}
src/main/java/com/zzsn/event/service/impl/InformationServiceImpl.java
浏览文件 @
b3c4febe
...
@@ -876,18 +876,23 @@ public class InformationServiceImpl implements InformationService {
...
@@ -876,18 +876,23 @@ public class InformationServiceImpl implements InformationService {
}
}
for
(
SpecialInformation
specialInformation
:
informationList
)
{
for
(
SpecialInformation
specialInformation
:
informationList
)
{
List
<
Label
>
labels
=
specialInformation
.
getLabels
();
List
<
Label
>
labels
=
specialInformation
.
getLabels
();
if
(
labels
.
size
()
==
1
)
{
List
<
Label
>
collect
=
labels
.
stream
().
filter
(
e
->
"thematic_information_column"
.
equals
(
e
.
getLabelMark
())).
collect
(
Collectors
.
toList
());
removeList
.
add
(
specialInformation
);
if
(
CollectionUtils
.
isNotEmpty
(
collect
))
{
}
else
{
if
(
collect
.
size
()
==
1
)
{
List
<
Label
>
newLabels
=
new
ArrayList
<>();
removeList
.
add
(
specialInformation
);
for
(
Label
label
:
labels
)
{
}
else
{
String
labelRelationId
=
label
.
getRelationId
();
List
<
Label
>
newLabels
=
new
ArrayList
<>();
if
(!
themeIds
.
contains
(
labelRelationId
))
{
for
(
Label
label
:
collect
)
{
newLabels
.
add
(
label
);
String
labelRelationId
=
label
.
getRelationId
();
if
(!
themeIds
.
contains
(
labelRelationId
))
{
newLabels
.
add
(
label
);
}
}
}
specialInformation
.
setLabels
(
newLabels
);
dataList
.
add
(
specialInformation
);
}
}
specialInformation
.
setLabels
(
newLabels
);
}
else
{
data
List
.
add
(
specialInformation
);
remove
List
.
add
(
specialInformation
);
}
}
}
}
}
}
...
...
src/main/java/com/zzsn/event/service/impl/SubjectSimpleServiceImpl.java
浏览文件 @
b3c4febe
...
@@ -80,7 +80,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
...
@@ -80,7 +80,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
private
CodeGenerateUtil
codeGenerateUtil
;
private
CodeGenerateUtil
codeGenerateUtil
;
@Autowired
@Autowired
private
PythonUtil
pythonUtil
;
private
PythonUtil
pythonUtil
;
@Autowired
@Autowired
(
required
=
false
)
private
RemoteModelService
remoteModelService
;
private
RemoteModelService
remoteModelService
;
@Value
(
"${clb.subject.default.processing.advanceMonth}"
)
@Value
(
"${clb.subject.default.processing.advanceMonth}"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论