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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
31 deletions
+39
-31
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+14
-12
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
;
...
@@ -32,12 +33,14 @@ public class FireSourceController extends BaseController {
...
@@ -32,12 +33,14 @@ public class FireSourceController extends BaseController {
private
IFireCarService
fireCarService
;
private
IFireCarService
fireCarService
;
@Autowired
@Autowired
private
IFireEquipService
iFireEquipService
;
private
IFireEquipService
iFireEquipService
;
@Autowired
private
IWaterResourceService
iWaterResourceService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setOrgCode
(
compCode
);
fireEquipment
.
setOrgCode
(
compCode
);
...
@@ -62,13 +65,18 @@ public class FireSourceController extends BaseController {
...
@@ -62,13 +65,18 @@ public class FireSourceController extends BaseController {
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
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
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
}
}
/**
/**
* 消防车查询
* 消防车查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
...
@@ -77,7 +85,7 @@ public class FireSourceController extends BaseController {
...
@@ -77,7 +85,7 @@ public class FireSourceController extends BaseController {
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
carList
);
return
CommonResponseUtil
.
success
(
carList
);
}
}
...
@@ -90,14 +98,13 @@ public class FireSourceController extends BaseController {
...
@@ -90,14 +98,13 @@ public class FireSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@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
)
{
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
return
CommonResponseUtil
.
success
(
car
);
}
}
/**
/**
* 消防装备查询-查询消防装备及视频监控
* 消防装备查询-查询消防装备及视频监控
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
...
@@ -113,7 +120,6 @@ public class FireSourceController extends BaseController {
...
@@ -113,7 +120,6 @@ public class FireSourceController extends BaseController {
/**
/**
* 配套设备查询
* 配套设备查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
...
@@ -129,7 +135,6 @@ public class FireSourceController extends BaseController {
...
@@ -129,7 +135,6 @@ public class FireSourceController extends BaseController {
/**
/**
* 生产区域查询查询
* 生产区域查询查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
...
@@ -139,7 +144,7 @@ public class FireSourceController extends BaseController {
...
@@ -139,7 +144,7 @@ public class FireSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
car
);
return
CommonResponseUtil
.
success
(
car
);
}
}
// @Authorization(ingore = true)
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForFireEquipmentHistory
(
public
CommonResponse
queryForFireEquipmentHistory
(
...
@@ -175,7 +180,4 @@ public class FireSourceController extends BaseController {
...
@@ -175,7 +180,4 @@ public class FireSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
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