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
3bf04189
Commit
3bf04189
authored
Jul 08, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(综合搜索):增量数据同步调整
1.评分时进行同步 2.作废时评分同步
parent
5e654dc7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
100 additions
and
88 deletions
+100
-88
CancelAndGradeEventListener.java
...le/jg/biz/event/listener/CancelAndGradeEventListener.java
+1
-1
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+1
-1
ManageStatusDataUpdateService.java
...event/listener/service/ManageStatusDataUpdateService.java
+53
-50
EquipmentRefreshHandler.java
...odule/jg/biz/refresh/handler/EquipmentRefreshHandler.java
+3
-1
BizDataChange2EditEventAdapter.java
...er/core/event/adapter/BizDataChange2EditEventAdapter.java
+1
-1
EquipQualityScoreUpdateService.java
...re/event/service/impl/EquipQualityScoreUpdateService.java
+15
-7
ProjectQualityScoreUpdateService.java
.../event/service/impl/ProjectQualityScoreUpdateService.java
+26
-1
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+0
-2
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+0
-19
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+0
-3
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+0
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/listener/CancelAndGradeEventListener.java
View file @
3bf04189
...
@@ -56,7 +56,7 @@ public class CancelAndGradeEventListener {
...
@@ -56,7 +56,7 @@ public class CancelAndGradeEventListener {
try
{
try
{
CancelEquipItem
cancelEquipItem
=
queue
.
take
();
CancelEquipItem
cancelEquipItem
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 cancelEquipItem: {}"
,
Thread
.
currentThread
().
getName
(),
cancelEquipItem
);
log
.
info
(
"线程 {} 开始处理 cancelEquipItem: {}"
,
Thread
.
currentThread
().
getName
(),
cancelEquipItem
);
updateService
.
dealData
(
cancelEquipItem
);
updateService
.
cancelAndGrade
(
cancelEquipItem
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/listener/CancellationEventListener.java
View file @
3bf04189
...
@@ -52,7 +52,7 @@ public class CancellationEventListener {
...
@@ -52,7 +52,7 @@ public class CancellationEventListener {
try
{
try
{
String
record
=
queue
.
take
();
String
record
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 record: {}"
,
Thread
.
currentThread
().
getName
(),
record
);
log
.
info
(
"线程 {} 开始处理 record: {}"
,
Thread
.
currentThread
().
getName
(),
record
);
updateService
.
dealData
(
record
,
false
);
updateService
.
dealData
AndAsyncEs
(
record
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/listener/service/ManageStatusDataUpdateService.java
View file @
3bf04189
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
...
@@ -20,10 +19,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,10 +19,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -41,79 +38,85 @@ public class ManageStatusDataUpdateService {
...
@@ -41,79 +38,85 @@ public class ManageStatusDataUpdateService {
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
CancelEquipItem
cancelEquipItem
)
{
public
void
cancelAndGrade
(
CancelEquipItem
cancelEquipItem
)
{
// 设备、气瓶、管道纳管状态处理
// 1.设备、气瓶、管道纳管状态处理
cancelEquipItem
.
getRecords
().
forEach
(
record
->
{
cancelEquipItem
.
getRecords
().
forEach
(
this
::
cancelAndGrade
);
dealData
(
record
,
true
);
// 2.评分级别更新
});
castEvent2EquipEditEvent
(
cancelEquipItem
);
// 装置评分处理
castEvent2EquipEditEvent
(
cancelEquipItem
.
getProjectContraptionIds
());
// 发送数据刷新消息
sendPipelineRefreshMsg
(
cancelEquipItem
.
getProjectContraptionIds
());
}
}
private
void
sendPipelineRefreshMsg
(
Set
<
String
>
projectContraptionIds
)
{
/**
if
(
projectContraptionIds
!=
null
&&
!
projectContraptionIds
.
isEmpty
())
{
* 处理单个设备纳管状态
List
<
String
>
records
=
idxBizJgUseInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
in
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionIds
).
select
(
IdxBizJgUseInfo:
:
getRecord
)).
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
());
*
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
* @param record 设备唯一标识
*/
public
void
cancelAndGrade
(
String
record
)
{
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
if
(!
inUsed
)
{
try
{
// 更新已纳管为未纳管 - 数据库
updateEquipData
(
idxBizJgUseInfoService
,
record
,
idxBizJgRegisterInfoService
,
esEquipmentCategoryDao
);
}
catch
(
Exception
e
)
{
log
.
error
(
"设备cancelAndGrade异常:{}"
,
e
.
getMessage
());
}
}
}
}
}
/**
/**
* 处理单个设备纳管状态
* 处理单个设备纳管状态
*
*
* @param record 设备唯一标识
* @param record 设备唯一标识
* @param isForward 是否进行转发
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
String
record
,
Boolean
isForward
)
{
public
void
dealDataAndAsyncEs
(
String
record
)
{
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
// 无引用则进行修改纳管状态为未纳管
if
(!
inUsed
)
{
if
(!
inUsed
)
{
log
.
info
(
"进行设备作废处理:{}"
,
record
);
try
{
try
{
// 更新已纳管为未纳管 - 数据库
updateEquipData
(
idxBizJgUseInfoService
,
record
,
idxBizJgRegisterInfoService
,
esEquipmentCategoryDao
);
idxBizJgUseInfoService
.
lambdaUpdate
()
// 发送数据刷新消息
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
)
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
)
.
update
();
// 清除系统自动生成的设备代码`equCode`
boolean
isRegisterUpdated
=
idxBizJgRegisterInfoService
.
lambdaUpdate
()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgRegisterInfo:
:
getEquCodeType
,
"2"
)
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
)
.
update
();
// 同步修改ES数据
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategoryDao
.
findById
(
record
);
optional
.
ifPresent
(
esEquipmentCategoryDto
->
{
esEquipmentCategoryDto
.
setIS_INTO_MANAGEMENT
(
false
);
if
(
isRegisterUpdated
)
{
esEquipmentCategoryDto
.
setEQU_CODE
(
null
);
}
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
});
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"设备
作废
异常:{}"
,
e
.
getMessage
());
log
.
error
(
"设备
dealDataAndAsyncEs
异常:{}"
,
e
.
getMessage
());
}
}
}
}
if
(
isForward
)
{
castEvent2EquipEditEvent
(
record
);
}
}
}
private
void
castEvent2EquipEditEvent
(
String
record
)
{
private
void
updateEquipData
(
IdxBizJgUseInfoServiceImpl
idxBizJgUseInfoService
,
String
record
,
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
,
ESEquipmentCategory
esEquipmentCategoryDao
)
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
// 更新已纳管为未纳管 - 数据库
idxBizJgUseInfoService
.
lambdaUpdate
()
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
)
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
)
.
update
();
// 清除系统自动生成的设备代码`equCode`
boolean
isRegisterUpdated
=
idxBizJgRegisterInfoService
.
lambdaUpdate
()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgRegisterInfo:
:
getEquCodeType
,
"2"
)
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
)
.
update
();
// 同步修改ES数据
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategoryDao
.
findById
(
record
);
optional
.
ifPresent
(
esEquipmentCategoryDto
->
{
esEquipmentCategoryDto
.
setIS_INTO_MANAGEMENT
(
false
);
if
(
isRegisterUpdated
)
{
esEquipmentCategoryDto
.
setEQU_CODE
(
null
);
}
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
});
}
}
private
void
castEvent2EquipEditEvent
(
Set
<
String
>
projectContraptionIds
)
{
private
void
castEvent2EquipEditEvent
(
CancelEquipItem
cancelEquipItem
)
{
Set
<
String
>
projectContraptionIds
=
cancelEquipItem
.
getProjectContraptionIds
();
if
(
projectContraptionIds
!=
null
&&
!
projectContraptionIds
.
isEmpty
())
{
if
(
projectContraptionIds
!=
null
&&
!
projectContraptionIds
.
isEmpty
())
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
projectContraptionIds
,
EquipCreateOrEditEvent
.
EquipType
.
project
));
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
projectContraptionIds
,
EquipCreateOrEditEvent
.
EquipType
.
project
));
}
else
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
cancelEquipItem
.
getRecords
()),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
}
}
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/refresh/handler/EquipmentRefreshHandler.java
View file @
3bf04189
...
@@ -65,7 +65,8 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
...
@@ -65,7 +65,8 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
record
);
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
record
);
ESEquipmentCategoryDto
categoryEs
=
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
categoryEs
=
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
BeanUtil
.
copyProperties
(
categoryEs
,
esEquipmentInfo
);
BeanUtil
.
copyProperties
(
categoryEs
,
esEquipmentInfo
);
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getCreateDate
));
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getCreateDate
,
IdxBizJgUseInfo:
:
getDataQualityScore
));
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>()
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>()
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgDesignInfo:
:
getRecord
,
IdxBizJgDesignInfo:
:
getDesignUnitName
,
IdxBizJgDesignInfo:
:
getDesignUnitCreditCode
,
IdxBizJgDesignInfo:
:
getDesignDate
));
.
select
(
IdxBizJgDesignInfo:
:
getRecord
,
IdxBizJgDesignInfo:
:
getDesignUnitName
,
IdxBizJgDesignInfo:
:
getDesignUnitCreditCode
,
IdxBizJgDesignInfo:
:
getDesignDate
));
...
@@ -87,6 +88,7 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
...
@@ -87,6 +88,7 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"时区转换失败:{}"
,
record
,
e
);
log
.
error
(
"时区转换失败:{}"
,
record
,
e
);
}
}
esEquipmentInfo
.
setDataQualityScore
(
useInfo
.
getDataQualityScore
()
!=
null
?
useInfo
.
getDataQualityScore
()
:
null
);
esEquipmentInfo
.
setCarNumber
(
registerInfo
.
getCarNumber
());
esEquipmentInfo
.
setCarNumber
(
registerInfo
.
getCarNumber
());
esEquipmentInfo
.
setUSE_ORG_CODE
(
registerInfo
.
getUseOrgCode
());
esEquipmentInfo
.
setUSE_ORG_CODE
(
registerInfo
.
getUseOrgCode
());
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
registerInfo
.
getUseOrgCode
()));
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
registerInfo
.
getUseOrgCode
()));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/core/event/adapter/EditEventAdapter.java
→
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/core/event/adapter/
BizDataChange2
EditEventAdapter.java
View file @
3bf04189
...
@@ -14,7 +14,7 @@ import org.springframework.transaction.event.TransactionalEventListener;
...
@@ -14,7 +14,7 @@ import org.springframework.transaction.event.TransactionalEventListener;
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
EditEventAdapter
{
public
class
BizDataChange2
EditEventAdapter
{
private
final
ApplicationEventPublisher
publisher
;
private
final
ApplicationEventPublisher
publisher
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/core/event/service/impl/EquipQualityScoreUpdateService.java
View file @
3bf04189
...
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.EquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.EquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.biz.factory.GradeStrategyFactory
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.biz.factory.GradeStrategyFactory
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.IQualityScoreUpdate
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.IQualityScoreUpdate
;
...
@@ -23,11 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -23,11 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.Optional
;
import
java.util.Set
;
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
...
@@ -46,8 +46,9 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -46,8 +46,9 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
private
final
GradeStrategyFactory
gradeStrategyFactory
;
private
final
GradeStrategyFactory
gradeStrategyFactory
;
@Autowired
private
final
EquipmentCategoryService
equipmentCategoryService
;
EquipmentCategoryService
equipmentCategoryService
;
private
final
EventPublisher
eventPublisher
;
@Override
@Override
public
Boolean
support
(
EquipCreateOrEditEvent
.
EquipType
equipType
)
{
public
Boolean
support
(
EquipCreateOrEditEvent
.
EquipType
equipType
)
{
...
@@ -56,8 +57,9 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -56,8 +57,9 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
@Async
@Async
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
String
bizType
,
Set
<
String
>
records
)
{
public
void
update
(
String
bizType
,
Set
<
String
>
records
)
{
records
.
parallelStream
().
forEach
(
record
->
{
records
.
forEach
(
record
->
{
Optional
<
ESEquipmentCategoryDto
>
op
=
equipmentCategoryDao
.
findById
(
record
);
Optional
<
ESEquipmentCategoryDto
>
op
=
equipmentCategoryDao
.
findById
(
record
);
// 压力管道不进行管道登记的计算
// 压力管道不进行管道登记的计算
if
(
op
.
isPresent
()
&&
op
.
get
().
getEQU_LIST_CODE
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
if
(
op
.
isPresent
()
&&
op
.
get
().
getEQU_LIST_CODE
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
...
@@ -74,6 +76,8 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -74,6 +76,8 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
updateWrapper
.
set
(
TzsBaseEntity:
:
getRecDate
,
new
Date
());
updateWrapper
.
set
(
TzsBaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgUseInfoService
.
update
(
updateWrapper
);
idxBizJgUseInfoService
.
update
(
updateWrapper
);
});
});
// 事务提交后发送数据变更消息
this
.
sendDataRefreshMsgEquip
(
new
ArrayList
<>(
records
));
}
}
public
Integer
getReminderLevel
(
String
bizType
,
String
record
)
{
public
Integer
getReminderLevel
(
String
bizType
,
String
record
)
{
...
@@ -111,4 +115,8 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -111,4 +115,8 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
IdxBizJgRegisterInfo:
:
getWhetherVehicleCylinder
,
IdxBizJgRegisterInfo:
:
getWhetherVehicleCylinder
,
IdxBizJgRegisterInfo:
:
getProductName
));
IdxBizJgRegisterInfo:
:
getProductName
));
}
}
private
void
sendDataRefreshMsgEquip
(
List
<
String
>
records
)
{
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/core/event/service/impl/ProjectQualityScoreUpdateService.java
View file @
3bf04189
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
reminder
.
core
.
event
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
reminder
.
core
.
event
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.biz.factory.GradeStrategyFactory
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.biz.factory.GradeStrategyFactory
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.IQualityScoreUpdate
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.IQualityScoreUpdate
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.dto.MatchItemDto
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.dto.MatchItemDto
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.service.CommonReminderService
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.service.CommonReminderService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImplService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
...
@@ -30,6 +38,10 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -30,6 +38,10 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
private
final
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionService
;
private
final
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionService
;
private
final
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
private
final
EventPublisher
eventPublisher
;
@Value
(
"${grade.calculation.strategy:MAX_GRADE}"
)
@Value
(
"${grade.calculation.strategy:MAX_GRADE}"
)
private
String
activeStrategy
;
private
String
activeStrategy
;
...
@@ -40,8 +52,9 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -40,8 +52,9 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
@Async
@Async
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
String
bizType
,
Set
<
String
>
projectContraptionIds
)
{
public
void
update
(
String
bizType
,
Set
<
String
>
projectContraptionIds
)
{
projectContraptionIds
.
parallelStream
().
forEach
(
projectContraptionId
->
{
projectContraptionIds
.
forEach
(
projectContraptionId
->
{
Integer
level
=
this
.
getReminderLevel
(
bizType
,
projectContraptionId
);
Integer
level
=
this
.
getReminderLevel
(
bizType
,
projectContraptionId
);
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
...
@@ -49,6 +62,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -49,6 +62,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
});
});
this
.
sendDataRefreshMsg
(
projectContraptionIds
);
}
}
...
@@ -67,6 +81,17 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -67,6 +81,17 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
reminderItemDto
.
setEquipName
(
projectContraption
.
getProjectContraption
());
reminderItemDto
.
setEquipName
(
projectContraption
.
getProjectContraption
());
reminderItemDto
.
setDetailData
(
BeanUtil
.
beanToMap
(
matchItemDto
));
reminderItemDto
.
setDetailData
(
BeanUtil
.
beanToMap
(
matchItemDto
));
return
gradeStrategyFactory
.
getStrategy
(
activeStrategy
).
calculateGrade
(
Collections
.
singletonList
(
reminderItemDto
),
matchItemDto
);
return
gradeStrategyFactory
.
getStrategy
(
activeStrategy
).
calculateGrade
(
Collections
.
singletonList
(
reminderItemDto
),
matchItemDto
);
}
/**
* 发送管道编辑信息-用于将装置下管道同步到
*
* @param projectContraptionIds 装置ids
*/
private
void
sendDataRefreshMsg
(
Set
<
String
>
projectContraptionIds
)
{
List
<
IdxBizJgUseInfo
>
useInfos
=
idxBizJgUseInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
in
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionIds
)
.
select
(
IdxBizJgUseInfo:
:
getRecord
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
useInfos
.
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
()),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
}
}
}
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 @
3bf04189
...
@@ -186,7 +186,6 @@ public class DataDockServiceImpl {
...
@@ -186,7 +186,6 @@ public class DataDockServiceImpl {
})).
toArray
(
CompletableFuture
[]::
new
)
})).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
).
join
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
new
ArrayList
<>(
recordSet
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
@@ -2460,7 +2459,6 @@ public class DataDockServiceImpl {
...
@@ -2460,7 +2459,6 @@ public class DataDockServiceImpl {
})).
toArray
(
CompletableFuture
[]::
new
)
})).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
).
join
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
new
ArrayList
<>(
recordSet
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
3bf04189
...
@@ -437,39 +437,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -437,39 +437,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ResponseModel
responseModel
=
this
.
pipelineEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
pipelineEquipCreateOrUpdate
(
paramMap
);
Long
projectContraptionId
=
(
Long
)
responseModel
.
getResult
();
Long
projectContraptionId
=
(
Long
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
Sets
.
newHashSet
(
projectContraptionId
.
toString
()),
EquipCreateOrEditEvent
.
EquipType
.
project
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
Sets
.
newHashSet
(
projectContraptionId
.
toString
()),
EquipCreateOrEditEvent
.
EquipType
.
project
));
this
.
sendDataRefreshMsgProjectContraption
(
projectContraptionId
);
return
responseModel
;
return
responseModel
;
}
}
if
(
dataSource
.
contains
(
"black"
)){
if
(
dataSource
.
contains
(
"black"
)){
ResponseModel
responseModel
=
this
.
blackEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
blackEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
return
responseModel
;
return
responseModel
;
}
else
{
}
else
{
ResponseModel
responseModel
=
this
.
otherEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
otherEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
return
responseModel
;
return
responseModel
;
}
}
}
}
private
void
sendDataRefreshMsgEquip
(
String
record
)
{
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
/**
*
* 发送管道编辑信息-用于将装置下管道同步到
* @param projectContraptionId 装置id
*/
private
void
sendDataRefreshMsgProjectContraption
(
Long
projectContraptionId
)
{
List
<
IdxBizJgUseInfo
>
useInfos
=
idxBizJgUseInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
)
.
select
(
IdxBizJgUseInfo:
:
getRecord
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
useInfos
.
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
()),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
/**
/**
* 管道设备新增或更新
* 管道设备新增或更新
...
@@ -4340,7 +4322,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4340,7 +4322,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Optional
.
of
(
esEquipmentCategoryList
).
filter
(
list
->
!
list
.
isEmpty
()).
ifPresent
(
esEquipmentCategory:
:
saveAll
);
Optional
.
of
(
esEquipmentCategoryList
).
filter
(
list
->
!
list
.
isEmpty
()).
ifPresent
(
esEquipmentCategory:
:
saveAll
);
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
new
ArrayList
<>(
recordSet
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
String
.
format
(
"导入完成,成功导入: %d 条数据!"
,
useInfoList
.
size
());
return
String
.
format
(
"导入完成,成功导入: %d 条数据!"
,
useInfoList
.
size
());
}
}
...
...
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/JgUseRegistrationServiceImpl.java
View file @
3bf04189
...
@@ -1298,7 +1298,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1298,7 +1298,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
mapData
));
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
mapData
));
jgRegistrationHistoryService
.
updateById
(
jgRegistrationHistory
);
jgRegistrationHistoryService
.
updateById
(
jgRegistrationHistory
);
this
.
publish2CalGrade
(
jgUseRegistration
,
records
);
this
.
publish2CalGrade
(
jgUseRegistration
,
records
);
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
}
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
...
@@ -1732,7 +1731,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1732,7 +1731,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
});
});
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
name
(),
Sets
.
newHashSet
(
registerInfo
.
getRecord
()),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
name
(),
Sets
.
newHashSet
(
registerInfo
.
getRecord
()),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
registerInfo
.
getRecord
()),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
}
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
...
@@ -4364,7 +4362,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -4364,7 +4362,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
}
}
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
equipId
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
equipId
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
equipId
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
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/JgVehicleInformationServiceImpl.java
View file @
3bf04189
...
@@ -1019,7 +1019,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1019,7 +1019,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
);
);
// 车用气瓶评分
// 车用气瓶评分
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
name
(),
Sets
.
newHashSet
(
equipIdList
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
name
(),
Sets
.
newHashSet
(
equipIdList
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
equipIdList
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
}
}
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
...
@@ -2188,7 +2187,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -2188,7 +2187,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
new
ArrayList
<>(
recordSet
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
Collections
.
singletonList
(
vehicleInformation
);
return
Collections
.
singletonList
(
vehicleInformation
);
}
}
...
...
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