Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
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
佟礼
HYH.APSJ
Commits
f45d7214
Commit
f45d7214
authored
Nov 27, 2025
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改速度计算
parent
40d7e42c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
LanuchServiceImpl.java
src/main/java/com/aps/service/impl/LanuchServiceImpl.java
+16
-10
No files found.
src/main/java/com/aps/service/impl/LanuchServiceImpl.java
View file @
f45d7214
...
@@ -557,10 +557,10 @@ public class LanuchServiceImpl implements LanuchService {
...
@@ -557,10 +557,10 @@ public class LanuchServiceImpl implements LanuchService {
prodProcessExec
.
setSpeed
(
prodProcessExec
.
setSpeed
(
Optional
.
ofNullable
(
detail
.
get
SingleOut
())
Optional
.
ofNullable
(
detail
.
get
Runtime
())
.
filter
(
out
->
detail
.
get
Runtime
()
!=
null
)
.
filter
(
out
->
detail
.
get
SingleOut
()
!=
null
)
.
filter
(
out
->
detail
.
get
Runtime
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
.
filter
(
out
->
detail
.
get
SingleOut
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
.
map
(
out
->
out
.
divide
(
detail
.
get
Runtime
(),
6
,
RoundingMode
.
HALF_UP
))
.
map
(
out
->
out
.
divide
(
detail
.
get
SingleOut
(),
6
,
RoundingMode
.
HALF_UP
))
.
map
(
BigDecimal:
:
doubleValue
)
// 关键转换
.
map
(
BigDecimal:
:
doubleValue
)
// 关键转换
.
orElse
(
0.0
)
.
orElse
(
0.0
)
);
);
...
@@ -762,12 +762,18 @@ public class LanuchServiceImpl implements LanuchService {
...
@@ -762,12 +762,18 @@ public class LanuchServiceImpl implements LanuchService {
prodEquipment
.
setEquipName
(
routingDetailEquip
.
getName
());
prodEquipment
.
setEquipName
(
routingDetailEquip
.
getName
());
prodEquipment
.
setResourceId
(
routingDetailEquip
.
getType1
());
prodEquipment
.
setResourceId
(
routingDetailEquip
.
getType1
());
double
duration
=
routingDetailEquip
.
getDuration
()
!=
null
?
routingDetailEquip
.
getDuration
().
doubleValue
()
:
0.0
;
double
outputQuantity
=
routingDetailEquip
.
getOutputQuantity
()
!=
null
?
routingDetailEquip
.
getOutputQuantity
().
doubleValue
()
:
0.0
;
double
speed
=
(
outputQuantity
>
0
)
?
duration
/
outputQuantity
:
0.0
;
prodEquipment
.
setSpeed
(
prodEquipment
.
setSpeed
(
speed
);
Optional
.
ofNullable
(
routingDetailEquip
.
getDuration
())
// 从映射中获取execId,避免额外的数据库查询
.
filter
(
out
->
routingDetailEquip
.
getOutputQuantity
()
!=
null
)
// 修复:使用equals比较,并处理null值
.
filter
(
out
->
routingDetailEquip
.
getOutputQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
.
map
(
out
->
out
.
divide
(
routingDetailEquip
.
getOutputQuantity
(),
6
,
RoundingMode
.
HALF_UP
))
.
map
(
BigDecimal:
:
doubleValue
)
// 关键转换
.
orElse
(
0.0
)
);
String
execId
=
processExecList
.
stream
()
String
execId
=
processExecList
.
stream
()
.
filter
(
exec
->
{
.
filter
(
exec
->
{
Long
execRoutingDetailId
=
exec
.
getRoutingDetailId
();
Long
execRoutingDetailId
=
exec
.
getRoutingDetailId
();
...
...
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