Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
d878bb97
Commit
d878bb97
authored
Apr 21, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改getone为findone
parent
c8dd8bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+21
-12
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
d878bb97
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper
;
...
@@ -97,8 +98,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -97,8 +98,9 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateFireCarPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireCarPosition
(
BindPointBo
pointBo
)
{
FireCar
fireCar
=
iFireCarDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
FireCar
>
data
=
iFireCarDao
.
findById
(
pointBo
.
getPointId
());
if
(
fireCar
!=
null
){
if
(
data
.
isPresent
()){
FireCar
fireCar
=
data
.
get
();
fireCar
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireCar
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireCar
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
fireCar
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireCarDao
.
save
(
fireCar
);
iFireCarDao
.
save
(
fireCar
);
...
@@ -106,8 +108,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -106,8 +108,9 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateWaterSourcePosition
(
BindPointBo
pointBo
)
{
public
void
updateWaterSourcePosition
(
BindPointBo
pointBo
)
{
WaterResource
waterResource
=
iWaterResourceDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
WaterResource
>
data
=
iWaterResourceDao
.
findById
(
pointBo
.
getPointId
());
if
(
waterResource
!=
null
){
if
(
data
.
isPresent
()){
WaterResource
waterResource
=
data
.
get
();
waterResource
.
setUe4Location
(
pointBo
.
getUe4Location
());
waterResource
.
setUe4Location
(
pointBo
.
getUe4Location
());
waterResource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
waterResource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iWaterResourceDao
.
save
(
waterResource
);
iWaterResourceDao
.
save
(
waterResource
);
...
@@ -115,8 +118,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -115,8 +118,9 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateFireStationPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireStationPosition
(
BindPointBo
pointBo
)
{
FireStation
fireStation
=
iFireStationDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
FireStation
>
data
=
iFireStationDao
.
findById
(
pointBo
.
getPointId
());
if
(
fireStation
!=
null
){
if
(
data
.
isPresent
()){
FireStation
fireStation
=
data
.
get
();
fireStation
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireStation
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireStation
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
fireStation
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireStationDao
.
save
(
fireStation
);
iFireStationDao
.
save
(
fireStation
);
...
@@ -124,8 +128,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -124,8 +128,9 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
FireEquipment
fireEquipment
=
iFireEquipmentDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
FireEquipment
>
data
=
iFireEquipmentDao
.
findById
(
pointBo
.
getPointId
());
if
(
fireEquipment
!=
null
){
if
(
data
.
isPresent
()){
FireEquipment
fireEquipment
=
data
.
get
();
fireEquipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireEquipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireEquipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
fireEquipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireEquipmentDao
.
save
(
fireEquipment
);
iFireEquipmentDao
.
save
(
fireEquipment
);
...
@@ -133,11 +138,14 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -133,11 +138,14 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateEquipmentPosition
(
BindPointBo
pointBo
)
{
Equipment
equipment
=
iEquipmentDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
Equipment
>
data
=
iEquipmentDao
.
findById
(
pointBo
.
getPointId
());
if
(
equipment
!=
null
){
Equipment
equipment
=
null
;
if
(
data
.
isPresent
()){
equipment
=
data
.
get
();
equipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
equipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
equipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
equipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iEquipmentDao
.
save
(
equipment
);
iEquipmentDao
.
save
(
equipment
);
iEquipmentDao
.
findById
(
pointBo
.
getPointId
()).
get
();
}
}
}
}
...
@@ -146,8 +154,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -146,8 +154,9 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateRiskSourcePosition
(
BindPointBo
pointBo
)
{
public
void
updateRiskSourcePosition
(
BindPointBo
pointBo
)
{
RiskSource
riskSource
=
iRiskSourceDao
.
getOne
(
pointBo
.
getPointId
());
Optional
<
RiskSource
>
data
=
iRiskSourceDao
.
findById
(
pointBo
.
getPointId
());
if
(
riskSource
!=
null
){
if
(
data
.
isPresent
()){
RiskSource
riskSource
=
data
.
get
();
riskSource
.
setUe4Location
(
pointBo
.
getUe4Location
());
riskSource
.
setUe4Location
(
pointBo
.
getUe4Location
());
riskSource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
riskSource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iRiskSourceDao
.
save
(
riskSource
);
iRiskSourceDao
.
save
(
riskSource
);
...
...
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