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
fc273ef6
Commit
fc273ef6
authored
Apr 19, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):车用气瓶-后端修改
parent
c0c6b22b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+19
-7
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 @
fc273ef6
...
...
@@ -54,11 +54,13 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
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
.*;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
...
...
@@ -235,7 +237,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
mapToDouble
(
x
->
Double
.
parseDouble
(
String
.
valueOf
(
x
.
get
(
"singleBottleVolume"
))))
.
sum
()));
vehicleInformation
.
setFillingMedium
(
Systemctl
.
dictionarieClient
.
value
(
"FILLING_MEDIUM"
,
equipmentLists
.
get
(
0
)
.
get
(
"chargingMedium"
)
+
""
).
getResult
().
getDictDataValue
());
.
get
(
"chargingMedium"
)
+
""
).
getResult
().
getDictDataValue
());
boolean
hasId
=
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
());
//新增
...
...
@@ -456,12 +458,22 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
LambdaQueryWrapper
<
JgVehicleInformationEq
>
vehicleInfoEqWrapper
=
new
QueryWrapper
<
JgVehicleInformationEq
>().
lambda
();
vehicleInfoEqWrapper
.
eq
(
JgVehicleInformationEq:
:
getVehicleId
,
sequenceNbr
);
List
<
JgVehicleInformationEq
>
vehicleInformationEqList
=
jgVehicleInformationEqService
.
getBaseMapper
().
selectList
(
vehicleInfoEqWrapper
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
this
.
baseMapper
.
queryForUnitVesselEquipment
(
vehicleInformationEqList
.
stream
().
map
(
JgVehicleInformationEq:
:
getEquId
).
collect
(
Collectors
.
toList
()));
vo
.
setEquipmentLists
(
equipmentLists
);
vo
.
setEquDefineCode
(
equipmentLists
.
stream
()
vo
.
setEquipmentLists
(
this
.
baseMapper
.
queryForUnitVesselEquipment
(
vehicleInformationEqList
.
stream
()
.
map
(
JgVehicleInformationEq:
:
getEquId
)
.
collect
(
Collectors
.
toList
())
).
stream
()
.
peek
(
v
->
v
.
put
(
"chargingMedium"
,
Systemctl
.
dictionarieClient
.
value
(
"FILLING_MEDIUM"
,
v
.
get
(
"chargingMedium"
)
+
""
).
getResult
().
getDictDataValue
()))
.
collect
(
Collectors
.
toList
())
);
vo
.
setEquDefineCode
(
vo
.
getEquipmentLists
().
stream
()
.
findFirst
()
.
map
(
map
->
(
String
)
map
.
get
(
"equDefine"
))
.
orElse
(
null
));
.
orElse
(
null
)
);
return
vo
;
}
...
...
@@ -995,9 +1007,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
return
useFlagParamDto
;
}
private
void
checkVesselCylinderIsUsed
(
Long
currentVehicleId
,
List
<
String
>
records
){
private
void
checkVesselCylinderIsUsed
(
Long
currentVehicleId
,
List
<
String
>
records
)
{
Long
usedNumber
=
this
.
getBaseMapper
().
countVesselCylinderIsUsedNumber
(
currentVehicleId
,
records
);
if
(
usedNumber
>
0
)
{
if
(
usedNumber
>
0
)
{
throw
new
BadRequest
(
"存在已经登记过的气瓶!"
);
}
}
...
...
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