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;
...
@@ -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.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
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.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
@@ -28,154 +29,155 @@ import java.util.List;
...
@@ -28,154 +29,155 @@ import java.util.List;
@RequestMapping
(
value
=
"/api/fireSource"
)
@RequestMapping
(
value
=
"/api/fireSource"
)
@Api
(
tags
=
"消防资源api"
)
@Api
(
tags
=
"消防资源api"
)
public
class
FireSourceController
extends
BaseController
{
public
class
FireSourceController
extends
BaseController
{
@Autowired
@Autowired
private
IFireCarService
fireCarService
;
private
IFireCarService
fireCarService
;
@Autowired
@Autowired
private
IFireEquipService
iFireEquipService
;
private
IFireEquipService
iFireEquipService
;
@Autowired
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
private
IWaterResourceService
iWaterResourceService
;
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
ReginParams
reginParams
=
getSelectedOrgInfo
();
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
String
compCode
=
getOrgCode
(
reginParams
);
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
fireEquipment
.
setCreateBy
(
getUserId
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
fireEquipment
.
setCreateDate
(
new
Date
());
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setOrgCode
(
compCode
);
fireEquipment
.
setCreateBy
(
getUserId
());
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
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
)
{
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防装备"
,
notes
=
"编辑消防装备"
)
fireEquipment
.
setId
(
id
);
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
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
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryOne
(
id
));
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
{
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
String
[]
idArray
=
ids
.
split
(
","
);
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
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
)
{
* @param id
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
* @return
}
*/
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
@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
);
* @return
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
*/
return
CommonResponseUtil
.
success
(
carList
);
@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
);
* @param id
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
* @return
return
CommonResponseUtil
.
success
(
carList
);
*/
}
@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
=
"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
)
{
* @param id
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
* @return
return
CommonResponseUtil
.
success
(
car
);
*/
}
@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
)
{
* @return
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
*/
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquip
(
param
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
return
CommonResponseUtil
.
success
(
carList
);
@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
);
* @param id
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
,
* @return
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
*/
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquipByProId
(
param
);
@RequestMapping
(
value
=
"/matching-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
return
CommonResponseUtil
.
success
(
carList
);
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
()
{
* @return
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
*/
return
CommonResponseUtil
.
success
(
car
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
}
@RequestMapping
(
value
=
"/fire-equip/area"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryProArea
()
{
// @Authorization(ingore = true)
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
return
CommonResponseUtil
.
success
(
car
);
@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
,
// @Authorization(ingore = true)
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
public
CommonResponse
queryForFireEquipmentHistory
(
int
pageSize
)
{
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
int
pageSize
)
{
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
public
CommonResponse
queryForEquipmentList
(
}
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
int
pageNumber
,
int
pageSize
)
{
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
int
pageNumber
,
int
pageSize
)
{
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Long
id
,
}
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
@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> {
...
@@ -16,4 +16,6 @@ public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
Optional
<
FireEquipment
>
findById
(
Long
id
);
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;
...
@@ -10,5 +10,4 @@ import com.yeejoin.amos.fas.dao.entity.FireStation;
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
Optional
<
FireStation
>
findById
(
Long
id
);
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;
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
java.util.Optional
;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
@Repository
(
"iWaterResourceDao"
)
@Repository
(
"iWaterResourceDao"
)
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
Optional
<
WaterResource
>
findById
(
Long
id
);
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 {
...
@@ -189,7 +189,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
return
returnEntity
;
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 {
...
@@ -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 {
...
@@ -18,15 +18,10 @@ public interface IFireEquipService {
List
<
String
>
findFireEquipArea
();
List
<
String
>
findFireEquipArea
();
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
queryOne
(
Long
id
);
FireEquipment
queryOne
(
Long
id
);
/**
/**
* 删除单个风险点
* 删除单个风险点
* @return
* @return
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
*/
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
String
equipmentName
,
String
equipmentName
,
String
startTime
,
String
startTime
,
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
//查询设备明细
//查询设备明细
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
;
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 {
...
@@ -54,4 +54,6 @@ public interface IWaterResourceService {
Object
queryForList
();
Object
queryForList
();
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
25d4f6df
...
@@ -68,7 +68,9 @@
...
@@ -68,7 +68,9 @@
fe.room,
fe.room,
fe.risk_source_id,
fe.risk_source_id,
fe.is_indoor,
fe.is_indoor,
fe.model,fe.manufacturer
fe.model,
fe.manufacturer,
fe.floor3d
FROM
FROM
f_fire_equipment fe
f_fire_equipment fe
LEFT JOIN f_risk_source rs ON rs.id = fe.risk_source_id
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