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
272d3322
Commit
272d3322
authored
May 13, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):设备履历字段添加
parent
85ac4add
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
BusinessTypeEnum.java
...ejoin/amos/boot/module/jg/api/enums/BusinessTypeEnum.java
+10
-0
ChangeLogInsertListener.java
...e/jg/biz/edit/event/listener/ChangeLogInsertListener.java
+18
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/BusinessTypeEnum.java
View file @
272d3322
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
java.util.Arrays
;
import
java.util.Optional
;
/**
* 业务类型枚举
*
...
...
@@ -75,6 +78,13 @@ public enum BusinessTypeEnum {
return
name
;
}
public
static
Optional
<
String
>
findNameByEnumName
(
String
enumName
)
{
return
Arrays
.
stream
(
values
())
.
filter
(
e
->
e
.
name
().
equals
(
enumName
))
.
map
(
BusinessTypeEnum:
:
getName
)
.
findFirst
();
}
public
String
getCode
()
{
return
code
;
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/event/listener/ChangeLogInsertListener.java
View file @
272d3322
...
...
@@ -5,10 +5,13 @@ import cn.hutool.core.date.DateUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ESDataChangeLogDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgBizChangeLog
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESDataChangeLogDao
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgBizChangeLogServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgResumeInfoServiceImpl
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -52,6 +55,8 @@ public class ChangeLogInsertListener {
private
final
JgBizChangeLogServiceImpl
bizChangeLogService
;
private
final
JgResumeInfoServiceImpl
jgResumeInfoService
;
private
final
BlockingQueue
<
BaseBizDataChangeEvent
>
queue
=
new
LinkedBlockingQueue
<>();
...
...
@@ -122,6 +127,19 @@ public class ChangeLogInsertListener {
// todo 使用上下文这个作为id 便于其他业务和其进行关联
changeLog
.
setSequenceNbr
(
Long
.
parseLong
(
event
.
getRequestContext
().
getTraceId
()));
bizChangeLogService
.
getBaseMapper
().
insert
(
changeLog
);
String
equId
=
event
.
getBizRelationData
().
getRecords
().
stream
().
findFirst
().
orElse
(
null
);
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
event
.
getBizRelationData
().
getUnitCode
())
.
businessType
(
BusinessTypeEnum
.
findNameByEnumName
(
bizTypeTableMap
.
get
(
changeLog
.
getBizType
())).
orElse
(
"未知类型"
))
.
businessId
(
event
.
getBizRelationData
().
getBizId
())
.
equId
(
equId
)
.
resumeType
(
"1"
)
.
changeLogId
(
String
.
valueOf
(
changeLog
.
getSequenceNbr
()))
.
approvalUnit
(
event
.
getBizRelationData
().
getUnitCode
())
.
approvalUnitCode
(
event
.
getBizRelationData
().
getUnitCode
())
.
createUserName
(
event
.
getBizRelationData
().
getCreateUserName
())
.
status
(
"正常"
)
.
build
());
return
changeLog
;
}
}
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