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
00ee2949
Commit
00ee2949
authored
Jun 09, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(大编辑):管道增减功能开发
1.使用登记管道编辑时在流程中时 使用json数据 监管和使用单位可以编辑一份数据
parent
b4eb682d
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
444 additions
and
104 deletions
+444
-104
PipelineChangeItemDto.java
...in/amos/boot/module/jg/api/dto/PipelineChangeItemDto.java
+4
-1
EquipBackupHandler.java
...os/boot/module/jg/biz/edit/backup/EquipBackupHandler.java
+4
-0
EditConstant.java
...n/amos/boot/module/jg/biz/edit/constant/EditConstant.java
+11
-0
DefaultBizDataChangeHandler.java
.../jg/biz/edit/process/biz/DefaultBizDataChangeHandler.java
+32
-8
ChangeRegistrationReformDataChangeHandler.java
...tionReform/ChangeRegistrationReformDataChangeHandler.java
+2
-1
ChangeRegistrationTransferDataChangeHandler.java
...Transfer/ChangeRegistrationTransferDataChangeHandler.java
+2
-1
ChangeRegistrationUnitDataChangeHandler.java
...strationUnit/ChangeRegistrationUnitDataChangeHandler.java
+2
-1
ChangeVehicleRegistrationUnitDataChangeHandler.java
...nUnit/ChangeVehicleRegistrationUnitDataChangeHandler.java
+2
-1
EnableDisableDataChangeHandler.java
...ess/biz/enableDisable/EnableDisableDataChangeHandler.java
+2
-1
EquipTransferDataChangeHandler.java
...ess/biz/equipTransfer/EquipTransferDataChangeHandler.java
+2
-1
InstallNoticeDataChangeHandler.java
...ess/biz/installNotice/InstallNoticeDataChangeHandler.java
+2
-1
MaintainNoticeDataChangeHandler.java
...s/biz/maintainNotice/MaintainNoticeDataChangeHandler.java
+2
-1
MaintenanceContractDataChangeHandler.java
...tenanceContract/MaintenanceContractDataChangeHandler.java
+2
-1
NewEquipDataChangeHandler.java
.../edit/process/biz/newEquip/NewEquipDataChangeHandler.java
+2
-1
NewProjectDataChangeHandler.java
...t/process/biz/newProject/NewProjectDataChangeHandler.java
+2
-1
ReformNoticeDataChangeHandler.java
...ocess/biz/reformNotice/ReformNoticeDataChangeHandler.java
+2
-1
ScrapCancelDataChangeHandler.java
...process/biz/scrapCancel/ScrapCancelDataChangeHandler.java
+2
-1
IBizDataChangeHandleStrategy.java
...it/process/biz/strategy/IBizDataChangeHandleStrategy.java
+8
-6
TransferNoticeDataChangeHandler.java
...s/biz/transferNotice/TransferNoticeDataChangeHandler.java
+2
-1
UseRegisterDataChangeHandler.java
...process/biz/useRegister/UseRegisterDataChangeHandler.java
+31
-6
UseRegisterUpdateService.java
...dit/process/biz/useRegister/UseRegisterUpdateService.java
+62
-31
VehicleInformationDataChangeHandler.java
...hicleInformation/VehicleInformationDataChangeHandler.java
+2
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+117
-5
PieLineDataChangeServiceImpl.java
.../biz/edit/process/equip/PieLineDataChangeServiceImpl.java
+3
-0
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+3
-5
SingleProjectEquipChangeProcess.java
...z/edit/process/equip/SingleProjectEquipChangeProcess.java
+112
-18
HandleResult.java
...dule/jg/biz/edit/process/equip/strategy/HandleResult.java
+18
-0
IEquipChangeDataProcessStrategy.java
...ocess/equip/strategy/IEquipChangeDataProcessStrategy.java
+1
-1
PieLineLevelTypeHandler.java
...dule/jg/biz/edit/typeHandler/PieLineLevelTypeHandler.java
+8
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+0
-7
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/PipelineChangeItemDto.java
View file @
00ee2949
...
@@ -35,7 +35,7 @@ public class PipelineChangeItemDto extends TechParamsPipelineChangeFieldDto {
...
@@ -35,7 +35,7 @@ public class PipelineChangeItemDto extends TechParamsPipelineChangeFieldDto {
private
String
uscUnitName
;
private
String
uscUnitName
;
@FieldDisplayDefine
(
value
=
"安装日期"
)
@FieldDisplayDefine
(
value
=
"安装日期"
)
private
Date
uscDate
;
private
String
uscDate
;
@FieldDisplayDefine
(
value
=
"检验类型"
,
dictCode
=
"JYJC"
)
@FieldDisplayDefine
(
value
=
"检验类型"
,
dictCode
=
"JYJC"
)
private
String
inspectType
;
private
String
inspectType
;
...
@@ -64,4 +64,7 @@ public class PipelineChangeItemDto extends TechParamsPipelineChangeFieldDto {
...
@@ -64,4 +64,7 @@ public class PipelineChangeItemDto extends TechParamsPipelineChangeFieldDto {
@FieldDisplayDefine
(
value
=
"检验报告编号"
)
@FieldDisplayDefine
(
value
=
"检验报告编号"
)
private
String
inspectReportNo
;
private
String
inspectReportNo
;
@FieldDisplayDefine
(
value
=
"主键"
,
isExist
=
false
)
private
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/backup/EquipBackupHandler.java
View file @
00ee2949
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.*;
...
@@ -10,6 +10,7 @@ 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.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
@@ -18,6 +19,7 @@ import java.util.stream.Collectors;
...
@@ -18,6 +19,7 @@ import java.util.stream.Collectors;
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
public
class
EquipBackupHandler
{
public
class
EquipBackupHandler
{
private
final
IdxBizJgPipelineOperationHistServiceImpl
pipelineDeleteHistoryService
;
private
final
IdxBizJgPipelineOperationHistServiceImpl
pipelineDeleteHistoryService
;
...
@@ -155,6 +157,8 @@ public class EquipBackupHandler {
...
@@ -155,6 +157,8 @@ public class EquipBackupHandler {
if
(!
insertIds
.
isEmpty
())
{
if
(!
insertIds
.
isEmpty
())
{
superviseInfoMapper
.
deleteDataAll
(
insertIds
);
superviseInfoMapper
.
deleteDataAll
(
insertIds
);
}
}
}
else
{
log
.
warn
(
"暂无编辑历史无法恢复数据:{},{}"
,
bizType
,
bizId
);
}
}
return
!
opHisList
.
isEmpty
();
return
!
opHisList
.
isEmpty
();
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/constant/EditConstant.java
0 → 100644
View file @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
constant
;
public
class
EditConstant
{
/**
* 管道的编辑维护key
*/
public
static
final
String
NEW_PIPELINES
=
"newPipelines"
;
public
static
final
String
UPDATE_PIPELINES
=
"updatePipelines"
;
public
static
final
String
DELETE_PIPELINES
=
"deletePipelines"
;
}
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 @
00ee2949
...
@@ -13,20 +13,24 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.core.IEventPublisher;
...
@@ -13,20 +13,24 @@ 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.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
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.CommonEquipDataProcessService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgBizChangeLogServiceImpl
;
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.ApplicationContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.HashSet
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Slf4j
public
abstract
class
DefaultBizDataChangeHandler
<
U
extends
BaseBizDataChangeEvent
>
implements
IBizDataChangeHandleStrategy
{
public
abstract
class
DefaultBizDataChangeHandler
<
U
extends
BaseBizDataChangeEvent
>
implements
IBizDataChangeHandleStrategy
{
public
static
String
IS_REQUIRES_TEMPORARY_SAVE
=
"isRequiresTemporarySave"
;
public
static
String
TEMPORARY_PIPELINES_DATA
=
"temporaryPipelinesData"
;
private
final
IEventPublisher
<
BaseBizDataChangeEvent
>
eventPublisher
;
private
final
IEventPublisher
<
BaseBizDataChangeEvent
>
eventPublisher
;
private
final
ApplicationContext
applicationContext
;
private
final
ApplicationContext
applicationContext
;
...
@@ -45,16 +49,36 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
...
@@ -45,16 +49,36 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
// 删除原始提交的变更说明及附件放置后续存放到json
// 删除原始提交的变更说明及附件放置后续存放到json
changeData
.
remove
(
"changeReason"
);
changeData
.
remove
(
"changeReason"
);
changeData
.
remove
(
"changeAttachment"
);
changeData
.
remove
(
"changeAttachment"
);
changeData
.
put
(
IS_REQUIRES_TEMPORARY_SAVE
,
requiresTemporarySave
(
applyNo
));
changeData
.
put
(
TEMPORARY_PIPELINES_DATA
,
getsTemporaryData
(
applyNo
));
IEquipChangeDataProcessStrategy
dataProcessor
=
EquipDataProcessStrategyContext
.
getStrategy
(
model
);
IEquipChangeDataProcessStrategy
dataProcessor
=
EquipDataProcessStrategyContext
.
getStrategy
(
model
);
List
<
FieldChangeMeta
>
allChangeColumns
=
dataProcessor
.
handle
(
changeData
,
bizId
,
this
::
callBack
);
HandleResult
handleResult
=
dataProcessor
.
handle
(
changeData
,
bizId
);
List
<
FieldChangeMeta
>
bizEditColumns
=
postSave
(
bizId
,
applyNo
,
model
,
changeData
,
allChangeColumns
);
List
<
FieldChangeMeta
>
allChangeColumns
=
handleResult
.
getFieldChangeMetas
()
==
null
?
new
ArrayList
<>()
:
handleResult
.
getFieldChangeMetas
();
List
<
FieldChangeMeta
>
bizEditColumns
=
postSave
(
bizId
,
applyNo
,
model
,
changeData
,
allChangeColumns
,
handleResult
.
getPipelineChangeItemMap
());
allChangeColumns
.
addAll
(
bizEditColumns
);
allChangeColumns
.
addAll
(
bizEditColumns
);
// 发送数据变更消息
// 发送数据变更消息
publish2OtherBiz
(
allChangeColumns
,
applyNo
,
oData
,
selectedOrgInfo
);
publish2OtherBiz
(
allChangeColumns
,
applyNo
,
oData
,
selectedOrgInfo
);
}
}
}
}
private
void
callBack
(
Map
<
String
,
List
<
PipelineChangeItemDto
>>
stringListMap
)
{
/**
* 是否需要暂存数据-暂存保存数据到json--管道专用
*
* @param applyNo 单据号
* @return yes-存json;no-实时存库
*/
protected
Boolean
requiresTemporarySave
(
String
applyNo
)
{
return
!
bizIsFinished
(
applyNo
);
}
/**
* 各业务暂存的管道数据--管道专用
*
* @param applyNo 申请单号
* @return 管道信息
*/
protected
List
<
PipelineChangeItemDto
>
getsTemporaryData
(
String
applyNo
)
{
return
new
ArrayList
<>();
}
}
public
abstract
void
preSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
);
public
abstract
void
preSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
);
...
@@ -98,7 +122,7 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
...
@@ -98,7 +122,7 @@ public abstract class DefaultBizDataChangeHandler<U extends BaseBizDataChangeEve
case
equip:
case
equip:
return
service
.
getEquipDetailByRecord
(
bizId
);
return
service
.
getEquipDetailByRecord
(
bizId
);
case
project:
case
project:
return
service
.
getProject
ContraptionBySeq
(
bizId
,
getEqs
(
applyNo
));
return
service
.
getProject
DetailBySeq
(
bizId
,
getEqs
(
applyNo
),
requiresTemporarySave
(
applyNo
),
getsTemporaryData
(
applyNo
));
default
:
default
:
throw
new
BadRequest
(
"unknown type for getSubDetail"
);
throw
new
BadRequest
(
"unknown type for getSubDetail"
);
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationR
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationR
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgChangeRegistrationReform
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -61,7 +62,7 @@ public class ChangeRegistrationReformDataChangeHandler extends DefaultBizDataCha
...
@@ -61,7 +62,7 @@ public class ChangeRegistrationReformDataChangeHandler extends DefaultBizDataCha
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
// 更新eq表、管道纳管状态、使用登记证;改更新本次新增、编辑的管道record集合到流水表
// 更新eq表、管道纳管状态、使用登记证;改更新本次新增、编辑的管道record集合到流水表
changeRegistrationReformEditUpdateService
.
updateBizInfo
(
allChangeColumns
,
applyNo
,
model
);
changeRegistrationReformEditUpdateService
.
updateBizInfo
(
allChangeColumns
,
applyNo
,
model
);
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationT
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationT
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgChangeRegistrationTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class ChangeRegistrationTransferDataChangeHandler extends DefaultBizDataC
...
@@ -36,7 +37,7 @@ public class ChangeRegistrationTransferDataChangeHandler extends DefaultBizDataC
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationU
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeRegistrationU
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgChangeRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class ChangeRegistrationUnitDataChangeHandler extends DefaultBizDataChang
...
@@ -36,7 +37,7 @@ public class ChangeRegistrationUnitDataChangeHandler extends DefaultBizDataChang
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeVehicleRegist
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.changeVehicleRegist
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgChangeVehicleRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class ChangeVehicleRegistrationUnitDataChangeHandler extends DefaultBizDa
...
@@ -36,7 +37,7 @@ public class ChangeVehicleRegistrationUnitDataChangeHandler extends DefaultBizDa
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.enableDisable;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.enableDisable;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgEnableDisable
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class EnableDisableDataChangeHandler extends DefaultBizDataChangeHandler<
...
@@ -36,7 +37,7 @@ public class EnableDisableDataChangeHandler extends DefaultBizDataChangeHandler<
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.equipTransfer;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.equipTransfer;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class EquipTransferDataChangeHandler extends DefaultBizDataChangeHandler<
...
@@ -36,7 +37,7 @@ public class EquipTransferDataChangeHandler extends DefaultBizDataChangeHandler<
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.installNotice;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.installNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -33,7 +34,7 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
...
@@ -33,7 +34,7 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintainNotice;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintainNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class MaintainNoticeDataChangeHandler extends DefaultBizDataChangeHandler
...
@@ -36,7 +37,7 @@ public class MaintainNoticeDataChangeHandler extends DefaultBizDataChangeHandler
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintenanceContract
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.maintenanceContract
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class MaintenanceContractDataChangeHandler extends DefaultBizDataChangeHa
...
@@ -36,7 +37,7 @@ public class MaintenanceContractDataChangeHandler extends DefaultBizDataChangeHa
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newEquip
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newEquip
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
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.event.BaseBizDataChangeEvent
;
...
@@ -29,7 +30,7 @@ public class NewEquipDataChangeHandler extends DefaultBizDataChangeHandler<BaseB
...
@@ -29,7 +30,7 @@ public class NewEquipDataChangeHandler extends DefaultBizDataChangeHandler<BaseB
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newProject
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
newProject
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
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.event.BaseBizDataChangeEvent
;
...
@@ -29,7 +30,7 @@ public class NewProjectDataChangeHandler extends DefaultBizDataChangeHandler<Bas
...
@@ -29,7 +30,7 @@ public class NewProjectDataChangeHandler extends DefaultBizDataChangeHandler<Bas
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
// 更新管道纳管状态、使用登记证编号业务信息
// 更新管道纳管状态、使用登记证编号业务信息
newProjectEditUpdateService
.
updateBizInfo
(
bizId
);
newProjectEditUpdateService
.
updateBizInfo
(
bizId
);
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.reformNotice;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.reformNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -33,7 +34,7 @@ public class ReformNoticeDataChangeHandler extends DefaultBizDataChangeHandler<B
...
@@ -33,7 +34,7 @@ public class ReformNoticeDataChangeHandler extends DefaultBizDataChangeHandler<B
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.scrapCancel;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.scrapCancel;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgScrapCancel
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class ScrapCancelDataChangeHandler extends DefaultBizDataChangeHandler<Ba
...
@@ -36,7 +37,7 @@ public class ScrapCancelDataChangeHandler extends DefaultBizDataChangeHandler<Ba
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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/strategy/IBizDataChangeHandleStrategy.java
View file @
00ee2949
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -42,13 +43,14 @@ public interface IBizDataChangeHandleStrategy {
...
@@ -42,13 +43,14 @@ public interface IBizDataChangeHandleStrategy {
/**
/**
* 保存
* 保存
*
*
* @param bizId 设备record或者装置id
* @param bizId 设备record或者装置id
* @param applyNo 单据编号
* @param applyNo 单据编号
* @param model @see ModelType
* @param model @see ModelType
* @param changeData 变更数据
* @param changeData 变更数据
* @param allChangeColumns 变化的字段
* @param allChangeColumns 变化的字段
* @param pipelineChangeItemMap 变化的管道信息汇总
*/
*/
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
);
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
);
/**
/**
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.transferNotice;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.transferNotice;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class TransferNoticeDataChangeHandler extends DefaultBizDataChangeHandler
...
@@ -36,7 +37,7 @@ public class TransferNoticeDataChangeHandler extends DefaultBizDataChangeHandler
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
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.api.enums.BusinessTypeEnum
;
...
@@ -64,20 +65,44 @@ public class UseRegisterDataChangeHandler extends DefaultBizDataChangeHandler<Ba
...
@@ -64,20 +65,44 @@ public class UseRegisterDataChangeHandler extends DefaultBizDataChangeHandler<Ba
useRegisterUpdateService
.
backupOPipelineData
(
applyNo
,
model
);
useRegisterUpdateService
.
backupOPipelineData
(
applyNo
,
model
);
}
}
/**
* 管道专用
* @param applyNo 单据号
* 判断数据是实时落库,还是先存到json
* @return 是否需要临时存储
*/
@Override
public
Boolean
requiresTemporarySave
(
String
applyNo
)
{
return
!
bizIsFinished
(
applyNo
);
}
/**
* 管道专用
* 临时存储的json 管道
*
* @param applyNo 申请单号
* @return 暂存的管道列表
*/
@Override
public
List
<
PipelineChangeItemDto
>
getsTemporaryData
(
String
applyNo
)
{
return
useRegisterUpdateService
.
getsTemporaryData
(
applyNo
);
}
/**
/**
* 保存
* 保存
*
*
* @param applyNo 单据编号
* @param applyNo 单据编号
* @param model @see IBizDataChangeHandleStrategy.ModelType
* @param model @see IBizDataChangeHandleStrategy.ModelType
* @param changeData 前端不支持分组-目前为平铺数据结构
* @param changeData 前端不支持分组-目前为平铺数据结构
* @param allChangeColumns 变化的字段集合
* @param allChangeColumns 变化的字段集合
* @param pipelineChangeItemMap 变化的管道
*/
*/
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
List
<
FieldChangeMeta
>
bizEditColumns
=
new
ArrayList
<>();
// 流程中时-更新单据-业务冗余的字段、eq表、管道状态,记录本次新增、编辑的管道record集合
// 流程中时-更新单据-业务冗余的字段、eq表、管道状态,记录本次新增、编辑的管道record集合
useRegisterUpdateService
.
updateBizInfo
(
allChangeColumns
,
bizId
,
applyNo
,
model
);
useRegisterUpdateService
.
updateBizInfo
(
allChangeColumns
,
bizId
,
applyNo
,
model
,
pipelineChangeItemMap
);
return
bizEditColumns
;
return
bizEditColumns
;
}
}
...
...
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/UseRegisterUpdateService.java
View file @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
useRegister
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
useRegister
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.constant.EditConstant
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
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.CommonEquipDataProcessService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationEqServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationEqServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.ListUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
@Service
@Service
@RequiredArgsConstructor
@RequiredArgsConstructor
...
@@ -43,7 +47,9 @@ public class UseRegisterUpdateService {
...
@@ -43,7 +47,9 @@ public class UseRegisterUpdateService {
private
final
UseRegisterBackupManager
useRegisterBackupManager
;
private
final
UseRegisterBackupManager
useRegisterBackupManager
;
public
void
updateBizInfo
(
List
<
FieldChangeMeta
>
allChangeColumns
,
String
bizId
,
String
applyNo
,
IBizDataChangeHandleStrategy
.
ModelType
model
)
{
private
final
PieLineLevelTypeHandler
pieLineLevelTypeHandler
;
public
void
updateBizInfo
(
List
<
FieldChangeMeta
>
allChangeColumns
,
String
bizId
,
String
applyNo
,
IBizDataChangeHandleStrategy
.
ModelType
model
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
if
(
model
.
equals
(
IBizDataChangeHandleStrategy
.
ModelType
.
singleEquip
))
{
if
(
model
.
equals
(
IBizDataChangeHandleStrategy
.
ModelType
.
singleEquip
))
{
JgUseRegistration
useRegistration
=
jgUseRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getStatus
).
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
));
JgUseRegistration
useRegistration
=
jgUseRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getStatus
).
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
));
// 非管道类设备且非已完成状态时,在编辑后进行内部设备代码的更新
// 非管道类设备且非已完成状态时,在编辑后进行内部设备代码的更新
...
@@ -59,15 +65,16 @@ public class UseRegisterUpdateService {
...
@@ -59,15 +65,16 @@ public class UseRegisterUpdateService {
if
(
model
.
equals
(
IBizDataChangeHandleStrategy
.
ModelType
.
singleProject
))
{
if
(
model
.
equals
(
IBizDataChangeHandleStrategy
.
ModelType
.
singleProject
))
{
JgUseRegistration
useRegistration
=
jgUseRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getProjectContraptionId
,
JgUseRegistration:
:
getOriginProjectContraptionIds
,
JgUseRegistration:
:
getUseRegistrationCode
).
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
));
JgUseRegistration
useRegistration
=
jgUseRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getProjectContraptionId
,
JgUseRegistration:
:
getOriginProjectContraptionIds
,
JgUseRegistration:
:
getUseRegistrationCode
).
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
));
if
(!
useRegistration
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()))
{
// 非完成状态更新eq表
if
(!
useRegistration
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()))
{
// 非完成状态更新eq表
// 1.按照装置id+非纳管状态,查询新增的管道
// 1.eq表删除
List
<
JgUseRegistrationEq
>
eqsNew
=
this
.
getNewPieLines
(
useRegistration
);
// 2.按照原装置id,查询剩余的管道
List
<
JgUseRegistrationEq
>
eqsRemained
=
this
.
getRemainedPieLines
(
useRegistration
);
// 3.eq表删除
this
.
deleteRelationEq
(
useRegistration
.
getSequenceNbr
());
this
.
deleteRelationEq
(
useRegistration
.
getSequenceNbr
());
//
4
.插入eq表
//
2
.插入eq表
List
<
JgUseRegistrationEq
>
registrationEqs
=
ListUtils
.
union
(
eqsNew
,
eqsRemained
);
List
<
JgUseRegistrationEq
>
registrationEqs
=
this
.
buildPipelineEqs
(
pipelineChangeItemMap
);
this
.
insertRelationEq
(
useRegistration
.
getSequenceNbr
(),
registrationEqs
);
this
.
insertRelationEq
(
useRegistration
.
getSequenceNbr
(),
registrationEqs
);
// 3.json history插入
JSONObject
jsonObject
=
jgUseRegistrationService
.
getHisData
(
useRegistration
);
jsonObject
.
remove
(
"equipmentLists"
);
jsonObject
.
put
(
"equipmentLists"
,
this
.
buildEquipmentLists
(
pipelineChangeItemMap
));
jgUseRegistrationService
.
updateHistory
(
jsonObject
,
bizId
,
useRegistration
.
getSequenceNbr
()
+
""
,
null
);
}
else
{
// 完成时,把管道更新为已纳管状态
}
else
{
// 完成时,把管道更新为已纳管状态
// 按照装置id查询装置下管道,更新为已纳管状态
// 按照装置id查询装置下管道,更新为已纳管状态
List
<
IdxBizJgUseInfo
>
useInfos
=
jgUseRegistrationService
.
getIdxBizJgUseInfoService
().
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
useRegistration
.
getProjectContraptionId
()).
eq
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgUseInfo:
:
getRecord
));
List
<
IdxBizJgUseInfo
>
useInfos
=
jgUseRegistrationService
.
getIdxBizJgUseInfoService
().
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
useRegistration
.
getProjectContraptionId
()).
eq
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgUseInfo:
:
getRecord
));
...
@@ -81,9 +88,41 @@ public class UseRegisterUpdateService {
...
@@ -81,9 +88,41 @@ public class UseRegisterUpdateService {
}
}
}
}
private
List
<
Map
<
String
,
Object
>>
buildEquipmentLists
(
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
List
<
PipelineChangeItemDto
>
newPipelines
=
pipelineChangeItemMap
.
get
(
EditConstant
.
NEW_PIPELINES
);
List
<
PipelineChangeItemDto
>
updPipelines
=
pipelineChangeItemMap
.
get
(
EditConstant
.
UPDATE_PIPELINES
);
// 兼容处理使用登记,管道级别存的为name,标准编辑为code,管道名称(登记单元)key为productName,而非为标准的pipeName
return
Stream
.
concat
(
newPipelines
.
stream
(),
updPipelines
.
stream
()).
map
(
item
->
{
Map
<
String
,
Object
>
one
=
BeanUtil
.
beanToMap
(
item
);
// 管道级别存的为name,标准编辑为code,进行转换,code时返回name, name时返回还是name
one
.
put
(
"deviceLevel"
,
pieLineLevelTypeHandler
.
handle
(
item
.
getDeviceLevel
()));
one
.
put
(
"productName"
,
item
.
getPipeName
());
// 日期字段处理
one
.
put
(
"inspectDate"
,
DateUtil
.
formatDate
(
item
.
getInspectDate
()));
one
.
put
(
"nextInspectDate"
,
DateUtil
.
formatDate
(
item
.
getNextInspectDate
()));
// 检验结论
one
.
put
(
"inspectC"
,
DateUtil
.
formatDate
(
item
.
getNextInspectDate
()));
// json需要处理 否则JSON.toJSONString 回转义
one
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
getInspectReport
()));
return
one
;
}).
collect
(
Collectors
.
toList
());
}
private
List
<
JgUseRegistrationEq
>
buildPipelineEqs
(
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
List
<
PipelineChangeItemDto
>
newPipelines
=
pipelineChangeItemMap
.
get
(
EditConstant
.
NEW_PIPELINES
);
List
<
PipelineChangeItemDto
>
updPipelines
=
pipelineChangeItemMap
.
get
(
EditConstant
.
UPDATE_PIPELINES
);
return
Stream
.
concat
(
newPipelines
.
stream
(),
updPipelines
.
stream
()).
map
(
item
->
{
JgUseRegistrationEq
useRegistrationEq
=
new
JgUseRegistrationEq
();
useRegistrationEq
.
setEquId
(
item
.
getRecord
());
useRegistrationEq
.
setOriginProjectContraptionId
(
item
.
getProjectContraptionId
());
return
useRegistrationEq
;
}).
collect
(
Collectors
.
toList
());
}
/**
/**
* 备份原始数据
* 备份原始数据
*
* @param applyNo 单据号
* @param applyNo 单据号
* @param model 类型
* @param model 类型
*/
*/
...
@@ -124,21 +163,6 @@ public class UseRegisterUpdateService {
...
@@ -124,21 +163,6 @@ public class UseRegisterUpdateService {
jgUseRegistrationService
.
getJgUseRegistrationEqService
().
remove
(
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>().
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
sequenceNbr
));
jgUseRegistrationService
.
getJgUseRegistrationEqService
().
remove
(
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>().
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
sequenceNbr
));
}
}
private
List
<
JgUseRegistrationEq
>
getRemainedPieLines
(
JgUseRegistration
useRegistration
)
{
String
pIds
=
useRegistration
.
getOriginProjectContraptionIds
();
// 合并的装置逻辑,按照原始装置查询其下的管道
if
(
StringUtils
.
isNotEmpty
(
pIds
)
&&
!
pIds
.
equals
(
useRegistration
.
getProjectContraptionId
()))
{
List
<
IdxBizJgUseInfo
>
useInfos
=
jgUseRegistrationService
.
getIdxBizJgUseInfoService
().
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
in
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
Arrays
.
asList
(
pIds
.
split
(
","
))).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgUseInfo:
:
getRecord
));
return
buildEqs
(
useRegistration
,
useInfos
);
}
// 非装置合并逻辑,按照新装置查询其下的管道
if
((
StringUtils
.
isNotEmpty
(
pIds
)
&&
pIds
.
equals
(
useRegistration
.
getProjectContraptionId
()))
||
(
StringUtils
.
isEmpty
(
useRegistration
.
getOriginProjectContraptionIds
())))
{
List
<
IdxBizJgUseInfo
>
useInfos
=
jgUseRegistrationService
.
getIdxBizJgUseInfoService
().
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
useRegistration
.
getProjectContraptionId
()).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgUseInfo:
:
getRecord
));
return
buildEqs
(
useRegistration
,
useInfos
);
}
return
new
ArrayList
<>();
}
private
List
<
JgUseRegistrationEq
>
buildEqs
(
JgUseRegistration
useRegistration
,
List
<
IdxBizJgUseInfo
>
useInfos
)
{
private
List
<
JgUseRegistrationEq
>
buildEqs
(
JgUseRegistration
useRegistration
,
List
<
IdxBizJgUseInfo
>
useInfos
)
{
return
useInfos
.
stream
().
map
(
u
->
{
return
useInfos
.
stream
().
map
(
u
->
{
...
@@ -150,8 +174,15 @@ public class UseRegisterUpdateService {
...
@@ -150,8 +174,15 @@ public class UseRegisterUpdateService {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
private
List
<
JgUseRegistrationEq
>
getNewPieLines
(
JgUseRegistration
useRegistration
)
{
List
<
IdxBizJgUseInfo
>
useInfos
=
jgUseRegistrationService
.
getIdxBizJgUseInfoService
().
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
useRegistration
.
getProjectContraptionId
()).
eq
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
).
select
(
IdxBizJgUseInfo:
:
getRecord
,
TzsBaseEntity:
:
getSequenceNbr
));
public
List
<
PipelineChangeItemDto
>
getsTemporaryData
(
String
applyNo
)
{
return
buildEqs
(
useRegistration
,
useInfos
);
JgUseRegistration
useRegistration
=
jgUseRegistrationService
.
getOne
(
new
LambdaQueryWrapper
<
JgUseRegistration
>().
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getProjectContraptionId
,
JgUseRegistration:
:
getOriginProjectContraptionIds
).
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
));
JSONObject
jsonObject
=
jgUseRegistrationService
.
getHisData
(
useRegistration
);
if
(
StringUtils
.
isNotEmpty
(
useRegistration
.
getProjectContraptionId
()))
{
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
jsonObject
.
get
(
"equipmentLists"
);
return
BeanUtil
.
copyToList
(
equipmentLists
,
PipelineChangeItemDto
.
class
);
}
else
{
return
Collections
.
emptyList
();
}
}
}
}
}
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 @
00ee2949
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.vehicleInformation;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.vehicleInformation;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
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.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
...
@@ -36,7 +37,7 @@ public class VehicleInformationDataChangeHandler extends DefaultBizDataChangeHan
...
@@ -36,7 +37,7 @@ public class VehicleInformationDataChangeHandler extends DefaultBizDataChangeHan
}
}
@Override
@Override
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
List
<
FieldChangeMeta
>
postSave
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChangeColumns
,
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
...
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/CommonEquipDataProcessService.java
View file @
00ee2949
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.backup.DefaultEquipBackupManager
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.backup.DefaultEquipBackupManager
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.FormatService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.FormatService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.RegionCodeTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.RegionCodeTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.JsonDiffUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.JsonDiffUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
...
@@ -127,6 +128,8 @@ public class CommonEquipDataProcessService {
...
@@ -127,6 +128,8 @@ public class CommonEquipDataProcessService {
private
final
RegionCodeTypeHandler
regionCodeTypeHandler
;
private
final
RegionCodeTypeHandler
regionCodeTypeHandler
;
private
final
PieLineLevelTypeHandler
pieLineLevelTypeHandler
;
private
final
IdxBizJgRegisterInfoServiceImpl
jgRegisterInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
jgRegisterInfoService
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
...
@@ -767,6 +770,93 @@ public class CommonEquipDataProcessService {
...
@@ -767,6 +770,93 @@ public class CommonEquipDataProcessService {
return
changeData
;
return
changeData
;
}
}
/**
* 简化版字段对比更新工具
* 要求:对象字段名与数据库列名一致(驼峰转下划线自动处理)
* @param oldObj 旧对象(必须有id字段)
* @param newObj 新对象(必须与旧对象同一类型)
*/
public
<
T
>
List
<
FieldChangeMeta
>
simpleTrackDiff
(
T
oldObj
,
T
newObj
,
String
changeId
)
{
List
<
FieldChangeMeta
>
changeData
=
new
ArrayList
<>();
// 基础校验
if
(
oldObj
==
null
||
newObj
==
null
)
{
throw
new
IllegalArgumentException
(
"新旧对象不能为空"
);
}
if
(!
oldObj
.
getClass
().
equals
(
newObj
.
getClass
()))
{
throw
new
IllegalArgumentException
(
"对象类型不一致"
);
}
Group
group
=
newObj
.
getClass
().
getAnnotation
(
Group
.
class
);
Class
<?>
clazz
=
oldObj
.
getClass
();
// 遍历所有字段(包含父类)
for
(
Field
field
:
getAllFields
(
clazz
))
{
try
{
field
.
setAccessible
(
true
);
Object
oldVal
=
field
.
get
(
oldObj
);
Object
newVal
=
field
.
get
(
newObj
);
FieldDisplayDefine
displayDefine
=
field
.
getAnnotation
(
FieldDisplayDefine
.
class
);
// 业务字段对比处理逻辑
if
(
displayDefine
!=
null
&&
displayDefine
.
isExist
())
{
// json 比较逻辑
if
(
displayDefine
.
type
().
equals
(
JSON
.
class
))
{
if
(!
JsonDiffUtil
.
jsonEqualsIgnoreType
((
String
)
oldVal
,
(
String
)
newVal
))
{
String
fieldName
=
displayDefine
.
value
();
FieldChangeMeta
fieldChangeMeta
=
new
FieldChangeMeta
();
fieldChangeMeta
.
setColumnKey
(
field
.
getName
());
fieldChangeMeta
.
setColumnFamily
(
group
.
value
());
fieldChangeMeta
.
setColumnLabel
(
fieldName
);
fieldChangeMeta
.
setChangeId
(
changeId
);
fieldChangeMeta
.
setIsRepeatColumn
(
displayDefine
.
isRepeatColumn
());
// 字段类型前端渲染时使用
fieldChangeMeta
.
setColumnType
(
displayDefine
.
type
().
getSimpleName
());
fieldChangeMeta
.
setColumnOldValue
(
Objects
.
toString
(
oldVal
,
null
));
fieldChangeMeta
.
setColumnNewValue
(
Objects
.
toString
(
newVal
,
null
));
fieldChangeMeta
.
setDisplayOldValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnOldValue
()));
fieldChangeMeta
.
setDisplayNewValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnNewValue
()));
changeData
.
add
(
fieldChangeMeta
);
}
continue
;
}
// 其他比较逻辑
if
(!
Objects
.
equals
(
oldVal
,
newVal
))
{
String
fieldName
=
displayDefine
.
value
();
FieldChangeMeta
fieldChangeMeta
=
new
FieldChangeMeta
();
fieldChangeMeta
.
setColumnKey
(
field
.
getName
());
fieldChangeMeta
.
setColumnFamily
(
group
.
value
());
fieldChangeMeta
.
setColumnLabel
(
fieldName
);
fieldChangeMeta
.
setChangeId
(
changeId
);
fieldChangeMeta
.
setIsRepeatColumn
(
displayDefine
.
isRepeatColumn
());
// 字段类型前端渲染时使用
fieldChangeMeta
.
setColumnType
(
displayDefine
.
type
().
getSimpleName
());
if
(
newVal
instanceof
String
)
{
fieldChangeMeta
.
setColumnOldValue
((
String
)
oldVal
);
fieldChangeMeta
.
setColumnNewValue
((
String
)
newVal
);
}
else
if
(
newVal
instanceof
Number
)
{
fieldChangeMeta
.
setColumnOldValue
(
String
.
valueOf
(
oldVal
));
fieldChangeMeta
.
setColumnNewValue
(
String
.
valueOf
(
newVal
));
}
else
if
(
newVal
instanceof
Date
)
{
fieldChangeMeta
.
setColumnOldValue
(
DateUtil
.
formatDate
((
Date
)
oldVal
));
fieldChangeMeta
.
setColumnNewValue
(
DateUtil
.
formatDate
((
Date
)
newVal
));
}
else
if
(
newVal
instanceof
Boolean
)
{
fieldChangeMeta
.
setColumnOldValue
(
Boolean
.
toString
((
Boolean
)
oldVal
));
fieldChangeMeta
.
setColumnNewValue
(
Boolean
.
toString
((
Boolean
)
newVal
));
}
else
{
fieldChangeMeta
.
setColumnOldValue
(
Objects
.
toString
(
oldVal
,
null
));
fieldChangeMeta
.
setColumnNewValue
(
Objects
.
toString
(
newVal
,
null
));
}
fieldChangeMeta
.
setDisplayOldValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnOldValue
()));
fieldChangeMeta
.
setDisplayNewValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnNewValue
()));
changeData
.
add
(
fieldChangeMeta
);
}
}
}
catch
(
IllegalAccessException
e
)
{
System
.
err
.
println
(
"字段访问失败: "
+
field
.
getName
());
}
}
return
changeData
;
}
public
Map
<
String
,
Object
>
getEquipDetailByRecord
(
String
record
)
{
public
Map
<
String
,
Object
>
getEquipDetailByRecord
(
String
record
)
{
Map
<
String
,
Object
>
re
=
new
HashMap
<>();
Map
<
String
,
Object
>
re
=
new
HashMap
<>();
...
@@ -927,15 +1017,37 @@ public class CommonEquipDataProcessService {
...
@@ -927,15 +1017,37 @@ public class CommonEquipDataProcessService {
return
result
;
return
result
;
}
}
public
Map
<
String
,
Object
>
getProjectContraptionBySeq
(
String
projectContraptionId
,
Set
<
String
>
records
)
{
/**
* 重新装置详情
* @param projectContraptionId 装置id
* @param records 装置下的管道
* @param aBoolean 是否需要json数据
* @param oldJsonData json数据
* @return 装置详情
*/
public
Map
<
String
,
Object
>
getProjectDetailBySeq
(
String
projectContraptionId
,
Set
<
String
>
records
,
Boolean
aBoolean
,
List
<
PipelineChangeItemDto
>
oldJsonData
)
{
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionServiceImpl
.
getById
(
projectContraptionId
);
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionServiceImpl
.
getById
(
projectContraptionId
);
Map
<
String
,
Object
>
re
=
BeanUtil
.
beanToMap
(
projectContraption
);
Map
<
String
,
Object
>
re
=
BeanUtil
.
beanToMap
(
projectContraption
);
this
.
convertStringToJsonObject
(
re
,
IdxBizJgProjectContraptionServiceImpl
.
getJsonFieldsCamel
());
this
.
convertStringToJsonObject
(
re
,
IdxBizJgProjectContraptionServiceImpl
.
getJsonFieldsCamel
());
List
<
Map
<
String
,
Object
>>
equList
=
jgUseRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipmentForEdit
(
new
ArrayList
<>(
records
));
if
(!
aBoolean
){
// 实时查询逻辑
// 检验报告数据格式化 转json
List
<
Map
<
String
,
Object
>>
equList
=
jgUseRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipmentForEdit
(
new
ArrayList
<>(
records
));
equList
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
get
(
"inspectReport"
).
toString
())));
// 检验报告数据格式化 转json
equList
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
get
(
"inspectReport"
).
toString
())));
re
.
put
(
"tableData"
,
equList
);
}
else
{
// 使用json的暂存数据逻辑
// 直接使用json暂存的管道数据 + todo isEdit调整
re
.
put
(
"tableData"
,
oldJsonData
.
stream
().
map
(
r
->{
Map
<
String
,
Object
>
item
=
BeanUtil
.
beanToMap
(
r
);
// 检验报告数据格式化 转json
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
r
.
getInspectReport
()));
// 兼容存量数据
// 1.管道级别 原业务存的name,编辑存的code,进行转换
item
.
put
(
"deviceLevel"
,
pieLineLevelTypeHandler
.
getCodeByName
(
r
.
getDeviceLevel
()));
item
.
put
(
"isEdit"
,
true
);
return
item
;
}).
collect
(
Collectors
.
toList
()));
}
re
.
put
(
"projectContraptionId"
,
projectContraption
.
getSequenceNbr
());
re
.
put
(
"projectContraptionId"
,
projectContraption
.
getSequenceNbr
());
re
.
put
(
"tableData"
,
equList
);
re
.
put
(
"dataSourceClassify"
,
this
.
genDataSource
(
projectContraption
.
getDataSource
()));
re
.
put
(
"dataSourceClassify"
,
this
.
genDataSource
(
projectContraption
.
getDataSource
()));
return
re
;
return
re
;
}
}
...
...
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/PieLineDataChangeServiceImpl.java
View file @
00ee2949
...
@@ -136,6 +136,8 @@ public class PieLineDataChangeServiceImpl {
...
@@ -136,6 +136,8 @@ public class PieLineDataChangeServiceImpl {
void
newPieLine
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
PipelineChangeItemDto
newPieLine
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
void
newPieLine
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
PipelineChangeItemDto
newPieLine
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
String
record
=
idUtil
.
nextId
().
toString
();
String
record
=
idUtil
.
nextId
().
toString
();
newPieLine
.
setRecord
(
record
);
newPieLine
.
setProjectContraptionId
(
projectContraptionChangeDataDto
.
getProjectContraptionId
());
this
.
buildNewPieLineLog
(
projectContraptionChangeDataDto
,
record
,
allChangeColumns
);
this
.
buildNewPieLineLog
(
projectContraptionChangeDataDto
,
record
,
allChangeColumns
);
// 检验信息
// 检验信息
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
BeanUtil
.
copyProperties
(
newPieLine
,
IdxBizJgInspectionDetectionInfo
.
class
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
BeanUtil
.
copyProperties
(
newPieLine
,
IdxBizJgInspectionDetectionInfo
.
class
);
...
@@ -178,6 +180,7 @@ public class PieLineDataChangeServiceImpl {
...
@@ -178,6 +180,7 @@ public class PieLineDataChangeServiceImpl {
commonEquipDataProcessService
.
getJgFactoryInfoMapper
().
insert
(
factoryInfo
);
commonEquipDataProcessService
.
getJgFactoryInfoMapper
().
insert
(
factoryInfo
);
// 施工信息
// 施工信息
newPieLine
.
setUscDate
(
newPieLine
.
getUscDate
()
!=
null
?
DateUtil
.
parse
(
newPieLine
.
getUscDate
(),
DatePattern
.
NORM_MONTH_FORMAT
).
toDateStr
()
:
null
);
IdxBizJgConstructionInfo
constructionInfo
=
BeanUtil
.
copyProperties
(
newPieLine
,
IdxBizJgConstructionInfo
.
class
);
IdxBizJgConstructionInfo
constructionInfo
=
BeanUtil
.
copyProperties
(
newPieLine
,
IdxBizJgConstructionInfo
.
class
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecDate
(
new
Date
());
constructionInfo
.
setRecDate
(
new
Date
());
...
...
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 @
00ee2949
...
@@ -7,11 +7,10 @@ import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
...
@@ -7,11 +7,10 @@ import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineDesignChangeDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -22,7 +21,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -22,7 +21,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Consumer
;
/**
/**
* 单个维护设备-策略实现类
* 单个维护设备-策略实现类
...
@@ -35,7 +33,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -35,7 +33,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
@Override
@Override
public
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
record
,
Consumer
<
Map
<
String
,
List
<
PipelineChangeItemDto
>>>
callBack
)
{
public
HandleResult
handle
(
Map
<
String
,
Object
>
changeData
,
String
record
)
{
JSONObject
changeJson
=
new
JSONObject
(
changeData
);
JSONObject
changeJson
=
new
JSONObject
(
changeData
);
List
<
FieldChangeMeta
>
allChangeColumns
=
new
ArrayList
<>();
List
<
FieldChangeMeta
>
allChangeColumns
=
new
ArrayList
<>();
...
@@ -137,7 +135,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -137,7 +135,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
this
.
updateOtherEquipInSameCert
(
useInfoNew
,
registerInfoNew
,
registerInfoOld
,
allChangeColumns
);
this
.
updateOtherEquipInSameCert
(
useInfoNew
,
registerInfoNew
,
registerInfoOld
,
allChangeColumns
);
// 设备技术参数入库处理
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerInfoOld
.
getEquList
(),
record
,
changeData
,
allChangeColumns
);
commonEquipDataProcessService
.
updateTechParamInfo
(
registerInfoOld
.
getEquList
(),
record
,
changeData
,
allChangeColumns
);
return
allChangeColumns
;
return
HandleResult
.
builder
().
fieldChangeMetas
(
allChangeColumns
).
build
()
;
}
}
private
void
updateOtherEquipInSameCert
(
IdxBizJgUseInfo
useInfoNew
,
IdxBizJgRegisterInfo
registerInfoNew
,
IdxBizJgRegisterInfo
registerInfoOld
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
private
void
updateOtherEquipInSameCert
(
IdxBizJgUseInfo
useInfoNew
,
IdxBizJgRegisterInfo
registerInfoNew
,
IdxBizJgRegisterInfo
registerInfoOld
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
...
...
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 @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.constant.EditConstant
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
...
@@ -18,8 +24,10 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -18,8 +24,10 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.DateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Consumer
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
/**
* 单个装置维护-策略实现类
* 单个装置维护-策略实现类
...
@@ -32,9 +40,11 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -32,9 +40,11 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
private
final
PieLineDataChangeServiceImpl
pieLineDataChangeService
;
private
final
PieLineDataChangeServiceImpl
pieLineDataChangeService
;
private
final
PieLineLevelTypeHandler
pieLineLevelTypeHandler
;
@Override
@Override
public
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
projectContraptionId
,
Consumer
<
Map
<
String
,
List
<
PipelineChangeItemDto
>>>
callBack
)
{
public
HandleResult
handle
(
Map
<
String
,
Object
>
changeData
,
String
projectContraptionId
)
{
JSONObject
data
=
(
JSONObject
)
changeData
;
JSONObject
data
=
(
JSONObject
)
changeData
;
// 新增编辑的管道------------------tableData
// 新增编辑的管道------------------tableData
JSONArray
insertOrEditPieLines
=
data
.
getJSONArray
(
RequestChangeData
.
multiDataKey
);
JSONArray
insertOrEditPieLines
=
data
.
getJSONArray
(
RequestChangeData
.
multiDataKey
);
...
@@ -46,8 +56,13 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -46,8 +56,13 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
if
(
items
.
size
()
!=
items
.
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getPipelineNumber
).
distinct
().
count
())
{
if
(
items
.
size
()
!=
items
.
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getPipelineNumber
).
distinct
().
count
())
{
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
}
}
List
<
PipelineChangeItemDto
>
newPipelines
=
new
ArrayList
<>();
List
<
PipelineChangeItemDto
>
updatePipelines
=
new
ArrayList
<>();
List
<
PipelineChangeItemDto
>
deletePipelines
=
new
ArrayList
<>();
if
(
deletedPieLines
!=
null
&&
!
deletedPieLines
.
isEmpty
())
{
if
(
deletedPieLines
!=
null
&&
!
deletedPieLines
.
isEmpty
())
{
List
<
PipelineChangeItemDto
>
deletedPieLinesJavaList
=
deletedPieLines
.
toJavaList
(
PipelineChangeItemDto
.
class
);
List
<
PipelineChangeItemDto
>
deletedPieLinesJavaList
=
deletedPieLines
.
toJavaList
(
PipelineChangeItemDto
.
class
);
deletePipelines
=
new
ArrayList
<>(
deletedPieLinesJavaList
);
pieLineDataChangeService
.
deletePieLineBatch
(
deletedPieLinesJavaList
,
allChangeColumns
,
projectContraptionId
);
pieLineDataChangeService
.
deletePieLineBatch
(
deletedPieLinesJavaList
,
allChangeColumns
,
projectContraptionId
);
}
}
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
...
@@ -55,29 +70,107 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -55,29 +70,107 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
this
.
setNameForDictKey
(
projectContraptionChangeDataDto
);
this
.
setNameForDictKey
(
projectContraptionChangeDataDto
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
Boolean
isRequireTemporarySave
=
data
.
getBoolean
(
DefaultBizDataChangeHandler
.
IS_REQUIRES_TEMPORARY_SAVE
);
JSONArray
oldPieLineJSONArray
=
data
.
getJSONArray
(
DefaultBizDataChangeHandler
.
TEMPORARY_PIPELINES_DATA
);
List
<
PipelineChangeItemDto
>
oriPipelineList
=
oldPieLineJSONArray
.
toJavaList
(
PipelineChangeItemDto
.
class
);
Map
<
String
,
PipelineChangeItemDto
>
oldRecordPipelineMap
=
oriPipelineList
.
stream
().
collect
(
Collectors
.
toMap
(
TechParamsPipelineChangeFieldDto:
:
getRecord
,
Function
.
identity
()));
// 3.管道信息入库保存
// 3.管道信息入库保存
items
.
forEach
(
item
->
{
items
.
forEach
(
pipelineNew
->
{
String
record
=
item
.
getRecord
();
String
record
=
pipelineNew
.
getRecord
();
if
(
record
==
null
)
{
// 新增的管道逻辑
if
(
record
==
null
)
{
// 新增的管道逻辑
pieLineDataChangeService
.
newPieLine
(
projectContraptionChangeDataDto
,
item
,
allChangeColumns
);
pieLineDataChangeService
.
newPieLine
(
projectContraptionChangeDataDto
,
pipelineNew
,
allChangeColumns
);
newPipelines
.
add
(
pipelineNew
);
}
else
{
// 更新管道逻辑
}
else
{
// 更新管道逻辑
// 基本信息
if
(
isRequireTemporarySave
)
{
// 记录变化流水
this
.
updateUseInfo
(
item
,
projectContraptionChangeDataDto
,
allChangeColumns
);
PipelineChangeItemDto
pipelineOld
=
oldRecordPipelineMap
.
get
(
record
);
// 安装信息
// 安装信息变更日志
this
.
updateConstructionInfo
(
item
,
projectContraptionChangeDataDto
,
allChangeColumns
);
this
.
buildConstructionInfoChangeLog
(
record
,
pipelineNew
,
pipelineOld
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 检验信息
// 检验信息变更日志
this
.
updateInspectInfo
(
item
,
projectContraptionChangeDataDto
,
allChangeColumns
);
this
.
buildInspectInfoChangeLog
(
record
,
pipelineNew
,
pipelineOld
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 设计信息更新
// 设计信息变更日志
pieLineDataChangeService
.
saveDesignForPieLine
(
record
,
allChangeColumns
,
item
);
this
.
buildDesignForPieLineChangeLog
(
record
,
pipelineNew
,
pipelineOld
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 技术参数入库保存
// 技术参数变更日志
TechParamsPipelineChangeFieldDto
paramsPipelineChangeFieldDto
=
new
TechParamsPipelineChangeFieldDto
();
this
.
buildTechParamChangeLog
(
record
,
pipelineNew
,
pipelineOld
,
projectContraptionChangeDataDto
,
allChangeColumns
);
BeanUtil
.
copyProperties
(
item
,
paramsPipelineChangeFieldDto
,
true
);
}
else
{
// 实时更新
commonEquipDataProcessService
.
savePieLineTechParam
(
record
,
allChangeColumns
,
paramsPipelineChangeFieldDto
);
// 基本信息
this
.
updateUseInfo
(
pipelineNew
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 安装信息
this
.
updateConstructionInfo
(
pipelineNew
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 检验信息
this
.
updateInspectInfo
(
pipelineNew
,
projectContraptionChangeDataDto
,
allChangeColumns
);
// 设计信息更新
pieLineDataChangeService
.
saveDesignForPieLine
(
record
,
allChangeColumns
,
pipelineNew
);
// 技术参数入库保存
TechParamsPipelineChangeFieldDto
paramsPipelineChangeFieldDto
=
new
TechParamsPipelineChangeFieldDto
();
BeanUtil
.
copyProperties
(
pipelineNew
,
paramsPipelineChangeFieldDto
,
true
);
commonEquipDataProcessService
.
savePieLineTechParam
(
record
,
allChangeColumns
,
paramsPipelineChangeFieldDto
);
}
updatePipelines
.
add
(
pipelineNew
);
}
}
});
});
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pmap
=
MapUtil
.<
String
,
List
<
PipelineChangeItemDto
>>
builder
().
put
(
EditConstant
.
NEW_PIPELINES
,
newPipelines
).
put
(
EditConstant
.
UPDATE_PIPELINES
,
updatePipelines
).
put
(
EditConstant
.
DELETE_PIPELINES
,
deletePipelines
).
build
();
// 4.更新所有管道的的冗余的管道名称字段(重点注意包括本次没做使用登记的管道也要更新)
// 4.更新所有管道的的冗余的管道名称字段(重点注意包括本次没做使用登记的管道也要更新)
pieLineDataChangeService
.
updateEs
(
projectContraptionChangeDataDto
);
pieLineDataChangeService
.
updateEs
(
projectContraptionChangeDataDto
);
return
allChangeColumns
;
return
HandleResult
.
builder
().
fieldChangeMetas
(
allChangeColumns
).
pipelineChangeItemMap
(
pmap
).
build
();
}
private
void
buildTechParamChangeLog
(
String
record
,
PipelineChangeItemDto
pipelineNew
,
PipelineChangeItemDto
pipelineOld
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
TechParamsPipelineChangeFieldDto
paramsPipelineChangeFieldNew
=
new
TechParamsPipelineChangeFieldDto
();
BeanUtil
.
copyProperties
(
pipelineNew
,
paramsPipelineChangeFieldNew
,
true
);
TechParamsPipelineChangeFieldDto
paramsPipelineChangeFieldOld
=
new
TechParamsPipelineChangeFieldDto
();
BeanUtil
.
copyProperties
(
pipelineOld
,
paramsPipelineChangeFieldOld
,
true
);
// 使用登记兼容处理,使用登记老数据存的name,这里统一转换为code进行比较
paramsPipelineChangeFieldOld
.
setDeviceLevel
(
pieLineLevelTypeHandler
.
getCodeByName
(
pipelineOld
.
getDeviceLevel
()));
// 字段行转列
List
<
FieldChangeMeta
>
newPipelineChangeData
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
paramsPipelineChangeFieldNew
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
List
<
FieldChangeMeta
>
oldPipelineChangeData
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
paramsPipelineChangeFieldOld
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
// 比对
List
<
FieldChangeMeta
>
pipelineChangeFields
=
commonEquipDataProcessService
.
mergeChangeFields
(
newPipelineChangeData
,
oldPipelineChangeData
);
allChangeColumns
.
addAll
(
pipelineChangeFields
);
}
private
void
buildDesignForPieLineChangeLog
(
String
record
,
PipelineChangeItemDto
pipelineNew
,
PipelineChangeItemDto
pipelineOld
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
// 1.记录变化的数据对象
PieLineDesignChangeDataDto
pieLineDesignChangeDataNew
=
BeanUtil
.
copyProperties
(
pipelineNew
,
PieLineDesignChangeDataDto
.
class
);
PieLineDesignChangeDataDto
pieLineDesignChangeDataOld
=
BeanUtil
.
copyProperties
(
pipelineOld
,
PieLineDesignChangeDataDto
.
class
);
// 构造新对象行转列
List
<
FieldChangeMeta
>
designInfoNew
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
pieLineDesignChangeDataNew
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
List
<
FieldChangeMeta
>
designInfoOld
=
commonEquipDataProcessService
.
convertBeanField2Column2
(
pieLineDesignChangeDataOld
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
// 老数据查询行转列
allChangeColumns
.
addAll
(
commonEquipDataProcessService
.
mergeChangeFields
(
designInfoNew
,
designInfoOld
));
}
private
void
buildInspectInfoChangeLog
(
String
record
,
PipelineChangeItemDto
pipelineNew
,
PipelineChangeItemDto
pipelineOld
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfoNew
=
castPipelineItem2Inspection
(
pipelineNew
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfoOld
=
castPipelineItem2Inspection
(
pipelineOld
);
List
<
FieldChangeMeta
>
inspectionFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackDiff
(
inspectionDetectionInfoOld
,
inspectionDetectionInfoNew
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
allChangeColumns
.
addAll
(
inspectionFieldChangeMetas
);
}
private
IdxBizJgInspectionDetectionInfo
castPipelineItem2Inspection
(
PipelineChangeItemDto
pipelineChangeItemDto
)
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
new
IdxBizJgInspectionDetectionInfo
();
inspectionDetectionInfo
.
setInspectConclusion
(
pipelineChangeItemDto
.
getInspectConclusionCode
());
inspectionDetectionInfo
.
setInspectDate
(
pipelineChangeItemDto
.
getInspectDate
());
inspectionDetectionInfo
.
setInspectReport
(
pipelineChangeItemDto
.
getInspectReport
());
inspectionDetectionInfo
.
setInspectOrgCode
(
pipelineChangeItemDto
.
getInspectOrgCode
());
inspectionDetectionInfo
.
setInspectOrgName
(
pipelineChangeItemDto
.
getInspectOrgName
());
inspectionDetectionInfo
.
setInspectStaff
(
pipelineChangeItemDto
.
getInspectStaff
());
inspectionDetectionInfo
.
setInspectType
(
pipelineChangeItemDto
.
getInspectType
());
inspectionDetectionInfo
.
setNextInspectDate
(
pipelineChangeItemDto
.
getNextInspectDate
());
return
inspectionDetectionInfo
;
}
private
void
buildConstructionInfoChangeLog
(
String
record
,
PipelineChangeItemDto
pipelineNew
,
PipelineChangeItemDto
pipelineOld
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
IdxBizJgConstructionInfo
constructionInfoOld
=
new
IdxBizJgConstructionInfo
();
constructionInfoOld
.
setUscUnitName
(
pipelineOld
.
getUscUnitName
());
constructionInfoOld
.
setUscDate
(
pipelineOld
.
getUscDate
()
!=
null
?
DateUtil
.
parse
(
pipelineOld
.
getUscDate
(),
DatePattern
.
NORM_MONTH_FORMAT
)
:
null
);
IdxBizJgConstructionInfo
constructionInfoNew
=
new
IdxBizJgConstructionInfo
();
constructionInfoNew
.
setUscUnitName
(
pipelineNew
.
getUscUnitName
());
constructionInfoNew
.
setUscDate
(
pipelineNew
.
getUscDate
()
!=
null
?
DateUtil
.
parse
(
pipelineNew
.
getUscDate
(),
DatePattern
.
NORM_MONTH_FORMAT
)
:
null
);
List
<
FieldChangeMeta
>
constructionInfoFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackDiff
(
constructionInfoOld
,
constructionInfoNew
,
projectContraptionChangeDataDto
.
getProjectContraptionId
()
+
"/"
+
record
);
allChangeColumns
.
addAll
(
constructionInfoFieldChangeMetas
);
}
}
private
void
updateInspectInfo
(
PipelineChangeItemDto
item
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
private
void
updateInspectInfo
(
PipelineChangeItemDto
item
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
...
@@ -99,6 +192,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -99,6 +192,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
String
constructionInfoSeq
=
item
.
getConstructionInfoSeq
();
String
constructionInfoSeq
=
item
.
getConstructionInfoSeq
();
if
(
constructionInfoSeq
!=
null
)
{
if
(
constructionInfoSeq
!=
null
)
{
IdxBizJgConstructionInfo
constructionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgConstructionInfoService
().
getById
(
constructionInfoSeq
);
IdxBizJgConstructionInfo
constructionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgConstructionInfoService
().
getById
(
constructionInfoSeq
);
// todo 安装年月特殊处理 格式刷yyyy-MM
IdxBizJgConstructionInfo
constructionInfoNew
=
new
IdxBizJgConstructionInfo
();
IdxBizJgConstructionInfo
constructionInfoNew
=
new
IdxBizJgConstructionInfo
();
BeanUtil
.
copyProperties
(
constructionInfoOld
,
constructionInfoNew
,
true
);
BeanUtil
.
copyProperties
(
constructionInfoOld
,
constructionInfoNew
,
true
);
BeanUtil
.
copyProperties
(
item
,
constructionInfoNew
,
true
);
BeanUtil
.
copyProperties
(
item
,
constructionInfoNew
,
true
);
...
...
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/strategy/HandleResult.java
0 → 100644
View file @
00ee2949
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
.
strategy
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Builder
public
class
HandleResult
{
private
List
<
FieldChangeMeta
>
fieldChangeMetas
;
private
Map
<
String
,
List
<
PipelineChangeItemDto
>>
pipelineChangeItemMap
;
}
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/strategy/IEquipChangeDataProcessStrategy.java
View file @
00ee2949
...
@@ -23,6 +23,6 @@ public interface IEquipChangeDataProcessStrategy {
...
@@ -23,6 +23,6 @@ public interface IEquipChangeDataProcessStrategy {
/**
/**
* 处理
* 处理
*/
*/
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
,
Consumer
<
Map
<
String
,
List
<
PipelineChangeItemDto
>>>
callBack
);
HandleResult
handle
(
Map
<
String
,
Object
>
changeData
,
String
defaultChangeId
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/typeHandler/PieLineLevelTypeHandler.java
View file @
00ee2949
...
@@ -22,6 +22,8 @@ public class PieLineLevelTypeHandler implements TypeHandler<String> {
...
@@ -22,6 +22,8 @@ public class PieLineLevelTypeHandler implements TypeHandler<String> {
private
Map
<
String
,
String
>
cache
;
private
Map
<
String
,
String
>
cache
;
private
Map
<
String
,
String
>
nameCodeMapCache
;
protected
PieLineLevelTypeHandler
(
DataDictionaryServiceImpl
dataDictionaryService
)
{
protected
PieLineLevelTypeHandler
(
DataDictionaryServiceImpl
dataDictionaryService
)
{
this
.
dataDictionaryService
=
dataDictionaryService
;
this
.
dataDictionaryService
=
dataDictionaryService
;
}
}
...
@@ -30,11 +32,16 @@ public class PieLineLevelTypeHandler implements TypeHandler<String> {
...
@@ -30,11 +32,16 @@ public class PieLineLevelTypeHandler implements TypeHandler<String> {
private
void
init
()
{
private
void
init
()
{
List
<
DataDictionary
>
dataDictionary
=
dataDictionaryService
.
getDataDictionaryMapper
().
selectList
(
new
LambdaQueryWrapper
<
DataDictionary
>().
in
(
DataDictionary:
:
getType
,
Arrays
.
asList
(
"8200"
,
"8100"
,
"8300"
)));
List
<
DataDictionary
>
dataDictionary
=
dataDictionaryService
.
getDataDictionaryMapper
().
selectList
(
new
LambdaQueryWrapper
<
DataDictionary
>().
in
(
DataDictionary:
:
getType
,
Arrays
.
asList
(
"8200"
,
"8100"
,
"8300"
)));
cache
=
dataDictionary
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
cache
=
dataDictionary
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
nameCodeMapCache
=
dataDictionary
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getName
,
DataDictionary:
:
getCode
));
}
}
@Override
@Override
public
String
handle
(
String
value
)
{
public
String
handle
(
String
value
)
{
return
cache
.
get
(
value
);
return
cache
.
getOrDefault
(
value
,
value
);
}
public
String
getCodeByName
(
String
name
)
{
return
nameCodeMapCache
.
getOrDefault
(
name
,
name
);
}
}
}
}
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 @
00ee2949
...
@@ -2228,13 +2228,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2228,13 +2228,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
});
});
jsonObject
.
put
(
"equipmentLists"
,
result
);
jsonObject
.
put
(
"equipmentLists"
,
result
);
}
}
// else {
// 查询管道设备详情
// jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitPipelineEquipment(records));
//}
}
else
{
this
.
setPieLineInspectInfo
(
jgUseRegistration
.
getProjectContraptionId
(),
jsonObject
);
this
.
setConstructionInfo
(
jgUseRegistration
.
getProjectContraptionId
(),
jsonObject
);
}
}
}
}
jsonObject
.
put
(
"useRegistrationCode"
,
jgUseRegistration
.
getUseRegistrationCode
());
jsonObject
.
put
(
"useRegistrationCode"
,
jgUseRegistration
.
getUseRegistrationCode
());
...
...
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