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
25d4f6df
Commit
25d4f6df
authored
May 26, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f720f850
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
177 additions
and
169 deletions
+177
-169
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+152
-150
IFireEquipmentDao.java
...n/amos/fas/business/dao/repository/IFireEquipmentDao.java
+2
-0
IFireStationDao.java
...oin/amos/fas/business/dao/repository/IFireStationDao.java
+0
-1
IWaterResourceDao.java
...n/amos/fas/business/dao/repository/IWaterResourceDao.java
+3
-0
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+4
-3
WaterResourceServiceImpl.java
...s/fas/business/service/impl/WaterResourceServiceImpl.java
+4
-4
IFireEquipService.java
...in/amos/fas/business/service/intfc/IFireEquipService.java
+7
-10
IWaterResourceService.java
...mos/fas/business/service/intfc/IWaterResourceService.java
+2
-0
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+3
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
25d4f6df
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
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
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
...
@@ -28,154 +29,155 @@ import java.util.List;
@RequestMapping
(
value
=
"/api/fireSource"
)
@Api
(
tags
=
"消防资源api"
)
public
class
FireSourceController
extends
BaseController
{
@Autowired
private
IFireCarService
fireCarService
;
@Autowired
private
IFireEquipService
iFireEquipService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防装备"
,
notes
=
"编辑消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireEquipment
fireEquipment
)
{
fireEquipment
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
query
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryOne
(
id
));
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
}
/**
* 消防车查询
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 消防车详情查询
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
}
/**
* 消防装备查询-查询消防装备及视频监控
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
@RequestMapping
(
value
=
"/fire-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireEquipment
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquip
(
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 配套设备查询
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
@RequestMapping
(
value
=
"/matching-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireEquipmentByProId
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquipByProId
(
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 生产区域查询查询
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
@RequestMapping
(
value
=
"/fire-equip/area"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryProArea
()
{
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
return
CommonResponseUtil
.
success
(
car
);
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForFireEquipmentHistory
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
int
pageNumber
,
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Long
id
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
}
@Autowired
private
IFireCarService
fireCarService
;
@Autowired
private
IFireEquipService
iFireEquipService
;
@Autowired
private
IWaterResourceService
iWaterResourceService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防装备"
,
notes
=
"编辑消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireEquipment
fireEquipment
)
{
fireEquipment
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
query
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryOne
(
id
));
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
if
(
iWaterResourceService
.
countAssociatedEquipWaterByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被灭火栓或消防水池绑定,请先删除绑定关系"
);
}
if
(
iFireEquipService
.
countAssociatedEquipStationByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
}
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
}
/**
* 消防车查询
*
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 消防车详情查询
*
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
}
/**
* 消防装备查询-查询消防装备及视频监控
*
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
@RequestMapping
(
value
=
"/fire-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireEquipment
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquip
(
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 配套设备查询
*
* @return
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
@RequestMapping
(
value
=
"/matching-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireEquipmentByProId
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquipByProId
(
param
);
return
CommonResponseUtil
.
success
(
carList
);
}
/**
* 生产区域查询查询
*
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
@RequestMapping
(
value
=
"/fire-equip/area"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryProArea
()
{
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
return
CommonResponseUtil
.
success
(
car
);
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForFireEquipmentHistory
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
int
pageNumber
,
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Long
id
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentDao.java
View file @
25d4f6df
...
...
@@ -16,4 +16,6 @@ public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
Optional
<
FireEquipment
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireStationDao.java
View file @
25d4f6df
...
...
@@ -10,5 +10,4 @@ import com.yeejoin.amos.fas.dao.entity.FireStation;
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
Optional
<
FireStation
>
findById
(
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IWaterResourceDao.java
View file @
25d4f6df
...
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
@Repository
(
"iWaterResourceDao"
)
...
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
Optional
<
WaterResource
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
25d4f6df
...
...
@@ -189,7 +189,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
return
returnEntity
;
}
@Override
public
int
countAssociatedEquipStationByIds
(
String
[]
ids
)
{
return
iFireEquipmentDao
.
countAssociatedEquipStationByIds
(
ids
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/WaterResourceServiceImpl.java
View file @
25d4f6df
...
...
@@ -120,8 +120,8 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
}
@Override
public
int
countAssociatedEquipWaterByIds
(
String
[]
ids
)
{
return
iWaterResourceDao
.
countAssociatedEquipWaterByIds
(
ids
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipService.java
View file @
25d4f6df
...
...
@@ -18,15 +18,10 @@ public interface IFireEquipService {
List
<
String
>
findFireEquipArea
();
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
queryOne
(
Long
id
);
/**
* 删除单个风险点
* @return
...
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
String
equipmentName
,
String
startTime
,
...
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
//查询设备明细
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
;
/**
* 查询关联数量
* @param ids
* @return
*/
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IWaterResourceService.java
View file @
25d4f6df
...
...
@@ -54,4 +54,6 @@ public interface IWaterResourceService {
Object
queryForList
();
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
25d4f6df
...
...
@@ -68,7 +68,9 @@
fe.room,
fe.risk_source_id,
fe.is_indoor,
fe.model,fe.manufacturer
fe.model,
fe.manufacturer,
fe.floor3d
FROM
f_fire_equipment fe
LEFT JOIN f_risk_source rs ON rs.id = fe.risk_source_id
...
...
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