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
9a04427c
Commit
9a04427c
authored
Jun 21, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(重要提醒):业务新增提醒开发联调
1.使用登记、车用气瓶作废
parent
72fcb711
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
160 additions
and
31 deletions
+160
-31
EquipBackupHandler.java
...os/boot/module/jg/biz/edit/backup/EquipBackupHandler.java
+2
-2
CancellationAndGradeEvent.java
...s/boot/module/jg/biz/event/CancellationAndGradeEvent.java
+24
-0
CancellationEvent.java
...join/amos/boot/module/jg/biz/event/CancellationEvent.java
+1
-9
CancelEquipItem.java
...in/amos/boot/module/jg/biz/event/dto/CancelEquipItem.java
+14
-0
CancelAndGradeEventListener.java
...le/jg/biz/event/listener/CancelAndGradeEventListener.java
+72
-0
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+3
-13
ManageStatusDataUpdateService.java
...event/listener/service/ManageStatusDataUpdateService.java
+30
-3
EquipQualityScoreUpdateService.java
...re/event/service/impl/EquipQualityScoreUpdateService.java
+9
-2
ProjectQualityScoreUpdateService.java
.../event/service/impl/ProjectQualityScoreUpdateService.java
+5
-2
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+0
-0
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+0
-0
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/edit/backup/EquipBackupHandler.java
View file @
9a04427c
...
@@ -140,12 +140,12 @@ public class EquipBackupHandler {
...
@@ -140,12 +140,12 @@ public class EquipBackupHandler {
useInfoService
.
saveOrUpdate
(
useInfo
);
useInfoService
.
saveOrUpdate
(
useInfo
);
// 检验流水
// 检验流水
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfos
=
JSONObject
.
parseArray
(
eq
.
getString
(
BACKUP_JSON_KEY_INSPECTION_DETECTION_INFO
),
IdxBizJgInspectionDetectionInfo
.
class
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfos
=
JSONObject
.
parseArray
(
eq
.
getString
(
BACKUP_JSON_KEY_INSPECTION_DETECTION_INFO
),
IdxBizJgInspectionDetectionInfo
.
class
);
if
(!
inspectionDetectionInfos
.
isEmpty
())
{
if
(
inspectionDetectionInfos
!=
null
&&
!
inspectionDetectionInfos
.
isEmpty
())
{
inspectionDetectionInfoService
.
saveOrUpdateBatch
(
inspectionDetectionInfos
);
inspectionDetectionInfoService
.
saveOrUpdateBatch
(
inspectionDetectionInfos
);
}
}
// 施工流水
// 施工流水
List
<
IdxBizJgConstructionInfo
>
constructionInfoList
=
JSONObject
.
parseArray
(
eq
.
getString
(
BACKUP_JSON_KEY_CONSTRUCTION_INFO
),
IdxBizJgConstructionInfo
.
class
);
List
<
IdxBizJgConstructionInfo
>
constructionInfoList
=
JSONObject
.
parseArray
(
eq
.
getString
(
BACKUP_JSON_KEY_CONSTRUCTION_INFO
),
IdxBizJgConstructionInfo
.
class
);
if
(!
constructionInfoList
.
isEmpty
())
{
if
(
constructionInfoList
!=
null
&&
!
constructionInfoList
.
isEmpty
())
{
constructionInfoService
.
saveOrUpdateBatch
(
constructionInfoList
);
constructionInfoService
.
saveOrUpdateBatch
(
constructionInfoList
);
}
}
// 技术参数
// 技术参数
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/CancellationAndGradeEvent.java
0 → 100644
View file @
9a04427c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
;
import
lombok.Getter
;
import
org.springframework.context.ApplicationEvent
;
import
java.util.List
;
import
java.util.Set
;
/**
* @author Administrator
*/
@Getter
public
class
CancellationAndGradeEvent
extends
ApplicationEvent
{
private
final
Set
<
String
>
projectContraptionIds
;
private
final
List
<
String
>
records
;
public
CancellationAndGradeEvent
(
Object
source
,
List
<
String
>
records
,
Set
<
String
>
projectContraptionIds
)
{
super
(
source
);
this
.
projectContraptionIds
=
projectContraptionIds
;
this
.
records
=
records
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/CancellationEvent.java
View file @
9a04427c
...
@@ -12,9 +12,7 @@ import java.util.Set;
...
@@ -12,9 +12,7 @@ import java.util.Set;
@Getter
@Getter
public
class
CancellationEvent
extends
ApplicationEvent
{
public
class
CancellationEvent
extends
ApplicationEvent
{
private
List
<
String
>
records
;
private
final
List
<
String
>
records
;
private
Set
<
String
>
projectContraptionIds
;
/**
/**
* Create a new {@code ApplicationEvent}.
* Create a new {@code ApplicationEvent}.
*
*
...
@@ -25,10 +23,4 @@ public class CancellationEvent extends ApplicationEvent {
...
@@ -25,10 +23,4 @@ public class CancellationEvent extends ApplicationEvent {
super
(
source
);
super
(
source
);
this
.
records
=
records
;
this
.
records
=
records
;
}
}
public
CancellationEvent
(
Object
source
,
List
<
String
>
records
,
Set
<
String
>
projectContraptionIds
)
{
super
(
source
);
this
.
records
=
records
;
this
.
projectContraptionIds
=
projectContraptionIds
;
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/dto/CancelEquipItem.java
0 → 100644
View file @
9a04427c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
dto
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Set
;
@Data
public
class
CancelEquipItem
{
private
Set
<
String
>
projectContraptionIds
;
private
List
<
String
>
records
;
}
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
0 → 100644
View file @
9a04427c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationAndGradeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.dto.CancelEquipItem
;
import
com.yeejoin.amos.boot.module.jg.biz.event.listener.service.ManageStatusDataUpdateService
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.List
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
/**
* @author Administrator
*/
@Component
@Slf4j
@RequiredArgsConstructor
public
class
CancelAndGradeEventListener
{
@Value
(
"${cancellation.deal.thread.number:1}"
)
private
int
threadNumber
;
private
final
BlockingQueue
<
CancelEquipItem
>
queue
=
new
LinkedBlockingQueue
<>();
private
final
ManageStatusDataUpdateService
updateService
;
@EventListener
(
value
=
CancellationAndGradeEvent
.
class
)
public
void
handleTransactionalEvent
(
CancellationAndGradeEvent
event
)
{
log
.
info
(
"收到作废且更新评分消息:{}"
,
JSONObject
.
toJSONString
(
event
));
List
<
String
>
records
=
event
.
getRecords
();
CancelEquipItem
cancelEquipItem
=
new
CancelEquipItem
();
cancelEquipItem
.
setRecords
(
records
);
cancelEquipItem
.
setProjectContraptionIds
(
event
.
getProjectContraptionIds
());
queue
.
add
(
cancelEquipItem
);
}
@PostConstruct
public
void
init
()
{
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
threadNumber
,
r
->
{
Thread
t
=
new
Thread
(
r
);
t
.
setName
(
"CancelAndGradeEventWorker-"
+
t
.
getId
());
return
t
;
});
for
(
int
i
=
0
;
i
<
threadNumber
;
i
++)
{
executorService
.
execute
(()
->
{
while
(
true
)
{
try
{
CancelEquipItem
cancelEquipItem
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 cancelEquipItem: {}"
,
Thread
.
currentThread
().
getName
(),
cancelEquipItem
);
updateService
.
dealData
(
cancelEquipItem
);
}
catch
(
Exception
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 @
9a04427c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.listener.service.ManageStatusDataUpdateService
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -31,22 +29,14 @@ public class CancellationEventListener {
...
@@ -31,22 +29,14 @@ public class CancellationEventListener {
private
final
BlockingQueue
<
String
>
queue
=
new
LinkedBlockingQueue
<>();
private
final
BlockingQueue
<
String
>
queue
=
new
LinkedBlockingQueue
<>();
private
final
EventPublisher
publisher
;
private
final
ManageStatusDataUpdateService
updateService
;
private
final
ManageStatusDataUpdateService
updateService
;
@EventListener
(
value
=
CancellationEvent
.
class
)
@EventListener
(
value
=
CancellationEvent
.
class
)
public
void
handleTransactionalEvent
(
CancellationEvent
event
)
{
public
void
handleTransactionalEvent
(
CancellationEvent
event
)
{
log
.
info
(
"收到作废消息:{}"
,
JSONObject
.
toJSONString
(
event
));
List
<
String
>
records
=
event
.
getRecords
();
List
<
String
>
records
=
event
.
getRecords
();
log
.
info
(
"收到作废消息:{}"
,
JSONObject
.
toJSONString
(
records
));
queue
.
addAll
(
records
);
queue
.
addAll
(
records
);
castEvent2EquipEditEvent
(
event
);
}
private
void
castEvent2EquipEditEvent
(
CancellationEvent
event
)
{
if
(
event
.
getProjectContraptionIds
()
!=
null
&&
!
event
.
getProjectContraptionIds
().
isEmpty
())
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
event
.
getProjectContraptionIds
(),
EquipCreateOrEditEvent
.
EquipType
.
project
));
}
}
}
@PostConstruct
@PostConstruct
...
@@ -62,7 +52,7 @@ public class CancellationEventListener {
...
@@ -62,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
);
updateService
.
dealData
(
record
,
false
);
}
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/ManageStatusDataUpdateService.java
→
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 @
9a04427c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
event
.
listener
.
service
;
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
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.event.dto.CancelEquipItem
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
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.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.Set
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -34,7 +36,23 @@ public class ManageStatusDataUpdateService {
...
@@ -34,7 +36,23 @@ public class ManageStatusDataUpdateService {
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
String
record
)
{
public
void
dealData
(
CancelEquipItem
cancelEquipItem
)
{
// 设备、气瓶、管道纳管状态处理
cancelEquipItem
.
getRecords
().
forEach
(
record
->
{
dealData
(
record
,
true
);
});
// 装置评分处理
castEvent2EquipEditEvent
(
cancelEquipItem
.
getProjectContraptionIds
());
}
/**
* 处理单个设备纳管状态
*
* @param record 设备唯一标识
* @param isForward 是否进行转发
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
String
record
,
Boolean
isForward
)
{
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
...
@@ -64,14 +82,23 @@ public class ManageStatusDataUpdateService {
...
@@ -64,14 +82,23 @@ public class ManageStatusDataUpdateService {
}
}
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
});
});
castEvent2EquipEditEvent
(
record
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"设备作废异常:{}"
,
e
.
getMessage
());
log
.
error
(
"设备作废异常:{}"
,
e
.
getMessage
());
}
}
}
}
if
(
isForward
)
{
castEvent2EquipEditEvent
(
record
);
}
}
}
private
void
castEvent2EquipEditEvent
(
String
record
)
{
private
void
castEvent2EquipEditEvent
(
String
record
)
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
}
}
private
void
castEvent2EquipEditEvent
(
Set
<
String
>
projectContraptionIds
)
{
if
(
projectContraptionIds
!=
null
&&
!
projectContraptionIds
.
isEmpty
())
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
projectContraptionIds
,
EquipCreateOrEditEvent
.
EquipType
.
project
));
}
}
}
}
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 @
9a04427c
...
@@ -5,16 +5,17 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -5,16 +5,17 @@ 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.jg.api.dto.ReminderItemDto
;
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.biz.factory.GradeStrategyFactory
;
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.api.dto.ReminderItemDto
;
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.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
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
;
...
@@ -22,6 +23,7 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -22,6 +23,7 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -52,6 +54,10 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -52,6 +54,10 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
public
void
update
(
String
bizType
,
Set
<
String
>
records
)
{
public
void
update
(
String
bizType
,
Set
<
String
>
records
)
{
records
.
parallelStream
().
forEach
(
record
->
{
records
.
parallelStream
().
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
()))
{
return
;
}
Integer
level
=
this
.
getReminderLevel
(
bizType
,
record
);
Integer
level
=
this
.
getReminderLevel
(
bizType
,
record
);
op
.
ifPresent
(
equipmentCategory
->
{
op
.
ifPresent
(
equipmentCategory
->
{
equipmentCategory
.
setDataQualityScore
(
level
);
equipmentCategory
.
setDataQualityScore
(
level
);
...
@@ -60,6 +66,7 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -60,6 +66,7 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
TzsBaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgUseInfoService
.
update
(
updateWrapper
);
idxBizJgUseInfoService
.
update
(
updateWrapper
);
});
});
}
}
...
...
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 @
9a04427c
...
@@ -2,11 +2,12 @@ package com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.impl;
...
@@ -2,11 +2,12 @@ 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.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto
;
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.biz.factory.GradeStrategyFactory
;
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.api.dto.ReminderItemDto
;
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.impl.IdxBizJgProjectContraptionServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
...
@@ -17,6 +18,7 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -17,6 +18,7 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Set
;
import
java.util.Set
;
@Component
@Component
...
@@ -44,6 +46,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
...
@@ -44,6 +46,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
});
});
}
}
...
...
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 @
9a04427c
This diff is collapsed.
Click to expand it.
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 @
9a04427c
This diff is collapsed.
Click to expand it.
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