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
1d06bb4d
Commit
1d06bb4d
authored
Jul 09, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
8343463c
2c6e060f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
1023 additions
and
500 deletions
+1023
-500
TZSCommonConstant.java
...os/boot/module/common/api/constant/TZSCommonConstant.java
+5
-0
ESEquipmentInfo.java
...n/amos/boot/module/common/api/entity/ESEquipmentInfo.java
+46
-8
unitTypeLimitUserType.json
...on-api/src/main/resources/json/unitTypeLimitUserType.json
+9
-0
Constants.java
...ejoin/amos/boot/module/common/biz/constats/Constants.java
+4
-0
DefaultEventPublisher.java
...s/boot/module/jg/biz/edit/core/DefaultEventPublisher.java
+0
-25
EventPublisherMapping.java
...s/boot/module/jg/biz/edit/core/EventPublisherMapping.java
+0
-12
IEventPublisher.java
...in/amos/boot/module/jg/biz/edit/core/IEventPublisher.java
+0
-7
RouterEventPublisher.java
...os/boot/module/jg/biz/edit/core/RouterEventPublisher.java
+0
-38
BaseBizDataChangeEvent.java
...boot/module/jg/biz/edit/event/BaseBizDataChangeEvent.java
+2
-11
EmptyDataChangeEvent.java
...s/boot/module/jg/biz/edit/event/EmptyDataChangeEvent.java
+23
-0
ChangeEquipImpactCertListener.java
...iz/edit/event/listener/ChangeEquipImpactCertListener.java
+25
-0
DefaultBizDataChangeHandler.java
.../jg/biz/edit/process/biz/DefaultBizDataChangeHandler.java
+19
-14
ChangeRegistrationReformDataChangeHandler.java
...tionReform/ChangeRegistrationReformDataChangeHandler.java
+2
-2
ChangeRegistrationTransferDataChangeHandler.java
...Transfer/ChangeRegistrationTransferDataChangeHandler.java
+2
-2
ChangeRegistrationUnitDataChangeHandler.java
...strationUnit/ChangeRegistrationUnitDataChangeHandler.java
+2
-2
ChangeVehicleRegistrationUnitDataChangeHandler.java
...nUnit/ChangeVehicleRegistrationUnitDataChangeHandler.java
+2
-2
EnableDisableDataChangeHandler.java
...ess/biz/enableDisable/EnableDisableDataChangeHandler.java
+2
-2
EquipTransferDataChangeHandler.java
...ess/biz/equipTransfer/EquipTransferDataChangeHandler.java
+2
-2
InstallNoticeDataChangeHandler.java
...ess/biz/installNotice/InstallNoticeDataChangeHandler.java
+2
-2
MaintainNoticeDataChangeHandler.java
...s/biz/maintainNotice/MaintainNoticeDataChangeHandler.java
+2
-2
MaintenanceContractDataChangeHandler.java
...tenanceContract/MaintenanceContractDataChangeHandler.java
+2
-2
NewEquipDataChangeHandler.java
.../edit/process/biz/newEquip/NewEquipDataChangeHandler.java
+2
-2
NewProjectDataChangeHandler.java
...t/process/biz/newProject/NewProjectDataChangeHandler.java
+2
-2
ReformNoticeDataChangeHandler.java
...ocess/biz/reformNotice/ReformNoticeDataChangeHandler.java
+2
-2
ScrapCancelDataChangeHandler.java
...process/biz/scrapCancel/ScrapCancelDataChangeHandler.java
+2
-2
TransferNoticeDataChangeHandler.java
...s/biz/transferNotice/TransferNoticeDataChangeHandler.java
+2
-2
UseRegisterDataChangeHandler.java
...process/biz/useRegister/UseRegisterDataChangeHandler.java
+2
-2
VehicleInformationDataChangeHandler.java
...hicleInformation/VehicleInformationDataChangeHandler.java
+2
-2
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+0
-4
SingleProjectEquipChangeProcess.java
...z/edit/process/equip/SingleProjectEquipChangeProcess.java
+0
-8
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
+54
-51
StatisticsDataUpdateService.java
...ot/module/jg/biz/refresh/StatisticsDataUpdateService.java
+42
-7
DataRefreshEventBuilderService.java
...g/biz/refresh/adapter/DataRefreshEventBuilderService.java
+28
-0
Emq2DataRefreshEvent.java
...t/module/jg/biz/refresh/adapter/Emq2DataRefreshEvent.java
+45
-0
EquipmentRefreshHandler.java
...odule/jg/biz/refresh/handler/EquipmentRefreshHandler.java
+15
-42
QualityScoreUpdateFactory.java
...g/biz/reminder/biz/factory/QualityScoreUpdateFactory.java
+12
-1
UseRegisterReminderAdapter.java
.../reminder/biz/useRegister/UseRegisterReminderAdapter.java
+2
-2
DefaultReminder.java
...mos/boot/module/jg/biz/reminder/core/DefaultReminder.java
+1
-1
BizDataChange2EditEventAdapter.java
...er/core/event/adapter/BizDataChange2EditEventAdapter.java
+13
-6
EquipOperationEventHandler.java
...inder/core/event/listener/EquipOperationEventHandler.java
+1
-1
DefaultQualityScoreUpdateService.java
.../core/event/service/DefaultQualityScoreUpdateService.java
+34
-0
IQualityScoreUpdate.java
.../biz/reminder/core/event/service/IQualityScoreUpdate.java
+1
-1
EquipQualityScoreUpdateService.java
...re/event/service/impl/EquipQualityScoreUpdateService.java
+51
-32
ProjectQualityScoreUpdateService.java
.../event/service/impl/ProjectQualityScoreUpdateService.java
+52
-18
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-1
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+0
-2
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+16
-36
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+6
-3
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+0
-19
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+21
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+2
-1
JgChangeVehicleRegistrationUnitServiceImpl.java
...vice/impl/JgChangeVehicleRegistrationUnitServiceImpl.java
+2
-2
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+28
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+8
-2
JgOverDesignServiceLifeServiceImpl.java
.../biz/service/impl/JgOverDesignServiceLifeServiceImpl.java
+7
-8
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+7
-3
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+6
-4
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+6
-5
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+0
-2
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+1
-0
InspectionDetectionSaveToDbEventListener.java
...nt/listener/InspectionDetectionSaveToDbEventListener.java
+6
-49
InspectionDetectionInfoUpdateService.java
...istener/service/InspectionDetectionInfoUpdateService.java
+94
-0
CommonServiceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonServiceImpl.java
+1
-1
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+37
-2
CompanyAdvanceSearchEnum.java
...module/statistics/api/enums/CompanyAdvanceSearchEnum.java
+2
-2
DataQualityScoreEnum.java
...oot/module/statistics/api/enums/DataQualityScoreEnum.java
+6
-6
EquipAdvanceSearchEnum.java
...t/module/statistics/api/enums/EquipAdvanceSearchEnum.java
+14
-3
PersonAdvanceSearchEnum.java
.../module/statistics/api/enums/PersonAdvanceSearchEnum.java
+1
-1
UnitTypeEnum.java
...n/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
+30
-11
UnitTypeNewEnum.java
...mos/boot/module/statistics/api/enums/UnitTypeNewEnum.java
+72
-0
ComprehensiveStatisticalAnalysisController.java
...ontroller/ComprehensiveStatisticalAnalysisController.java
+43
-10
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+0
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+4
-3
IdxBizJgUseInfo.java
...join/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
+16
-1
IdxBizJgUseInfoMapper.java
...mos/boot/module/ymt/api/mapper/IdxBizJgUseInfoMapper.java
+3
-0
IdxBizJgUseInfoMapper.xml
...t-api/src/main/resources/mapper/IdxBizJgUseInfoMapper.xml
+65
-0
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/constant/TZSCommonConstant.java
View file @
1d06bb4d
...
...
@@ -8,4 +8,9 @@ public class TZSCommonConstant {
* 陕西省行政区划编码
*/
public
final
static
String
SHAN_XI_REGION_CODE
=
"610000"
;
/**
* 数据刷新主题-前缀,第一个为:dataType, 第二个为:操作类型:增删改
*/
public
final
static
String
DATA_REFRESH_TOPIC
=
"data/refresh/%s/%s"
;
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/ESEquipmentInfo.java
View file @
1d06bb4d
...
...
@@ -32,7 +32,7 @@ public class ESEquipmentInfo {
/**
* 管辖机构名称
*/
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Keyword
)
private
String
ORG_BRANCH_NAME
;
/**
...
...
@@ -44,7 +44,7 @@ public class ESEquipmentInfo {
/**
* 使用单位名称
*/
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Keyword
)
private
String
USE_UNIT_NAME
;
/**
...
...
@@ -189,7 +189,7 @@ public class ESEquipmentInfo {
/**
* 制造单位名称
*/
@Field
(
type
=
FieldType
.
Text
)
@Field
(
type
=
FieldType
.
Keyword
)
private
String
PRODUCE_UNIT_NAME
;
/**
...
...
@@ -205,12 +205,18 @@ public class ESEquipmentInfo {
private
String
USC_UNIT_NAME
;
/**
*
投用
日期
*
安装
日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
LocalDate
USC_DATE
;
/**
* 投用日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
LocalDate
USE_DATE
;
/**
* 创建日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
...
...
@@ -271,9 +277,8 @@ public class ESEquipmentInfo {
*/
@Field
(
type
=
FieldType
.
Boolean
)
private
Boolean
IS_INTO_MANAGEMENT
;
/**
* 设备使用地点区域码610000#610100#610101
* 设备使用地点区域码610000#610100#610101
#61010101d 到街道
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
USE_PLACE_CODE
;
...
...
@@ -341,6 +346,12 @@ public class ESEquipmentInfo {
/**
* 车牌号
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
carNumber
;
/**
* 下次检验日期-冗余字段
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
...
...
@@ -568,16 +579,24 @@ public class ESEquipmentInfo {
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
LocalDate
informEnd
;
/**
* 维保负责人姓名
* 维保负责
1
人姓名
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
meMaster
;
/**
* 维保负责人身份证
* 维保负责人
1
身份证
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
meMasterId
;
/**
* 维保负责人1电话
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
meMasterPhone
;
/**
* 紧急救援电话
*/
...
...
@@ -601,5 +620,24 @@ public class ESEquipmentInfo {
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
me24Telephone
;
/**
* 维保负责人2姓名
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
meMaster1
;
/**
* 维保负责人2身份证
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
meMaster1Id
;
/**
* 维保负责人2电话
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
meMaster1Phone
;
}
}
amos-boot-system-tzs/amos-boot-module-
tcm/amos-boot-module-tcm-biz
/src/main/resources/json/unitTypeLimitUserType.json
→
amos-boot-system-tzs/amos-boot-module-
common/amos-boot-module-common-api
/src/main/resources/json/unitTypeLimitUserType.json
View file @
1d06bb4d
...
...
@@ -65,5 +65,14 @@
"6616"
:
[],
"6617"
:
[],
"6549"
:
[]
},
"个人主体"
:
{
"6552"
:
[
"6713"
],
"6546"
:
[],
"6547"
:
[],
"6548"
:
[],
"6616"
:
[],
"6617"
:
[],
"6549"
:
[]
}
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/constats/Constants.java
View file @
1d06bb4d
...
...
@@ -27,5 +27,9 @@ public class Constants {
public
static
final
Integer
REFRESH_STATUS_FAILURE
=
3
;
public
static
final
String
JG_EDIT_PROJECT
=
"JG_EDIT_PROJECT"
;
public
static
final
String
JG_EDIT_EQUIP
=
"JG_EDIT_EQUIP"
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/core/DefaultEventPublisher.java
deleted
100644 → 0
View file @
8343463c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
core
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
lombok.Getter
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisherAware
;
import
org.springframework.stereotype.Component
;
@Getter
@Component
(
"defaultEventPublisher"
)
public
class
DefaultEventPublisher
implements
IEventPublisher
<
BaseBizDataChangeEvent
>,
ApplicationEventPublisherAware
{
private
ApplicationEventPublisher
publisher
;
@Override
public
void
publish
(
BaseBizDataChangeEvent
event
)
{
publisher
.
publishEvent
(
event
);
}
@Override
public
void
setApplicationEventPublisher
(
ApplicationEventPublisher
applicationEventPublisher
)
{
this
.
publisher
=
applicationEventPublisher
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/core/EventPublisherMapping.java
deleted
100644 → 0
View file @
8343463c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
core
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
TYPE
)
public
@interface
EventPublisherMapping
{
String
value
()
default
"defaultEventPublisher"
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/core/IEventPublisher.java
deleted
100644 → 0
View file @
8343463c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
core
;
import
org.springframework.context.ApplicationEvent
;
public
interface
IEventPublisher
<
T
extends
ApplicationEvent
>
{
void
publish
(
T
event
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/core/RouterEventPublisher.java
deleted
100644 → 0
View file @
8343463c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
core
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
@RequiredArgsConstructor
public
class
RouterEventPublisher
implements
IEventPublisher
<
BaseBizDataChangeEvent
>
{
private
final
ApplicationContext
applicationContext
;
private
final
Map
<
Class
<?>,
String
>
publisherCache
=
new
ConcurrentHashMap
<>();
@Override
public
void
publish
(
BaseBizDataChangeEvent
event
)
{
String
publisherName
=
resolvePublisherName
(
event
.
getClass
());
IEventPublisher
<
BaseBizDataChangeEvent
>
publisher
=
applicationContext
.
getBean
(
publisherName
,
IEventPublisher
.
class
);
Optional
.
ofNullable
(
publisher
).
orElseGet
(
this
::
getDefaultPublisher
).
publish
(
event
);
}
private
String
resolvePublisherName
(
Class
<?>
eventClass
)
{
return
publisherCache
.
computeIfAbsent
(
eventClass
,
clz
->
{
EventPublisherMapping
annotation
=
clz
.
getAnnotation
(
EventPublisherMapping
.
class
);
return
(
annotation
!=
null
)
?
annotation
.
value
()
:
"defaultEventPublisher"
;
});
}
private
IEventPublisher
<
BaseBizDataChangeEvent
>
getDefaultPublisher
()
{
return
applicationContext
.
getBean
(
"defaultEventPublisher"
,
IEventPublisher
.
class
);
}
}
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/BaseBizDataChangeEvent.java
View file @
1d06bb4d
...
...
@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.event;
import
com.yeejoin.amos.boot.module.jg.api.dto.BizRelationDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.EventPublisherMapping
;
import
lombok.Getter
;
import
org.springframework.context.ApplicationEvent
;
import
org.typroject.tyboot.core.foundation.context.RequestContextModel
;
import
java.util.List
;
...
...
@@ -13,19 +11,12 @@ import java.util.List;
* @author Administrator
*/
@Getter
@EventPublisherMapping
public
class
BaseBizDataChangeEvent
extends
ApplicationEvent
{
public
class
BaseBizDataChangeEvent
extends
EmptyDataChangeEvent
{
private
final
List
<
FieldChangeMeta
>
data
;
private
final
RequestContextModel
requestContext
;
private
final
BizRelationDataDto
bizRelationData
;
public
BaseBizDataChangeEvent
(
Object
source
,
BizRelationDataDto
bizRelationData
,
List
<
FieldChangeMeta
>
data
,
RequestContextModel
requestContext
)
{
super
(
source
);
super
(
source
,
bizRelationData
,
requestContext
);
this
.
data
=
data
;
this
.
bizRelationData
=
bizRelationData
;
this
.
requestContext
=
requestContext
;
}
}
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/EmptyDataChangeEvent.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
event
;
import
com.yeejoin.amos.boot.module.jg.api.dto.BizRelationDataDto
;
import
lombok.Getter
;
import
org.springframework.context.ApplicationEvent
;
import
org.typroject.tyboot.core.foundation.context.RequestContextModel
;
/**
* @author Administrator
*/
@Getter
public
class
EmptyDataChangeEvent
extends
ApplicationEvent
{
private
final
RequestContextModel
requestContext
;
private
final
BizRelationDataDto
bizRelationData
;
public
EmptyDataChangeEvent
(
Object
source
,
BizRelationDataDto
bizRelationData
,
RequestContextModel
requestContext
)
{
super
(
source
);
this
.
bizRelationData
=
bizRelationData
;
this
.
requestContext
=
requestContext
;
}
}
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/ChangeEquipImpactCertListener.java
View file @
1d06bb4d
...
...
@@ -15,8 +15,10 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeEqSe
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
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.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -52,6 +54,7 @@ public class ChangeEquipImpactCertListener {
private
final
IdxBizJgProjectContraptionServiceImplService
jgProjectContraptionService
;
private
final
JgInstallationNoticeEqServiceImpl
jgInstallationNoticeEqService
;
private
final
IdxBizJgUseInfoMapper
useInfoMapper
;
private
final
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
/**
* 事件监听:只把事件放入队列
...
...
@@ -141,6 +144,9 @@ public class ChangeEquipImpactCertListener {
case
"useOrgCode"
:
manage
.
setUseRegistrationCode
(
afterValue
);
break
;
case
"carNumber"
:
manage
.
setCarNumber
(
afterValue
);
break
;
case
"city"
:
case
"county"
:
case
"street"
:
...
...
@@ -296,6 +302,25 @@ public class ChangeEquipImpactCertListener {
private
void
handleNewEquipEdit
(
BaseBizDataChangeEvent
event
)
{
log
.
info
(
"处理 handleNewEquipEdit 类型逻辑"
);
if
(
event
.
getBizRelationData
().
getBizIsFinished
()){
String
useOrgCode
=
""
;
for
(
FieldChangeMeta
meta
:
event
.
getData
())
{
String
columnKey
=
meta
.
getColumnKey
();
if
(
columnKey
.
equals
(
"useOrgCode"
)){
useOrgCode
=
meta
.
getColumnOldValue
();
}
else
{
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryRegisterWrapper
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
queryRegisterWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
event
.
getBizRelationData
().
getBizId
());
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
queryRegisterWrapper
);
useOrgCode
=
registerInfo
.
getUseOrgCode
();
}
}
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useOrgCode
)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
one
();
this
.
handleFieldChange
(
event
.
getData
(),
jgUseRegistrationManage
);
}
}
private
void
handleNewProjectEdit
(
List
<
FieldChangeMeta
>
fieldChangeMetaList
,
String
projectContraptionId
)
{
...
...
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/biz/DefaultBizDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -4,13 +4,14 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.BizRelationDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipDataProcessStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.IEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.EmptyDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.CommonEquipDataProcessService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
...
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipCha
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgBizChangeLogServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationEvent
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -31,10 +33,11 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
public
static
String
TEMPORARY_PIPELINES_DATA
=
"temporaryPipelinesData"
;
private
final
IEventPublisher
<
BaseBizDataChangeEvent
>
eventPublisher
;
private
final
CommonPublisher
eventPublisher
;
private
final
ApplicationContext
applicationContext
;
protected
DefaultBizDataChangeHandler
(
IEventPublisher
<
BaseBizDataChangeEvent
>
eventPublisher
,
ApplicationContext
applicationContext
)
{
protected
DefaultBizDataChangeHandler
(
CommonPublisher
eventPublisher
,
ApplicationContext
applicationContext
)
{
this
.
eventPublisher
=
eventPublisher
;
this
.
applicationContext
=
applicationContext
;
}
...
...
@@ -86,19 +89,21 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
private
void
publish2OtherBiz
(
List
<
FieldChangeMeta
>
allChangeColumns
,
String
applyNo
,
JSONObject
oData
,
ReginParams
selectedOrgInfo
)
{
// 重复行数据不记录日志(如行政区划编码、行政区划名称,只记录一个字段即可)
List
<
FieldChangeMeta
>
noPeatChangeFields
=
allChangeColumns
.
stream
().
filter
(
f
->
!
f
.
getIsRepeatColumn
()).
collect
(
Collectors
.
toList
());
BizRelationDataDto
bizRelationDataDto
=
new
BizRelationDataDto
();
bizRelationDataDto
.
setBizId
(
applyNo
);
bizRelationDataDto
.
setBizType
(
canHandleBizType
());
bizRelationDataDto
.
setRecords
(
getEqs
(
applyNo
));
bizRelationDataDto
.
setChangeReason
(
oData
.
getString
(
"changeReason"
));
bizRelationDataDto
.
setChangeAttachment
(
oData
.
get
(
"changeAttachment"
)
!=
null
?
JSONObject
.
toJSONString
(
oData
.
get
(
"changeAttachment"
))
:
null
);
bizRelationDataDto
.
setProjectContraptionIds
(
getProjectContraptionIds
(
applyNo
));
bizRelationDataDto
.
setRecUserName
(
selectedOrgInfo
.
getUserModel
().
getRealName
());
bizRelationDataDto
.
setUnitCode
(
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
bizRelationDataDto
.
setUnitName
(
selectedOrgInfo
.
getCompany
().
getCompanyName
());
bizRelationDataDto
.
setBizIsFinished
(
bizIsFinished
(
applyNo
));
if
(!
noPeatChangeFields
.
isEmpty
())
{
BizRelationDataDto
bizRelationDataDto
=
new
BizRelationDataDto
();
bizRelationDataDto
.
setBizId
(
applyNo
);
bizRelationDataDto
.
setBizType
(
canHandleBizType
());
bizRelationDataDto
.
setRecords
(
getEqs
(
applyNo
));
bizRelationDataDto
.
setChangeReason
(
oData
.
getString
(
"changeReason"
));
bizRelationDataDto
.
setChangeAttachment
(
oData
.
get
(
"changeAttachment"
)
!=
null
?
JSONObject
.
toJSONString
(
oData
.
get
(
"changeAttachment"
))
:
null
);
bizRelationDataDto
.
setProjectContraptionIds
(
getProjectContraptionIds
(
applyNo
));
bizRelationDataDto
.
setRecUserName
(
selectedOrgInfo
.
getUserModel
().
getRealName
());
bizRelationDataDto
.
setUnitCode
(
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
bizRelationDataDto
.
setUnitName
(
selectedOrgInfo
.
getCompany
().
getCompanyName
());
bizRelationDataDto
.
setBizIsFinished
(
bizIsFinished
(
applyNo
));
eventPublisher
.
publish
(
new
BaseBizDataChangeEvent
(
this
,
bizRelationDataDto
,
noPeatChangeFields
,
RequestContext
.
cloneRequestContext
()));
}
else
{
eventPublisher
.
publish
(
new
EmptyDataChangeEvent
(
this
,
bizRelationDataDto
,
RequestContext
.
cloneRequestContext
()));
}
}
...
...
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/biz/changeRegistrationReform/ChangeRegistrationReformDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationR
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class ChangeRegistrationReformDataChangeHandler extends DefaultBizDataCha
private
final
ChangeRegistrationReformEditUpdateService
changeRegistrationReformEditUpdateService
;
protected
ChangeRegistrationReformDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationReformEditUpdateService
changeRegistrationReformEditUpdateService
)
{
protected
ChangeRegistrationReformDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationReformEditUpdateService
changeRegistrationReformEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
changeRegistrationReformEditUpdateService
=
changeRegistrationReformEditUpdateService
;
}
...
...
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/biz/changeRegistrationTransfer/ChangeRegistrationTransferDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationT
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class ChangeRegistrationTransferDataChangeHandler extends DefaultBizDataC
private
final
ChangeRegistrationTransferEditUpdateService
changeRegistrationTransferEditUpdateService
;
protected
ChangeRegistrationTransferDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationTransferEditUpdateService
changeRegistrationTransferEditUpdateService
)
{
protected
ChangeRegistrationTransferDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationTransferEditUpdateService
changeRegistrationTransferEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
changeRegistrationTransferEditUpdateService
=
changeRegistrationTransferEditUpdateService
;
}
...
...
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/biz/changeRegistrationUnit/ChangeRegistrationUnitDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationU
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class ChangeRegistrationUnitDataChangeHandler extends DefaultBizDataChang
private
final
ChangeRegistrationUnitEditUpdateService
changeRegistrationUnitEditUpdateService
;
protected
ChangeRegistrationUnitDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationUnitEditUpdateService
changeRegistrationUnitEditUpdateService
)
{
protected
ChangeRegistrationUnitDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeRegistrationUnitEditUpdateService
changeRegistrationUnitEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
changeRegistrationUnitEditUpdateService
=
changeRegistrationUnitEditUpdateService
;
}
...
...
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/biz/changeVehicleRegistrationUnit/ChangeVehicleRegistrationUnitDataChangeHandler.java
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
changeVehicleRegistrationUnit
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeVehicleRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class ChangeVehicleRegistrationUnitDataChangeHandler extends DefaultBizDa
private
final
ChangeVehicleRegistrationUnitEditUpdateService
changeVehicleRegistrationUnitEditUpdateService
;
protected
ChangeVehicleRegistrationUnitDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeVehicleRegistrationUnitEditUpdateService
changeVehicleRegistrationUnitEditUpdateService
)
{
protected
ChangeVehicleRegistrationUnitDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ChangeVehicleRegistrationUnitEditUpdateService
changeVehicleRegistrationUnitEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
changeVehicleRegistrationUnitEditUpdateService
=
changeVehicleRegistrationUnitEditUpdateService
;
}
...
...
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/biz/enableDisable/EnableDisableDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.enableDisable;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class EnableDisableDataChangeHandler extends DefaultBizDataChangeHandler<
private
final
EnableDisableEditUpdateService
enableDisableEditUpdateService
;
protected
EnableDisableDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
EnableDisableEditUpdateService
enableDisableEditUpdateService
)
{
protected
EnableDisableDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
EnableDisableEditUpdateService
enableDisableEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
enableDisableEditUpdateService
=
enableDisableEditUpdateService
;
}
...
...
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/biz/equipTransfer/EquipTransferDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.equipTransfer;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class EquipTransferDataChangeHandler extends DefaultBizDataChangeHandler<
private
final
EquipTransferEditUpdateService
equipTransferEditUpdateService
;
protected
EquipTransferDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
EquipTransferEditUpdateService
equipTransferEditUpdateService
)
{
protected
EquipTransferDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
EquipTransferEditUpdateService
equipTransferEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
equipTransferEditUpdateService
=
equipTransferEditUpdateService
;
}
...
...
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/biz/installNotice/InstallNoticeDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.installNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -23,7 +23,7 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
private
final
InstallNoticeEditUpdateService
installNoticeEditUpdateService
;
protected
InstallNoticeDataChangeHandler
(
InstallNoticeEditUpdateService
installNoticeEditUpdateService
,
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
protected
InstallNoticeDataChangeHandler
(
InstallNoticeEditUpdateService
installNoticeEditUpdateService
,
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
installNoticeEditUpdateService
=
installNoticeEditUpdateService
;
}
...
...
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/biz/maintainNotice/MaintainNoticeDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintainNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -28,7 +28,7 @@ public class MaintainNoticeDataChangeHandler extends DefaultBizDataChangeHandler
private
final
MaintainNoticeEditUpdateService
maintainNoticeEditUpdateService
;
protected
MaintainNoticeDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
MaintainNoticeEditUpdateService
maintainNoticeEditUpdateService
)
{
protected
MaintainNoticeDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
MaintainNoticeEditUpdateService
maintainNoticeEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
maintainNoticeEditUpdateService
=
maintainNoticeEditUpdateService
;
}
...
...
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/biz/maintenanceContract/MaintenanceContractDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintenanceContract
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class MaintenanceContractDataChangeHandler extends DefaultBizDataChangeHa
private
final
MaintenanceContractEditUpdateService
maintenanceContractEditUpdateService
;
protected
MaintenanceContractDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
MaintenanceContractEditUpdateService
maintenanceContractEditUpdateService
)
{
protected
MaintenanceContractDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
MaintenanceContractEditUpdateService
maintenanceContractEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
maintenanceContractEditUpdateService
=
maintenanceContractEditUpdateService
;
}
...
...
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/biz/newEquip/NewEquipDataChangeHandler.java
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newEquip
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -20,7 +20,7 @@ import java.util.Set;
@Component
public
class
NewEquipDataChangeHandler
extends
DefaultBizDataChangeHandler
<
BaseBizDataChangeEvent
>
{
protected
NewEquipDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
protected
NewEquipDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
super
(
routerEventPublisher
,
applicationContext
);
}
...
...
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/biz/newProject/NewProjectDataChangeHandler.java
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newProject
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -19,7 +19,7 @@ public class NewProjectDataChangeHandler extends DefaultBizDataChangeHandler<Bas
private
final
NewProjectEditUpdateService
newProjectEditUpdateService
;
protected
NewProjectDataChangeHandler
(
NewProjectEditUpdateService
newProjectEditUpdateService
,
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
protected
NewProjectDataChangeHandler
(
NewProjectEditUpdateService
newProjectEditUpdateService
,
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
newProjectEditUpdateService
=
newProjectEditUpdateService
;
}
...
...
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/biz/reformNotice/ReformNoticeDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.reformNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -23,7 +23,7 @@ public class ReformNoticeDataChangeHandler extends DefaultBizDataChangeHandler<B
private
final
ReformNoticeEditUpdateService
reformNoticeEditUpdateService
;
protected
ReformNoticeDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ReformNoticeEditUpdateService
reformNoticeEditUpdateService
)
{
protected
ReformNoticeDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ReformNoticeEditUpdateService
reformNoticeEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
reformNoticeEditUpdateService
=
reformNoticeEditUpdateService
;
}
...
...
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/biz/scrapCancel/ScrapCancelDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.scrapCancel;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class ScrapCancelDataChangeHandler extends DefaultBizDataChangeHandler<Ba
private
final
ScrapCancelEditUpdateService
scrapCancelEditUpdateService
;
protected
ScrapCancelDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ScrapCancelEditUpdateService
scrapCancelEditUpdateService
)
{
protected
ScrapCancelDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
ScrapCancelEditUpdateService
scrapCancelEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
scrapCancelEditUpdateService
=
scrapCancelEditUpdateService
;
}
...
...
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/biz/transferNotice/TransferNoticeDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.transferNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class TransferNoticeDataChangeHandler extends DefaultBizDataChangeHandler
private
final
TransferNoticeEditUpdateService
transferNoticeEditUpdateService
;
protected
TransferNoticeDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
TransferNoticeEditUpdateService
transferNoticeEditUpdateService
)
{
protected
TransferNoticeDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
TransferNoticeEditUpdateService
transferNoticeEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
transferNoticeEditUpdateService
=
transferNoticeEditUpdateService
;
}
...
...
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/biz/useRegister/UseRegisterDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,12 +2,12 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -30,7 +30,7 @@ public class UseRegisterDataChangeHandler extends DefaultBizDataChangeHandler<Ba
private
final
UseRegisterUpdateService
useRegisterUpdateService
;
protected
UseRegisterDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
UseRegisterUpdateService
useRegisterUpdateService
,
ApplicationContext
applicationContext
)
{
protected
UseRegisterDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
UseRegisterUpdateService
useRegisterUpdateService
,
ApplicationContext
applicationContext
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
useRegisterUpdateService
=
useRegisterUpdateService
;
}
...
...
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/biz/vehicleInformation/VehicleInformationDataChangeHandler.java
View file @
1d06bb4d
...
...
@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.vehicleInformation;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -26,7 +26,7 @@ public class VehicleInformationDataChangeHandler extends DefaultBizDataChangeHan
private
final
VehicleInformationEditUpdateService
vehicleInformationEditUpdateService
;
protected
VehicleInformationDataChangeHandler
(
RouterEvent
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
VehicleInformationEditUpdateService
vehicleInformationEditUpdateService
)
{
protected
VehicleInformationDataChangeHandler
(
Common
Publisher
routerEventPublisher
,
ApplicationContext
applicationContext
,
VehicleInformationEditUpdateService
vehicleInformationEditUpdateService
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
vehicleInformationEditUpdateService
=
vehicleInformationEditUpdateService
;
}
...
...
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/SingleEquipChangeProcess.java
View file @
1d06bb4d
...
...
@@ -38,8 +38,6 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
private
final
EsUpdateService
esUpdateService
;
private
final
CommonPublisher
publisher
;
@Override
public
HandleResult
handle
(
Map
<
String
,
Object
>
changeData
,
String
record
)
{
...
...
@@ -145,8 +143,6 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
this
.
updateOtherEquipInSameCert
(
useInfoNew
,
registerInfoNew
,
registerInfoOld
,
allChangeColumns
);
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerInfoOld
.
getEquList
(),
record
,
changeData
,
allChangeColumns
);
// 发送数据刷新消息
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
HandleResult
.
builder
().
fieldChangeMetas
(
allChangeColumns
).
build
();
}
...
...
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 @
1d06bb4d
...
...
@@ -47,8 +47,6 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
private
final
EsUpdateService
esUpdateService
;
private
final
CommonPublisher
publisher
;
@Override
public
HandleResult
handle
(
Map
<
String
,
Object
>
changeData
,
String
projectContraptionId
)
{
...
...
@@ -120,15 +118,9 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
pieLineDataChangeService
.
updateEs
(
projectContraptionChangeDataDto
);
// 5.更新管道长度,按照装置下的已经入库的全量更新(todo 流程中编辑时数据不体现在这 还是原数据)
pieLineDataChangeService
.
updatePipelineLength
(
projectContraptionChangeDataDto
.
getProjectContraptionId
());
this
.
sendDataRefreshMsgProjectContraption
(
pmap
.
values
());
return
HandleResult
.
builder
().
fieldChangeMetas
(
allChangeColumns
).
pipelineChangeItemMap
(
pmap
).
build
();
}
private
void
sendDataRefreshMsgProjectContraption
(
Collection
<
List
<
PipelineChangeItemDto
>>
values
)
{
List
<
String
>
records
=
values
.
stream
().
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toList
()).
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getRecord
).
collect
(
Collectors
.
toList
());
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
private
void
buildTechParamChangeLog
(
String
record
,
PipelineChangeItemDto
pipelineNew
,
PipelineChangeItemDto
pipelineOld
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
TechParamsPipelineChangeFieldDto
paramsPipelineChangeFieldNew
=
new
TechParamsPipelineChangeFieldDto
();
...
...
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 @
1d06bb4d
...
...
@@ -56,7 +56,7 @@ public class CancelAndGradeEventListener {
try
{
CancelEquipItem
cancelEquipItem
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 cancelEquipItem: {}"
,
Thread
.
currentThread
().
getName
(),
cancelEquipItem
);
updateService
.
dealData
(
cancelEquipItem
);
updateService
.
cancelAndGrade
(
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 @
1d06bb4d
...
...
@@ -52,7 +52,7 @@ public class CancellationEventListener {
try
{
String
record
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 record: {}"
,
Thread
.
currentThread
().
getName
(),
record
);
updateService
.
dealData
(
record
,
false
);
updateService
.
dealData
AndAsyncEs
(
record
);
}
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/service/ManageStatusDataUpdateService.java
View file @
1d06bb4d
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.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
...
...
@@ -20,10 +19,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Service
@Slf4j
...
...
@@ -41,79 +38,85 @@ public class ManageStatusDataUpdateService {
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
CancelEquipItem
cancelEquipItem
)
{
// 设备、气瓶、管道纳管状态处理
cancelEquipItem
.
getRecords
().
forEach
(
record
->
{
dealData
(
record
,
true
);
});
// 装置评分处理
castEvent2EquipEditEvent
(
cancelEquipItem
.
getProjectContraptionIds
());
// 发送数据刷新消息
sendPipelineRefreshMsg
(
cancelEquipItem
.
getProjectContraptionIds
());
public
void
cancelAndGrade
(
CancelEquipItem
cancelEquipItem
)
{
// 1.设备、气瓶、管道纳管状态处理
cancelEquipItem
.
getRecords
().
forEach
(
this
::
cancelAndGrade
);
// 2.评分级别更新
castEvent2EquipEditEvent
(
cancelEquipItem
);
}
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 isForward 是否进行转发
* @param record 设备唯一标识
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
dealData
(
String
record
,
Boolean
isForward
)
{
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
public
void
dealDataAndAsyncEs
(
String
record
)
{
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
if
(!
inUsed
)
{
log
.
info
(
"进行设备作废处理:{}"
,
record
);
try
{
// 更新已纳管为未纳管 - 数据库
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
));
updateEquipData
(
idxBizJgUseInfoService
,
record
,
idxBizJgRegisterInfoService
,
esEquipmentCategoryDao
);
// 发送数据刷新消息
}
catch
(
Exception
e
)
{
log
.
error
(
"设备
作废
异常:{}"
,
e
.
getMessage
());
log
.
error
(
"设备
dealDataAndAsyncEs
异常:{}"
,
e
.
getMessage
());
}
}
if
(
isForward
)
{
castEvent2EquipEditEvent
(
record
);
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
private
void
castEvent2EquipEditEvent
(
String
record
)
{
publisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
private
void
updateEquipData
(
IdxBizJgUseInfoServiceImpl
idxBizJgUseInfoService
,
String
record
,
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
,
ESEquipmentCategory
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
);
});
}
private
void
castEvent2EquipEditEvent
(
Set
<
String
>
projectContraptionIds
)
{
private
void
castEvent2EquipEditEvent
(
CancelEquipItem
cancelEquipItem
)
{
Set
<
String
>
projectContraptionIds
=
cancelEquipItem
.
getProjectContraptionIds
();
if
(
projectContraptionIds
!=
null
&&
!
projectContraptionIds
.
isEmpty
())
{
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/StatisticsDataUpdateService.java
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
refresh
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.common.api.dto.ITechParamDefine
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParamItem
;
import
com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo
;
import
com.yeejoin.amos.boot.module.common.biz.utils.TechParamUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.backup.TechParamsBackupService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.time.ZoneId
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Service
@RequiredArgsConstructor
@Slf4j
public
class
StatisticsDataUpdateService
{
private
final
TechParamsBackupService
techParamsBackupService
;
public
static
final
String
USE_DATE_KEY
=
"USE_DATE"
;
public
List
<
ESEquipmentInfo
.
TechParam
>
getTechParams
(
String
equList
,
String
record
)
{
List
<
ESEquipmentInfo
.
TechParam
>
techParams
=
new
ArrayList
<>();
...
...
@@ -44,7 +51,7 @@ public class StatisticsDataUpdateService {
/**
*
判断字符串是否为合法的 JSON 格式
* 判断字符串是否为合法的 JSON 格式
*/
public
static
boolean
isJSONValid
(
String
test
)
{
try
{
...
...
@@ -55,13 +62,10 @@ public class StatisticsDataUpdateService {
}
}
public
static
String
castList2String
(
List
<
String
>
posts
){
return
String
.
join
(
","
,
posts
);
}
public
static
String
castStrList2String
(
String
jsonTypesStr
){
if
(!
isNullOrEmpty
(
jsonTypesStr
))
{
if
(
isJSONValid
(
jsonTypesStr
))
{
public
static
String
castStrList2String
(
String
jsonTypesStr
)
{
if
(!
isNullOrEmpty
(
jsonTypesStr
))
{
if
(
isJSONValid
(
jsonTypesStr
))
{
List
<
String
>
posts
=
JSON
.
parseArray
(
jsonTypesStr
,
String
.
class
);
return
String
.
join
(
","
,
posts
);
}
...
...
@@ -74,4 +78,35 @@ public class StatisticsDataUpdateService {
return
str
==
null
||
str
.
trim
().
isEmpty
()
||
"null"
.
equals
(
str
);
}
public
static
void
formatUseDate
(
Map
<
String
,
Object
>
detail
)
{
if
(
detail
.
containsKey
(
USE_DATE_KEY
)
&&
detail
.
get
(
USE_DATE_KEY
)
!=
null
)
{
if
(
detail
.
get
(
USE_DATE_KEY
).
toString
().
isEmpty
()
||
detail
.
get
(
USE_DATE_KEY
).
toString
().
equals
(
"null"
))
{
detail
.
put
(
USE_DATE_KEY
,
null
);
}
else
{
String
useDateStr
=
""
;
try
{
useDateStr
=
detail
.
get
(
USE_DATE_KEY
).
toString
();
detail
.
put
(
USE_DATE_KEY
,
DateUtil
.
parse
(
useDateStr
));
}
catch
(
Exception
e
)
{
log
.
error
(
"非法的USE_DATE格式:{}"
,
useDateStr
);
detail
.
put
(
USE_DATE_KEY
,
null
);
}
}
}
}
public
static
void
formatInspectDate
(
ESEquipmentInfo
esEquipmentInfo
,
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
,
String
record
)
{
try
{
esEquipmentInfo
.
setINSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"INSPECT_DATE时区转换失败:{}"
,
record
,
e
);
}
try
{
esEquipmentInfo
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"NEXT_INSPECT_DATE时区转换失败:{}"
,
record
,
e
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/refresh/adapter/DataRefreshEventBuilderService.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
refresh
.
adapter
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
lombok.RequiredArgsConstructor
;
import
org.eclipse.paho.client.mqttv3.MqttTopic
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Component
@RequiredArgsConstructor
public
class
DataRefreshEventBuilderService
{
private
final
CommonPublisher
publisher
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
processMessage
(
String
topic
,
List
<
String
>
records
)
{
String
[]
topicCxt
=
topic
.
split
(
MqttTopic
.
TOPIC_LEVEL_SEPARATOR
);
if
(
topicCxt
.
length
==
4
)
{
String
dataType
=
topicCxt
[
2
];
String
operation
=
topicCxt
[
3
];
DataRefreshEvent
dataRefreshEvent
=
new
DataRefreshEvent
(
this
,
records
,
dataType
,
DataRefreshEvent
.
Operation
.
valueOf
(
operation
));
publisher
.
publish
(
dataRefreshEvent
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/refresh/adapter/Emq2DataRefreshEvent.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
refresh
.
adapter
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.RequiredArgsConstructor
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
javax.annotation.PostConstruct
;
import
java.nio.charset.StandardCharsets
;
import
java.util.List
;
@Component
@RequiredArgsConstructor
public
class
Emq2DataRefreshEvent
extends
EmqxListener
{
private
final
EmqKeeper
emqKeeper
;
@Value
(
"${data.refresh.tp:data/refresh/+/+}"
)
private
String
dataRefreshTp
;
@Value
(
"${spring.application.name}"
)
private
String
applicationName
;
private
final
DataRefreshEventBuilderService
dataRefreshEventBuilderService
;
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
{
byte
[]
payload
=
message
.
getPayload
();
String
str
=
new
String
(
payload
,
StandardCharsets
.
UTF_8
);
List
<
String
>
records
=
JSONObject
.
parseArray
(
str
,
String
.
class
);
dataRefreshEventBuilderService
.
processMessage
(
topic
,
records
);
}
@PostConstruct
void
init
()
throws
Exception
{
emqKeeper
.
subscript
(
this
.
buildShareTopic
(
dataRefreshTp
),
2
,
this
);
}
private
String
buildShareTopic
(
String
topic
)
{
return
"$share/"
+
applicationName
+
"/"
+
topic
;
}
}
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 @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
refresh
.
handler
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsDataRefreshMessage
;
import
com.yeejoin.amos.boot.module.common.api.service.IDataRefreshHandler
;
...
...
@@ -14,9 +12,9 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import
com.yeejoin.amos.boot.module.jg.biz.refresh.StatisticsDataUpdateService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -26,8 +24,6 @@ import java.time.LocalDate;
import
java.time.ZoneId
;
import
java.util.*
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
@Component
@RequiredArgsConstructor
@Slf4j
...
...
@@ -45,8 +41,6 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
private
final
JgUseRegistrationManageServiceImpl
jgUseRegistrationManageServiceImpl
;
@Override
public
String
supportType
()
{
return
"equipment"
;
...
...
@@ -62,41 +56,19 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
case
UPDATE:
String
record
=
message
.
getDataId
();
ESEquipmentInfo
esEquipmentInfo
=
new
ESEquipmentInfo
();
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
record
);
ESEquipmentCategoryDto
categoryEs
=
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
BeanUtil
.
copyProperties
(
categoryEs
,
esEquipmentInfo
);
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getCreateDate
));
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>()
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgDesignInfo:
:
getRecord
,
IdxBizJgDesignInfo:
:
getDesignUnitName
,
IdxBizJgDesignInfo:
:
getDesignUnitCreditCode
,
IdxBizJgDesignInfo:
:
getDesignDate
));
IdxBizJgFactoryInfo
factoryInfo
=
factoryInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>()
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgFactoryInfo:
:
getRecord
,
IdxBizJgFactoryInfo:
:
getProduceUnitCreditCode
));
IdxBizJgRegisterInfo
registerInfo
=
registerInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgRegisterInfo:
:
getRecord
,
IdxBizJgRegisterInfo:
:
getWhetherSphericalTank
,
IdxBizJgRegisterInfo:
:
getUseOrgCode
));
Map
<
String
,
Object
>
detail
=
useInfoService
.
getBaseMapper
().
queryDetail
(
record
);
StatisticsDataUpdateService
.
formatUseDate
(
detail
);
BeanUtil
.
copyProperties
(
detail
,
esEquipmentInfo
,
true
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfos
=
iIdxBizJgInspectionDetectionInfoService
.
queryLastedGroupByInspectType
(
record
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgMaintenanceRecordInfo
lastMaintenanceRecordInfo
=
maintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
try
{
esEquipmentInfo
.
setDesignDate
(
designInfo
.
getDesignDate
()
!=
null
?
designInfo
.
getDesignDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
);
esEquipmentInfo
.
setINSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
esEquipmentInfo
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
esEquipmentInfo
.
setCreateDate
(
useInfo
.
getCreateDate
()
!=
null
?
useInfo
.
getCreateDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
()
:
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"时区转换失败:{}"
,
record
,
e
);
}
esEquipmentInfo
.
setUSE_ORG_CODE
(
registerInfo
.
getUseOrgCode
());
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
registerInfo
.
getUseOrgCode
()));
esEquipmentInfo
.
setWhetherSphericalTank
(
registerInfo
.
getWhetherSphericalTank
());
esEquipmentInfo
.
setDesignUnitCreditCode
(
designInfo
.
getDesignUnitCreditCode
());
StatisticsDataUpdateService
.
formatInspectDate
(
esEquipmentInfo
,
inspectionDetectionInfo
,
record
);
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
esEquipmentInfo
.
getUSE_ORG_CODE
()));
esEquipmentInfo
.
setMAINTAIN_UNIT
(
lastMaintenanceRecordInfo
.
getMeUnitCreditCode
());
esEquipmentInfo
.
setMAINTAIN_UNIT_NAME
(
lastMaintenanceRecordInfo
.
getMeUnitName
());
esEquipmentInfo
.
setDesignUnitName
(
designInfo
.
getDesignUnitName
());
esEquipmentInfo
.
setProduceUnitCreditCode
(
factoryInfo
.
getProduceUnitCreditCode
());
esEquipmentInfo
.
setInspections
(
BeanUtil
.
copyToList
(
inspectionDetectionInfos
,
ESEquipmentInfo
.
Inspection
.
class
));
esEquipmentInfo
.
setMaintenances
(
lastMaintenanceRecordInfo
.
getSequenceNbr
()
!=
null
?
Collections
.
singletonList
(
BeanUtil
.
copyProperties
(
lastMaintenanceRecordInfo
,
ESEquipmentInfo
.
Maintenance
.
class
))
:
new
ArrayList
<>());
esEquipmentInfo
.
setTechParams
(
this
.
buildTechParamByEquList
(
record
,
categoryEs
.
getEQU_LIST_CODE
()));
esEquipmentInfo
.
setTechParams
(
this
.
buildTechParamByEquList
(
record
,
esEquipmentInfo
.
getEQU_LIST_CODE
()));
esEquipmentDao
.
save
(
esEquipmentInfo
);
break
;
default
:
...
...
@@ -104,20 +76,21 @@ public class EquipmentRefreshHandler implements IDataRefreshHandler {
}
}
private
List
<
ESEquipmentInfo
.
TechParam
>
buildTechParamByEquList
(
String
record
,
String
equListCode
)
{
return
StringUtils
.
isNotEmpty
(
equListCode
)
?
statisticsDataUpdateService
.
getTechParams
(
equListCode
,
record
)
:
new
ArrayList
<>();
}
private
LocalDate
getIssueDate
(
String
useRegistrationCode
){
if
(
StringUtils
.
isEmpty
(
useRegistrationCode
))
{
return
null
;
private
LocalDate
getIssueDate
(
String
useRegistrationCode
)
{
if
(
StringUtils
.
isEmpty
(
useRegistrationCode
))
{
return
null
;
}
LambdaQueryWrapper
<
JgUseRegistrationManage
>
useRegistrationManageWrapper
=
new
LambdaQueryWrapper
<>();
useRegistrationManageWrapper
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationCode
)
.
isNotNull
(
JgUseRegistrationManage:
:
getUseRegistrationCode
)
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
"已登记"
)
.
eq
(
BaseEntity:
:
getIsDelete
,
false
).
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getRegDate
);
JgUseRegistrationManage
manage
=
jgUseRegistrationManageServiceImpl
.
getBaseMapper
().
selectOne
(
useRegistrationManageWrapper
);
return
Optional
.
ofNullable
(
manage
).
map
(
JgUseRegistrationManage:
:
getRegDate
).
map
(
d
->
d
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()).
orElse
(
null
);
.
eq
(
BaseEntity:
:
getIsDelete
,
false
).
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getRegDate
);
JgUseRegistrationManage
manage
=
jgUseRegistrationManageServiceImpl
.
getBaseMapper
().
selectOne
(
useRegistrationManageWrapper
);
return
Optional
.
ofNullable
(
manage
).
map
(
JgUseRegistrationManage:
:
getRegDate
).
map
(
d
->
d
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()).
orElse
(
null
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/biz/factory/QualityScoreUpdateFactory.java
View file @
1d06bb4d
...
...
@@ -3,11 +3,14 @@ package com.yeejoin.amos.boot.module.jg.biz.reminder.biz.factory;
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
lombok.RequiredArgsConstructor
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
...
...
@@ -18,7 +21,7 @@ public class QualityScoreUpdateFactory {
private
final
Map
<
String
,
IQualityScoreUpdate
>
qualityScoreUpdaterMap
=
new
ConcurrentHashMap
<>();
p
ublic
IQualityScoreUpdate
getUpdater
(
EquipCreateOrEditEvent
.
EquipType
equipType
)
{
p
rivate
IQualityScoreUpdate
getUpdater
(
EquipCreateOrEditEvent
.
EquipType
equipType
)
{
return
qualityScoreUpdaterMap
.
computeIfAbsent
(
equipType
.
name
(),
(
k
)
->
{
for
(
IQualityScoreUpdate
qualityScoreUpdater
:
qualityScoreUpdaters
)
{
if
(
qualityScoreUpdater
.
support
(
equipType
))
{
...
...
@@ -28,4 +31,12 @@ public class QualityScoreUpdateFactory {
throw
new
BadRequest
(
"not found updater handler for "
+
equipType
.
name
());
});
}
@Async
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
EquipCreateOrEditEvent
.
EquipType
equipType
,
String
bizType
,
Set
<
String
>
recordOrPIds
)
{
IQualityScoreUpdate
qualityScoreUpdateHandler
=
getUpdater
(
equipType
);
qualityScoreUpdateHandler
.
doUpdate
(
bizType
,
recordOrPIds
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/reminder/biz/useRegister/UseRegisterReminderAdapter.java
View file @
1d06bb4d
...
...
@@ -47,7 +47,7 @@ public class UseRegisterReminderAdapter extends DefaultReminder {
List
<
ReminderItemDto
>
re
=
new
ArrayList
<>();
// 创建后, 监管通过时使用
JgUseRegistration
useRegistration
=
useRegisterReminderParse
.
getJgUseRegistrationMapper
().
selectById
(
bizId
);
// 压力管道
// 压力管道
- 左侧设备类别以装置为维度
if
(
StringUtils
.
isNotEmpty
(
useRegistration
.
getProjectContraptionId
()))
{
String
projectContraptionId
=
useRegistration
.
getProjectContraptionId
();
IdxBizJgProjectContraption
projectContraption
=
useRegisterReminderParse
.
getIdxBizJgProjectContraptionServiceImpl
().
getById
(
projectContraptionId
);
...
...
@@ -58,7 +58,7 @@ public class UseRegisterReminderAdapter extends DefaultReminder {
reminderItemDto
.
setDetailData
(
this
.
buildProjectContraptionByStatus
(
useRegistration
,
useRegistration
.
getProjectContraptionId
()));
re
.
add
(
reminderItemDto
);
}
// 气瓶
// 气瓶
-左侧以气瓶为维度
if
(
StringUtils
.
isEmpty
(
useRegistration
.
getProjectContraptionId
())
&&
"unit"
.
equals
(
useRegistration
.
getManageType
()))
{
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
useRegistration
.
getSequenceNbr
());
...
...
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/DefaultReminder.java
View file @
1d06bb4d
...
...
@@ -59,7 +59,7 @@ public abstract class DefaultReminder implements IReminderHandler {
/**
* 获取指定设备、装置、单据下的设备、管道列表-评分使用;台套-台套设备;气瓶-气瓶;
装置
-装置
* 获取指定设备、装置、单据下的设备、管道列表-评分使用;台套-台套设备;气瓶-气瓶;
管道
-装置
*
* @param bizId 唯一标识
* @return 设备/管道列表
...
...
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 @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
reminder
.
core
.
event
.
adapter
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.common.biz.constats.Constants
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.EmptyDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.EquipCreateOrEditEvent
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -14,13 +15,13 @@ import org.springframework.transaction.event.TransactionalEventListener;
@Component
@RequiredArgsConstructor
@Slf4j
public
class
EditEventAdapter
{
public
class
BizDataChange2
EditEventAdapter
{
private
final
ApplicationEventPublisher
publisher
;
@TransactionalEventListener
(
phase
=
TransactionPhase
.
AFTER_COMMIT
)
@TransactionalEventListener
(
phase
=
TransactionPhase
.
AFTER_COMMIT
,
value
=
{
EmptyDataChangeEvent
.
class
}
)
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
public
void
handleEventAsync
(
BaseBiz
DataChangeEvent
event
)
{
public
void
handleEventAsync
(
Empty
DataChangeEvent
event
)
{
log
.
info
(
"receive editEvent handleEventAAsync eventA={}"
,
event
);
try
{
publisher
.
publishEvent
(
convertToEvent
(
event
));
...
...
@@ -30,10 +31,16 @@ public class EditEventAdapter {
}
private
EquipCreateOrEditEvent
convertToEvent
(
BaseBizDataChangeEvent
eventA
)
{
/**
* 特殊处理由于其他业务类型还没评分准则,故使用设备或者装置的
*
* @param eventA 事件
* @return 转换后事件
*/
private
EquipCreateOrEditEvent
convertToEvent
(
EmptyDataChangeEvent
eventA
)
{
return
new
EquipCreateOrEditEvent
(
this
,
eventA
.
getBizRelationData
().
get
BizType
()
,
eventA
.
getBizRelationData
().
get
ProjectContraptionIds
().
isEmpty
()
?
Constants
.
JG_EDIT_EQUIP
:
Constants
.
JG_EDIT_PROJECT
,
eventA
.
getBizRelationData
().
getProjectContraptionIds
().
isEmpty
()
?
eventA
.
getBizRelationData
().
getRecords
()
:
eventA
.
getBizRelationData
().
getProjectContraptionIds
(),
eventA
.
getBizRelationData
().
getProjectContraptionIds
().
isEmpty
()
?
EquipCreateOrEditEvent
.
EquipType
.
equip
:
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/listener/EquipOperationEventHandler.java
View file @
1d06bb4d
...
...
@@ -60,6 +60,6 @@ public class EquipOperationEventHandler {
private
void
processEvent
(
EquipCreateOrEditEvent
event
)
{
qualityScoreUpdateFactory
.
getUpdater
(
event
.
getEquipType
()).
update
(
event
.
getBizType
(),
event
.
getUpdatedIds
());
qualityScoreUpdateFactory
.
update
(
event
.
getEquipType
(),
event
.
getBizType
(),
event
.
getUpdatedIds
());
}
}
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/DefaultQualityScoreUpdateService.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
reminder
.
core
.
event
.
service
;
import
java.util.Set
;
public
abstract
class
DefaultQualityScoreUpdateService
implements
IQualityScoreUpdate
{
/**
* 前置处理-定义目前支持的业务类型,由于目前仅实现使用登记、新增设备、新增装置、大编辑设备、大编辑装置、安装告知准则,
* 所有都实现后返回true即可
* @param bizType 业务类型
* @return 是否通过前置检验
*/
protected
abstract
Boolean
shouldProcess
(
String
bizType
);
public
void
doUpdate
(
String
bizType
,
Set
<
String
>
recordOrPIds
)
{
if
(
shouldProcess
(
bizType
))
{
doHandle
(
bizType
,
recordOrPIds
);
}
afterHandle
(
recordOrPIds
);
}
/**
* 执行
* @param bizType 业务类型
* @param recordOrPIds 装置或者设备id集合
*/
protected
abstract
void
doHandle
(
String
bizType
,
Set
<
String
>
recordOrPIds
);
/**
* 事后处理
* @param recordOrPIds 装置或者设备id集合
*/
protected
abstract
void
afterHandle
(
Set
<
String
>
recordOrPIds
);
}
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/IQualityScoreUpdate.java
View file @
1d06bb4d
...
...
@@ -7,5 +7,5 @@ import java.util.Set;
public
interface
IQualityScoreUpdate
{
Boolean
support
(
EquipCreateOrEditEvent
.
EquipType
equipType
);
void
update
(
String
bizType
,
Set
<
String
>
biz
Ids
);
void
doUpdate
(
String
bizType
,
Set
<
String
>
recordOrP
Ids
);
}
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 @
1d06bb4d
...
...
@@ -5,11 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
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.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.biz.constats.Constants
;
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.jg.api.dto.ReminderItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
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.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.
IQualityScoreUpdat
e
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.
DefaultQualityScoreUpdateServic
e
;
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.service.impl.IdxBizJgRegisterInfoServiceImpl
;
...
...
@@ -19,19 +23,14 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.*
;
@Component
@RequiredArgsConstructor
public
class
EquipQualityScoreUpdateService
implements
IQualityScoreUpdat
e
{
public
class
EquipQualityScoreUpdateService
extends
DefaultQualityScoreUpdateServic
e
{
private
final
ESEquipmentCategory
equipmentCategoryDao
;
...
...
@@ -46,37 +45,17 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
private
final
GradeStrategyFactory
gradeStrategyFactory
;
@Autowired
EquipmentCategoryService
equipmentCategoryService
;
private
final
EquipmentCategoryService
equipmentCategoryService
;
private
final
EventPublisher
eventPublisher
;
@Override
public
Boolean
support
(
EquipCreateOrEditEvent
.
EquipType
equipType
)
{
return
EquipCreateOrEditEvent
.
EquipType
.
equip
.
equals
(
equipType
);
}
@Async
@Override
public
void
update
(
String
bizType
,
Set
<
String
>
records
)
{
records
.
parallelStream
().
forEach
(
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
);
op
.
ifPresent
(
equipmentCategory
->
{
equipmentCategory
.
setDataQualityScore
(
level
);
equipmentCategoryService
.
saveWithImmediateRefresh
(
equipmentCategory
);
});
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
TzsBaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgUseInfoService
.
update
(
updateWrapper
);
});
}
p
ublic
Integer
getReminderLevel
(
String
bizType
,
String
record
)
{
p
rivate
Integer
getReminderLevel
(
String
bizType
,
String
record
)
{
MatchItemDto
matchItemDto
=
MatchItemDto
.
builder
().
build
();
IdxBizJgUseInfo
useInfo
=
getIdxBizJgUseInfo
(
record
);
IdxBizJgRegisterInfo
registerInfo
=
getIdxBizJgRegisterInfo
(
record
);
...
...
@@ -111,4 +90,44 @@ public class EquipQualityScoreUpdateService implements IQualityScoreUpdate {
IdxBizJgRegisterInfo:
:
getWhetherVehicleCylinder
,
IdxBizJgRegisterInfo:
:
getProductName
));
}
private
void
sendDataRefreshMsgEquip
(
List
<
String
>
records
)
{
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
@Override
protected
Boolean
shouldProcess
(
String
bizType
)
{
return
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
name
().
equals
(
bizType
)
||
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
name
().
equals
(
bizType
)
||
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
().
equals
(
bizType
)
||
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
name
().
equals
(
bizType
)
||
Constants
.
JG_EDIT_EQUIP
.
equals
(
bizType
);
}
@Override
protected
void
doHandle
(
String
bizType
,
Set
<
String
>
recordOrPIds
)
{
recordOrPIds
.
forEach
(
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
);
op
.
ifPresent
(
equipmentCategory
->
{
equipmentCategory
.
setDataQualityScore
(
level
);
equipmentCategoryService
.
saveWithImmediateRefresh
(
equipmentCategory
);
});
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
TzsBaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgUseInfoService
.
update
(
updateWrapper
);
});
}
@Override
protected
void
afterHandle
(
Set
<
String
>
recordOrPIds
)
{
// 事务提交后发送数据变更消息
this
.
sendDataRefreshMsgEquip
(
new
ArrayList
<>(
recordOrPIds
));
}
}
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 @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
reminder
.
core
.
event
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.biz.constats.Constants
;
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.enums.BusinessTypeEnum
;
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.core.event.EquipCreateOrEditEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.
IQualityScoreUpdat
e
;
import
com.yeejoin.amos.boot.module.jg.biz.reminder.core.event.service.
DefaultQualityScoreUpdateServic
e
;
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.service.IIdxBizJgUseInfoService
;
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.IdxBizJgUseInfo
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Component
@RequiredArgsConstructor
public
class
ProjectQualityScoreUpdateService
implements
IQualityScoreUpdat
e
{
public
class
ProjectQualityScoreUpdateService
extends
DefaultQualityScoreUpdateServic
e
{
private
final
GradeStrategyFactory
gradeStrategyFactory
;
private
final
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionService
;
private
final
IIdxBizJgUseInfoService
idxBizJgUseInfoService
;
private
final
EventPublisher
eventPublisher
;
@Value
(
"${grade.calculation.strategy:MAX_GRADE}"
)
private
String
activeStrategy
;
...
...
@@ -38,21 +50,7 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
return
EquipCreateOrEditEvent
.
EquipType
.
project
.
equals
(
equipType
);
}
@Async
@Override
public
void
update
(
String
bizType
,
Set
<
String
>
projectContraptionIds
)
{
projectContraptionIds
.
parallelStream
().
forEach
(
projectContraptionId
->
{
Integer
level
=
this
.
getReminderLevel
(
bizType
,
projectContraptionId
);
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
});
}
public
Integer
getReminderLevel
(
String
bizType
,
String
projectContraptionId
)
{
private
Integer
getReminderLevel
(
String
bizType
,
String
projectContraptionId
)
{
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionService
.
getById
(
projectContraptionId
);
MatchItemDto
matchItemDto
=
MatchItemDto
.
builder
().
build
();
matchItemDto
.
setBizType
(
bizType
);
...
...
@@ -67,6 +65,42 @@ public class ProjectQualityScoreUpdateService implements IQualityScoreUpdate {
reminderItemDto
.
setEquipName
(
projectContraption
.
getProjectContraption
());
reminderItemDto
.
setDetailData
(
BeanUtil
.
beanToMap
(
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
));
}
@Override
protected
Boolean
shouldProcess
(
String
bizType
)
{
return
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
name
().
equals
(
bizType
)
||
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
name
().
equals
(
bizType
)
||
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
().
equals
(
bizType
)
||
Constants
.
JG_EDIT_PROJECT
.
equals
(
bizType
);
}
@Override
protected
void
doHandle
(
String
bizType
,
Set
<
String
>
projectContraptionIds
)
{
projectContraptionIds
.
forEach
(
projectContraptionId
->
{
Integer
level
=
this
.
getReminderLevel
(
bizType
,
projectContraptionId
);
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
projectContraptionId
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getDataQualityScore
,
level
);
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
new
Date
());
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
});
}
@Override
protected
void
afterHandle
(
Set
<
String
>
projectContraptionIds
)
{
this
.
sendDataRefreshMsg
(
projectContraptionIds
);
}
}
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/CommonServiceImpl.java
View file @
1d06bb4d
...
...
@@ -3190,7 +3190,7 @@ public class CommonServiceImpl implements ICommonService {
*/
public
String
castDataQualityScore2Name
(
String
dataQualityScore
,
Boolean
isIntoManagement
){
String
name
=
dataDictTypeHandler
.
handle
(
DATA_QUALITY_SCORE
,
dataQualityScore
);
return
name
==
null
?
(
isIntoManagement
==
null
||
!
isIntoManagement
)
?
"
Ⅱ级"
:
"Ⅲ级
"
:
name
;
return
name
==
null
?
(
isIntoManagement
==
null
||
!
isIntoManagement
)
?
"
二类"
:
"一类
"
:
name
;
}
public
void
setDataQualityScore2Json
(
Map
<
String
,
Object
>
result
,
String
bizId
,
BusinessTypeEnum
businessTypeEnum
)
{
...
...
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 @
1d06bb4d
...
...
@@ -186,7 +186,6 @@ public class DataDockServiceImpl {
})).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
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
;
}
...
...
@@ -2460,7 +2459,6 @@ public class DataDockServiceImpl {
})).
toArray
(
CompletableFuture
[]::
new
)
).
join
();
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
;
}
...
...
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/DataHandlerServiceImpl.java
View file @
1d06bb4d
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.LocalDateTimeUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -137,7 +136,6 @@ public class DataHandlerServiceImpl {
private
final
IdxBizJgMaintenanceRecordInfoServiceImpl
maintenanceRecordInfoService
;
private
static
final
String
ROOT_ORG_CODE
=
"50"
;
private
final
IdxBizJgDesignInfoServiceImpl
idxBizJgDesignInfoServiceImpl
;
private
final
StatisticsDataUpdateService
statisticsDataUpdateService
;
...
...
@@ -1511,54 +1509,34 @@ public class DataHandlerServiceImpl {
ESEquipmentInfo
esEquipmentInfo
=
null
;
try
{
esEquipmentInfo
=
new
ESEquipmentInfo
();
Optional
<
ESEquipmentCategoryDto
>
categoryDto
=
esEquipmentCategory
.
findById
(
record
);
// 兼容243 es 被删除逻辑
ESEquipmentCategoryDto
categoryEs
=
categoryDto
.
orElseGet
(()
->
{
Map
<
String
,
Object
>
map
=
categoryOtherInfoMapper
.
selectDataById
(
record
);
return
JSON
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
});
BeanUtil
.
copyProperties
(
categoryEs
,
esEquipmentInfo
);
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getCreateDate
));
IdxBizJgDesignInfo
designInfo
=
idxBizJgDesignInfoServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>()
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgDesignInfo:
:
getRecord
,
IdxBizJgDesignInfo:
:
getDesignUnitName
,
IdxBizJgDesignInfo:
:
getDesignUnitCreditCode
,
IdxBizJgDesignInfo:
:
getDesignDate
));
IdxBizJgFactoryInfo
factoryInfo
=
factoryInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>()
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgFactoryInfo:
:
getRecord
,
IdxBizJgFactoryInfo:
:
getProduceUnitCreditCode
));
IdxBizJgRegisterInfo
registerInfo
=
registerInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgRegisterInfo:
:
getRecord
,
IdxBizJgRegisterInfo:
:
getWhetherSphericalTank
,
IdxBizJgRegisterInfo:
:
getUseOrgCode
));
Map
<
String
,
Object
>
detail
=
useInfoService
.
getBaseMapper
().
queryDetail
(
record
);
StatisticsDataUpdateService
.
formatUseDate
(
detail
);
BeanUtil
.
copyProperties
(
detail
,
esEquipmentInfo
,
true
);
Optional
<
ESEquipmentCategoryDto
>
esOptional
=
esEquipmentCategory
.
findById
(
record
);
if
(
esOptional
.
isPresent
()){
ESEquipmentCategoryDto
dto
=
esOptional
.
get
();
esEquipmentInfo
.
setUSC_UNIT_CREDIT_CODE
(
dto
.
getUSC_UNIT_CREDIT_CODE
());
esEquipmentInfo
.
setUSC_UNIT_NAME
(
dto
.
getUSC_UNIT_NAME
());
esEquipmentInfo
.
setIS_DO_BUSINESS
(
dto
.
getIS_DO_BUSINESS
());
}
// 检验信息按照不同检验类型,存最新的一条
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfos
=
iIdxBizJgInspectionDetectionInfoService
.
queryLastedGroupByInspectType
(
record
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgMaintenanceRecordInfo
lastMaintenanceRecordInfo
=
maintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
try
{
esEquipmentInfo
.
setDesignDate
(
designInfo
.
getDesignDate
()
!=
null
?
designInfo
.
getDesignDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
);
esEquipmentInfo
.
setINSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
esEquipmentInfo
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
:
null
);
esEquipmentInfo
.
setCreateDate
(
useInfo
.
getCreateDate
()
!=
null
?
useInfo
.
getCreateDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
()
:
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"时区转换失败:{}"
,
record
,
e
);
}
esEquipmentInfo
.
setUSE_ORG_CODE
(
registerInfo
.
getUseOrgCode
());
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
registerInfo
.
getUseOrgCode
()));
esEquipmentInfo
.
setWhetherSphericalTank
(
registerInfo
.
getWhetherSphericalTank
());
esEquipmentInfo
.
setDesignUnitCreditCode
(
designInfo
.
getDesignUnitCreditCode
());
StatisticsDataUpdateService
.
formatInspectDate
(
esEquipmentInfo
,
inspectionDetectionInfo
,
record
);
esEquipmentInfo
.
setIssueDate
(
getIssueDate
(
esEquipmentInfo
.
getUSE_ORG_CODE
()));
esEquipmentInfo
.
setMAINTAIN_UNIT
(
lastMaintenanceRecordInfo
.
getMeUnitCreditCode
());
esEquipmentInfo
.
setMAINTAIN_UNIT_NAME
(
lastMaintenanceRecordInfo
.
getMeUnitName
());
esEquipmentInfo
.
setDesignUnitName
(
designInfo
.
getDesignUnitName
());
esEquipmentInfo
.
setProduceUnitCreditCode
(
factoryInfo
.
getProduceUnitCreditCode
());
esEquipmentInfo
.
setInspections
(
BeanUtil
.
copyToList
(
inspectionDetectionInfos
,
ESEquipmentInfo
.
Inspection
.
class
));
esEquipmentInfo
.
setMaintenances
(
lastMaintenanceRecordInfo
.
getSequenceNbr
()
!=
null
?
Collections
.
singletonList
(
BeanUtil
.
copyProperties
(
lastMaintenanceRecordInfo
,
ESEquipmentInfo
.
Maintenance
.
class
))
:
new
ArrayList
<>());
esEquipmentInfo
.
setTechParams
(
this
.
buildTechParamByEquList
(
record
,
categoryEs
.
getEQU_LIST_CODE
()));
esEquipmentInfo
.
setTechParams
(
this
.
buildTechParamByEquList
(
record
,
esEquipmentInfo
.
getEQU_LIST_CODE
()));
}
catch
(
Exception
e
)
{
// 异常数据跳过
log
.
error
(
"设备刷数据处理失败:{}"
,
record
,
e
);
}
return
esEquipmentInfo
;
}).
collect
(
Collectors
.
toList
());
esEquipmentInfos
.
remove
(
null
);
esEquipmentInfos
=
esEquipmentInfos
.
stream
().
filter
(
e
->
StringUtils
.
isNotEmpty
(
e
.
getSEQUENCE_NBR
())).
collect
(
Collectors
.
toList
()
);
if
(!
esEquipmentInfos
.
isEmpty
()){
esEquipmentDao
.
saveAll
(
esEquipmentInfos
);
}
...
...
@@ -1570,6 +1548,8 @@ public class DataHandlerServiceImpl {
return
refreshRecords
.
size
();
}
private
List
<
ESEquipmentInfo
.
TechParam
>
buildTechParamByEquList
(
String
record
,
String
equListCode
)
{
return
StringUtils
.
isNotEmpty
(
equListCode
)
?
statisticsDataUpdateService
.
getTechParams
(
equListCode
,
record
)
:
new
ArrayList
<>();
}
...
...
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
1d06bb4d
...
...
@@ -570,10 +570,11 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdateDetectionInfoBatch
(
JSONObject
jsonObject
)
{
if
(
Objects
.
nonNull
(
jsonObject
)){
JSONArray
records
=
jsonObject
.
getJSONArray
(
"records"
);
if
(
CollectionUtil
.
isNotEmpty
(
records
)){
JSONArray
items
=
jsonObject
.
getJSONArray
(
"records"
);
Set
<
String
>
records
=
new
HashSet
<>();
if
(
CollectionUtil
.
isNotEmpty
(
items
)){
List
<
IdxBizJgInspectionDetectionInfo
>
jgInspectionDetectionInfos
=
new
ArrayList
<>();
for
(
Object
record
:
record
s
)
{
for
(
Object
record
:
item
s
)
{
IdxBizJgInspectionDetectionInfo
detectionInfo
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
record
),
IdxBizJgInspectionDetectionInfo
.
class
);
if
(
Objects
.
nonNull
(
detectionInfo
)){
if
(
record
instanceof
LinkedHashMap
){
...
...
@@ -581,6 +582,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
detectionInfo
.
setRecDate
(
new
Date
());
detectionInfo
.
setSequenceNbr
((
String
)
map
.
get
(
"detectionInfoSequenceNbr"
));
detectionInfo
.
setInspectConclusion
((
String
)
map
.
get
(
"inspectConclusionCode"
));
records
.
add
(
detectionInfo
.
getRecord
());
jgInspectionDetectionInfos
.
add
(
detectionInfo
);
}
}
...
...
@@ -588,6 +590,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
if
(
CollUtil
.
isNotEmpty
(
jgInspectionDetectionInfos
)){
detectionInfoService
.
saveOrUpdateBatch
(
jgInspectionDetectionInfos
);
}
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
new
ArrayList
<>(
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/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
1d06bb4d
...
...
@@ -437,39 +437,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ResponseModel
responseModel
=
this
.
pipelineEquipCreateOrUpdate
(
paramMap
);
Long
projectContraptionId
=
(
Long
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
Sets
.
newHashSet
(
projectContraptionId
.
toString
()),
EquipCreateOrEditEvent
.
EquipType
.
project
));
this
.
sendDataRefreshMsgProjectContraption
(
projectContraptionId
);
return
responseModel
;
}
if
(
dataSource
.
contains
(
"black"
)){
ResponseModel
responseModel
=
this
.
blackEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
return
responseModel
;
}
else
{
ResponseModel
responseModel
=
this
.
otherEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
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
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
DataRefreshEvent
(
this
,
new
ArrayList
<>(
recordSet
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
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/JgChangeRegistrationReformServiceImpl.java
View file @
1d06bb4d
...
...
@@ -628,6 +628,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
null
,
jgChangeRegistrationReform
.
getApplyNo
());
// 生成流水信息
saveRecord
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
,
taskV2Model
);
this
.
clearUscWInfo
(
jgChangeRegistrationReform
);
}
else
{
// 压力管道逻辑
// 1.批量更新技术参数
// 1.1 技术参数更新
...
...
@@ -681,6 +682,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
});
}
private
void
clearUscWInfo
(
JgChangeRegistrationReform
reform
)
{
List
<
JgChangeRegistrationReformEq
>
reformEqs
=
jgChangeRegistrationReformEqMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
JgChangeRegistrationReformEq:
:
getEquipTransferId
,
reform
.
getSequenceNbr
()));
reformEqs
.
forEach
(
reformEq
->
{
// 数据库表清空
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
reformEq
.
getEquId
());
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUSC_UNIT_CREDIT_CODE
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUSC_UNIT_NAME
,
null
);
idxBizJgUseInfoService
.
update
(
updateWrapper
);
// es清空
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
reformEq
.
getEquId
());
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setUSC_UNIT_NAME
(
null
);
esEquipmentCategoryDto
.
setUSC_UNIT_CREDIT_CODE
(
null
);
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
});
}
private
void
saveCertFlowBatch
(
JgChangeRegistrationReform
jgChangeRegistrationReform
,
List
<
IdxBizJgTechParamsPipeline
>
paramsPipelines
,
TaskV2Model
taskV2Model
)
{
// 1.更新使用登记证信息
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
1d06bb4d
...
...
@@ -1230,7 +1230,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
);
}
//场车更新车牌号
if
(
"5000"
.
equals
(
dto
.
getEquListCode
())
&&
newCarNumber
!=
null
&&
useCode
!=
null
){
if
(
"5000"
.
equals
(
dto
.
getEquListCode
())
&&
newCarNumber
!=
null
&&
!
"null"
.
equals
(
newCarNumber
)
&&
useCode
!=
null
){
idxBizJgRegisterInfoService
.
update
(
new
IdxBizJgRegisterInfo
().
setCarNumber
(
newCarNumber
),
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useCode
)
);
...
...
@@ -1289,6 +1289,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto
.
getRegistrationList
().
stream
()
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
.
map
(
item
->
String
.
valueOf
(
item
.
get
(
"newCarNumber"
)))
.
filter
(
carNumber
->
carNumber
!=
null
&&
!
"null"
.
equalsIgnoreCase
(
carNumber
.
trim
()))
.
findFirst
()
.
ifPresent
(
registrationManage:
:
setCarNumber
);
}
...
...
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/JgChangeVehicleRegistrationUnitServiceImpl.java
View file @
1d06bb4d
...
...
@@ -597,9 +597,9 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
dataList
.
forEach
(
item
->
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
item
));
JgCertificateChangeRecordEq
jgCertificateChangeRecordEq
=
new
JgCertificateChangeRecordEq
();
jgCertificateChangeRecordEq
.
setEquId
(
object
.
get
(
"record"
).
toString
(
));
jgCertificateChangeRecordEq
.
setEquId
(
Objects
.
toString
(
object
.
get
(
"record"
),
""
));
jgCertificateChangeRecordEq
.
setChangeRecordId
(
jgCertificateChangeRecord
.
getSequenceNbr
().
toString
());
jgCertificateChangeRecordEq
.
setProductCode
(
object
.
get
(
"factoryNum"
).
toString
(
));
jgCertificateChangeRecordEq
.
setProductCode
(
Objects
.
toString
(
object
.
get
(
"factoryNum"
),
""
));
jgCertificateChangeRecordEqs
.
add
(
jgCertificateChangeRecordEq
);
});
// 保存设备流水信息
...
...
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/JgEquipTransferServiceImpl.java
View file @
1d06bb4d
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.map.MapBuilder;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -13,6 +14,8 @@ import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao
;
import
com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransferEq
;
...
...
@@ -39,6 +42,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
...
@@ -107,6 +111,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
@Autowired
private
JgRegistrationHistoryMapper
jgRegistrationHistoryMapper
;
@Autowired
private
final
EsEquipmentDao
esEquipmentDao
;
@Autowired
private
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
/**
* 保存和保存并提交
*
...
...
@@ -601,6 +610,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
.
build
())
.
build
();
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
updateEsEquipment
(
equipTransferEq
,
jgEquipTransfer
);
writeUsc2UseInfo
(
equipTransferEq
,
jgEquipTransfer
);
});
}
// 上个代办改为已办
...
...
@@ -646,6 +657,23 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
}
}
private
void
writeUsc2UseInfo
(
JgEquipTransferEq
equipTransferEq
,
JgEquipTransfer
jgEquipTransfer
)
{
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
lambdaUpdateWrapper
=
new
LambdaUpdateWrapper
<>();
lambdaUpdateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
equipTransferEq
.
getEquId
());
lambdaUpdateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUSC_UNIT_CREDIT_CODE
,
jgEquipTransfer
.
getInstallUnitCreditCode
());
lambdaUpdateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUSC_UNIT_NAME
,
jgEquipTransfer
.
getInstallUnitName
());
idxBizJgUseInfoServiceImpl
.
update
(
lambdaUpdateWrapper
);
}
private
void
updateEsEquipment
(
JgEquipTransferEq
equipTransferEq
,
JgEquipTransfer
jgEquipTransfer
)
{
Optional
<
ESEquipmentInfo
>
optionalESEquipmentInfo
=
esEquipmentDao
.
findById
(
equipTransferEq
.
getEquId
());
optionalESEquipmentInfo
.
ifPresent
(
esEquipmentInfo
->
{
esEquipmentInfo
.
setUSC_UNIT_NAME
(
jgEquipTransfer
.
getInstallUnitName
());
esEquipmentInfo
.
setUSC_UNIT_CREDIT_CODE
(
jgEquipTransfer
.
getInstallUnitCreditCode
());
esEquipmentDao
.
save
(
esEquipmentInfo
);
});
}
public
InstanceRuntimeData
buildInstanceRuntimeData
(
JgEquipTransfer
jgEquipTransfer
)
{
return
InstanceRuntimeData
.
builder
()
.
nextExecuteUserIds
(
jgEquipTransfer
.
getNextExecuteUserIds
())
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
1d06bb4d
...
...
@@ -76,6 +76,7 @@ import org.redisson.api.RedissonClient;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -198,7 +199,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
EventPublisher
eventPublisher
;
@Autowired
private
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
@Autowired
@Lazy
private
JgReformNoticeServiceImpl
jgReformNoticeService
;
@Autowired
private
JgTransferNoticeServiceImpl
jgTransferNoticeService
;
...
...
@@ -413,7 +416,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"equDefineName"
,
projectContraption
.
getEquDefineName
());
equipListMaps
=
projectContraptionService
.
getBaseMapper
().
selectEquipList
(
projectContraptionId
);
equipListMaps
.
forEach
(
item
->
item
.
put
(
"deviceLevel"
,
Optional
.
ofNullable
(
dataDictionaryMapper
.
getByCode
(
String
.
valueOf
(
item
.
get
(
"deviceLevel"
)),
"8300"
))
item
.
put
(
"deviceLevel"
,
Optional
.
ofNullable
(
dataDictionaryMapper
.
getByCode
(
String
.
valueOf
(
item
.
get
(
"deviceLevel"
)),
projectContraption
.
getEquCategory
()
))
.
map
(
DataDictionary:
:
getName
)
.
orElse
(
""
)));
}
else
{
...
...
@@ -1438,6 +1441,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
.
collect
(
Collectors
.
toList
())
);
}
// 更新关联设备表
jgInstallationNoticeEqService
.
updateBatchById
(
jgRelationEquips
);
// 发送数据刷新消息
...
...
@@ -1669,6 +1673,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
idxBizJgUseInfo
.
setStreetName
(
jgInstallationNotice
.
getStreetName
());
idxBizJgUseInfo
.
setAddress
(
jgInstallationNotice
.
getAddress
());
idxBizJgUseInfo
.
setIsNotXiXian
(
jgInstallationNotice
.
getIsXixian
());
idxBizJgUseInfo
.
setUSC_UNIT_NAME
(
jgInstallationNotice
.
getInstallUnitName
());
idxBizJgUseInfo
.
setUSC_UNIT_CREDIT_CODE
(
jgInstallationNotice
.
getInstallUnitCreditCode
());
if
(
"8100"
.
equals
(
jgInstallationNotice
.
getEquCategoryCode
())
||
"8200"
.
equals
(
jgInstallationNotice
.
getEquCategoryCode
()))
{
idxBizJgUseInfo
.
setEquState
(
String
.
valueOf
(
EquimentEnum
.
ZAIYONG
.
getCode
()));
}
...
...
@@ -2025,7 +2031,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
Map
<
String
,
Object
>>
deviceList
=
projectContraptionService
.
getBaseMapper
().
selectEquipList
(
projectContraptionSeq
);
deviceList
.
forEach
(
device
->
{
String
deviceLevel
=
String
.
valueOf
(
device
.
get
(
"deviceLevel"
));
device
.
put
(
"deviceLevel"
,
dataDictionaryMapper
.
getByCode
(
deviceLevel
,
"8300"
).
getName
());
device
.
put
(
"deviceLevel"
,
dataDictionaryMapper
.
getByCode
(
deviceLevel
,
projectContraption
.
getEquCategory
()
).
getName
());
device
.
put
(
"sequenceNbr"
,
projectContraptionSeq
);
device
.
put
(
"equListName"
,
projectContraption
.
getEquListName
());
});
...
...
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/JgOverDesignServiceLifeServiceImpl.java
View file @
1d06bb4d
...
...
@@ -100,7 +100,6 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
private
final
JgOverDesignServiceLifeEqServiceImpl
jgOverDesignServiceLifeEqService
;
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
final
RedissonClient
redissonClient
;
private
final
CommonServiceImpl
commonServiceImpl
;
private
final
RedisUtils
redisUtils
;
private
final
CmWorkflowServiceImpl
cmWorkflowService
;
private
final
JgOverDesignServiceLifeEqMapper
jgOverDesignServiceLifeEqMapper
;
...
...
@@ -409,14 +408,14 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
throw
new
BadRequest
(
"当前流程已经被执行!请重新打开页面查看并执行!"
);
}
// 撤回校验
commonService
Impl
.
checkForRevocationFlow
(
nextTaskId
,
instanceId
);
commonService
.
checkForRevocationFlow
(
nextTaskId
,
instanceId
);
JgOverDesignServiceLife
overDesign
=
new
JgOverDesignServiceLife
();
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
rollBack
(
instanceId
);
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
processTaskDTOS
.
add
(
processTaskDTO
);
List
<
WorkflowResultDto
>
resultDto
=
commonService
Impl
.
buildWorkFlowInfo
(
processTaskDTOS
);
List
<
WorkflowResultDto
>
resultDto
=
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
String
taskCode
=
""
;
String
roles
=
""
;
if
(!
ObjectUtils
.
isEmpty
(
resultDto
)
&&
!
ObjectUtils
.
isEmpty
(
resultDto
.
get
(
0
)))
{
...
...
@@ -442,7 +441,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
jsonObject
.
put
(
"nextTaskId"
,
data
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
data
.
getNextExecuteIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_OVER_DESIGN_SERVICE_LIFE
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
commonService
Impl
.
getDictionaryCodeByName
(
overDesign
.
getStatus
()));
jsonObject
.
put
(
"flowStatus"
,
commonService
.
getDictionaryCodeByName
(
overDesign
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
overDesign
.
getStatus
());
jsonObject
.
remove
(
"otherAccessories"
);
jsonObject
.
remove
(
"instanceStatus"
);
...
...
@@ -459,9 +458,9 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
jsonObject
.
put
(
"pageType"
,
"look"
);
}
// 撤回删除代办
commonService
Impl
.
rollbackTask
(
instanceId
,
jsonObject
);
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
// redis流程实时数据更新
commonService
Impl
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
data
));
commonService
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
data
));
this
.
clearDataForCheckEquipRepeatUsed
(
data
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
...
...
@@ -925,7 +924,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
delete
(
Long
sequenceNbr
)
{
JgOverDesignServiceLife
overDesignServiceLife
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
commonService
Impl
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
),
overDesignServiceLife
.
getInstanceId
());
commonService
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
),
overDesignServiceLife
.
getInstanceId
());
this
.
baseMapper
.
deleteById
(
sequenceNbr
);
jgOverDesignServiceLifeEqService
.
remove
(
new
LambdaQueryWrapper
<
JgOverDesignServiceLifeEq
>()
.
eq
(
JgOverDesignServiceLifeEq:
:
getOverDesignId
,
sequenceNbr
));
...
...
@@ -1035,7 +1034,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
BeanUtils
.
copyProperties
(
overDesignServiceLife
,
taskMessageDto
);
this
.
setEquListForWorkSpace
(
overDesignServiceLife
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
commonService
Impl
.
updateTaskModel
(
taskMap
);
commonService
.
updateTaskModel
(
taskMap
);
}
public
Map
<
String
,
Object
>
getNewWTJYInspectionDetailByRecord
(
String
record
,
String
equListCode
)
{
...
...
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/JgReformNoticeServiceImpl.java
View file @
1d06bb4d
...
...
@@ -58,6 +58,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
...
...
@@ -121,7 +123,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
final
RedisUtils
redisUtils
;
private
final
SnowflakeIdUtil
sequence
;
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
final
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
private
final
JgReformNoticeMapper
jgReformNoticeMapper
;
private
final
CommonServiceImpl
commonService
;
private
final
CmWorkflowServiceImpl
cmWorkflowService
;
...
...
@@ -141,7 +142,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
final
IdxBizJgInspectionDetectionInfoServiceImpl
idxBizJgInspectionDetectionInfoService
;
private
final
IIdxBizJgTechParamsPipelineService
iIdxBizJgTechParamsPipelineService
;
private
final
JgUseRegistrationServiceImpl
useRegistrationService
;
private
final
UseInfoMapper
useInfoMapper
;
@Autowired
@Lazy
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@ResultFieldMapping
({
...
...
@@ -896,7 +900,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
/**
* 通过和驳回
*
* @param
dto
改造信息
* @param
map
改造信息
* @param op 通过或驳回
*/
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
...
...
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/JgUseRegistrationManageServiceImpl.java
View file @
1d06bb4d
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
...
@@ -427,12 +428,12 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
List
<
JgUseRegistrationManage
>
jgUseRegistrationManageList
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
.
in
(
JgUseRegistrationManage:
:
getSequenceNbr
,
sequenceNbrList
)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
select
(
JgUseRegistrationManage:
:
getUseRegistrationCode
));
.
select
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
BaseEntity:
:
getSequenceNbr
));
if
(
ValidationUtil
.
isEmpty
(
jgUseRegistrationManageList
))
{
return
new
ArrayList
<>();
}
// List<JSONObject> result = new ArrayList<>();
Set
<
String
>
useOrgCodes
=
jgUseRegistrationManageList
.
stream
().
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
useOrgCodes
=
jgUseRegistrationManageList
.
stream
().
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
).
filter
(
org
.
apache
.
commons
.
lang3
.
StringUtils
::
isNotEmpty
).
collect
(
Collectors
.
toSet
());
// es中通过查询【使用登记证编号】所有设备
// SearchRequest request = new SearchRequest("idx_biz_view_jg_all");
...
...
@@ -534,7 +535,8 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
public
Page
<
JSONObject
>
queryEquForPageByCertificateSeqList
(
String
enableType
,
List
<
Long
>
sequenceNbrList
,
int
current
,
int
size
)
{
List
<
JgUseRegistrationManage
>
jgUseRegistrationManageList
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
.
in
(
JgUseRegistrationManage:
:
getSequenceNbr
,
sequenceNbrList
)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
));
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
select
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
BaseEntity:
:
getSequenceNbr
));
if
(
ValidationUtil
.
isEmpty
(
jgUseRegistrationManageList
))
{
return
new
Page
<>();
}
...
...
@@ -543,7 +545,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
long
totle
=
0
;
Page
<
JSONObject
>
result
=
new
Page
<>(
Optional
.
of
(
current
).
orElse
(
1
),
Optional
.
of
(
size
).
orElse
(
10
));
Set
<
String
>
useOrgCodes
=
jgUseRegistrationManageList
.
stream
().
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
useOrgCodes
=
jgUseRegistrationManageList
.
stream
().
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
).
filter
(
org
.
apache
.
commons
.
lang3
.
StringUtils
::
isNotEmpty
).
collect
(
Collectors
.
toSet
());
// es中通过查询【使用登记证编号】所有设备
SearchRequest
request
=
new
SearchRequest
(
"idx_biz_view_jg_all"
);
...
...
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 @
1d06bb4d
...
...
@@ -1298,7 +1298,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
mapData
));
jgRegistrationHistoryService
.
updateById
(
jgRegistrationHistory
);
this
.
publish2CalGrade
(
jgUseRegistration
,
records
);
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
...
...
@@ -1732,7 +1731,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
});
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
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
...
...
@@ -1795,6 +1793,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
useInfo
.
setIsIntoManagement
(
Boolean
.
TRUE
);
useInfo
.
setUseDate
(
Objects
.
toString
(
mapData
.
get
(
"useDate"
),
""
));
useInfo
.
setUSC_UNIT_CREDIT_CODE
(
""
);
useInfo
.
setUSC_UNIT_NAME
(
""
);
useInfoMapper
.
updateById
(
useInfo
);
// 更新es
updateEsData
(
usePlace
,
mapData
,
otherInfo
,
useInfo
,
jgUseRegistration
,
jsonObject
);
...
...
@@ -1957,7 +1957,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新es的下次检验日期
param
.
put
(
"NEXT_INSPECT_DATE"
,
this
.
castDate2TimeStr
(
dataMap
.
getString
(
"nextInspectDate"
)));
param
.
put
(
"USE_INNER_CODE"
,
useInfo
.
getUseInnerCode
());
if
(!
Arrays
.
asList
(
"temp"
,
"tempEdit"
).
contains
(
dataMap
.
get
(
"historySubmitType"
)))
{
String
historySubmitType
=
String
.
valueOf
(
dataMap
.
get
(
"historySubmitType"
));
if
(!
"temp"
.
equals
(
historySubmitType
)
&&
!
"tempEdit"
.
equals
(
historySubmitType
))
{
param
.
put
(
"IS_INTO_MANAGEMENT"
,
true
);
}
param
.
put
(
"USE_PLACE_CODE"
,
jsonObject
.
get
(
"province"
)
+
"#"
+
jsonObject
.
get
(
"city"
)
+
"#"
+
jsonObject
.
get
(
"county"
)
+
"#"
+
jsonObject
.
get
(
"factoryUseSiteStreet"
));
...
...
@@ -1969,6 +1970,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param
.
put
(
"EQU_CODE"
,
dataMap
.
get
(
"equCode"
));
param
.
put
(
"USE_ORG_CODE"
,
jgUseRegistration
.
getUseRegistrationCode
());
param
.
put
(
"CYLINDER_CATEGORY"
,
dataMap
.
get
(
"cylinderCategory"
));
param
.
put
(
"FACTORY_NUM"
,
MapUtil
.
getStr
(
dataMap
,
"factoryNum"
));
objMap
.
put
((
String
)
dataMap
.
get
(
"equipId"
),
param
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
...
...
@@ -2377,7 +2379,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
new
FillingUseRegisterResult
(
sequenceNbr
,
jsonObject
,
applicationContext
).
getData
();
// 结果增强,填充当前人是否有编辑按钮权限
new
FillingEditPermForCurrentUser
(
jsonObject
,
Optional
.
ofNullable
(
selectedOrgInfo
).
map
(
ReginParams:
:
getCompany
).
orElse
(
null
),
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
).
getData
();
commonServiceImpl
.
setDataQualityScore2Json
(
jsonObject
,
sequenceNbr
+
""
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
);
//
commonServiceImpl.setDataQualityScore2Json(jsonObject, sequenceNbr + "", BusinessTypeEnum.JG_USAGE_REGISTRATION);
return
jsonObject
;
}
// 基本信息 + 制造信息
...
...
@@ -4365,7 +4367,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
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
equipId
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
}
catch
(
BadRequest
|
LocalBadRequest
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 @
1d06bb4d
...
...
@@ -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
DataRefreshEvent
(
this
,
equipIdList
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
}
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
...
...
@@ -2188,7 +2187,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
collect
(
Collectors
.
toSet
());
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
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
1d06bb4d
...
...
@@ -222,6 +222,7 @@ public class JyjcInspectionResultController extends BaseController {
public
ResponseModel
<
Boolean
>
useUnitEntryWithSave
(
@RequestBody
Map
<
String
,
Object
>
entryData
)
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
useUnitEntryWithSave
(
entryData
,
getSelectedOrgInfo
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/useUnitEntryWithUpdate"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用单位录入检验结果-更新"
,
notes
=
"使用单位录入检验结果-更新"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/listener/InspectionDetectionSaveToDbEventListener.java
View file @
1d06bb4d
...
...
@@ -5,11 +5,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.listener.service.InspectionDetectionInfoUpdateService
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -31,26 +33,15 @@ import java.util.stream.Collectors;
*/
@Component
@Slf4j
@RequiredArgsConstructor
public
class
InspectionDetectionSaveToDbEventListener
implements
ApplicationListener
<
InspectionDetectionSaveToDbEvent
>
{
@Value
(
"${inspect.info.save.thread.number:3}"
)
private
int
threadNumber
;
@Autowired
CommonServiceImpl
commonService
;
@Autowired
private
SnowflakeIdUtil
sequence
;
@Autowired
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
BizEmqPublisher
bizEmqPublisher
;
private
BlockingQueue
<
JyjcInspectionResult
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
private
final
BlockingQueue
<
JyjcInspectionResult
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
private
final
InspectionDetectionInfoUpdateService
updateService
;
@Override
...
...
@@ -67,27 +58,12 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
while
(
true
)
{
try
{
JyjcInspectionResult
jyjcInspectionResult
=
blockingQueue
.
take
();
InspectionDetectionInfo
info
=
new
InspectionDetectionInfo
();
QueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
jyjcInspectionResult
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
fillInspectionFields
(
jyjcInspectionResult
,
info
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"insert"
);
}
else
{
info
=
list
.
get
(
0
);
fillInspectionFields
(
jyjcInspectionResult
,
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
}
updateService
.
update
(
jyjcInspectionResult
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
}
});
}
}
...
...
@@ -95,25 +71,6 @@ public class InspectionDetectionSaveToDbEventListener implements ApplicationList
private
void
fillInspectionFields
(
JyjcInspectionResult
jyjcInspectionResult
,
InspectionDetectionInfo
info
)
{
info
.
setInspectOrgName
(
jyjcInspectionResult
.
getInspectionTypeName
());
info
.
setInspectType
(
jyjcInspectionResult
.
getInspectionType
());
info
.
setRecord
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setInspectDate
(
jyjcInspectionResult
.
getInspectionDate
());
info
.
setInspectStaff
(
getInspectUserName
(
jyjcInspectionResult
));
info
.
setInspectStaffCode
(
jyjcInspectionResult
.
getInspector
());
info
.
setInspectConclusion
(
jyjcInspectionResult
.
getInspectionConclusion
());
info
.
setProblemRemark
(
jyjcInspectionResult
.
getNonConformance
());
info
.
setNextInspectDate
(
jyjcInspectionResult
.
getNextInspectionDate
());
info
.
setSequenceCode
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setInspectOrgCode
(
jyjcInspectionResult
.
getInspectionUnitCode
());
info
.
setInspectReportNo
(
jyjcInspectionResult
.
getResultNo
());
info
.
setRecDate
(
new
Date
());
}
private
String
getInspectUserName
(
JyjcInspectionResult
model
)
{
List
<
TzsUserInfo
>
userInfos
=
commonService
.
getUserInfosByUnitCode
(
model
.
getInspectionUnitCode
());
return
userInfos
.
stream
().
filter
(
u
->
model
.
getInspector
().
contains
(
u
.
getSequenceNbr
()
+
""
)).
map
(
TzsUserInfo:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/listener/service/InspectionDetectionInfoUpdateService.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
listener
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Component
@Slf4j
public
class
InspectionDetectionInfoUpdateService
{
@Autowired
CommonServiceImpl
commonService
;
@Autowired
private
SnowflakeIdUtil
sequence
;
@Autowired
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
BizEmqPublisher
bizEmqPublisher
;
@Autowired
private
EmqKeeper
emqKeeper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
update
(
JyjcInspectionResult
jyjcInspectionResult
)
{
InspectionDetectionInfo
info
=
new
InspectionDetectionInfo
();
QueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
jyjcInspectionResult
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
String
record
;
if
(
CollectionUtils
.
isEmpty
(
list
))
{
fillInspectionFields
(
jyjcInspectionResult
,
info
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
record
=
info
.
getRecord
();
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"insert"
);
}
else
{
info
=
list
.
get
(
0
);
fillInspectionFields
(
jyjcInspectionResult
,
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
record
=
info
.
getRecord
();
bizEmqPublisher
.
sendInspectionMsgAfterSave
(
info
,
"update"
);
}
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
TZSCommonConstant
.
DATA_REFRESH_TOPIC
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
),
JSONObject
.
toJSONString
(
Collections
.
singletonList
(
record
)).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
log
.
error
(
"发送数据变更emq消息失败:{}"
,
e
.
getMessage
(),
e
);
}
}
private
void
fillInspectionFields
(
JyjcInspectionResult
jyjcInspectionResult
,
InspectionDetectionInfo
info
)
{
info
.
setInspectOrgName
(
jyjcInspectionResult
.
getInspectionTypeName
());
info
.
setInspectType
(
jyjcInspectionResult
.
getInspectionType
());
info
.
setRecord
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setInspectDate
(
jyjcInspectionResult
.
getInspectionDate
());
info
.
setInspectStaff
(
getInspectUserName
(
jyjcInspectionResult
));
info
.
setInspectStaffCode
(
jyjcInspectionResult
.
getInspector
());
info
.
setInspectConclusion
(
jyjcInspectionResult
.
getInspectionConclusion
());
info
.
setProblemRemark
(
jyjcInspectionResult
.
getNonConformance
());
info
.
setNextInspectDate
(
jyjcInspectionResult
.
getNextInspectionDate
());
info
.
setSequenceCode
(
jyjcInspectionResult
.
getEquipUnicode
());
info
.
setInspectOrgCode
(
jyjcInspectionResult
.
getInspectionUnitCode
());
info
.
setInspectReportNo
(
jyjcInspectionResult
.
getResultNo
());
info
.
setRecDate
(
new
Date
());
}
private
String
getInspectUserName
(
JyjcInspectionResult
model
)
{
List
<
TzsUserInfo
>
userInfos
=
commonService
.
getUserInfosByUnitCode
(
model
.
getInspectionUnitCode
());
return
userInfos
.
stream
().
filter
(
u
->
model
.
getInspector
().
contains
(
u
.
getSequenceNbr
()
+
""
)).
map
(
TzsUserInfo:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonServiceImpl.java
View file @
1d06bb4d
...
...
@@ -268,6 +268,6 @@ public class CommonServiceImpl {
public
String
castDataQualityScore2Name
(
String
dataQualityScore
,
Boolean
isIntoManagement
)
{
DataDictionary
dataDictionary
=
dictionaryService
.
getByCode
(
"DATA_QUALITY_SCORE"
,
dataQualityScore
);
String
name
=
Optional
.
ofNullable
(
dataDictionary
).
map
(
DataDictionary:
:
getName
).
orElse
(
null
);
return
name
==
null
?
(
isIntoManagement
==
null
||
!
isIntoManagement
)
?
"
Ⅱ级"
:
"Ⅲ级
"
:
name
;
return
name
==
null
?
(
isIntoManagement
==
null
||
!
isIntoManagement
)
?
"
二类"
:
"一类
"
:
name
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
1d06bb4d
...
...
@@ -19,8 +19,10 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
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.constant.TZSCommonConstant
;
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.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.api.dto.DynamicColumnDto
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
...
...
@@ -48,6 +50,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
...
...
@@ -56,6 +59,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
...
...
@@ -63,6 +67,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.nio.charset.StandardCharsets
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.function.Function
;
...
...
@@ -153,6 +158,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
private
IdxBizJgInspectionDetectionInfoMapper
idxBizJgInspectionDetectionInfoMapper
;
@Autowired
private
EmqKeeper
emqKeeper
;
/**
* 检验检测单位分页查询
*/
...
...
@@ -313,14 +321,24 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
JyjcInspectionResultModel
dbResultModel
=
this
.
queryBySeq
(
model
.
getSequenceNbr
());
// 更新使用信息、检验信息、技术参数
this
.
updateTechParamAndInspectInfo
(
dbResultModel
,
jybgFile
);
Set
<
String
>
records
=
this
.
updateTechParamAndInspectInfo
(
dbResultModel
,
jybgFile
);
// 更新单据信息的json(公共)
this
.
updateHisDataAfterResultUpdate
(
dbResultModel
);
sendDataRefreshMsg
(
records
);
return
dbResultModel
;
}
private
void
sendDataRefreshMsg
(
Set
<
String
>
records
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
TZSCommonConstant
.
DATA_REFRESH_TOPIC
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
),
JSONObject
.
toJSONString
(
new
ArrayList
<>(
records
)).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
log
.
error
(
"发送数据变更emq消息失败:{}"
,
e
.
getMessage
(),
e
);
}
}
private
void
updateTechParamAndInspectInfo
(
JyjcInspectionResultModel
model
,
JyjcInspectionResultAttachment
jybgFile
){
private
Set
<
String
>
updateTechParamAndInspectInfo
(
JyjcInspectionResultModel
model
,
JyjcInspectionResultAttachment
jybgFile
){
Set
<
String
>
records
=
new
HashSet
<>();
if
(
model
.
getEquList
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
())){
// 管道逻辑: 循环更新技术参数、检验信息更新或者插入、使用信息更新(数据库及es)
JyjcInspectionResultParam
param
=
iJyjcInspectionResultParamService
.
getOneParamByResultSeq
(
model
.
getSequenceNbr
());
...
...
@@ -334,6 +352,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
);
equips
.
forEach
(
e
->{
String
record
=
String
.
valueOf
(
e
.
get
(
"record"
));
records
.
add
(
record
);
// 1.更新管道的技术参数
EquipTechParamPipeline
techParamPipeline
=
new
EquipTechParamPipeline
();
BeanUtil
.
copyProperties
(
e
,
techParamPipeline
,
true
);
...
...
@@ -421,7 +440,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
// 4.es更新下次检验日期
this
.
updateEquipNextInspectDate
(
model
,
model
.
getEquipUnicode
());
records
.
add
(
model
.
getEquipUnicode
());
}
return
records
;
}
private
String
getTableName
(
String
paramType
)
{
...
...
@@ -736,6 +757,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
useUnitEntryWithSave
(
Map
<
String
,
Object
>
entryData
,
ReginParams
reginParams
)
{
Set
<
String
>
records
=
new
HashSet
<>();
boolean
isYLGD
=
"8000"
.
equals
(
Objects
.
toString
(
entryData
.
get
(
"equList"
)));
JSONArray
equList
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
entryData
.
get
(
EQU_LIST
)));
List
<
String
>
applicationNos
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
equList
.
size
()).
getResult
();
...
...
@@ -810,11 +832,17 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
inspectionHistory
.
setRecUserId
(
RequestContext
.
getExeUserId
());
inspectionHistory
.
setRecDate
(
new
Date
());
jyjcInspectionHistoryService
.
save
(
inspectionHistory
);
records
.
add
(
inspectionDetectionInfo
.
getRecord
());
}
catch
(
Exception
e
)
{
log
.
warn
(
e
.
getMessage
());
throw
new
BadRequest
(
"数据异常,请联系管理员!"
);
}
}
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
TZSCommonConstant
.
DATA_REFRESH_TOPIC
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
),
JSONObject
.
toJSONString
(
records
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
log
.
error
(
"发送数据变更emq消息失败:{}"
,
e
.
getMessage
(),
e
);
}
return
Boolean
.
TRUE
;
}
...
...
@@ -937,7 +965,10 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
inspectionHistory
.
setRecUserId
(
RequestContext
.
getExeUserId
());
jyjcInspectionHistoryService
.
update
(
inspectionHistory
,
new
LambdaUpdateWrapper
<
JyjcInspectionHistory
>().
eq
(
JyjcInspectionHistory:
:
getSSeq
,
Long
.
valueOf
(
Objects
.
toString
(
sequenceNbr
))));
// 发送数据变更消息
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
TZSCommonConstant
.
DATA_REFRESH_TOPIC
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
),
JSONObject
.
toJSONString
(
Collections
.
singletonList
(
inspectionDetectionInfo
.
getRecord
())).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
BadRequest
(
"数据异常,请联系管理员!"
);
}
return
Boolean
.
TRUE
;
...
...
@@ -963,12 +994,15 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
public
Boolean
delUseUnitEntry
(
Long
resultSeq
)
{
// 删除结果表
this
.
baseMapper
.
deleteById
(
resultSeq
);
Set
<
String
>
records
=
idxBizJgInspectionDetectionInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizJgInspectionDetectionInfo
>().
eq
(
IdxBizJgInspectionDetectionInfo:
:
getResultSeq
,
resultSeq
).
select
(
IdxBizJgInspectionDetectionInfo:
:
getRecord
)).
stream
().
map
(
IdxBizJgInspectionDetectionInfo:
:
getRecord
).
collect
(
Collectors
.
toSet
());
// 删除检验信息表
idxBizJgInspectionDetectionInfoMapper
.
delete
(
new
LambdaQueryWrapper
<
IdxBizJgInspectionDetectionInfo
>().
eq
(
IdxBizJgInspectionDetectionInfo:
:
getResultSeq
,
resultSeq
.
toString
()));
// 删除附件表
attachmentService
.
getBaseMapper
().
delete
(
new
LambdaQueryWrapper
<
JyjcInspectionResultAttachment
>().
eq
(
JyjcInspectionResultAttachment:
:
getResultSeq
,
resultSeq
.
toString
()));
// 删除历史表
jyjcInspectionHistoryService
.
getBaseMapper
().
delete
(
new
LambdaQueryWrapper
<
JyjcInspectionHistory
>().
eq
(
JyjcInspectionHistory:
:
getSSeq
,
resultSeq
));
// 发送数据变更消息
sendDataRefreshMsg
(
records
);
return
Boolean
.
TRUE
;
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/CompanyAdvanceSearchEnum.java
View file @
1d06bb4d
...
...
@@ -17,12 +17,12 @@ public enum CompanyAdvanceSearchEnum {
ADDRESS
(
"详细地址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
EXPIRYDATE
(
"许可有效期"
,
"expiryDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
UNIT_TYPE
(
"企业类型"
,
"unitType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType"
,
null
,
null
),
REGULATORY_LABELS
(
"
企业等级
"
,
"regulatoryLabels"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYBQ"
,
null
),
REGULATORY_LABELS
(
"
监管标签
"
,
"regulatoryLabels"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYBQ"
,
null
),
INDUSTRY_SUPERVISOR
(
"行业主管部门"
,
"industrySupervisor"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"HYZGBM"
,
null
),
ITEM_CODE
(
"许可项目"
,
"itemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK"
,
null
,
null
),
SUB_ITEM_CODE
(
"许可子项目"
,
"subItemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK?type={type}"
,
null
,
"itemCode"
),
OPERATING_STATUS
(
"经营状态"
,
"operatingStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicDataNew?type={type}"
,
"jyzt"
,
null
),
EQUIP_CATEGORY
(
"
监管
设备类型"
,
"equipCategory"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
EQUIP_CATEGORY
(
"设备类型"
,
"equipCategory"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/DataQualityScoreEnum.java
View file @
1d06bb4d
...
...
@@ -17,12 +17,12 @@ public enum DataQualityScoreEnum {
* *设备等级
*/
I
(
"一级"
,
"3"
),
II
(
"二级"
,
"2"
),
III
(
"三级"
,
"1"
),
;
I
(
"一级(使用登记证信息齐全)"
,
"一级"
,
"1"
),
II
(
"二级(只有设备名称和使用登记证编号)"
,
"二级"
,
"2"
),
III
(
"三级(只有设备名称)"
,
"三级"
,
"3"
);
private
String
name
;
private
String
label
;
private
String
code
;
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
...
...
@@ -48,10 +48,10 @@ public enum DataQualityScoreEnum {
return
jsonArray
;
}
public
static
String
get
Name
ByCode
(
String
code
)
{
public
static
String
get
Label
ByCode
(
String
code
)
{
for
(
DataQualityScoreEnum
e
:
EnumSet
.
allOf
(
DataQualityScoreEnum
.
class
))
{
if
(
e
.
getCode
().
equals
(
code
)){
return
e
.
get
Name
();
return
e
.
get
Label
();
}
}
return
null
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/EquipAdvanceSearchEnum.java
View file @
1d06bb4d
...
...
@@ -22,10 +22,13 @@ public enum EquipAdvanceSearchEnum {
PARAM_RANGE
(
"参数范围"
,
"paramRange"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
NEXT_INSPECT_DATE
(
"检验有效期"
,
"NEXT_INSPECT_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
EQU_STATE
(
"设备状态"
,
"EQU_STATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquState"
,
null
,
null
),
IS_SUPERVISORY_CODE
(
"赋码状态"
,
"IS_SUPERVISORY_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryIsSupervisoryCode"
,
null
,
null
),
WHETHER_VEHICLE_CYLINDER
(
"是否车用气瓶"
,
"WHETHER_VEHICLE_CYLINDER"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/vehicleCylinder"
,
null
,
null
),
QZ_OR_TANK
(
"是否车用气瓶"
,
"WHETHER_VEHICLE_CYLINDER"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/qzOrTank"
,
null
,
null
),
// IS_SUPERVISORY_CODE("赋码状态", "IS_SUPERVISORY_CODE", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryIsSupervisoryCode",null,null),
DATA_QUALITY_SCORE
(
"数据完整性"
,
"DATA_QUALITY_SCORE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDataQualityScore"
,
null
,
null
),
USC_DATE
(
"使用年限"
,
"USC_DATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUscDate"
,
null
,
null
),
UNIT_TYPE
(
"所属单位类型"
,
"unitType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType"
,
null
,
null
),
USE_DATE
(
"使用年限"
,
"USE_DATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUscDate"
,
null
,
null
),
REGISTER_STATUS
(
"登记状态"
,
"registerStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRegisterStatus"
,
null
,
null
),
// UNIT_TYPE("所属单位类型", "unitType", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType",null,null),
USC_UNIT_NAME
(
"所属单位名称"
,
"USC_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
PRODUCE_UNIT_NAME
(
"制造单位名称"
,
"PRODUCE_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
DESIGN_UNIT_NAME
(
"设计单位名称"
,
"DESIGN_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
...
...
@@ -35,6 +38,14 @@ public enum EquipAdvanceSearchEnum {
SUPERVISORY_CODE
(
"监管码"
,
"SUPERVISORY_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
EQU_TYPE
(
"设备型号"
,
"EQU_TYPE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
PRODUCE_DATE
(
"制造日期"
,
"PRODUCE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
designDate
(
"设计日期"
,
"designDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
use_date
(
"投用如期"
,
"USE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
ISSUE_DATE
(
"使用登记证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
JDJY
(
"监督检验日期"
,
"JDJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
DQJY
(
"定期检验日期"
,
"DQJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
SCJY
(
"首次检验日期"
,
"SCJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
DTJY
(
"电梯检测日期"
,
"DTJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
nextInspectDate
(
"下次检验日期"
,
"nextInspectDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
// PRODUCE_DATE("是否进口", "PRODUCE_DATE", TechnicalParameter.ParamType.DATE,""),
USE_PLACE_CODE
(
"使用地点"
,
"USE_PLACE_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
USE_PLACE
(
"使用场所"
,
"USE_PLACE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData"
,
"ADDRESS"
,
null
),
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/PersonAdvanceSearchEnum.java
View file @
1d06bb4d
...
...
@@ -27,7 +27,7 @@ public enum PersonAdvanceSearchEnum {
ADDRESS
(
"住址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
UNITCODE
(
"所属企业"
,
"unitCode"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
SUPERVISEORGCODE
(
"管辖机构"
,
"superviseOrgCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitByOrgCode?type={type}"
,
null
,
"orgTreeId"
),
EQUIP_TYPE
(
"
监管
设备类型"
,
"equipType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
EQUIP_TYPE
(
"设备类型"
,
"equipType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
View file @
1d06bb4d
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -16,16 +17,17 @@ public enum UnitTypeEnum {
* *注册单位类型
*/
sydw
(
"使用单位"
,
"1232"
),
czdw
(
"充装单位"
,
"1231"
),
jyjcjg
(
"检验检测机构"
,
"1233"
),
azgzwxdw
(
"安装改造维修单位"
,
"1234"
),
zzdw
(
"制造单位"
,
"1236"
),
sjdw
(
"设计单位"
,
"1235"
),
grzt
(
"个人主体"
,
"6599"
);
sydw
(
"使用单位"
,
"1232"
,
"use"
),
czdw
(
"充装单位"
,
"1231"
,
"license"
),
jyjcjg
(
"检验检测机构"
,
"1233"
,
"license"
),
azgzwxdw
(
"安装改造维修单位"
,
"1234"
,
"license"
),
zzdw
(
"制造单位"
,
"1236"
,
"license"
),
sjdw
(
"设计单位"
,
"1235"
,
"license"
),
grzt
(
"个人主体"
,
"6599"
,
"use"
);
private
String
name
;
private
String
code
;
private
String
type
;
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCode
=
new
HashMap
<>();
...
...
@@ -38,15 +40,32 @@ public enum UnitTypeEnum {
}
}
public
static
JSONArray
getAll
(){
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeEnum
e
:
UnitTypeEnum
.
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
name
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
name
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
return
jsonArray
;
}
public
static
JSONArray
getUnitTypeByType
(
String
category
)
{
if
(
ObjectUtils
.
isEmpty
(
category
))
{
return
getAll
();
}
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeEnum
e
:
UnitTypeEnum
.
values
())
{
if
(
e
.
type
.
equals
(
category
))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
name
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/UnitTypeNewEnum.java
0 → 100644
View file @
1d06bb4d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@Getter
public
enum
UnitTypeNewEnum
{
/**
* *注册单位类型
*/
sydw
(
"企业"
,
"1232"
,
"use"
),
czdw
(
"充装单位"
,
"1231"
,
"license"
),
jydw
(
"检验单位"
,
"1233"
,
"license"
),
jcdw
(
"检测单位"
,
"1233"
,
"license"
),
azgzwxdw
(
"安装改造维修单位"
,
"1234"
,
"license"
),
zzdw
(
"制造单位"
,
"1236"
,
"license"
),
sjdw
(
"设计单位"
,
"1235"
,
"license"
),
grzt
(
"个人主体"
,
"6599"
,
"use"
);
private
String
name
;
private
String
code
;
private
String
type
;
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCode
=
new
HashMap
<>();
static
{
for
(
UnitTypeNewEnum
e
:
UnitTypeNewEnum
.
values
())
{
getName
.
put
(
e
.
code
,
e
.
name
);
getCode
.
put
(
e
.
name
,
e
.
code
);
}
}
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeNewEnum
e
:
UnitTypeNewEnum
.
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
name
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
return
jsonArray
;
}
public
static
JSONArray
getUnitTypeByType
(
String
category
)
{
if
(
ObjectUtils
.
isEmpty
(
category
))
{
return
getAll
();
}
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeNewEnum
e
:
UnitTypeNewEnum
.
values
())
{
if
(
e
.
type
.
equals
(
category
))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
name
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ComprehensiveStatisticalAnalysisController.java
View file @
1d06bb4d
...
...
@@ -74,8 +74,8 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryCompanySearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业条件"
,
notes
=
"查询企业条件"
)
public
ResponseModel
<
JSONObject
>
queryCompanySearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryCompanySearchData
());
public
ResponseModel
<
JSONObject
>
queryCompanySearchData
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryCompanySearchData
(
type
));
}
/**
...
...
@@ -85,8 +85,8 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryPersonSearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询个人条件"
,
notes
=
"查询个人条件"
)
public
ResponseModel
<
JSONObject
>
queryPersonSearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryPersonSearchData
());
public
ResponseModel
<
JSONObject
>
queryPersonSearchData
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryPersonSearchData
(
type
));
}
/**
...
...
@@ -96,8 +96,8 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryUnitType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单位类型"
,
notes
=
"查询单位类型"
)
public
ResponseModel
<
JSONArray
>
queryUnitType
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryUnitType
());
public
ResponseModel
<
JSONArray
>
queryUnitType
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryUnitType
(
type
));
}
/**
...
...
@@ -116,10 +116,10 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
Ge
tMapping
(
value
=
"/select/queryRYLX"
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"查询人员类型"
,
notes
=
"查询人员类型"
)
public
ResponseModel
<
JSONArray
>
queryRYLX
(
@Request
Param
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRYLX
(
type
));
@
Pos
tMapping
(
value
=
"/select/queryRYLX"
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"查询人员类型"
,
notes
=
"查询人员类型"
)
public
ResponseModel
<
JSONArray
>
queryRYLX
(
@Request
Body
JSONObject
params
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRYLX
(
params
));
}
/**
...
...
@@ -270,6 +270,39 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/vehicleCylinder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级搜索是否车用气瓶"
,
notes
=
"高级搜索是否车用气瓶"
)
public
ResponseModel
<
JSONArray
>
queryVehicleCylinder
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryVehicleCylinder
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/qzOrTank"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级搜索是否撬装球罐"
,
notes
=
"高级搜索是否撬装球罐"
)
public
ResponseModel
<
JSONArray
>
queryQzOrTank
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryQzOrTank
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryRegisterStatus"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级搜索登记状态"
,
notes
=
"高级搜索登记状态"
)
public
ResponseModel
<
JSONArray
>
queryRegisterStatus
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRegisterStatus
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryUscDate"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级搜索使用年限"
,
notes
=
"高级搜索使用年限"
)
public
ResponseModel
<
JSONArray
>
queryUscDate
()
{
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
1d06bb4d
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
1d06bb4d
...
...
@@ -71,7 +71,6 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -82,10 +81,12 @@ import javax.annotation.PostConstruct;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.Validator
;
import
java.io.*
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.file.Files
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
View file @
1d06bb4d
...
...
@@ -10,6 +10,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
...
...
@@ -181,7 +183,7 @@ public class IdxBizJgUseInfo extends TzsBaseEntity implements IBaseChangeData {
private
String
phone
;
/**
*
*
设备状态 @see com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
*/
@TableField
(
"\"EQU_STATE\""
)
private
String
equState
;
...
...
@@ -333,4 +335,17 @@ public class IdxBizJgUseInfo extends TzsBaseEntity implements IBaseChangeData {
*/
@TableField
(
"\"VERSION\""
)
private
String
version
;
/**
* 安改维单位code-安装告知、移交后写入,登记后清除
*/
@TableField
(
"\"USC_UNIT_CREDIT_CODE\""
)
private
String
USC_UNIT_CREDIT_CODE
;
/**
* 安改维单位统名称-安装告知、移交后写入,登记后清除
*/
@TableField
(
"\"USC_UNIT_NAME\""
)
private
String
USC_UNIT_NAME
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgUseInfoMapper.java
View file @
1d06bb4d
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 使用信息表 Mapper 接口
...
...
@@ -28,4 +29,6 @@ public interface IdxBizJgUseInfoMapper extends BaseMapper<IdxBizJgUseInfo> {
void
updateDataQualityScoreBatch
(
@Param
(
"equips"
)
List
<
EquipWaitRefreshDataQualityScore
>
refreshDataQualityScores
,
@Param
(
"version"
)
int
version
);
void
updateVersionBatch
(
@Param
(
"records"
)
List
<
String
>
records
,
@Param
(
"version"
)
int
version
);
Map
<
String
,
Object
>
queryDetail
(
@Param
(
"record"
)
String
record
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgUseInfoMapper.xml
View file @
1d06bb4d
...
...
@@ -64,6 +64,71 @@
COALESCE(MAX(version),0) as version
FROM "idx_biz_jg_use_info"
</select>
<select
id=
"queryDetail"
resultType=
"java.util.Map"
>
SELECT
ibjui."RECORD" AS "SEQUENCE_NBR",
ibjui."PROJECT_CONTRAPTION",
ibjui."PROJECT_CONTRAPTION_ID",
ibjsi."ORG_BRANCH_NAME",
ibjsi."ORG_BRANCH_CODE",
ibjui."REC_DATE",
ibjui."USE_UNIT_NAME",
ibjui."USE_UNIT_CREDIT_CODE",
ibjui."USC_UNIT_NAME",
ibjui."USC_UNIT_CREDIT_CODE",
ibjri."EQU_LIST" AS "EQU_LIST_CODE",
ibjri."EQU_DEFINE" AS "EQU_DEFINE_CODE",
ibjri."PRODUCT_NAME",
ibjri."BRAND_NAME",
ibjri."EQU_TYPE",
ibjri."EQU_CATEGORY" AS "EQU_CATEGORY_CODE",
tec2.NAME AS "EQU_DEFINE",
tec1.NAME AS "EQU_LIST",
tec.NAME AS "EQU_CATEGORY",
ibjri."USE_ORG_CODE",
ibjui."USE_INNER_CODE",
ibjui."DATA_SOURCE",
ibjoi."CODE96333",
ibjri."EQU_CODE",
ibjoi."SUPERVISORY_CODE",
ibjri."WHETHER_VEHICLE_CYLINDER",
ibjri."WHETHER_SKID_MOUNTED_PRESSURE_VESSEL",
ibjri."CYLINDER_CATEGORY",
ibjri."WHETHER_SPHERICAL_TANK",
ibjri."CAR_NUMBER",
concat_ws ( '/', ibjui."PROVINCE_NAME", ibjui."CITY_NAME", ibjui."COUNTY_NAME", ibjui."STREET_NAME" ) AS "USE_PLACE",
concat_ws ( '#', ibjui."PROVINCE", ibjui."CITY", ibjui."COUNTY", ibjui."FACTORY_USE_SITE_STREET" ) AS "USE_PLACE_CODE",
ibjui."ADDRESS",
ibjui."EQU_STATE",
ibjui."IS_INTO_MANAGEMENT",
ibjoi."CLAIM_STATUS" AS "STATUS",
ibjfi."FACTORY_NUM",
ibjfi."PRODUCE_UNIT_NAME",
ibjfi."PRODUCE_UNIT_CREDIT_CODE",
ibjfi."PRODUCE_DATE",
ibjui."CREATE_DATE" ,
ibjui."SAFETY_MANAGER" ,
ibjui."PHONE",
ibjui."USE_DATE",
ibjui."USE_PLACE" as USE_SITE_CODE,
ibjui."DATA_QUALITY_SCORE",
ibjoi."INFORMATION_SITUATION",
di."DESIGN_UNIT_CREDIT_CODE",
di."DESIGN_UNIT_NAME",
di."DESIGN_DATE"
FROM
amos_tzs_biz.idx_biz_jg_use_info ibjui
LEFT JOIN amos_tzs_biz.idx_biz_jg_supervision_info ibjsi ON ibjui."RECORD" = ibjsi."RECORD"
LEFT JOIN amos_tzs_biz.idx_biz_jg_register_info ibjri ON ibjui."RECORD" = ibjri."RECORD"
LEFT JOIN amos_tzs_biz.idx_biz_jg_other_info ibjoi ON ibjui."RECORD" = ibjoi."RECORD"
LEFT JOIN amos_tzs_biz.idx_biz_jg_factory_info ibjfi ON ibjui."RECORD" = ibjfi."RECORD"
LEFT JOIN amos_tzs_biz.idx_biz_jg_design_info di ON di."RECORD" = ibjui."RECORD"
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ibjri."EQU_CATEGORY" = tec.code
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ibjri."EQU_LIST" = tec1.code
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ibjri."EQU_DEFINE" = tec2.code
WHERE
ibjui."RECORD" = #{record}
</select>
<update
id=
"updateVersionBatch"
>
<foreach
collection=
"records"
separator=
";"
item=
"record"
open=
""
close=
""
>
UPDATE idx_biz_jg_use_info SET "VERSION"=#{version} WHERE record = #{record}
...
...
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