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
fd137860
Commit
fd137860
authored
Apr 21, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改命名规则
parent
3e833c1e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
151 additions
and
18 deletions
+151
-18
Equipment.java
.../main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
+2
-2
FireCar.java
...rc/main/java/com/yeejoin/amos/fas/dao/entity/FireCar.java
+3
-2
FireEquipment.java
...n/java/com/yeejoin/amos/fas/dao/entity/FireEquipment.java
+2
-3
FireStation.java
...ain/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
+2
-2
RiskSource.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
+4
-3
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+3
-2
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+3
-3
PatrolMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/PatrolMapper.java
+7
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+112
-1
dbTemplate_patrol.xml
...sStart/src/main/resources/db/mapper/dbTemplate_patrol.xml
+13
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
View file @
fd137860
...
@@ -112,14 +112,12 @@ public class Equipment extends BasicEntity {
...
@@ -112,14 +112,12 @@ public class Equipment extends BasicEntity {
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
public
Equipment
()
{
public
Equipment
()
{
...
@@ -228,6 +226,7 @@ public class Equipment extends BasicEntity {
...
@@ -228,6 +226,7 @@ public class Equipment extends BasicEntity {
this
.
reservePlan
=
reservePlan
;
this
.
reservePlan
=
reservePlan
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -236,6 +235,7 @@ public class Equipment extends BasicEntity {
...
@@ -236,6 +235,7 @@ public class Equipment extends BasicEntity {
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireCar.java
View file @
fd137860
...
@@ -80,14 +80,12 @@ public class FireCar extends BasicEntity {
...
@@ -80,14 +80,12 @@ public class FireCar extends BasicEntity {
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
public
FireCar
()
{
public
FireCar
()
{
...
@@ -230,6 +228,8 @@ public class FireCar extends BasicEntity {
...
@@ -230,6 +228,8 @@ public class FireCar extends BasicEntity {
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
this
.
riskSourceId
=
riskSourceId
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -238,6 +238,7 @@ public class FireCar extends BasicEntity {
...
@@ -238,6 +238,7 @@ public class FireCar extends BasicEntity {
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipment.java
View file @
fd137860
...
@@ -125,14 +125,12 @@ public class FireEquipment extends BasicEntity {
...
@@ -125,14 +125,12 @@ public class FireEquipment extends BasicEntity {
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
public
Long
getRiskSourceId
()
{
public
Long
getRiskSourceId
()
{
...
@@ -357,7 +355,7 @@ public class FireEquipment extends BasicEntity {
...
@@ -357,7 +355,7 @@ public class FireEquipment extends BasicEntity {
this
.
weight
=
weight
;
this
.
weight
=
weight
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -366,6 +364,7 @@ public class FireEquipment extends BasicEntity {
...
@@ -366,6 +364,7 @@ public class FireEquipment extends BasicEntity {
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
View file @
fd137860
...
@@ -84,14 +84,12 @@ public class FireStation extends BasicEntity{
...
@@ -84,14 +84,12 @@ public class FireStation extends BasicEntity{
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
@Transient
@Transient
...
@@ -191,6 +189,7 @@ public class FireStation extends BasicEntity{
...
@@ -191,6 +189,7 @@ public class FireStation extends BasicEntity{
this
.
riskSourceId
=
riskSourceId
;
this
.
riskSourceId
=
riskSourceId
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -199,6 +198,7 @@ public class FireStation extends BasicEntity{
...
@@ -199,6 +198,7 @@ public class FireStation extends BasicEntity{
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
View file @
fd137860
...
@@ -58,21 +58,18 @@ public class RiskSource extends BasicEntity {
...
@@ -58,21 +58,18 @@ public class RiskSource extends BasicEntity {
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
/**
/**
* ue4缩放
* ue4缩放
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_extent"
)
private
String
ue4Extent
;
private
String
ue4Extent
;
private
List
<
Fmea
>
fmeaList
;
private
List
<
Fmea
>
fmeaList
;
...
@@ -222,6 +219,8 @@ public class RiskSource extends BasicEntity {
...
@@ -222,6 +219,8 @@ public class RiskSource extends BasicEntity {
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
this
.
isIndoor
=
isIndoor
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -230,6 +229,7 @@ public class RiskSource extends BasicEntity {
...
@@ -230,6 +229,7 @@ public class RiskSource extends BasicEntity {
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
@@ -238,6 +238,7 @@ public class RiskSource extends BasicEntity {
...
@@ -238,6 +238,7 @@ public class RiskSource extends BasicEntity {
this
.
ue4Rotation
=
ue4Rotation
;
this
.
ue4Rotation
=
ue4Rotation
;
}
}
@Column
(
name
=
"ue4_extent"
)
public
String
getUe4Extent
()
{
public
String
getUe4Extent
()
{
return
ue4Extent
;
return
ue4Extent
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
View file @
fd137860
...
@@ -87,14 +87,12 @@ public class WaterResource extends BasicEntity{
...
@@ -87,14 +87,12 @@ public class WaterResource extends BasicEntity{
* ue4位置
* ue4位置
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_location"
)
private
String
ue4Location
;
private
String
ue4Location
;
/**
/**
* ue4旋转
* ue4旋转
*/
*/
@Lob
@Lob
@Column
(
name
=
"ue4_rotation"
)
private
String
ue4Rotation
;
private
String
ue4Rotation
;
public
String
getName
()
{
public
String
getName
()
{
...
@@ -193,6 +191,8 @@ public class WaterResource extends BasicEntity{
...
@@ -193,6 +191,8 @@ public class WaterResource extends BasicEntity{
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
public
String
getUe4Location
()
{
return
ue4Location
;
return
ue4Location
;
}
}
...
@@ -201,6 +201,7 @@ public class WaterResource extends BasicEntity{
...
@@ -201,6 +201,7 @@ public class WaterResource extends BasicEntity{
this
.
ue4Location
=
ue4Location
;
this
.
ue4Location
=
ue4Location
;
}
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
return
ue4Rotation
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
fd137860
...
@@ -21,15 +21,15 @@ import java.util.List;
...
@@ -21,15 +21,15 @@ import java.util.List;
@RestController
@RestController
@RequestMapping
(
"/api/view3d"
)
@RequestMapping
(
"/api/view3d"
)
@Api
(
tags
=
"
view3d数据
"
)
@Api
(
tags
=
"
全景监控
"
)
public
class
View3dController
{
public
class
View3dController
extends
BaseController
{
@Autowired
@Autowired
private
IRiskSourceService
riskSourceService
;
private
IRiskSourceService
riskSourceService
;
@Autowired
@Autowired
private
IView3dService
view3dService
;
private
IView3dService
view3dService
;
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"点3d坐标设置"
,
notes
=
"按照点类型3d坐标设置"
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"点3d坐标设置"
,
notes
=
"按照点类型3d坐标设置"
)
@PostMapping
(
value
=
"/point/bind"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/point/bind"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
setPoint3dPosition
(
@ApiParam
(
name
=
"参数"
,
required
=
true
)
@RequestBody
List
<
BindPointBo
>
pointBoList
){
public
CommonResponse
setPoint3dPosition
(
@ApiParam
(
name
=
"参数"
,
required
=
true
)
@RequestBody
List
<
BindPointBo
>
pointBoList
){
return
view3dService
.
setPoint3dPosition
(
pointBoList
);
return
view3dService
.
setPoint3dPosition
(
pointBoList
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PatrolMapper.java
0 → 100644
View file @
fd137860
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
public
interface
PatrolMapper
extends
BaseMapper
{
void
updatePoint3dPosition
(
BindPointBo
bo
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
fd137860
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
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.repository.*
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -15,6 +21,25 @@ import java.util.List;
...
@@ -15,6 +21,25 @@ import java.util.List;
*/
*/
@Service
(
"view3dService"
)
@Service
(
"view3dService"
)
public
class
View3dServiceImpl
implements
IView3dService
{
public
class
View3dServiceImpl
implements
IView3dService
{
Logger
log
=
LoggerFactory
.
getLogger
(
View3dServiceImpl
.
class
);
@Autowired
private
IRiskSourceDao
iRiskSourceDao
;
@Autowired
private
IFireCarDao
iFireCarDao
;
@Autowired
private
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
private
IFireStationDao
iFireStationDao
;
@Autowired
private
IEquipmentDao
iEquipmentDao
;
@Autowired
private
IWaterResourceDao
iWaterResourceDao
;
@Autowired
private
PatrolMapper
patrolMapper
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
)
{
public
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
)
{
...
@@ -24,10 +49,96 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -24,10 +49,96 @@ public class View3dServiceImpl implements IView3dService {
pointBoList
.
forEach
(
pointBo
->{
pointBoList
.
forEach
(
pointBo
->{
this
.
savePointPositionByType
(
pointBo
.
getPointType
(),
pointBo
);
this
.
savePointPositionByType
(
pointBo
.
getPointType
(),
pointBo
);
});
});
return
null
;
return
CommonResponseUtil
.
success
()
;
}
}
public
void
savePointPositionByType
(
String
pointType
,
BindPointBo
pointBo
){
public
void
savePointPositionByType
(
String
pointType
,
BindPointBo
pointBo
){
switch
(
pointType
){
case
"riskSource"
:
this
.
updateRiskSourcePosition
(
pointBo
);
break
;
case
"patrol"
:
this
.
updatePatrolPosition
(
pointBo
);
break
;
case
"impEquipment"
:
this
.
updateEquipmentPosition
(
pointBo
);
break
;
case
"monitorEquipment"
:
case
"video"
:
case
"fireEquipment"
:
this
.
updateFireEquipmentPosition
(
pointBo
);
break
;
case
"fireCar"
:
this
.
updateFireCarPosition
(
pointBo
);
case
"fireChamber"
:
case
"fireFoamRoom"
:
this
.
updateFireStationPosition
(
pointBo
);
break
;
case
"hydrant"
:
case
"pool"
:
this
.
updateWaterSourcePosition
(
pointBo
);
break
;
default
:
log
.
error
(
"不支持的类型-->"
+
pointType
);
break
;
}
}
public
void
updateFireCarPosition
(
BindPointBo
pointBo
)
{
FireCar
fireCar
=
iFireCarDao
.
getOne
(
pointBo
.
getPointId
());
if
(
fireCar
!=
null
){
fireCar
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireCar
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireCarDao
.
save
(
fireCar
);
}
}
public
void
updateWaterSourcePosition
(
BindPointBo
pointBo
)
{
WaterResource
waterResource
=
iWaterResourceDao
.
getOne
(
pointBo
.
getPointId
());
if
(
waterResource
!=
null
){
waterResource
.
setUe4Location
(
pointBo
.
getUe4Location
());
waterResource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iWaterResourceDao
.
save
(
waterResource
);
}
}
public
void
updateFireStationPosition
(
BindPointBo
pointBo
)
{
FireStation
fireStation
=
iFireStationDao
.
getOne
(
pointBo
.
getPointId
());
if
(
fireStation
!=
null
){
fireStation
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireStation
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireStationDao
.
save
(
fireStation
);
}
}
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
FireEquipment
fireEquipment
=
iFireEquipmentDao
.
getOne
(
pointBo
.
getPointId
());
if
(
fireEquipment
!=
null
){
fireEquipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
fireEquipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iFireEquipmentDao
.
save
(
fireEquipment
);
}
}
public
void
updateEquipmentPosition
(
BindPointBo
pointBo
)
{
Equipment
equipment
=
iEquipmentDao
.
getOne
(
pointBo
.
getPointId
());
if
(
equipment
!=
null
){
equipment
.
setUe4Location
(
pointBo
.
getUe4Location
());
equipment
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iEquipmentDao
.
save
(
equipment
);
}
}
public
void
updatePatrolPosition
(
BindPointBo
pointBo
)
{
patrolMapper
.
updatePoint3dPosition
(
pointBo
);
}
public
void
updateRiskSourcePosition
(
BindPointBo
pointBo
)
{
RiskSource
riskSource
=
iRiskSourceDao
.
getOne
(
pointBo
.
getPointId
());
if
(
riskSource
!=
null
){
riskSource
.
setUe4Location
(
pointBo
.
getUe4Location
());
riskSource
.
setUe4Rotation
(
pointBo
.
getUe4Rotation
());
iRiskSourceDao
.
save
(
riskSource
);
}
}
}
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_patrol.xml
0 → 100644
View file @
fd137860
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper"
>
<update
id=
"updatePoint3dPosition"
>
update p_point
set
ue4_location = #{ue4Location},
ue4_rotation = #{ue4Rotation}
where id = #{pointId}
</update>
</mapper>
\ No newline at end of file
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