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
eab39c97
Commit
eab39c97
authored
Oct 30, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reafact(jyjc): 压力管道管道长度
1.压力管道管道长度调整为字符串/分隔开 2.手工录入结果适配调整 3.系统对接时管道长度适配
parent
0f9103d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
14 deletions
+66
-14
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+9
-8
HisDataHandlerController.java
.../module/jyjc/biz/controller/HisDataHandlerController.java
+7
-0
HisDataHandlerServiceImpl.java
...dule/jyjc/biz/service/impl/HisDataHandlerServiceImpl.java
+47
-4
IdxBizJgTechParamsPipeline.java
...oot/module/ymt/api/entity/IdxBizJgTechParamsPipeline.java
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
View file @
eab39c97
...
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum;
import
com.yeejoin.amos.boot.module.common.biz.refresh.cm.RefreshCmService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.EsSearchServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.RefreshDataUtils
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto
;
...
...
@@ -2542,8 +2543,8 @@ public class DataHandlerServiceImpl {
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"deviceList"
);
List
<
JSONObject
>
pipelines
=
jsonArray
.
stream
().
map
(
e
->{
JSONObject
pipeline
=
JSONObject
.
parseObject
(
e
.
toString
());
if
(!
pipeline
.
containsKey
(
"pipeLengthText"
)){
pipeline
.
put
(
"pipeLengthText"
,
pipeline
.
get
(
"pipeLength"
));
if
(!
pipeline
.
containsKey
(
BizCommonConstant
.
PIPE_LENGTH
)){
pipeline
.
put
(
BizCommonConstant
.
PIPE_LENGTH
,
pipeline
.
get
(
"pipeLength"
));
}
return
pipeline
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -2572,8 +2573,8 @@ public class DataHandlerServiceImpl {
Optional
.
ofNullable
(
jsonArray
).
ifPresent
(
d
->{
List
<
JSONObject
>
pipelines
=
d
.
stream
().
map
(
e
->{
JSONObject
pipeline
=
JSONObject
.
parseObject
(
e
.
toString
());
if
(!
pipeline
.
containsKey
(
"pipeLengthText"
)){
pipeline
.
put
(
"pipeLengthText"
,
pipeline
.
get
(
"pipeLength"
));
if
(!
pipeline
.
containsKey
(
BizCommonConstant
.
PIPE_LENGTH
)){
pipeline
.
put
(
BizCommonConstant
.
PIPE_LENGTH
,
pipeline
.
get
(
"pipeLength"
));
}
return
pipeline
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -2597,8 +2598,8 @@ public class DataHandlerServiceImpl {
Optional
.
ofNullable
(
jsonArray
).
ifPresent
(
d
->{
List
<
JSONObject
>
pipelines
=
d
.
stream
().
map
(
e
->{
JSONObject
pipeline
=
JSONObject
.
parseObject
(
e
.
toString
());
if
(!
pipeline
.
containsKey
(
"pipeLengthText"
)){
pipeline
.
put
(
"pipeLengthText"
,
pipeline
.
get
(
"pipeLength"
));
if
(!
pipeline
.
containsKey
(
BizCommonConstant
.
PIPE_LENGTH
)){
pipeline
.
put
(
BizCommonConstant
.
PIPE_LENGTH
,
pipeline
.
get
(
"pipeLength"
));
}
return
pipeline
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -2622,8 +2623,8 @@ public class DataHandlerServiceImpl {
Optional
.
ofNullable
(
jsonArray
).
ifPresent
(
d
->{
List
<
JSONObject
>
pipelines
=
d
.
stream
().
map
(
e
->{
JSONObject
pipeline
=
JSONObject
.
parseObject
(
e
.
toString
());
if
(!
pipeline
.
containsKey
(
"pipeLengthText"
)){
pipeline
.
put
(
"pipeLengthText"
,
pipeline
.
get
(
"pipeLength"
));
if
(!
pipeline
.
containsKey
(
BizCommonConstant
.
PIPE_LENGTH
)){
pipeline
.
put
(
BizCommonConstant
.
PIPE_LENGTH
,
pipeline
.
get
(
"pipeLength"
));
}
return
pipeline
;
}).
collect
(
Collectors
.
toList
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/HisDataHandlerController.java
View file @
eab39c97
...
...
@@ -37,4 +37,11 @@ public class HisDataHandlerController {
hisDataHandlerService
.
openDataHandlerV1
();
return
ResponseHelper
.
buildResponse
(
true
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/fixPipeLen"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"压力管道报检结果管道长度补充"
,
notes
=
"压力管道报检结果管道长度补充"
)
public
ResponseModel
<
Long
>
pipeLenFix
()
{
return
ResponseHelper
.
buildResponse
(
hisDataHandlerService
.
pipeLenFix
());
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/HisDataHandlerServiceImpl.java
View file @
eab39c97
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.StopWatch
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseCertDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.BaseEnterpriseCert
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.BaseEnterpriseCertServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationEquip
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionHistory
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationEquipMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultParamMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Slf4j
...
...
@@ -40,6 +44,12 @@ public class HisDataHandlerServiceImpl {
@Resource
private
BaseEnterpriseCertServiceImpl
enterpriseCertService
;
@Resource
private
JyjcInspectionResultParamMapper
jyjcInspectionResultParamMapper
;
@Resource
private
ObjectMapper
objectMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
pieLineDataHandlerV1
()
{
List
<
JyjcInspectionApplicationEquip
>
applicationEquips
=
jyjcInspectionApplicationEquipMapper
.
queryWaitFlushData
();
...
...
@@ -81,4 +91,37 @@ public class HisDataHandlerServiceImpl {
enterpriseCertService
.
update
(
null
,
updateWrapperCert
);
});
}
public
Long
pipeLenFix
()
{
StopWatch
watch
=
new
StopWatch
();
watch
.
start
();
List
<
JyjcInspectionResultParam
>
resultParams
=
jyjcInspectionResultParamMapper
.
selectList
(
new
LambdaQueryWrapper
<
JyjcInspectionResultParam
>().
eq
(
JyjcInspectionResultParam:
:
getParamType
,
"IdxBizJgTechParamsPipeline"
));
resultParams
.
parallelStream
().
forEach
(
c
->
{
JSONObject
paramObj
=
JSON
.
parseObject
(
c
.
getParamJson
());
if
(
paramObj
!=
null
){
try
{
List
<
Map
<
String
,
Object
>>
equips
=
objectMapper
.
readValue
(
objectMapper
.
writeValueAsString
(
paramObj
.
get
(
"equip"
)),
new
TypeReference
<
ArrayList
<
Map
<
String
,
Object
>>>()
{
}
);
equips
.
forEach
(
equip
->
{
if
(!
equip
.
containsKey
(
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH
))
{
equip
.
put
(
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH
,
equip
.
get
(
"pipeLength"
));
}
});
paramObj
.
put
(
"equip"
,
equips
);
LambdaUpdateWrapper
<
JyjcInspectionResultParam
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
JyjcInspectionResultParam:
:
getParamJson
,
JSON
.
toJSONString
(
paramObj
));
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
c
.
getSequenceNbr
());
jyjcInspectionResultParamMapper
.
update
(
null
,
updateWrapper
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
}
}
});
watch
.
stop
();
log
.
info
(
"压力管道检验技术参数补充字段pipeLengthText,总处理数量:{}, 耗时信息:{}"
,
resultParams
.
size
(),
watch
.
getTotalTimeSeconds
());
return
(
long
)
resultParams
.
size
();
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgTechParamsPipeline.java
View file @
eab39c97
...
...
@@ -98,9 +98,10 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
/**
*
*/
@TableField
(
value
=
"\"PIPE_LENGTH\""
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
value
=
"\"PIPE_LENGTH\""
)
private
String
pipeLength
;
/**
*
*/
...
...
@@ -172,7 +173,7 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
/**
* 管道长度斜线分隔多段表示用:数字或者 / 分割的数字,如2.1/6.3
*/
@TableField
(
"\"PIPE_LENGTH_TEXT\""
)
@TableField
(
value
=
"\"PIPE_LENGTH_TEXT\""
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
String
pipeLengthText
;
}
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