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
54a09edf
Commit
54a09edf
authored
Apr 21, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):西安电梯历史数据导入接口添加错误记录
parent
803a5bdc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
ExcelImportErrorLogDao.java
...os/boot/module/common/api/dao/ExcelImportErrorLogDao.java
+12
-0
ExcelImportErrorLogDto.java
...os/boot/module/common/api/dto/ExcelImportErrorLogDto.java
+29
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+8
-1
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/dao/ExcelImportErrorLogDao.java
0 → 100644
View file @
54a09edf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dao
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelImportErrorLogDto
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.stereotype.Repository
;
/**
* @author Administrator
*/
@Repository
public
interface
ExcelImportErrorLogDao
extends
PagingAndSortingRepository
<
ExcelImportErrorLogDto
,
String
>
{
}
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
0 → 100644
View file @
54a09edf
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.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
/**
* @author Administrator
* Excel导入错误日志
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"excel_import_error_log"
,
shards
=
2
)
public
class
ExcelImportErrorLogDto
{
@Id
private
Long
sequenceNbr
;
@Field
(
type
=
FieldType
.
Text
)
private
String
xaSerial
;
@Field
(
type
=
FieldType
.
Text
)
private
String
record
;
@Field
(
type
=
FieldType
.
Text
)
private
String
errorInfo
;
}
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 @
54a09edf
...
...
@@ -21,7 +21,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ExcelImportErrorLogDao
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelImportErrorLogDto
;
import
com.yeejoin.amos.boot.module.jg.api.converter.DictParamsConverter
;
import
com.yeejoin.amos.boot.module.jg.api.converter.EquCategoryConverter
;
import
com.yeejoin.amos.boot.module.jg.api.converter.EquDefineConverter
;
...
...
@@ -130,6 +132,7 @@ public class DataDockServiceImpl {
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
final
JgVehicleInformationMapper
jgVehicleInformationMapper
;
private
final
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
private
final
ExcelImportErrorLogDao
excelImportErrorLogDao
;
/**
* 西安数据对接-保存设备信息
...
...
@@ -2215,7 +2218,11 @@ public class DataDockServiceImpl {
}
catch
(
Exception
e
)
{
esEquipmentCategory
.
deleteById
(
record
);
superviseInfoMapper
.
deleteDataAll
(
Collections
.
singletonList
(
record
));
ExcelImportErrorLogDto
errorLogDto
=
JSON
.
parseObject
(
toJSONString
(
equ
),
ExcelImportErrorLogDto
.
class
);
errorLogDto
.
setErrorInfo
(
e
.
getMessage
());
excelImportErrorLogDao
.
save
(
errorLogDto
);
log
.
error
(
"{}数据:保存时出现异常,对应数据:{}"
,
dataSource
,
JSONObject
.
toJSONString
(
equ
),
e
);
log
.
error
(
"==========================西安电梯数据:保存时出现异常,对应数据:{}=========================="
,
record
);
throw
new
RuntimeException
(
"保存电梯数据失败"
,
e
);
}
}
...
...
@@ -2364,7 +2371,7 @@ public class DataDockServiceImpl {
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
new
BadRequest
(
"保存失败!"
);
throw
new
BadRequest
(
e
.
getMessage
()
);
}
finally
{
FlowingEquipRedisContext
.
clean
();
}
...
...
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