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
e59e14c5
Commit
e59e14c5
authored
Oct 29, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reafact(jg): 压力管道管道长度
1.压力管道管道长度调整为字符串/分隔开
parent
7ef92938
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
13 deletions
+40
-13
TechParamsPipelineChangeFieldDto.java
...t/module/jg/api/dto/TechParamsPipelineChangeFieldDto.java
+6
-2
NewProjectEditUpdateService.java
...t/process/biz/newProject/NewProjectEditUpdateService.java
+1
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+8
-0
PieLineDataChangeServiceImpl.java
.../biz/edit/process/equip/PieLineDataChangeServiceImpl.java
+1
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+15
-6
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+2
-2
PipLenCalUtils.java
...yeejoin/amos/boot/module/jg/biz/utils/PipLenCalUtils.java
+7
-1
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/TechParamsPipelineChangeFieldDto.java
View file @
e59e14c5
...
...
@@ -31,7 +31,7 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
private
String
pipelineNumber
;
@FieldDisplayDefine
(
value
=
"管道级别"
,
typeHandler
=
"pieLineLevelTypeHandler"
)
@FieldDisplayDefine
(
value
=
"管道级别"
,
typeHandler
=
"pieLineLevelTypeHandler"
)
private
String
deviceLevel
;
...
...
@@ -44,7 +44,11 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine
(
value
=
"管道长度"
)
private
Double
pipeLength
;
private
String
pipeLengthText
;
@FieldDisplayDefine
(
value
=
"管道长度"
,
isRepeatColumn
=
true
)
private
String
pipeLength
;
@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/newProject/NewProjectEditUpdateService.java
View file @
e59e14c5
...
...
@@ -35,7 +35,7 @@ public class NewProjectEditUpdateService {
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
)
//.eq(IdxBizJgUseInfo::getIsIntoManagement, false)修改已纳管管道编辑使用登记证号,不更新bug
.
select
(
IdxBizJgUseInfo:
:
getRecord
,
TzsBaseEntity:
:
getSequenceNbr
));
useInfos
.
parallelStream
().
forEach
(
e
->
{
useInfos
.
forEach
(
e
->
{
commonEquipDataProcessService
.
setNewPipelineUseState
(
e
,
projectContraption
.
getUseRegistrationCode
());
commonEquipDataProcessService
.
updateUseOrgCode2NewPipeline
(
e
,
projectContraption
.
getUseRegistrationCode
());
});
...
...
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 @
e59e14c5
...
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.RegionCodeTypeHandle
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.DiffUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.PipLenCalUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
...
...
@@ -523,6 +524,7 @@ public class CommonEquipDataProcessService {
}
public
void
savePieLineTechParam
(
String
record
,
List
<
FieldChangeMeta
>
allChange
,
TechParamsPipelineChangeFieldDto
newPipeline
)
{
this
.
calPipelineLength
(
newPipeline
);
IdxBizJgTechParamsPipeline
techParamsPipeline
=
iIdxBizJgTechParamsPipelineService
.
getOneData
(
record
);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉
TechParamsPipelineChangeFieldDto
oldPipeline
=
techParamsPipeline
!=
null
?
BeanUtil
.
copyProperties
(
techParamsPipeline
,
TechParamsPipelineChangeFieldDto
.
class
)
:
new
TechParamsPipelineChangeFieldDto
();
...
...
@@ -537,6 +539,12 @@ public class CommonEquipDataProcessService {
allChange
.
addAll
(
pipelineChangeFields
);
}
private
void
calPipelineLength
(
TechParamsPipelineChangeFieldDto
newPipeline
)
{
if
(
newPipeline
!=
null
){
newPipeline
.
setPipeLength
(
PipLenCalUtils
.
cal
(
newPipeline
.
getPipeLengthText
()));
}
}
public
List
<
FieldChangeMeta
>
convertBeanField2Column2
(
Object
beanData
,
String
changeId
)
{
List
<
FieldChangeMeta
>
changeData
=
new
ArrayList
<>();
Group
group
=
beanData
.
getClass
().
getAnnotation
(
Group
.
class
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/PieLineDataChangeServiceImpl.java
View file @
e59e14c5
...
...
@@ -355,7 +355,7 @@ public class PieLineDataChangeServiceImpl {
public
String
calPipelineLength
(
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
()).
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
map
(
e
->
new
BigDecimal
(
String
.
valueOf
(
e
.
getPipeLength
()
))).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
setScale
(
3
,
RoundingMode
.
HALF_UP
).
toPlainString
();
return
Stream
.
concat
(
newPipelines
.
stream
(),
updPipelines
.
stream
()).
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
map
(
e
->
new
BigDecimal
(
e
.
getPipeLength
(
))).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
setScale
(
3
,
RoundingMode
.
HALF_UP
).
toPlainString
();
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
e59e14c5
...
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
...
...
@@ -842,6 +843,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateBatch
(
inspectionDetectionInfoList
);
iIdxBizJgTechParamsPipelineService
.
saveOrUpdateBatch
(
paramsPipelineList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
// 更新管道长度
updatePipelineLength
(
projectContraption
,
paramsPipelineList
);
if
(
OPERATESAVE
.
equals
(
operateType
)){
// 记录设备创建履历
this
.
createResumePipeline
(
sequenceNbr
,
String
.
format
(
pipelineRoutePath
,
sequenceNbr
+
""
),
company
);
}
return
sequenceNbr
;
}
private
void
updatePipelineLength
(
IdxBizJgProjectContraption
projectContraption
,
List
<
IdxBizJgTechParamsPipeline
>
paramsPipelineList
)
{
projectContraption
.
setPipelineLength
(
paramsPipelineList
.
stream
()
.
map
(
IdxBizJgTechParamsPipeline:
:
getPipeLength
)
...
...
@@ -851,12 +862,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
setScale
(
2
,
RoundingMode
.
HALF_UP
)
.
doubleValue
()
);
idxBizJgProjectContraptionService
.
saveOrUpdateData
(
projectContraption
);
if
(
OPERATESAVE
.
equals
(
operateType
)){
// 记录设备创建履历
this
.
createResumePipeline
(
sequenceNbr
,
String
.
format
(
pipelineRoutePath
,
sequenceNbr
+
""
),
company
);
}
return
sequenceNbr
;
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getPipelineLength
,
projectContraption
.
getPipelineLength
());
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
projectContraption
.
getSequenceNbr
());
idxBizJgProjectContraptionService
.
update
(
updateWrapper
);
}
private
void
createResumePipeline
(
Long
sequenceNbr
,
String
routePath
,
CompanyBo
company
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
View file @
e59e14c5
...
...
@@ -1154,7 +1154,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
String
deviceLevel
=
pipData
.
getString
(
"deviceLevel"
);
String
nominalDiameter
=
pipData
.
getString
(
"nominalDiameter"
);
String
wallThickness
=
pipData
.
getString
(
"wallThickness"
);
String
pipeLength
=
pipData
.
getString
(
"pipeLength
"
);
String
pipeLength
Text
=
pipData
.
getString
(
"pipeLengthText
"
);
String
pressure
=
pipData
.
getString
(
"pressure"
);
String
temperature
=
pipData
.
getString
(
"temperature"
);
String
medium
=
pipData
.
getString
(
"medium"
);
...
...
@@ -1168,7 +1168,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
.
set
(
IdxBizJgTechParamsPipeline:
:
getDeviceLevel
,
deviceLevel
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getNominalDiameter
,
nominalDiameter
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getWallThickness
,
wallThickness
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getPipeLength
,
pipeLength
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getPipeLength
Text
,
pipeLengthText
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getPressure
,
pressure
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getTemperature
,
temperature
)
.
set
(
IdxBizJgTechParamsPipeline:
:
getMedium
,
medium
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/utils/PipLenCalUtils.java
View file @
e59e14c5
...
...
@@ -3,9 +3,11 @@ package com.yeejoin.amos.boot.module.jg.biz.utils;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.github.pagehelper.util.StringUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Optional
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH_SPILT
;
...
...
@@ -13,7 +15,7 @@ import static com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant.PIPE_
/**
* 管道长度计算公共类-便于统一维护口
*/
public
class
PipLenCalUtils
{
public
final
class
PipLenCalUtils
{
public
static
double
getPipLen
(
JSONArray
oldPipData
)
{
return
oldPipData
.
stream
()
...
...
@@ -27,4 +29,8 @@ public class PipLenCalUtils {
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
// 全局求和
.
doubleValue
();
}
public
static
String
cal
(
String
pipeLengthText
)
{
return
Optional
.
ofNullable
(
pipeLengthText
).
filter
(
StringUtils:
:
isNotEmpty
).
map
(
l
->
Arrays
.
stream
(
l
.
split
(
PIPE_LENGTH_SPILT
)).
map
(
BigDecimal:
:
new
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)).
orElse
(
new
BigDecimal
(
"0"
)).
stripTrailingZeros
().
toPlainString
();
}
}
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