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
003010c6
Commit
003010c6
authored
Apr 22, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口
parent
c8dd8bb4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
249 additions
and
46 deletions
+249
-46
ResourceTypeDefEnum.java
...om/yeejoin/amos/fas/common/enums/ResourceTypeDefEnum.java
+14
-2
RegionTreeResponse.java
...oin/amos/fas/core/common/response/RegionTreeResponse.java
+2
-1
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+18
-6
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+3
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+14
-14
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+31
-1
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+3
-0
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+164
-22
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/ResourceTypeDefEnum.java
View file @
003010c6
...
@@ -11,13 +11,13 @@ public enum ResourceTypeDefEnum {
...
@@ -11,13 +11,13 @@ public enum ResourceTypeDefEnum {
patrol
(
"巡检点"
,
"patrol"
,
"巡检点"
,
"patrol"
),
patrol
(
"巡检点"
,
"patrol"
,
"巡检点"
,
"patrol"
),
impEquipment
(
"重点设备"
,
"impEquipment"
,
"重点设备"
,
"impEquipment"
),
impEquipment
(
"重点设备"
,
"impEquipment"
,
"重点设备"
,
"impEquipment"
),
monitorEquipment
(
"探测器"
,
"monitorEquipment"
,
"探测器"
,
"monitorEquipment"
),
monitorEquipment
(
"探测器"
,
"monitorEquipment"
,
"探测器"
,
"monitorEquipment"
),
video
(
"视频设备"
,
"video"
,
"摄像头"
,
"video"
),
hydrant
(
"消火栓"
,
"hydrant"
,
"消防设备"
,
"fireEquipment"
),
hydrant
(
"消火栓"
,
"hydrant"
,
"消防设备"
,
"fireEquipment"
),
pool
(
"消防水池"
,
"pool"
,
"消防设备"
,
"fireEquipment"
),
pool
(
"消防水池"
,
"pool"
,
"消防设备"
,
"fireEquipment"
),
fireCar
(
"消防车"
,
"fireCar"
,
"消防设备"
,
"fireEquipment"
),
fireCar
(
"消防车"
,
"fireCar"
,
"消防设备"
,
"fireEquipment"
),
fireEquipment
(
"灭火器材"
,
"fireEquipment"
,
"消防设备"
,
"fireEquipment"
),
fireEquipment
(
"灭火器材"
,
"fireEquipment"
,
"消防设备"
,
"fireEquipment"
),
fireChamber
(
"消防小室"
,
"fireChamber"
,
"消防设备"
,
"fireEquipment"
),
fireChamber
(
"消防小室"
,
"fireChamber"
,
"消防设备"
,
"fireEquipment"
),
fireFoamRoom
(
"消防泡沫间"
,
"fireFoamRoom"
,
"消防设备"
,
"fireEquipment"
),
fireFoamRoom
(
"消防泡沫间"
,
"fireFoamRoom"
,
"消防设备"
,
"fireEquipment"
);
video
(
"视频设备"
,
"video"
,
"摄像头"
,
"video"
);
/**
/**
* 名称,描述
* 名称,描述
...
@@ -73,6 +73,18 @@ public enum ResourceTypeDefEnum {
...
@@ -73,6 +73,18 @@ public enum ResourceTypeDefEnum {
}
}
return
list
;
return
list
;
}
}
public
static
Boolean
containsTypeCode
(
String
typeCode
)
{
Boolean
flag
=
false
;
for
(
ResourceTypeDefEnum
e
:
ResourceTypeDefEnum
.
values
())
{
Map
<
String
,
String
>
reso
=
new
HashMap
<>();
if
(
e
.
getTypeCode
().
equals
(
typeCode
))
{
flag
=
true
;
break
;
}
}
return
flag
;
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/response/RegionTreeResponse.java
View file @
003010c6
package
com
.
yeejoin
.
amos
.
fas
.
core
.
common
.
response
;
package
com
.
yeejoin
.
amos
.
fas
.
core
.
common
.
response
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
RegionTreeResponse
{
public
class
RegionTreeResponse
{
...
@@ -12,7 +13,7 @@ public class RegionTreeResponse {
...
@@ -12,7 +13,7 @@ public class RegionTreeResponse {
private
String
ue4Rotation
;
private
String
ue4Rotation
;
private
String
ue4Extent
;
private
String
ue4Extent
;
private
Boolean
isBind
;
private
Boolean
isBind
;
private
List
<
RegionTreeResponse
>
children
;
private
List
<
RegionTreeResponse
>
children
=
new
ArrayList
<>()
;
private
String
type
;
private
String
type
;
public
Long
getId
()
{
public
Long
getId
()
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
003010c6
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.common.enums.ResourceTypeDefEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
java.util.List
;
import
java.util.List
;
...
@@ -45,11 +46,11 @@ public class View3dController extends BaseController {
...
@@ -45,11 +46,11 @@ public class View3dController extends BaseController {
}
}
@ApiOperation
(
value
=
"区域详情查询"
,
notes
=
"区域详情查询"
)
@ApiOperation
(
value
=
"区域详情查询"
,
notes
=
"区域详情查询"
)
@GetMapping
(
value
=
"region/detail/{
i
d}"
)
@GetMapping
(
value
=
"region/detail/{
riskSourceI
d}"
)
public
CommonResponse
getRegionDetail
(
@PathVariable
(
"
id"
)
Long
i
d
)
{
public
CommonResponse
getRegionDetail
(
@PathVariable
(
"
riskSourceId"
)
Long
riskSourceI
d
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionById
(
i
d
,
orgCode
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionById
(
riskSourceI
d
,
orgCode
));
}
}
@ApiOperation
(
value
=
"区域绑定"
,
notes
=
"区域绑定"
)
@ApiOperation
(
value
=
"区域绑定"
,
notes
=
"区域绑定"
)
...
@@ -70,11 +71,22 @@ public class View3dController extends BaseController {
...
@@ -70,11 +71,22 @@ public class View3dController extends BaseController {
}
}
@ApiOperation
(
value
=
"按照分类查询点树"
,
notes
=
"按照分类查询点树"
)
@ApiOperation
(
value
=
"按照分类查询点树"
,
notes
=
"按照分类查询点树"
)
@GetMapping
(
value
=
"point/type/{type}"
)
@GetMapping
(
value
=
"point/tree/{type}"
)
public
CommonResponse
getPointTreeByType
(
@PathVariable
(
"type"
)
String
type
)
{
public
CommonResponse
getPointTreeByType
(
@PathVariable
(
value
=
"type"
)
String
type
)
{
if
(
ResourceTypeDefEnum
.
containsTypeCode
(
type
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getPointTreeByType
(
type
,
orgCode
));
}
return
CommonResponseUtil
.
failure
(
type
+
" 类型不存在"
);
}
@ApiOperation
(
value
=
"按照不同类型查询点详情"
,
notes
=
"按照不同类型查询点详情"
)
@GetMapping
(
value
=
"point/detail"
)
public
CommonResponse
getPointDetail
(
String
type
,
Long
pointId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getPointTreeByType
(
type
,
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
));
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
003010c6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -10,4 +11,6 @@ public interface View3dMapper extends BaseMapper{
...
@@ -10,4 +11,6 @@ public interface View3dMapper extends BaseMapper{
List
<
RegionTreeResponse
>
getPointTreeByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
RegionTreeResponse
>
getPointTreeByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
@Param
(
"type"
)
String
type
,
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"orgCode"
)
String
orgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
003010c6
...
@@ -1754,20 +1754,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1754,20 +1754,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
//区域列表转树
//区域列表转树
private
static
List
<
RegionTreeResponse
>
getRiskRegionTree
(
List
<
RegionTreeResponse
>
list
)
{
private
static
List
<
RegionTreeResponse
>
getRiskRegionTree
(
List
<
RegionTreeResponse
>
list
)
{
List
<
RegionTreeResponse
>
treeList
=
new
ArrayList
<
RegionTreeResponse
>();
HashMap
<
Long
,
RegionTreeResponse
>
hashMap
=
new
HashMap
<
>();
for
(
RegionTreeResponse
tree
:
list
)
{
list
.
forEach
(
e
->
hashMap
.
put
(
e
.
getId
(),
e
));
if
(
tree
.
getParentId
()
!=
null
&&
tree
.
getParentId
()
==
0
)
{
List
<
RegionTreeResponse
>
treeList
=
new
ArrayList
<
RegionTreeResponse
>();
treeList
.
add
(
tree
);
list
.
forEach
(
r
->
{
}
Long
parentId
=
r
.
getParentId
();
for
(
RegionTreeResponse
treeNode
:
list
)
{
if
(
parentId
!=
null
)
{
if
(
treeNode
.
getParentId
().
longValue
()
==
tree
.
getId
())
{
RegionTreeResponse
pRegion
=
hashMap
.
get
(
parentId
);
if
(
tree
.
getChildren
()
=
=
null
)
{
if
(
pRegion
!
=
null
)
{
tree
.
setChildren
(
new
ArrayList
<>()
);
pRegion
.
getChildren
().
add
(
r
);
}
}
else
{
tree
.
getChildren
().
add
(
treeNode
);
treeList
.
add
(
r
);
}
}
}
}
}
}
);
return
treeList
;
return
treeList
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
003010c6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
static
org
.
hamcrest
.
CoreMatchers
.
either
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
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
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
...
@@ -161,6 +166,31 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -161,6 +166,31 @@ public class View3dServiceImpl implements IView3dService {
@Override
@Override
public
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
)
{
public
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
)
{
return
view3dMapper
.
getPointTreeByType
(
type
,
orgCode
);
List
<
RegionTreeResponse
>
pointTreeByType
=
view3dMapper
.
getPointTreeByType
(
type
,
orgCode
);
return
convertPointTree
(
pointTreeByType
);
}
//区域列表转树
private
static
List
<
RegionTreeResponse
>
convertPointTree
(
List
<
RegionTreeResponse
>
list
)
{
HashMap
<
Long
,
RegionTreeResponse
>
hashMap
=
new
HashMap
<>();
list
.
forEach
(
e
->
hashMap
.
put
(
e
.
getId
(),
e
));
List
<
RegionTreeResponse
>
treeList
=
new
ArrayList
<
RegionTreeResponse
>();
list
.
forEach
(
r
->
{
Long
parentId
=
r
.
getParentId
();
if
(
parentId
!=
null
)
{
RegionTreeResponse
pRegion
=
hashMap
.
get
(
parentId
);
if
(
pRegion
!=
null
)
{
pRegion
.
getChildren
().
add
(
r
);
}
else
{
treeList
.
add
(
r
);
}
}
});
return
treeList
;
}
@Override
public
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
)
{
return
view3dMapper
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
);
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
003010c6
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.bo.BindPointBo;
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.bo.BindPointBo;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -17,4 +18,6 @@ public interface IView3dService {
...
@@ -17,4 +18,6 @@ public interface IView3dService {
List
<
Map
<
String
,
String
>>
getPointType
();
List
<
Map
<
String
,
String
>>
getPointType
();
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
);
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
);
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
003010c6
...
@@ -2,30 +2,172 @@
...
@@ -2,30 +2,172 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.View3dMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.View3dMapper"
>
<select
id=
"getPointTreeByType"
resultType=
"com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"
>
<select
id=
"getPointTreeByType"
resultType=
"com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"
>
select
<choose>
R.id,R.name,R.code,R.parent_id,R.ue4_location,R.ue4_rotation,R.ue4_extent,
<when
test=
"type == 'riskSource'"
>
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind
select
from f_risk_source R
R.id,R.name,R.code,R.parent_id,R.ue4_location,R.ue4_rotation,R.ue4_extent,
where 1=1
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
<if
test=
"type == 'riskSource'"
>
#{type} as type
from f_risk_source R
</if>
where 1=1
<if
test=
"type == 'patrol'"
>
</when>
<when
test=
"type == 'patrol'"
>
</if>
select
<if
test=
"type == 'impEquipment'"
>
R.id,R.parent_id,
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
</if>
#{type} as type,
<if
test=
"type == 'monitorEquipment'"
>
B.name as name,B.point_no,B.ue4_location,B.ue4_rotation
from f_risk_source R
</if>
left join p_point B on B.risk_source_id = R.id AND R.is_region='TRUE'
<if
test=
"type == 'fireEquipment'"
>
where 1=1
AND B.id is not null
</when>
<when
test=
"type == 'impEquipment'"
>
select
R.id,R.parent_id,
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
#{type} as type,
B.name,B.code,B.ue4_location,B.ue4_rotation
from f_risk_source R
left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE'
where 1=1
AND B.id is not null
</when>
<when
test=
"type == 'monitorEquipment'"
>
select
R.id,R.parent_id,
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
#{type} as type,
B.name,B.code,B.ue4_location,B.ue4_rotation
from f_risk_source R
left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 0
where 1=1
AND B.id is not null
</when>
<when
test=
"type == 'video'"
>
select
R.id,R.parent_id,
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
#{type} as type,
B.name,B.code,B.ue4_location,B.ue4_rotation
from f_risk_source R
left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 2
where 1=1
AND B.id is not null
</when>
<when
test=
"type == 'fireEquipment'"
>
select
R.id,R.parent_id,
IF(ISNULL(IF(trim(R.ue4_rotation)='',NULL,R.ue4_rotation)) OR ISNULL(IF(trim(R.ue4_location)='',NULL,R.ue4_location)),0,1) as is_bind,
CASE
WHEN ISNULL(C.id) = 0 then 'fireCar'
WHEN ISNULL(E.id) = 0 then 'fireEquipment'
WHEN ISNULL(S.id) = 0 AND S.type = 1 then 'fireChamber'
WHEN ISNULL(S.id) = 0 AND S.type = 2 then 'fireFoamRoom'
WHEN ISNULL(W.id) = 0 AND W.type = 1 then 'hydrant'
WHEN ISNULL(W.id) = 0 AND W.type = 2 then 'pool'
END as type,
CASE
WHEN ISNULL(C.name) = 0 then C.name
WHEN ISNULL(E.name) = 0 then E.name
WHEN ISNULL(S.name) = 0 then S.name
WHEN ISNULL(W.name) = 0 then W.name
END as name,
CASE
WHEN ISNULL(C.name) = 0 then C.car_num
WHEN ISNULL(E.name) = 0 then E.code
WHEN ISNULL(S.name) = 0 then S.code
WHEN ISNULL(W.name) = 0 then W.code
END as code,
CASE
WHEN ISNULL(C.name) = 0 then C.ue4_location
WHEN ISNULL(E.name) = 0 then E.ue4_location
WHEN ISNULL(S.name) = 0 then S.ue4_location
WHEN ISNULL(W.name) = 0 then W.ue4_location
END as ue4_location,
CASE
WHEN ISNULL(C.name) = 0 then C.ue4_rotation
WHEN ISNULL(E.name) = 0 then E.ue4_rotation
WHEN ISNULL(S.name) = 0 then S.ue4_rotation
WHEN ISNULL(W.name) = 0 then W.ue4_rotation
END as code
from f_risk_source R
left join f_fire_car C on C.risk_source_id = R.id
left join f_fire_equipment E on E.risk_source_id = R.id AND equip_classify = 3
left join f_fire_station S on S.risk_source_id = R.id
left join f_water_resource W on W.risk_source_id = R.id
where 1=1
AND (C.id is not null OR E.id is not null OR S.id is not null OR w.id is not null)
</when>
</choose>
<if
test=
"orgCode != null"
>
AND R.org_code like CONCAT(#{orgCode},'%')
</if>
</if>
<if
test=
"type == 'video'"
>
</select>
<select
id=
"getPointDetailByTypeAndId"
resultType=
"java.util.HashMap"
>
<choose>
<when
test=
"type == 'riskSource'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_risk_source
where 1=1
</when>
<when
test=
"type == 'patrol'"
>
select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from p_point
where 1=1
</when>
<when
test=
"type == 'impEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_equipment
where 1=1
</when>
<when
test=
"type == 'monitorEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_equipment
where equip_classify = 0
</when>
<when
test=
"type == 'video'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_equipment
where equip_classify = 2
</when>
<when
test=
"type == 'hydrant'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_water_resource
where type = 1
</when>
<when
test=
"type == 'pool'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_water_resource
where type = 2
</when>
<when
test=
"type == 'fireCar'"
>
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_car
where 1=1
</when>
<when
test=
"type == 'fireEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_equipment
where equip_classify = 3
</when>
<when
test=
"type == 'fireChamber'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_station
where type = 2
</when>
<when
test=
"type == 'fireFoamRoom'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation
from f_fire_station
where type = 1
</when>
</choose>
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code like CONCAT(#{orgCode},'%')
AND org_code like CONCAT(#{orgCode},'%')
...
...
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