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
257079eb
Commit
257079eb
authored
Nov 04, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc): 压力管道管道长度
1.压力管道管道长度调整为字符串/分隔开
parent
1beaf2dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
PipLenCalUtils.java
...eejoin/amos/boot/module/jg/api/common/PipLenCalUtils.java
+17
-5
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+1
-1
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+1
-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/common/PipLenCalUtils.java
View file @
257079eb
...
@@ -8,9 +8,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -8,9 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.List
;
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
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH_SPILT
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
common
.
BizCommonConstant
.
PIPE_LENGTH_SPILT
;
...
@@ -34,7 +32,6 @@ public final class PipLenCalUtils {
...
@@ -34,7 +32,6 @@ public final class PipLenCalUtils {
}
}
public
static
double
getPipLen
(
List
<
PipingExcelDto
>
equLists
)
{
public
static
double
getPipLen
(
List
<
PipingExcelDto
>
equLists
)
{
return
equLists
.
stream
()
return
equLists
.
stream
()
.
map
(
PipingExcelDto:
:
getPipeLength
)
.
map
(
PipingExcelDto:
:
getPipeLength
)
...
@@ -53,6 +50,21 @@ public final class PipLenCalUtils {
...
@@ -53,6 +50,21 @@ public final class PipLenCalUtils {
}
}
public
static
BigDecimal
calBigDecimal
(
String
pipeLengthText
)
{
public
static
BigDecimal
calBigDecimal
(
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
(
BigDecimal
.
ZERO
).
setScale
(
3
,
RoundingMode
.
HALF_UP
);
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
(
BigDecimal
.
ZERO
).
setScale
(
3
,
RoundingMode
.
HALF_UP
);
}
public
static
double
getPipLenMap
(
List
<
Map
<
String
,
Object
>>
equLists
)
{
return
equLists
.
stream
()
.
map
(
r
->
r
.
get
(
"pipeLengthText"
))
.
filter
(
Objects:
:
nonNull
)
.
map
(
String:
:
valueOf
)
.
filter
(
s
->
!
"null"
.
equals
(
s
)
&&
StringUtil
.
isNotEmpty
(
s
))
.
map
(
d
->
Arrays
.
stream
(
d
.
split
(
PIPE_LENGTH_SPILT
))
// 分割字符串
.
map
(
BigDecimal:
:
new
)
// 转 BigDecimal
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
)
// 分段求和
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
stripTrailingZeros
()
// 全局求和
.
doubleValue
();
}
}
}
}
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 @
257079eb
...
@@ -1267,7 +1267,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1267,7 +1267,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
String
getTipMsgString
(
String
record
)
{
private
String
getTipMsgString
(
String
record
)
{
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
IdxBizJgRegisterInfo
registerInfo
=
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
"RECORD"
,
record
));
return
String
.
format
(
"存在
被引用
的设备,设备代码:%s"
,
registerInfo
.
getEquCode
());
return
String
.
format
(
"存在
业务办理中
的设备,设备代码:%s"
,
registerInfo
.
getEquCode
());
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
257079eb
...
@@ -635,7 +635,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -635,7 +635,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
});
});
// 管道长度更新为最新的
// 管道长度更新为最新的
paramObj
.
put
(
"pipelineLength"
,
JyjcInspectionApplicationServiceImpl
.
calTotalLength
(
equips
));
paramObj
.
put
(
"pipelineLength"
,
PipLenCalUtils
.
getPipLenMap
(
equips
));
paramObj
.
put
(
"equip"
,
equips
);
paramObj
.
put
(
"equip"
,
equips
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
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