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
a8586f0a
Commit
a8586f0a
authored
May 15, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
cbb7dac2
7f71d352
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
45 deletions
+131
-45
ProjectContraptionChangeDataDto.java
...ot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
+2
-2
InstallNoticeDataChangeHandler.java
...ess/biz/installNotice/InstallNoticeDataChangeHandler.java
+20
-9
InstallNoticeEditUpdateService.java
...ess/biz/installNotice/InstallNoticeEditUpdateService.java
+34
-0
UseRegisterUpdateService.java
...dit/process/biz/useRegister/UseRegisterUpdateService.java
+0
-22
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+39
-12
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+9
-0
IdxBizJgConstructionInfo.java
.../boot/module/ymt/api/entity/IdxBizJgConstructionInfo.java
+20
-0
IdxBizJgMaintenanceRecordInfo.java
.../module/ymt/api/entity/IdxBizJgMaintenanceRecordInfo.java
+7
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/ProjectContraptionChangeDataDto.java
View file @
a8586f0a
...
...
@@ -24,10 +24,10 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
private
static
final
long
serialVersionUID
=
1L
;
@FieldDisplayDefine
(
value
=
"工程
装置
名称"
)
@FieldDisplayDefine
(
value
=
"工程
(装置)名称/项目
名称"
)
private
String
projectContraption
;
@FieldDisplayDefine
(
value
=
"工程
装置
编号"
)
@FieldDisplayDefine
(
value
=
"工程
(装置)编号/项目
编号"
)
private
String
projectContraptionNo
;
@FieldDisplayDefine
(
value
=
"设备品种代码"
)
...
...
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 @
a8586f0a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
installNotice
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
@Component
public
class
InstallNoticeDataChangeHandler
extends
DefaultBizDataChangeHandler
<
BaseBizDataChangeEvent
>
{
protected
InstallNoticeDataChangeHandler
(
RouterEventPublisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
private
final
InstallNoticeEditUpdateService
installNoticeEditUpdateService
;
protected
InstallNoticeDataChangeHandler
(
InstallNoticeEditUpdateService
installNoticeEditUpdateService
,
RouterEventPublisher
routerEventPublisher
,
ApplicationContext
applicationContext
)
{
super
(
routerEventPublisher
,
applicationContext
);
this
.
installNoticeEditUpdateService
=
installNoticeEditUpdateService
;
}
@Override
...
...
@@ -31,12 +36,12 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
@Override
public
Boolean
beforeCheck
(
String
bizId
,
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
)
{
return
null
;
return
true
;
}
@Override
public
Set
<
String
>
getEqs
(
String
applyNo
)
{
return
Collections
.
emptySet
(
);
return
installNoticeEditUpdateService
.
getEqsByApplyNo
(
applyNo
);
}
@Override
...
...
@@ -46,11 +51,17 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
@Override
public
Boolean
bizIsFinished
(
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
)
{
return
null
;
JgInstallationNotice
installationNotice
=
installNoticeEditUpdateService
.
getInstallationNoticeService
().
getOne
(
new
LambdaQueryWrapper
<
JgInstallationNotice
>().
eq
(
JgInstallationNotice:
:
getApplyNo
,
applyNo
).
select
(
BaseEntity:
:
getSequenceNbr
,
JgInstallationNotice:
:
getNoticeStatus
));
return
installationNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
}
@Override
public
Set
<
String
>
getProjectContraptionIds
(
String
applyNo
)
{
return
Collections
.
emptySet
();
JgInstallationNotice
installationNotice
=
installNoticeEditUpdateService
.
getOneByApplyNo
(
applyNo
);
Set
<
String
>
projectContraptionIds
=
new
HashSet
<>();
projectContraptionIds
.
add
(
installationNotice
.
getProjectContraptionId
());
projectContraptionIds
.
remove
(
null
);
projectContraptionIds
.
remove
(
""
);
return
projectContraptionIds
;
}
}
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/InstallNoticeEditUpdateService.java
0 → 100644
View file @
a8586f0a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
installNotice
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeEqServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
@Service
@RequiredArgsConstructor
@Getter
public
class
InstallNoticeEditUpdateService
{
private
final
JgInstallationNoticeServiceImpl
installationNoticeService
;
private
final
JgInstallationNoticeEqServiceImpl
installationNoticeEqService
;
public
Set
<
String
>
getEqsByApplyNo
(
String
applyNo
)
{
JgInstallationNotice
jgInstallationNotice
=
installationNoticeService
.
getOne
(
new
LambdaQueryWrapper
<
JgInstallationNotice
>().
eq
(
JgInstallationNotice:
:
getApplyNo
,
applyNo
).
select
(
BaseEntity:
:
getSequenceNbr
));
List
<
JgInstallationNoticeEq
>
eqs
=
installationNoticeEqService
.
list
(
new
LambdaQueryWrapper
<
JgInstallationNoticeEq
>().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
()).
select
(
JgInstallationNoticeEq:
:
getEquId
));
return
eqs
.
stream
().
map
(
JgInstallationNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toSet
());
}
public
JgInstallationNotice
getOneByApplyNo
(
String
applyNo
)
{
return
installationNoticeService
.
getOne
(
new
LambdaQueryWrapper
<
JgInstallationNotice
>().
eq
(
JgInstallationNotice:
:
getApplyNo
,
applyNo
));
}
}
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 @
a8586f0a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
useRegister
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
...
...
@@ -43,27 +42,6 @@ public class UseRegisterUpdateService {
private
final
JgUseRegistrationEqServiceImpl
useRegistrationEqService
;
public
void
convertStringToJsonObject
(
Object
obj
,
String
[]
jsonFields
)
{
if
(
obj
instanceof
JSONObject
)
{
JSONObject
jsonObject
=
(
JSONObject
)
obj
;
for
(
String
field
:
jsonFields
)
{
if
(
jsonObject
.
get
(
field
)
!=
null
&&
jsonObject
.
get
(
field
)
instanceof
String
)
{
jsonObject
.
put
(
field
,
JSON
.
parse
(
JSONObject
.
toJSONString
(
jsonObject
.
get
(
field
))));
}
}
}
else
if
(
obj
instanceof
Map
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
obj
;
for
(
String
field
:
jsonFields
)
{
if
(
map
.
containsKey
(
field
)
&&
map
.
get
(
field
)
instanceof
String
)
{
map
.
put
(
field
,
JSON
.
parse
((
String
)
map
.
get
(
field
)));
}
}
}
else
{
// 处理其他类型
System
.
out
.
println
(
"Unsupported Object Type"
);
}
}
public
void
updateBizInfo
(
Map
<
String
,
Object
>
changeData
)
{
}
...
...
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 @
a8586f0a
...
...
@@ -131,6 +131,7 @@ public class CommonEquipDataProcessService {
throw
new
RuntimeException
(
e
);
}
}
public
static
<
T
extends
IBaseChangeData
>
void
castMap2Bean
(
Map
<
String
,
Object
>
map
,
T
target
)
{
BeanUtil
.
copyProperties
(
JSON
.
parse
(
JSONObject
.
toJSONString
(
map
)),
target
,
true
);
}
...
...
@@ -844,16 +845,36 @@ public class CommonEquipDataProcessService {
}
public
Map
<
String
,
?>
getProjectContraptionBySeq
(
String
projectContraptionId
,
Set
<
String
>
records
)
{
JSONObject
jsonObject
=
new
JSONObject
();
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionServiceImpl
.
getById
(
projectContraptionId
);
jsonObject
.
put
(
"pipelineLength"
,
projectContraption
.
getPipelineLength
());
jsonObject
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
jsonObject
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
List
<
Map
<
String
,
Object
>>
equList
=
jgUseRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipment
(
new
ArrayList
<>(
records
));
Map
<
String
,
Object
>
re
=
BeanUtil
.
beanToMap
(
projectContraption
);
this
.
convertStringToJsonObject
(
re
,
IdxBizJgProjectContraptionServiceImpl
.
getJsonFieldsCamel
());
List
<
Map
<
String
,
Object
>>
equList
=
jgUseRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipmentForEdit
(
new
ArrayList
<>(
records
));
// 检验报告数据格式化 转json
equList
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
get
(
"inspectReport"
).
toString
())));
jsonObject
.
put
(
"tableData"
,
equList
);
return
jsonObject
;
re
.
put
(
"projectContraptionId"
,
projectContraption
.
getSequenceNbr
());
re
.
put
(
"tableData"
,
equList
);
return
re
;
}
public
void
convertStringToJsonObject
(
Object
obj
,
String
[]
jsonFields
)
{
if
(
obj
instanceof
JSONObject
)
{
JSONObject
jsonObject
=
(
JSONObject
)
obj
;
for
(
String
field
:
jsonFields
)
{
if
(
jsonObject
.
get
(
field
)
!=
null
&&
jsonObject
.
get
(
field
)
instanceof
String
)
{
jsonObject
.
put
(
field
,
JSON
.
parse
(
jsonObject
.
get
(
field
).
toString
()));
}
}
}
else
if
(
obj
instanceof
Map
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
obj
;
for
(
String
field
:
jsonFields
)
{
if
(
map
.
containsKey
(
field
)
&&
map
.
get
(
field
)
instanceof
String
)
{
map
.
put
(
field
,
JSON
.
parse
(
map
.
get
(
field
).
toString
()));
}
}
}
else
{
// 处理其他类型
System
.
out
.
println
(
"Unsupported Object Type"
);
}
}
public
IPage
<?>
getProjectContraptionsBySeqs
(
Set
<
String
>
projectContraptionIds
,
JSONObject
params
)
{
...
...
@@ -871,21 +892,27 @@ public class CommonEquipDataProcessService {
.
in
(
BaseEntity:
:
getSequenceNbr
,
projectContraptionIds
)
.
orderByDesc
(
IdxBizJgProjectContraption:
:
getRecDate
)
.
page
(
page
);
List
<
Map
<
String
,
Object
>>
records
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
pageList
.
getRecords
()))
{
pageList
.
getRecords
().
forEach
(
record
->
{
BigDecimal
pipelineLength
=
BigDecimal
.
valueOf
(
record
.
getPipelineLength
());
BigDecimal
roundedValue
=
pipelineLength
.
setScale
(
3
,
RoundingMode
.
HALF_UP
);
BigDecimal
strippedValue
=
roundedValue
.
stripTrailingZeros
();
record
.
setPipelineLength
(
Double
.
valueOf
(
strippedValue
.
toPlainString
()));
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
record
.
setDataSourceName
(
EquipSourceEnum
.
getDataSourceName
(
record
.
getDataSource
()));
record
.
setFullAddress
(
Stream
.
of
(
record
.
getProvinceName
(),
record
.
getCityName
(),
record
.
getCountyName
(),
record
.
getStreetName
(),
record
.
getAddress
())
.
map
(
value
->
value
==
null
?
""
:
value
)
.
collect
(
Collectors
.
joining
())
);
BeanUtil
.
copyProperties
(
record
,
item
);
BigDecimal
pipelineLength
=
BigDecimal
.
valueOf
(
record
.
getPipelineLength
());
BigDecimal
roundedValue
=
pipelineLength
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
item
.
put
(
"pipelineLength"
,
roundedValue
.
toPlainString
());
records
.
add
(
item
);
});
}
return
pageList
;
Page
<
Map
<
String
,
Object
>>
page1
=
new
Page
<>();
BeanUtil
.
copyProperties
(
pageList
,
page1
);
page1
.
setRecords
(
records
);
return
page1
;
}
public
void
updateEsDataOfEquip
(
String
record
,
IBaseChangeData
changeDataDto
)
{
...
...
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/IdxBizJgProjectContraptionServiceImpl.java
View file @
a8586f0a
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -130,6 +131,14 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
return
this
.
saveOrUpdate
(
projectContraption
);
}
public
static
String
[]
getJsonFieldsCamel
(){
List
<
String
>
camelFields
=
new
ArrayList
<>();
for
(
String
field
:
jsonFields
)
{
camelFields
.
add
(
CharSequenceUtil
.
toCamelCase
(
field
));
}
return
camelFields
.
toArray
(
new
String
[
0
]);
}
/**
* 根据工程装置seq物理删除装置表数据和对应设备信息(数据库+es)
*
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgConstructionInfo.java
View file @
a8586f0a
...
...
@@ -135,4 +135,24 @@ public class IdxBizJgConstructionInfo extends TzsBaseEntity implements IBaseChan
@TableField
(
value
=
"\"CONSTRUCTION_OTHER_ACCESSORIES\""
)
private
String
constructionOtherAccessories
;
@FieldDisplayDefine
(
value
=
"施工区域-省"
)
@TableField
(
value
=
"\"CONSTRUCTION_PROVINCE\""
)
private
String
constructionProvince
;
@FieldDisplayDefine
(
value
=
"施工区域-市"
)
@TableField
(
value
=
"\"CONSTRUCTION_CITY\""
)
private
String
constructionCity
;
@FieldDisplayDefine
(
value
=
"施工区域-区/县"
)
@TableField
(
value
=
"\"CONSTRUCTION_COUNTY\""
)
private
String
constructionCounty
;
@FieldDisplayDefine
(
value
=
"施工区域-街道"
)
@TableField
(
value
=
"\"CONSTRUCTION_STREET\""
)
private
String
constructionStreet
;
@FieldDisplayDefine
(
value
=
"施工区域-详细地址"
)
@TableField
(
value
=
"\"CONSTRUCTION_ADDRESS\""
)
private
String
constructionAddress
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgMaintenanceRecordInfo.java
View file @
a8586f0a
...
...
@@ -168,4 +168,11 @@ public class IdxBizJgMaintenanceRecordInfo extends TzsBaseEntity implements IBas
*/
@TableField
(
"\"SOURCE_ID\""
)
private
String
sourceId
;
/**
* 其他维保附件
*/
@FieldDisplayDefine
(
value
=
"其他维保附件"
,
type
=
JSON
.
class
)
@TableField
(
"\"ME_OTHER_ACCESSORIES\""
)
private
String
ME_OTHER_ACCESSORIES
;
}
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