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
44510002
Commit
44510002
authored
Jun 23, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
df267d9e
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
174 additions
and
22 deletions
+174
-22
ExcelController.java
...yeejoin/amos/fas/business/controller/ExcelController.java
+6
-1
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+15
-0
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+6
-0
IEquipmentFireEquipmentDao.java
...s/business/dao/repository/IEquipmentFireEquipmentDao.java
+3
-0
IFireEquipmentPointDao.java
...s/fas/business/dao/repository/IFireEquipmentPointDao.java
+10
-0
IRiskSourceDao.java
...join/amos/fas/business/dao/repository/IRiskSourceDao.java
+2
-0
FeignBasicAuthRequestInterceptor.java
.../fas/business/feign/FeignBasicAuthRequestInterceptor.java
+13
-10
FireEquipmentParam.java
...m/yeejoin/amos/fas/business/param/FireEquipmentParam.java
+18
-1
WaterResourceParam.java
...m/yeejoin/amos/fas/business/param/WaterResourceParam.java
+21
-4
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+6
-0
ExcelServiceImpl.java
...join/amos/fas/business/service/impl/ExcelServiceImpl.java
+22
-0
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+12
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+1
-0
IEquipmentService.java
...in/amos/fas/business/service/intfc/IEquipmentService.java
+2
-0
IFireEquipPontService.java
...mos/fas/business/service/intfc/IFireEquipPontService.java
+6
-0
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+29
-5
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+2
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ExcelController.java
View file @
44510002
...
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.fas.business.util.FileHelper;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -119,7 +121,10 @@ public class ExcelController extends BaseController {
iExcelService
.
importWaterResource
(
list
);
}
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
YeeException
e
)
{
logger
.
info
(
"导入数据异常"
,
e
);
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
catch
(
Exception
e
)
{
logger
.
info
(
"导入数据异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"导入失败"
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
44510002
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.google.common.collect.Maps
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService
;
...
...
@@ -163,6 +164,15 @@ public class FireEquimtPointController extends BaseController {
@ApiOperation
(
value
=
"修改监测点"
,
notes
=
"修改监测点"
)
@PostMapping
(
value
=
"/update"
)
public
CommonResponse
update
(
@ApiParam
(
value
=
"监测点对象"
,
required
=
true
)
@RequestBody
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
FireEquipmentPoint
old
=
fireEquipPontService
.
queryOne
(
fireEquipmentPointEntity
.
getId
());
if
(
old
.
getId
()
!=
0
)
{
String
[]
idArray
=
new
String
[]
{
String
.
valueOf
(
old
.
getId
())
};
if
(
fireEquipPontService
.
countImpEquipment
(
idArray
)
>
0
)
{
String
riskSourceNames
=
fireEquipPontService
.
findBindRiskSourceStrByPointIds
(
idArray
);
return
CommonResponseUtil
.
failure
(
"该设备已被风险区域 ["
+
riskSourceNames
+
"] 绑定,请先删除绑定关系"
);
}
}
return
fireEquipPontService
.
update
(
fireEquipmentPointEntity
);
}
...
...
@@ -172,6 +182,11 @@ public class FireEquimtPointController extends BaseController {
if
(
StringUtils
.
isEmpty
(
pointIds
))
{
return
CommonResponseUtil
.
failure
(
"监测点编号必填"
);
}
String
[]
idArray
=
pointIds
.
split
(
","
);
if
(
fireEquipPontService
.
countImpEquipment
(
idArray
)
>
0
)
{
String
riskSourceNames
=
fireEquipPontService
.
findBindRiskSourceStrByPointIds
(
idArray
);
return
CommonResponseUtil
.
failure
(
"该点位已被风险区域 ["
+
riskSourceNames
+
"] 绑定,请先删除绑定关系"
);
}
List
<
Long
>
ids
=
Arrays
.
stream
(
pointIds
.
split
(
","
)).
map
(
s
->
Long
.
parseLong
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
return
fireEquipPontService
.
batchDelete
(
ids
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
44510002
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
...
...
@@ -36,6 +37,8 @@ public class FireSourceController extends BaseController {
private
IFireEquipService
iFireEquipService
;
@Autowired
private
IWaterResourceService
iWaterResourceService
;
@Autowired
private
IEquipmentService
iEquipService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
...
...
@@ -83,6 +86,9 @@ public class FireSourceController extends BaseController {
if
(
iFireEquipService
.
countAssociatedEquipStationByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
}
if
(
iEquipService
.
countImpEquipByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被重点设备绑定,请先删除绑定关系"
);
}
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IEquipmentFireEquipmentDao.java
View file @
44510002
...
...
@@ -17,4 +17,7 @@ public interface IEquipmentFireEquipmentDao extends BaseDao<EquipmentFireEquipme
@Query
(
value
=
"select count(1) from f_equipment_fire_equipment WHERE equipment_id = ?1 and fire_equipment_id = ?2"
,
nativeQuery
=
true
)
int
findByEqmtIdAndFireEqmtId
(
Long
equipmentId
,
Long
fireEquipmentId
);
@Query
(
value
=
"SELECT count(1) FROM `f_equipment_fire_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countImpEquipByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentPointDao.java
View file @
44510002
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.dao.repository;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
...
...
@@ -15,4 +16,13 @@ public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long
int
countByCode
(
String
code
);
@Query
(
value
=
"SELECT count(1) FROM `f_fmea_equipment_point` WHERE equipment_point_id in ?1"
,
nativeQuery
=
true
)
int
countImpEquipment
(
String
[]
idArray
);
@Query
(
value
=
"select group_CONCAT(r.name) from f_fmea_equipment_point ep "
+
"left join f_fmea f on f.id = ep.fmea_id "
+
"left join f_risk_source r on r.id = f.risk_source_id "
+
" WHERE ep.equipment_point_id in ?1 "
,
nativeQuery
=
true
)
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IRiskSourceDao.java
View file @
44510002
...
...
@@ -39,4 +39,6 @@ public interface IRiskSourceDao extends BaseDao<RiskSource, Long> {
Optional
<
RiskSource
>
findByOrgCodeAndParentId
(
String
orgCode
,
Long
parentId
);
List
<
RiskSource
>
findByParentIdAndIsRegion
(
long
id
,
String
string
);
Optional
<
RiskSource
>
findByCode
(
String
riskSourceCode
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/FeignBasicAuthRequestInterceptor.java
View file @
44510002
...
...
@@ -16,15 +16,18 @@ public class FeignBasicAuthRequestInterceptor implements RequestInterceptor{
@Override
public
void
apply
(
RequestTemplate
template
)
{
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
HttpServletRequest
request
=
attributes
.
getRequest
();
/* Get token from header */
String
authToken
=
request
.
getHeader
(
"X-Access-Token"
);
/* If token not found get it from request parameter */
if
(
authToken
==
null
)
{
authToken
=
request
.
getParameter
(
"token"
);
}
template
.
header
(
"X-Access-Token"
,
authToken
);
template
.
header
(
"token"
,
authToken
);
if
(
attributes
!=
null
)
{
HttpServletRequest
request
=
attributes
.
getRequest
();
/* Get token from header */
String
authToken
=
request
.
getHeader
(
"X-Access-Token"
);
/* If token not found get it from request parameter */
if
(
authToken
==
null
)
{
authToken
=
request
.
getParameter
(
"token"
);
}
template
.
header
(
"X-Access-Token"
,
authToken
);
template
.
header
(
"token"
,
authToken
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FireEquipmentParam.java
View file @
44510002
...
...
@@ -48,8 +48,11 @@ public class FireEquipmentParam {
@Excel
(
name
=
"重量"
,
orderNum
=
"13"
)
private
Double
weight
=
0.00
;
@Excel
(
name
=
"风险区域编号
"
,
orderNum
=
"14"
)
// @Excel(name = "风险区域id
", orderNum = "14")
private
Long
riskSourceId
;
@Excel
(
name
=
"风险区域编号(必填)"
,
orderNum
=
"14"
)
private
String
riskSourceCode
;
@Excel
(
name
=
"厂商"
,
orderNum
=
"15"
,
width
=
20
)
private
String
manufacturer
;
...
...
@@ -189,4 +192,18 @@ public class FireEquipmentParam {
public
void
setManufacturer
(
String
manufacturer
)
{
this
.
manufacturer
=
manufacturer
;
}
/**
* @return the riskSourceCode
*/
public
String
getRiskSourceCode
()
{
return
riskSourceCode
;
}
/**
* @param riskSourceCode the riskSourceCode to set
*/
public
void
setRiskSourceCode
(
String
riskSourceCode
)
{
this
.
riskSourceCode
=
riskSourceCode
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/WaterResourceParam.java
View file @
44510002
...
...
@@ -6,13 +6,13 @@ public class WaterResourceParam {
private
Long
id
;
@Excel
(
name
=
"编号"
,
width
=
20
)
@Excel
(
name
=
"编号
(必填)
"
,
width
=
20
)
private
String
code
;
@Excel
(
name
=
"名称"
,
orderNum
=
"1"
,
width
=
20
)
private
String
name
;
@Excel
(
name
=
"类型"
,
replace
=
{
"消火栓_1"
,
"消防水池_2"
,
"喷淋_3"
},
orderNum
=
"3"
)
@Excel
(
name
=
"类型
(消火栓_1,消防水池_2,喷淋_3)
"
,
replace
=
{
"消火栓_1"
,
"消防水池_2"
,
"喷淋_3"
},
orderNum
=
"3"
)
private
String
type
;
@Excel
(
name
=
"三维坐标"
,
orderNum
=
"4"
,
width
=
15
)
...
...
@@ -21,11 +21,14 @@ public class WaterResourceParam {
@Excel
(
name
=
"三维楼层"
,
orderNum
=
"5"
)
private
String
floor3d
;
@Excel
(
name
=
"是否室内"
,
replace
=
{
"是_1"
,
"否_0"
},
orderNum
=
"6"
)
@Excel
(
name
=
"是否室内
(是_1,否_0)
"
,
replace
=
{
"是_1"
,
"否_0"
},
orderNum
=
"6"
)
private
Boolean
isIndoor
=
true
;
@Excel
(
name
=
"所属风险区域"
,
orderNum
=
"7"
)
//
@Excel(name = "所属风险区域", orderNum = "7")
private
Long
riskSourceId
;
@Excel
(
name
=
"所属风险区域编号(必填)"
,
orderNum
=
"7"
)
private
String
riskSourceCode
;
@Excel
(
name
=
"房间"
,
orderNum
=
"8"
)
private
String
room
;
...
...
@@ -123,4 +126,18 @@ public class WaterResourceParam {
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
/**
* @return the riskSourceCode
*/
public
String
getRiskSourceCode
()
{
return
riskSourceCode
;
}
/**
* @param riskSourceCode the riskSourceCode to set
*/
public
void
setRiskSourceCode
(
String
riskSourceCode
)
{
this
.
riskSourceCode
=
riskSourceCode
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
44510002
...
...
@@ -481,4 +481,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
return
data
.
get
(
0
);
}
@Override
public
int
countImpEquipByIds
(
String
[]
idArray
)
{
return
equipmentFireEquipmentDao
.
countImpEquipByIds
(
idArray
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ExcelServiceImpl.java
View file @
44510002
...
...
@@ -6,6 +6,7 @@ import com.google.common.collect.Sets;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.param.FireEquipmentParam
;
...
...
@@ -14,7 +15,10 @@ import com.yeejoin.amos.fas.business.param.WaterResourceParam;
import
com.yeejoin.amos.fas.business.service.intfc.IExcelService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageImpl
;
...
...
@@ -25,6 +29,7 @@ import org.springframework.util.CollectionUtils;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
@Service
(
"excelService"
)
...
...
@@ -41,6 +46,9 @@ public class ExcelServiceImpl implements IExcelService {
@Autowired
private
WaterResourceMapper
waterResourceMapper
;
@Autowired
private
IRiskSourceDao
riskSourceDao
;
@Transactional
@Override
...
...
@@ -53,6 +61,13 @@ public class ExcelServiceImpl implements IExcelService {
List
<
FireEquipmentParam
>
updateList
=
Lists
.
newArrayList
();
list
.
forEach
(
fireEquipment
->
{
String
code
=
fireEquipment
.
getCode
();
String
riskSourceCode
=
fireEquipment
.
getRiskSourceCode
();
Optional
<
RiskSource
>
riskSourceOptional
=
riskSourceDao
.
findByCode
(
riskSourceCode
);
if
(
riskSourceOptional
.
isPresent
())
{
fireEquipment
.
setRiskSourceId
(
riskSourceOptional
.
get
().
getId
());
}
else
{
throw
new
YeeException
(
"编号: ["
+
riskSourceCode
+
"] 风险区域不存在!"
);
}
FireEquipmentEntity
fireEquipmentEntity
=
equipmentMap
.
get
(
code
);
if
(
fireEquipmentEntity
==
null
)
{
saveList
.
add
(
fireEquipment
);
...
...
@@ -132,6 +147,13 @@ public class ExcelServiceImpl implements IExcelService {
List
<
WaterResourceParam
>
saveList
=
Lists
.
newArrayList
();
List
<
WaterResourceParam
>
updateList
=
Lists
.
newArrayList
();
list
.
forEach
(
warerRes
->
{
String
riskSourceCode
=
warerRes
.
getRiskSourceCode
();
Optional
<
RiskSource
>
riskSourceOptional
=
riskSourceDao
.
findByCode
(
riskSourceCode
);
if
(
riskSourceOptional
.
isPresent
())
{
warerRes
.
setRiskSourceId
(
riskSourceOptional
.
get
().
getId
());
}
else
{
throw
new
YeeException
(
"编号: ["
+
riskSourceCode
+
"] 风险区域不存在!"
);
}
String
code
=
warerRes
.
getCode
();
WaterResource
waterResource
=
waterResourceMap
.
get
(
code
);
if
(
waterResource
==
null
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
44510002
...
...
@@ -154,4 +154,16 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
List
<
FireEquipmentEntity
>
equipments
=
fireEquipMapper
.
listByType
(
type
);
return
CommonResponseUtil
.
success
(
equipments
);
}
@Override
public
int
countImpEquipment
(
String
[]
idArray
)
{
return
fireEquipmentPointDao
.
countImpEquipment
(
idArray
);
}
@Override
public
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
)
{
return
fireEquipmentPointDao
.
findBindRiskSourceStrByPointIds
(
idArray
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
44510002
...
...
@@ -1446,6 +1446,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
JpushMsgContentBo
jpushMsgContentBo
=
jpushMsgBo
.
getMsg
();
Set
<
String
>
target
=
jpushMsgBo
.
getTarget
();
target
.
remove
(
null
);
if
(
jpushMsgContentBo
.
getSend
()){
PushMsgParam
pushMsgParam
=
new
PushMsgParam
();
pushMsgParam
.
setRecivers
(
Lists
.
newArrayList
(
target
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEquipmentService.java
View file @
44510002
...
...
@@ -103,4 +103,6 @@ public interface IEquipmentService {
EquipCommunicationData
findFireEquipDataByPointCode
(
String
code
);
int
countImpEquipByIds
(
String
[]
idArray
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipPontService.java
View file @
44510002
...
...
@@ -59,4 +59,10 @@ public interface IFireEquipPontService {
CommonResponse
batchDelete
(
List
<
Long
>
ids
);
CommonResponse
listByType
(
Integer
type
);
int
countImpEquipment
(
String
[]
idArray
);
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
);
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
44510002
...
...
@@ -241,10 +241,19 @@
<if
test=
"name!=null"
>
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
</if>
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND (select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) is not true
</if>
</select>
<select
id=
"queryForEquipmentPage"
resultType=
"map"
>
select
select * from (
select
fe.*, (
SELECT
'YES'
...
...
@@ -253,19 +262,29 @@
WHERE
efe.fire_equipment_id = fe.id limit 0,1
) isBind,
frs.name riskSourceName
frs.name riskSourceName,
(select true from
f_fire_station_equipment fse
left join f_fire_equipment e on fse.fire_equipment_id = e.id
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) as bindStation
from f_fire_equipment fe
left join f_risk_source frs on frs.id = fe.risk_source_id
where 1=1) tmp
<where>
<if
test=
"equipClassify!=null"
>
and
fe
.equip_classify in ( ${equipClassify} )
and
tmp
.equip_classify in ( ${equipClassify} )
</if>
<if
test=
"code!=null"
>
and
fe
.`code` like '%${code}%'
and
tmp
.`code` like '%${code}%'
</if>
<if
test=
"name!=null"
>
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
and (tmp.`name` like '%${name}%' or tmp.`code` like '%${name}%')
</if>
<!-- 筛选未绑定的配套设施
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
AND tmp.bindStation is not true
</if>
</where>
LIMIT ${start},${length}
...
...
@@ -385,6 +404,7 @@
is_indoor,
name,
maintenance_cycle,
manufacturer,
number,
unit,
room,
...
...
@@ -404,6 +424,7 @@
#{item.isIndoor},
#{item.name},
#{item.maintenanceCycle},
#{item.manufacturer},
#{item.number},
#{item.unit},
#{item.room},
...
...
@@ -445,6 +466,9 @@
<if
test=
"item.maintenanceCycle != null"
>
maintenance_cycle = #{item.maintenanceCycle},
</if>
<if
test=
"item.manufacturer != null"
>
manufacturer = #{item.manufacturer},
</if>
<if
test=
"item.number != null"
>
number = #{item.number},
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
44510002
...
...
@@ -1338,7 +1338,7 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
)
END positionDTO,
m.name as label,
f.name
as protectObjName,
group_concat(f.name)
as protectObjName,
'' as routeName,
'' as person,
m.name as title,
...
...
@@ -1347,6 +1347,7 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id
where equip_classify = 0
group By m.code
<if
test=
"protectObjName != null and protectObjName != ''"
>
AND f.name = #{protectObjName}
</if>
...
...
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