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
aee4bae4
Commit
aee4bae4
authored
Aug 14, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):【现场问题】车用气瓶使用标志容积小数计算问题(70.2+30.6 算出来一堆000000000)
parent
fd293497
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+9
-9
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/JgVehicleInformationServiceImpl.java
View file @
aee4bae4
...
...
@@ -67,9 +67,9 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.nio.file.Files
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
...
...
@@ -78,7 +78,6 @@ import java.util.*;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.
XIAN_YANG
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.
XI_XIAN
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
...
...
@@ -310,9 +309,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInformation
.
setRegDate
(
new
Date
());
vehicleInformation
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
vehicleInformation
.
setGasNum
(
equipmentLists
.
size
());
vehicleInformation
.
setVolume
(
String
.
valueOf
(
equipmentLists
.
stream
()
.
mapToDouble
(
x
->
Double
.
parseDouble
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
sum
()));
BigDecimal
totalVolume
=
equipmentLists
.
stream
()
.
map
(
x
->
new
BigDecimal
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
vehicleInformation
.
setVolume
(
totalVolume
.
toPlainString
());
vehicleInformation
.
setFillingMedium
(
equipmentLists
.
get
(
0
).
get
(
"chargingMedium"
)
+
""
);
boolean
hasId
=
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
());
...
...
@@ -1809,10 +1809,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInformation
.
setRegDate
(
new
Date
());
vehicleInformation
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
vehicleInformation
.
setGasNum
(
equipmentLists
.
size
());
vehicleInformation
.
setVolume
(
String
.
valueOf
(
equipmentLists
.
stream
()
.
map
ToDouble
(
x
->
Double
.
parseDouble
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
sum
())
);
vehicleInformation
.
set
FillingMedium
(
equipmentLists
.
get
(
0
).
get
(
"chargingMedium"
)
+
""
);
BigDecimal
totalVolume
=
equipmentLists
.
stream
()
.
map
(
x
->
new
BigDecimal
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
vehicleInformation
.
set
Volume
(
totalVolume
.
toPlainString
()
);
vehicleInformation
.
setAuditPassDate
(
new
Date
());
// 登记证记录表主键
...
...
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