Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
47beccd6
Commit
47beccd6
authored
Nov 07, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(jg): 优化数据对接服务与设备处理逻辑
- 数据对接服务线程池大小调整为CPU核心数的两倍 - 电梯数据保存增加异常捕获处理 - Excel导入错误日志添加创建时间字段 - 错误结果抛出LocalBadRequest异常替代直接返回
parent
38f914f8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
ExcelImportErrorLogDto.java
...os/boot/module/common/api/dto/ExcelImportErrorLogDto.java
+8
-2
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+0
-1
SingleProjectEquipChangeProcess.java
...z/edit/process/equip/SingleProjectEquipChangeProcess.java
+6
-1
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+7
-2
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/ExcelImportErrorLogDto.java
View file @
47beccd6
...
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
/**
* @author Administrator
* Excel导入错误日志
...
...
@@ -18,10 +21,10 @@ public class ExcelImportErrorLogDto {
@Id
private
Long
sequenceNbr
;
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Keyword
)
private
String
xaSerial
;
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Keyword
)
private
String
record
;
@Field
(
type
=
FieldType
.
Text
)
...
...
@@ -29,4 +32,7 @@ public class ExcelImportErrorLogDto {
@Field
(
type
=
FieldType
.
Text
)
private
String
traceInfo
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute
)
private
Date
createTime
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
47beccd6
...
...
@@ -123,7 +123,6 @@ public class CommonEquipDataProcessService {
private
final
RestHighLevelClient
restHighLevelClient
;
@Lazy
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
final
CommonServiceImpl
commonService
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/SingleProjectEquipChangeProcess.java
View file @
47beccd6
...
...
@@ -20,10 +20,14 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleRes
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
...
...
@@ -37,6 +41,7 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public
class
SingleProjectEquipChangeProcess
implements
IEquipChangeDataProcessStrategy
{
@Lazy
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
private
final
PieLineDataChangeServiceImpl
pieLineDataChangeService
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataDockServiceImpl.java
View file @
47beccd6
...
...
@@ -179,7 +179,7 @@ public class DataDockServiceImpl {
@Value
(
"${pipeline.detail.path:/mixuap?appId=1742358052905971713&id=1867406434120003586&formType=detail&sequenceNbr=%s}"
)
private
String
pipelineRoutePath
;
private
final
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
10
);
private
final
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
Runtime
.
getRuntime
().
availableProcessors
()
*
2
);
/**
* 西安数据对接-保存设备信息
...
...
@@ -2628,6 +2628,7 @@ public class DataDockServiceImpl {
CompletableFuture
.
allOf
(
equLists
.
parallelStream
().
map
(
equ
->
CompletableFuture
.
runAsync
(()
->
{
contextWrapper
.
apply
();
try
{
Object
resultObj
=
saveElevatorDataInTransaction
(
equ
,
"jg_his_xa"
,
null
);
if
(
resultObj
instanceof
String
)
{
recordSet
.
add
(
resultObj
.
toString
());
...
...
@@ -2636,6 +2637,9 @@ public class DataDockServiceImpl {
Map
<
String
,
Object
>
result
=
(
Map
<
String
,
Object
>)
resultObj
;
inUseRecordSet
.
add
(
JSONObject
.
toJSONString
(
result
));
}
}
catch
(
LocalBadRequest
e
)
{
inUseRecordSet
.
add
(
e
.
getMessage
());
}
},
executorService
)).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
}
catch
(
Exception
e
)
{
...
...
@@ -2724,6 +2728,7 @@ public class DataDockServiceImpl {
ExcelImportErrorLogDto
errorLogDto
=
JSON
.
parseObject
(
toJSONString
(
equ
),
ExcelImportErrorLogDto
.
class
);
errorLogDto
.
setErrorInfo
(
e
.
getMessage
());
errorLogDto
.
setTraceInfo
(
traceInfo
);
errorLogDto
.
setCreateTime
(
new
Date
());
excelImportErrorLogDao
.
save
(
errorLogDto
);
String
errorMessage
=
e
.
getMessage
();
if
(
errorMessage
==
null
)
{
...
...
@@ -2735,7 +2740,7 @@ public class DataDockServiceImpl {
errorResult
.
put
(
"type"
,
"error"
);
errorResult
.
put
(
"msg"
,
errorMessage
);
errorResult
.
put
(
"traceInfo"
,
traceInfo
);
return
errorResult
;
throw
new
LocalBadRequest
(
JSON
.
toJSONString
(
errorResult
))
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment