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
0cb2f733
Commit
0cb2f733
authored
May 15, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
6e37ce61
fc083344
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
4492 additions
and
3976 deletions
+4492
-3976
ManageLevelEum.java
...ava/com/yeejoin/amos/fas/common/enums/ManageLevelEum.java
+61
-0
EquipDetailsResponse.java
...n/amos/fas/core/common/response/EquipDetailsResponse.java
+12
-0
AccidentType.java
...in/java/com/yeejoin/amos/fas/dao/entity/AccidentType.java
+129
-114
Equipment.java
.../main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
+248
-245
EvaluationModel.java
...java/com/yeejoin/amos/fas/dao/entity/EvaluationModel.java
+129
-128
FireStation.java
...ain/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
+209
-209
FireStationFireEquipment.java
...yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
+90
-90
FireStrength.java
...in/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
+171
-171
Fmea.java
...n/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
+324
-323
PreplanPicture.java
.../java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
+85
-84
RiskFactor.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskFactor.java
+96
-95
RiskLevel.java
.../main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
+140
-137
RiskSource.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
+285
-284
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+212
-212
AccidentTypeController.java
.../amos/fas/business/controller/AccidentTypeController.java
+1
-1
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+18
-17
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+1
-1
FireStationController.java
...n/amos/fas/business/controller/FireStationController.java
+156
-156
FireStrengthController.java
.../amos/fas/business/controller/FireStrengthController.java
+88
-88
RiskFactorController.java
...in/amos/fas/business/controller/RiskFactorController.java
+1
-1
RiskLevelController.java
...oin/amos/fas/business/controller/RiskLevelController.java
+10
-6
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+20
-19
WaterResourceController.java
...amos/fas/business/controller/WaterResourceController.java
+136
-136
FeignConfiguration.java
...m/yeejoin/amos/fas/business/feign/FeignConfiguration.java
+0
-8
MultipartSupportConfig.java
...ejoin/amos/fas/business/feign/MultipartSupportConfig.java
+37
-0
PushFeign.java
...n/java/com/yeejoin/amos/fas/business/feign/PushFeign.java
+40
-0
PushFeignServer.java
.../com/yeejoin/amos/fas/business/feign/PushFeignServer.java
+52
-0
AppMessagePushService.java
...eejoin/amos/fas/business/jpush/AppMessagePushService.java
+89
-79
AccidentTypeServiceImpl.java
...os/fas/business/service/impl/AccidentTypeServiceImpl.java
+115
-78
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+480
-448
FireCarServiceImpl.java
...in/amos/fas/business/service/impl/FireCarServiceImpl.java
+24
-14
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+0
-1
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+70
-0
RiskFactorServiceImpl.java
...amos/fas/business/service/impl/RiskFactorServiceImpl.java
+135
-98
RiskLevelServiceImpl.java
.../amos/fas/business/service/impl/RiskLevelServiceImpl.java
+39
-5
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+122
-28
IAccidentTypeService.java
...amos/fas/business/service/intfc/IAccidentTypeService.java
+3
-4
IEquipmentService.java
...in/amos/fas/business/service/intfc/IEquipmentService.java
+1
-1
IFireCarService.java
...join/amos/fas/business/service/intfc/IFireCarService.java
+1
-4
IRiskFactorService.java
...n/amos/fas/business/service/intfc/IRiskFactorService.java
+1
-1
IRiskLevelService.java
...in/amos/fas/business/service/intfc/IRiskLevelService.java
+1
-1
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+1
-1
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+52
-50
fas-create-table.sql
...src/main/resources/db/changelog/init/fas-create-table.sql
+589
-589
dbTemplate_accident_type.xml
...src/main/resources/db/mapper/dbTemplate_accident_type.xml
+4
-12
dbTemplate_fire_car.xml
...tart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
+0
-4
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+1
-5
dbTemplate_fmea.xml
...SysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
+5
-5
dbTemplate_fmea_point_inputitem.xml
...n/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
+2
-11
dbTemplate_risk_factor.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_factor.xml
+1
-4
dbTemplate_risk_level.xml
...rt/src/main/resources/db/mapper/dbTemplate_risk_level.xml
+3
-3
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-5
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/ManageLevelEum.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 管控级别
*/
public
enum
ManageLevelEum
{
company
(
"单位级"
,
1
),
department
(
"部门级"
,
2
),
group
(
"班组级"
,
3
),
person
(
"个人级"
,
4
);
private
String
name
;
private
int
manageLevel
;
ManageLevelEum
(
String
name
,
int
manageLevel
){
this
.
name
=
name
;
this
.
manageLevel
=
manageLevel
;
}
public
static
List
<
Map
>
getManageLevelEumList
(){
List
<
Map
>
eumList
=
new
ArrayList
<>();
for
(
ManageLevelEum
eum
:
ManageLevelEum
.
values
()){
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"key"
,
eum
.
getManageLevel
());
param
.
put
(
"label"
,
eum
.
getName
());
eumList
.
add
(
param
);
}
return
eumList
;
}
public
static
String
getNameByManageLevel
(
int
level
){
String
name
=
""
;
for
(
ManageLevelEum
eum
:
ManageLevelEum
.
values
()){
if
(
level
==
eum
.
getManageLevel
()){
name
=
eum
.
getName
();
break
;
}
}
return
name
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getManageLevel
()
{
return
manageLevel
;
}
public
void
setManageLevel
(
int
manageLevel
)
{
this
.
manageLevel
=
manageLevel
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/response/EquipDetailsResponse.java
View file @
0cb2f733
...
...
@@ -19,6 +19,8 @@ public class EquipDetailsResponse {
private
String
tel
;
private
String
remarks
;
private
String
userId
;
public
String
getName
()
{
return
name
;
...
...
@@ -83,4 +85,14 @@ public class EquipDetailsResponse {
public
void
setStationName
(
String
stationName
)
{
this
.
stationName
=
stationName
;
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/AccidentType.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
/**
* The persistent class for the accident_type database table.
*
*/
@Entity
@Table
(
name
=
"f_accident_type"
)
@NamedQuery
(
name
=
"AccidentType.findAll"
,
query
=
"SELECT a FROM AccidentType a"
)
public
class
AccidentType
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
@Column
(
name
=
"dept_id"
)
private
Long
deptId
;
private
String
name
;
@Column
(
name
=
"evaluation_sid"
)
private
String
evaluationSid
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
private
String
severity
;
private
String
influence
;
public
AccidentType
()
{
}
public
Long
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
Long
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Long
getDeptId
()
{
return
this
.
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
@Transient
public
String
getInfluence
()
{
return
this
.
influence
;
}
public
void
setInfluence
(
String
influence
)
{
this
.
influence
=
influence
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEvaluationSid
()
{
return
evaluationSid
;
}
public
void
setEvaluationSid
(
String
evaluationSid
)
{
this
.
evaluationSid
=
evaluationSid
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Transient
public
String
getSeverity
()
{
return
this
.
severity
;
}
public
void
setSeverity
(
String
severity
)
{
this
.
severity
=
severity
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
/**
* The persistent class for the accident_type database table.
*
*/
@Entity
@Table
(
name
=
"f_accident_type"
)
@NamedQuery
(
name
=
"AccidentType.findAll"
,
query
=
"SELECT a FROM AccidentType a"
)
public
class
AccidentType
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"dept_id"
)
private
String
deptId
;
private
String
name
;
@Column
(
name
=
"evaluation_sid"
)
private
String
evaluationSid
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
private
String
severity
;
private
String
influence
;
public
AccidentType
()
{
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
@Transient
public
String
getInfluence
()
{
return
this
.
influence
;
}
public
void
setInfluence
(
String
influence
)
{
this
.
influence
=
influence
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEvaluationSid
()
{
return
evaluationSid
;
}
public
void
setEvaluationSid
(
String
evaluationSid
)
{
this
.
evaluationSid
=
evaluationSid
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Transient
public
String
getSeverity
()
{
return
this
.
severity
;
}
public
void
setSeverity
(
String
severity
)
{
this
.
severity
=
severity
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
/**
* The persistent class for the equipment database table.
*
*/
@Entity
@Table
(
name
=
"f_equipment"
)
@NamedQuery
(
name
=
"Equipment.findAll"
,
query
=
"SELECT e FROM Equipment e"
)
public
class
Equipment
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
address
;
private
String
building
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 3维坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 预案配置
*/
@Column
(
name
=
"reserve_plan"
)
private
String
reservePlan
;
/**
* 是否室内 0-否 1-是
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
;
@Column
(
name
=
"charge_dept_id"
)
private
int
chargeDeptId
;
@Column
(
name
=
"charge_user_id"
)
private
int
chargeUserId
;
private
String
code
;
@Column
(
name
=
"fire_truck_route"
)
private
String
fireTruckRoute
;
public
String
getFireTruckRoute
()
{
return
fireTruckRoute
;
}
public
void
setFireTruckRoute
(
String
fireTruckRoute
)
{
this
.
fireTruckRoute
=
fireTruckRoute
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
private
String
room
;
/**
* 关联消防小室id
*/
@Column
(
name
=
"fire_station_id"
)
private
Long
fireStationId
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
public
Equipment
()
{
}
public
String
getAddress
()
{
return
this
.
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getBuilding
()
{
return
this
.
building
;
}
public
void
setBuilding
(
String
building
)
{
this
.
building
=
building
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
int
getChargeDeptId
()
{
return
this
.
chargeDeptId
;
}
public
void
setChargeDeptId
(
int
chargeDeptId
)
{
this
.
chargeDeptId
=
chargeDeptId
;
}
public
int
getChargeUserId
()
{
return
this
.
chargeUserId
;
}
public
void
setChargeUserId
(
int
chargeUserId
)
{
this
.
chargeUserId
=
chargeUserId
;
}
public
String
getCode
()
{
return
this
.
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
Long
getFireStationId
()
{
return
fireStationId
;
}
public
void
setFireStationId
(
Long
fireStationId
)
{
this
.
fireStationId
=
fireStationId
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getRoom
()
{
return
room
;
}
public
void
setRoom
(
String
room
)
{
this
.
room
=
room
;
}
public
String
getReservePlan
()
{
return
reservePlan
;
}
public
void
setReservePlan
(
String
reservePlan
)
{
this
.
reservePlan
=
reservePlan
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
/**
* The persistent class for the equipment database table.
*
*/
@Entity
@Table
(
name
=
"f_equipment"
)
@NamedQuery
(
name
=
"Equipment.findAll"
,
query
=
"SELECT e FROM Equipment e"
)
public
class
Equipment
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
address
;
private
String
building
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 3维坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 预案配置
*/
@Column
(
name
=
"reserve_plan"
)
private
String
reservePlan
;
/**
* 是否室内 0-否 1-是
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
;
@Column
(
name
=
"charge_dept_id"
)
private
String
chargeDeptId
;
@Column
(
name
=
"charge_user_id"
)
private
String
chargeUserId
;
private
String
code
;
@Column
(
name
=
"fire_truck_route"
)
private
String
fireTruckRoute
;
public
String
getFireTruckRoute
()
{
return
fireTruckRoute
;
}
public
void
setFireTruckRoute
(
String
fireTruckRoute
)
{
this
.
fireTruckRoute
=
fireTruckRoute
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
private
String
room
;
/**
* 关联消防小室id
*/
@Column
(
name
=
"fire_station_id"
)
private
Long
fireStationId
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
public
Equipment
()
{
}
public
String
getAddress
()
{
return
this
.
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getBuilding
()
{
return
this
.
building
;
}
public
void
setBuilding
(
String
building
)
{
this
.
building
=
building
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
String
getChargeDeptId
()
{
return
chargeDeptId
;
}
public
void
setChargeDeptId
(
String
chargeDeptId
)
{
this
.
chargeDeptId
=
chargeDeptId
;
}
public
String
getChargeUserId
()
{
return
chargeUserId
;
}
public
void
setChargeUserId
(
String
chargeUserId
)
{
this
.
chargeUserId
=
chargeUserId
;
}
public
String
getCode
()
{
return
this
.
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
Long
getFireStationId
()
{
return
fireStationId
;
}
public
void
setFireStationId
(
Long
fireStationId
)
{
this
.
fireStationId
=
fireStationId
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getRoom
()
{
return
room
;
}
public
void
setRoom
(
String
room
)
{
this
.
room
=
room
;
}
public
String
getReservePlan
()
{
return
reservePlan
;
}
public
void
setReservePlan
(
String
reservePlan
)
{
this
.
reservePlan
=
reservePlan
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EvaluationModel.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the evaluation_model database table.
*
*/
@Entity
@Table
(
name
=
"f_evaluation_model"
)
@NamedQuery
(
name
=
"EvaluationModel.findAll"
,
query
=
"SELECT e FROM EvaluationModel e"
)
public
class
EvaluationModel
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
name
;
/**
* 系数
*/
private
String
coefficient
;
/**
* 影响
*/
private
String
influence
;
/**
* 描述
*/
private
String
describe
;
/**
* S,D,O
*/
private
String
type
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
@Lob
private
String
standard
;
public
EvaluationModel
()
{
}
public
int
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getStandard
()
{
return
this
.
standard
;
}
public
void
setStandard
(
String
standard
)
{
this
.
standard
=
standard
;
}
public
String
getCoefficient
()
{
return
coefficient
;
}
public
void
setCoefficient
(
String
coefficient
)
{
this
.
coefficient
=
coefficient
;
}
public
String
getInfluence
()
{
return
influence
;
}
public
void
setInfluence
(
String
influence
)
{
this
.
influence
=
influence
;
}
public
String
getDescribe
()
{
return
describe
;
}
public
void
setDescribe
(
String
describe
)
{
this
.
describe
=
describe
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the evaluation_model database table.
*
*/
@Entity
@Table
(
name
=
"f_evaluation_model"
)
@NamedQuery
(
name
=
"EvaluationModel.findAll"
,
query
=
"SELECT e FROM EvaluationModel e"
)
public
class
EvaluationModel
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
name
;
/**
* 系数
*/
private
String
coefficient
;
/**
* 影响
*/
private
String
influence
;
/**
* 描述
*/
private
String
describe
;
/**
* S,D,O
*/
private
String
type
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
@Lob
private
String
standard
;
public
EvaluationModel
()
{
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getStandard
()
{
return
this
.
standard
;
}
public
void
setStandard
(
String
standard
)
{
this
.
standard
=
standard
;
}
public
String
getCoefficient
()
{
return
coefficient
;
}
public
void
setCoefficient
(
String
coefficient
)
{
this
.
coefficient
=
coefficient
;
}
public
String
getInfluence
()
{
return
influence
;
}
public
void
setInfluence
(
String
influence
)
{
this
.
influence
=
influence
;
}
public
String
getDescribe
()
{
return
describe
;
}
public
void
setDescribe
(
String
describe
)
{
this
.
describe
=
describe
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.util.List
;
import
java.util.Map
;
import
javax.persistence.*
;
/**
* 消防站点
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_station"
)
@NamedQuery
(
name
=
"FireStation.findAll"
,
query
=
"SELECT f FROM FireStation f"
)
public
class
FireStation
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
private
String
name
;
/**
* 编号
*/
private
String
code
;
/**
* 类型 1:消防小室,2:消防泡沫间
*/
private
String
type
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 位置
*/
private
String
address
;
/**
* 3纬坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 是否室内
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
=
true
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
int
createBy
;
@Column
(
name
=
"picture"
)
private
String
picture
;
private
List
<
Map
>
fireEquipmentInfo
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
@Transient
public
List
<
Map
>
getFireEquipmentInfo
()
{
return
fireEquipmentInfo
;
}
public
void
setFireEquipmentInfo
(
List
<
Map
>
fireEquipmentInfo
)
{
this
.
fireEquipmentInfo
=
fireEquipmentInfo
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
int
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getPicture
()
{
return
picture
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.util.List
;
import
java.util.Map
;
import
javax.persistence.*
;
/**
* 消防站点
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_station"
)
@NamedQuery
(
name
=
"FireStation.findAll"
,
query
=
"SELECT f FROM FireStation f"
)
public
class
FireStation
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
private
String
name
;
/**
* 编号
*/
private
String
code
;
/**
* 类型 1:消防小室,2:消防泡沫间
*/
private
String
type
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 位置
*/
private
String
address
;
/**
* 3纬坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 是否室内
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
=
true
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"picture"
)
private
String
picture
;
private
List
<
Map
>
fireEquipmentInfo
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
@Transient
public
List
<
Map
>
getFireEquipmentInfo
()
{
return
fireEquipmentInfo
;
}
public
void
setFireEquipmentInfo
(
List
<
Map
>
fireEquipmentInfo
)
{
this
.
fireEquipmentInfo
=
fireEquipmentInfo
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getPicture
()
{
return
picture
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* 消防站关联物资
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_station_equipment"
)
@NamedQuery
(
name
=
"FireStationFireEquipment.findAll"
,
query
=
"SELECT f FROM FireStationFireEquipment f"
)
public
class
FireStationFireEquipment
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 消防站id
*/
@Column
(
name
=
"fire_station_id"
)
private
Long
fireStationId
;
/**
* 消防资源
*/
@Column
(
name
=
"fire_equipment_id"
)
private
Long
fireEquipmentId
;
/**
* 个数
*/
private
Double
number
;
/**
* 单位
*/
private
String
unit
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
int
createBy
;
public
Long
getFireStationId
()
{
return
fireStationId
;
}
public
void
setFireStationId
(
Long
fireStationId
)
{
this
.
fireStationId
=
fireStationId
;
}
public
Long
getFireEquipmentId
()
{
return
fireEquipmentId
;
}
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
}
public
Double
getNumber
()
{
return
number
;
}
public
void
setNumber
(
Double
number
)
{
this
.
number
=
number
;
}
public
String
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
}
public
int
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* 消防站关联物资
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_station_equipment"
)
@NamedQuery
(
name
=
"FireStationFireEquipment.findAll"
,
query
=
"SELECT f FROM FireStationFireEquipment f"
)
public
class
FireStationFireEquipment
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 消防站id
*/
@Column
(
name
=
"fire_station_id"
)
private
Long
fireStationId
;
/**
* 消防资源
*/
@Column
(
name
=
"fire_equipment_id"
)
private
Long
fireEquipmentId
;
/**
* 个数
*/
private
Double
number
;
/**
* 单位
*/
private
String
unit
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
String
createBy
;
public
Long
getFireStationId
()
{
return
fireStationId
;
}
public
void
setFireStationId
(
Long
fireStationId
)
{
this
.
fireStationId
=
fireStationId
;
}
public
Long
getFireEquipmentId
()
{
return
fireEquipmentId
;
}
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
}
public
Double
getNumber
()
{
return
number
;
}
public
void
setNumber
(
Double
number
)
{
this
.
number
=
number
;
}
public
String
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.sql.Time
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* 消防力量
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_strength"
)
@NamedQuery
(
name
=
"FireStrength.findAll"
,
query
=
"SELECT f FROM FireStrength f"
)
public
class
FireStrength
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 编号
*/
private
String
code
;
/**
* 姓名
*/
private
String
username
;
/**
* 职位
*/
private
String
position
;
/**
* 固话
*/
private
String
tel
;
/**
* 开始时间
*/
@Column
(
name
=
"day_begin"
)
private
Time
dayBegin
;
/**
* 结束时间
*/
@Column
(
name
=
"day_end"
)
private
Time
dayEnd
;
/**
* 手机
*/
@Column
(
name
=
"phone_num"
)
private
String
phoneNum
;
/**
* 工作描述
*/
@Column
(
name
=
"job_des"
)
private
String
jobDes
;
/**
* 备注
*/
private
String
remark
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
int
createBy
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPosition
()
{
return
position
;
}
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
;
}
public
String
getTel
()
{
return
tel
;
}
public
void
setTel
(
String
tel
)
{
this
.
tel
=
tel
;
}
public
String
getPhoneNum
()
{
return
phoneNum
;
}
public
void
setPhoneNum
(
String
phoneNum
)
{
this
.
phoneNum
=
phoneNum
;
}
public
String
getJobDes
()
{
return
jobDes
;
}
public
void
setJobDes
(
String
jobDes
)
{
this
.
jobDes
=
jobDes
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
int
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Time
getDayBegin
()
{
return
dayBegin
;
}
public
void
setDayBegin
(
Time
dayBegin
)
{
this
.
dayBegin
=
dayBegin
;
}
public
Time
getDayEnd
()
{
return
dayEnd
;
}
public
void
setDayEnd
(
Time
dayEnd
)
{
this
.
dayEnd
=
dayEnd
;
}
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.sql.Time
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* 消防力量
* @author Administrator
*
*/
@Entity
@Table
(
name
=
"f_fire_strength"
)
@NamedQuery
(
name
=
"FireStrength.findAll"
,
query
=
"SELECT f FROM FireStrength f"
)
public
class
FireStrength
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 编号
*/
private
String
code
;
/**
* 姓名
*/
private
String
username
;
/**
* 职位
*/
private
String
position
;
/**
* 固话
*/
private
String
tel
;
/**
* 开始时间
*/
@Column
(
name
=
"day_begin"
)
private
Time
dayBegin
;
/**
* 结束时间
*/
@Column
(
name
=
"day_end"
)
private
Time
dayEnd
;
/**
* 手机
*/
@Column
(
name
=
"phone_num"
)
private
String
phoneNum
;
/**
* 工作描述
*/
@Column
(
name
=
"job_des"
)
private
String
jobDes
;
/**
* 备注
*/
private
String
remark
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
String
createBy
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPosition
()
{
return
position
;
}
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
;
}
public
String
getTel
()
{
return
tel
;
}
public
void
setTel
(
String
tel
)
{
this
.
tel
=
tel
;
}
public
String
getPhoneNum
()
{
return
phoneNum
;
}
public
void
setPhoneNum
(
String
phoneNum
)
{
this
.
phoneNum
=
phoneNum
;
}
public
String
getJobDes
()
{
return
jobDes
;
}
public
void
setJobDes
(
String
jobDes
)
{
this
.
jobDes
=
jobDes
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Time
getDayBegin
()
{
return
dayBegin
;
}
public
void
setDayBegin
(
Time
dayBegin
)
{
this
.
dayBegin
=
dayBegin
;
}
public
Time
getDayEnd
()
{
return
dayEnd
;
}
public
void
setDayEnd
(
Time
dayEnd
)
{
this
.
dayEnd
=
dayEnd
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.Lob
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.math.BigDecimal
;
/**
* The persistent class for the fmea database table.
*/
@Entity
@Table
(
name
=
"f_fmea"
)
@NamedQuery
(
name
=
"Fmea.findAll"
,
query
=
"SELECT f FROM Fmea f"
)
public
class
Fmea
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Lob
private
String
disposal
;
@Lob
private
String
engineering
;
@Column
(
name
=
"evaluation_did"
)
private
Long
evaluationDid
;
@Column
(
name
=
"evaluation_oid"
)
private
Long
evaluationOid
;
@Column
(
name
=
"evaluation_sid"
)
private
Long
evaluationSid
;
@Column
(
name
=
"new_evaluation_oid"
)
private
Long
newEvaluationOid
;
@Column
(
name
=
"rpn"
)
private
BigDecimal
rpn
;
private
String
didValue
;
private
String
oidValue
;
private
String
newOidValue
;
private
String
sidValue
;
@Lob
private
String
management
;
@Lob
private
String
protection
;
private
String
remark
;
@Column
(
name
=
"risk_factors_id"
)
private
Long
riskFactorsId
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
@Column
(
name
=
"risk_level_id"
)
private
Long
riskLevelId
;
private
BigDecimal
rpni
;
@Lob
private
String
train
;
private
RiskSource
riskSource
;
@Column
(
name
=
"company_leader"
)
private
String
companyLeader
;
@Column
(
name
=
"department_leader"
)
private
String
departmentLeader
;
@Column
(
name
=
"group_leader"
)
private
String
groupLeader
;
@Column
(
name
=
"person_leader"
)
private
String
personLeader
;
@Column
(
name
=
"identify_user"
)
private
Integer
identifyUser
;
@Column
(
name
=
"identify_method"
)
private
String
identifyMethod
;
public
Fmea
()
{
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getDisposal
()
{
return
this
.
disposal
;
}
public
void
setDisposal
(
String
disposal
)
{
this
.
disposal
=
disposal
;
}
public
String
getEngineering
()
{
return
this
.
engineering
;
}
public
void
setEngineering
(
String
engineering
)
{
this
.
engineering
=
engineering
;
}
public
Long
getEvaluationDid
()
{
return
this
.
evaluationDid
;
}
public
void
setEvaluationDid
(
Long
evaluationDid
)
{
this
.
evaluationDid
=
evaluationDid
;
}
public
Long
getEvaluationOid
()
{
return
this
.
evaluationOid
;
}
public
void
setEvaluationOid
(
Long
evaluationOid
)
{
this
.
evaluationOid
=
evaluationOid
;
}
public
Long
getEvaluationSid
()
{
return
this
.
evaluationSid
;
}
public
void
setEvaluationSid
(
Long
evaluationSid
)
{
this
.
evaluationSid
=
evaluationSid
;
}
public
String
getManagement
()
{
return
this
.
management
;
}
public
void
setManagement
(
String
management
)
{
this
.
management
=
management
;
}
public
String
getProtection
()
{
return
this
.
protection
;
}
public
void
setProtection
(
String
protection
)
{
this
.
protection
=
protection
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Long
getRiskFactorsId
()
{
return
this
.
riskFactorsId
;
}
public
void
setRiskFactorsId
(
Long
riskFactorsId
)
{
this
.
riskFactorsId
=
riskFactorsId
;
}
public
Long
getRiskSourceId
()
{
return
this
.
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
BigDecimal
getRpni
()
{
return
this
.
rpni
;
}
public
void
setRpni
(
BigDecimal
rpni
)
{
this
.
rpni
=
rpni
;
}
public
String
getTrain
()
{
return
this
.
train
;
}
public
void
setTrain
(
String
train
)
{
this
.
train
=
train
;
}
@ManyToOne
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
public
RiskSource
getRiskSource
()
{
return
riskSource
;
}
@JsonBackReference
public
void
setRiskSource
(
RiskSource
riskSource
)
{
this
.
riskSource
=
riskSource
;
}
@Transient
public
String
getDidValue
()
{
return
didValue
;
}
public
void
setDidValue
(
String
didValue
)
{
this
.
didValue
=
didValue
;
}
@Transient
public
String
getOidValue
()
{
return
oidValue
;
}
public
void
setOidValue
(
String
oidValue
)
{
this
.
oidValue
=
oidValue
;
}
@Transient
public
String
getNewOidValue
()
{
return
newOidValue
;
}
public
void
setNewOidValue
(
String
newOidValue
)
{
this
.
newOidValue
=
newOidValue
;
}
@Transient
public
String
getSidValue
()
{
return
sidValue
;
}
public
void
setSidValue
(
String
sidValue
)
{
this
.
sidValue
=
sidValue
;
}
public
Long
getNewEvaluationOid
()
{
return
newEvaluationOid
;
}
public
void
setNewEvaluationOid
(
Long
newEvaluationOid
)
{
this
.
newEvaluationOid
=
newEvaluationOid
;
}
public
BigDecimal
getRpn
()
{
return
rpn
;
}
public
void
setRpn
(
BigDecimal
rpn
)
{
this
.
rpn
=
rpn
;
}
public
String
getCompanyLeader
()
{
return
companyLeader
;
}
public
void
setCompanyLeader
(
String
companyLeader
)
{
this
.
companyLeader
=
companyLeader
;
}
public
String
getDepartmentLeader
()
{
return
departmentLeader
;
}
public
void
setDepartmentLeader
(
String
departmentLeader
)
{
this
.
departmentLeader
=
departmentLeader
;
}
public
String
getGroupLeader
()
{
return
groupLeader
;
}
public
void
setGroupLeader
(
String
groupLeader
)
{
this
.
groupLeader
=
groupLeader
;
}
public
String
getPersonLeader
()
{
return
personLeader
;
}
public
void
setPersonLeader
(
String
personLeader
)
{
this
.
personLeader
=
personLeader
;
}
public
Integer
getIdentifyUser
()
{
return
identifyUser
;
}
public
void
setIdentifyUser
(
Integer
identifyUser
)
{
this
.
identifyUser
=
identifyUser
;
}
public
String
getIdentifyMethod
()
{
return
identifyMethod
;
}
public
void
setIdentifyMethod
(
String
identifyMethod
)
{
this
.
identifyMethod
=
identifyMethod
;
}
public
Long
getRiskLevelId
()
{
return
riskLevelId
;
}
public
void
setRiskLevelId
(
Long
riskLevelId
)
{
this
.
riskLevelId
=
riskLevelId
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.Lob
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.math.BigDecimal
;
/**
* The persistent class for the fmea database table.
*/
@Entity
@Table
(
name
=
"f_fmea"
)
@NamedQuery
(
name
=
"Fmea.findAll"
,
query
=
"SELECT f FROM Fmea f"
)
public
class
Fmea
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Lob
private
String
disposal
;
@Lob
private
String
engineering
;
@Column
(
name
=
"evaluation_did"
)
private
Long
evaluationDid
;
@Column
(
name
=
"evaluation_oid"
)
private
Long
evaluationOid
;
@Column
(
name
=
"evaluation_sid"
)
private
Long
evaluationSid
;
@Column
(
name
=
"new_evaluation_oid"
)
private
Long
newEvaluationOid
;
@Column
(
name
=
"rpn"
)
private
BigDecimal
rpn
;
private
String
didValue
;
private
String
oidValue
;
private
String
newOidValue
;
private
String
sidValue
;
@Lob
private
String
management
;
@Lob
private
String
protection
;
private
String
remark
;
@Column
(
name
=
"risk_factors_id"
)
private
Long
riskFactorsId
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
@Column
(
name
=
"risk_level_id"
)
private
Long
riskLevelId
;
private
BigDecimal
rpni
;
@Lob
private
String
train
;
private
RiskSource
riskSource
;
@Column
(
name
=
"company_leader"
)
private
String
companyLeader
;
@Column
(
name
=
"department_leader"
)
private
String
departmentLeader
;
@Column
(
name
=
"group_leader"
)
private
String
groupLeader
;
@Column
(
name
=
"person_leader"
)
private
String
personLeader
;
@Column
(
name
=
"identify_user"
)
private
String
identifyUser
;
@Column
(
name
=
"identify_method"
)
private
String
identifyMethod
;
public
Fmea
()
{
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getDisposal
()
{
return
this
.
disposal
;
}
public
void
setDisposal
(
String
disposal
)
{
this
.
disposal
=
disposal
;
}
public
String
getEngineering
()
{
return
this
.
engineering
;
}
public
void
setEngineering
(
String
engineering
)
{
this
.
engineering
=
engineering
;
}
public
Long
getEvaluationDid
()
{
return
this
.
evaluationDid
;
}
public
void
setEvaluationDid
(
Long
evaluationDid
)
{
this
.
evaluationDid
=
evaluationDid
;
}
public
Long
getEvaluationOid
()
{
return
this
.
evaluationOid
;
}
public
void
setEvaluationOid
(
Long
evaluationOid
)
{
this
.
evaluationOid
=
evaluationOid
;
}
public
Long
getEvaluationSid
()
{
return
this
.
evaluationSid
;
}
public
void
setEvaluationSid
(
Long
evaluationSid
)
{
this
.
evaluationSid
=
evaluationSid
;
}
public
String
getManagement
()
{
return
this
.
management
;
}
public
void
setManagement
(
String
management
)
{
this
.
management
=
management
;
}
public
String
getProtection
()
{
return
this
.
protection
;
}
public
void
setProtection
(
String
protection
)
{
this
.
protection
=
protection
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Long
getRiskFactorsId
()
{
return
this
.
riskFactorsId
;
}
public
void
setRiskFactorsId
(
Long
riskFactorsId
)
{
this
.
riskFactorsId
=
riskFactorsId
;
}
public
Long
getRiskSourceId
()
{
return
this
.
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
BigDecimal
getRpni
()
{
return
this
.
rpni
;
}
public
void
setRpni
(
BigDecimal
rpni
)
{
this
.
rpni
=
rpni
;
}
public
String
getTrain
()
{
return
this
.
train
;
}
public
void
setTrain
(
String
train
)
{
this
.
train
=
train
;
}
@ManyToOne
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
public
RiskSource
getRiskSource
()
{
return
riskSource
;
}
@JsonBackReference
public
void
setRiskSource
(
RiskSource
riskSource
)
{
this
.
riskSource
=
riskSource
;
}
@Transient
public
String
getDidValue
()
{
return
didValue
;
}
public
void
setDidValue
(
String
didValue
)
{
this
.
didValue
=
didValue
;
}
@Transient
public
String
getOidValue
()
{
return
oidValue
;
}
public
void
setOidValue
(
String
oidValue
)
{
this
.
oidValue
=
oidValue
;
}
@Transient
public
String
getNewOidValue
()
{
return
newOidValue
;
}
public
void
setNewOidValue
(
String
newOidValue
)
{
this
.
newOidValue
=
newOidValue
;
}
@Transient
public
String
getSidValue
()
{
return
sidValue
;
}
public
void
setSidValue
(
String
sidValue
)
{
this
.
sidValue
=
sidValue
;
}
public
Long
getNewEvaluationOid
()
{
return
newEvaluationOid
;
}
public
void
setNewEvaluationOid
(
Long
newEvaluationOid
)
{
this
.
newEvaluationOid
=
newEvaluationOid
;
}
public
BigDecimal
getRpn
()
{
return
rpn
;
}
public
void
setRpn
(
BigDecimal
rpn
)
{
this
.
rpn
=
rpn
;
}
public
String
getCompanyLeader
()
{
return
companyLeader
;
}
public
void
setCompanyLeader
(
String
companyLeader
)
{
this
.
companyLeader
=
companyLeader
;
}
public
String
getDepartmentLeader
()
{
return
departmentLeader
;
}
public
void
setDepartmentLeader
(
String
departmentLeader
)
{
this
.
departmentLeader
=
departmentLeader
;
}
public
String
getGroupLeader
()
{
return
groupLeader
;
}
public
void
setGroupLeader
(
String
groupLeader
)
{
this
.
groupLeader
=
groupLeader
;
}
public
String
getPersonLeader
()
{
return
personLeader
;
}
public
void
setPersonLeader
(
String
personLeader
)
{
this
.
personLeader
=
personLeader
;
}
public
String
getIdentifyUser
()
{
return
identifyUser
;
}
public
void
setIdentifyUser
(
String
identifyUser
)
{
this
.
identifyUser
=
identifyUser
;
}
public
String
getIdentifyMethod
()
{
return
identifyMethod
;
}
public
void
setIdentifyMethod
(
String
identifyMethod
)
{
this
.
identifyMethod
=
identifyMethod
;
}
public
Long
getRiskLevelId
()
{
return
riskLevelId
;
}
public
void
setRiskLevelId
(
Long
riskLevelId
)
{
this
.
riskLevelId
=
riskLevelId
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the preplan_picture database table.
*/
@Entity
@Table
(
name
=
"f_preplan_picture"
)
@NamedQuery
(
name
=
"PreplanPicture.findAll"
,
query
=
"SELECT p FROM PreplanPicture p"
)
public
class
PreplanPicture
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
int
createBy
;
@Column
(
name
=
"equipment_id"
)
private
Long
equipmentId
;
private
String
name
;
@Lob
private
String
picture
;
private
String
remark
;
private
int
type
;
public
PreplanPicture
()
{
}
public
int
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Long
getEquipmentId
()
{
return
this
.
equipmentId
;
}
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getPicture
()
{
return
this
.
picture
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
int
getType
()
{
return
this
.
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the preplan_picture database table.
*/
@Entity
@Table
(
name
=
"f_preplan_picture"
)
@NamedQuery
(
name
=
"PreplanPicture.findAll"
,
query
=
"SELECT p FROM PreplanPicture p"
)
public
class
PreplanPicture
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"equipment_id"
)
private
Long
equipmentId
;
private
String
name
;
@Lob
private
String
picture
;
private
String
remark
;
private
int
type
;
public
PreplanPicture
()
{
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Long
getEquipmentId
()
{
return
this
.
equipmentId
;
}
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getPicture
()
{
return
this
.
picture
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
int
getType
()
{
return
this
.
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskFactor.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the risk_factors database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_factor"
)
@NamedQuery
(
name
=
"RiskFactor.findAll"
,
query
=
"SELECT r FROM RiskFactor r"
)
public
class
RiskFactor
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"accident_type_id"
)
private
Long
accidentTypeId
;
@Column
(
name
=
"create_by"
)
private
int
createBy
;
@Column
(
name
=
"dept_id"
)
private
Long
deptId
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
private
String
type
;
public
RiskFactor
()
{
}
public
Long
getAccidentTypeId
()
{
return
this
.
accidentTypeId
;
}
public
void
setAccidentTypeId
(
Long
accidentTypeId
)
{
this
.
accidentTypeId
=
accidentTypeId
;
}
public
int
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Long
getDeptId
()
{
return
this
.
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the risk_factors database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_factor"
)
@NamedQuery
(
name
=
"RiskFactor.findAll"
,
query
=
"SELECT r FROM RiskFactor r"
)
public
class
RiskFactor
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"accident_type_id"
)
private
Long
accidentTypeId
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"dept_id"
)
private
String
deptId
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
remark
;
private
String
type
;
public
RiskFactor
()
{
}
public
Long
getAccidentTypeId
()
{
return
this
.
accidentTypeId
;
}
public
void
setAccidentTypeId
(
Long
accidentTypeId
)
{
this
.
accidentTypeId
=
accidentTypeId
;
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getDeptId
()
{
return
this
.
deptId
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
/**
* The persistent class for the risk_level database table.
*/
@Entity
@Table
(
name
=
"f_risk_level"
)
@NamedQuery
(
name
=
"RiskLevel.findAll"
,
query
=
"SELECT r FROM RiskLevel r"
)
public
class
RiskLevel
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
color
;
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
@Column
(
name
=
"evaluation_model_id"
)
private
Long
evaluationModelId
;
@Column
(
name
=
"name"
)
private
String
name
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Column
(
name
=
"level"
)
private
Integer
level
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
@Column
(
name
=
"top_limit"
)
private
BigDecimal
topLimit
;
@Column
(
name
=
"down_limit"
)
private
BigDecimal
downLimit
;
private
Integer
manageLevel
;
private
String
remark
;
private
String
severity
;
public
RiskLevel
()
{
}
public
String
getColor
()
{
return
this
.
color
;
}
public
void
setColor
(
String
color
)
{
this
.
color
=
color
;
}
public
Long
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
Long
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getLevel
()
{
return
this
.
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getSeverity
()
{
return
this
.
severity
;
}
public
void
setSeverity
(
String
severity
)
{
this
.
severity
=
severity
;
}
public
Long
getEvaluationModelId
()
{
return
evaluationModelId
;
}
public
void
setEvaluationModelId
(
Long
evaluationModelId
)
{
this
.
evaluationModelId
=
evaluationModelId
;
}
public
BigDecimal
getTopLimit
()
{
return
topLimit
;
}
public
void
setTopLimit
(
BigDecimal
topLimit
)
{
this
.
topLimit
=
topLimit
;
}
public
BigDecimal
getDownLimit
()
{
return
downLimit
;
}
public
void
setDownLimit
(
BigDecimal
downLimit
)
{
this
.
downLimit
=
downLimit
;
}
public
Integer
getManageLevel
()
{
return
manageLevel
;
}
public
void
setManageLevel
(
Integer
manageLevel
)
{
this
.
manageLevel
=
manageLevel
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
/**
* The persistent class for the risk_level database table.
*/
@Entity
@Table
(
name
=
"f_risk_level"
)
@NamedQuery
(
name
=
"RiskLevel.findAll"
,
query
=
"SELECT r FROM RiskLevel r"
)
public
class
RiskLevel
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
color
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"evaluation_model_id"
)
private
Long
evaluationModelId
;
@Column
(
name
=
"name"
)
private
String
name
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Column
(
name
=
"level"
)
private
Integer
level
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
@Column
(
name
=
"top_limit"
)
private
BigDecimal
topLimit
;
@Column
(
name
=
"down_limit"
)
private
BigDecimal
downLimit
;
private
Integer
manageLevel
;
private
String
remark
;
private
String
severity
;
public
RiskLevel
()
{
}
public
String
getColor
()
{
return
this
.
color
;
}
public
void
setColor
(
String
color
)
{
this
.
color
=
color
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getLevel
()
{
return
this
.
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getSeverity
()
{
return
this
.
severity
;
}
public
void
setSeverity
(
String
severity
)
{
this
.
severity
=
severity
;
}
public
Long
getEvaluationModelId
()
{
return
evaluationModelId
;
}
public
void
setEvaluationModelId
(
Long
evaluationModelId
)
{
this
.
evaluationModelId
=
evaluationModelId
;
}
public
BigDecimal
getTopLimit
()
{
return
topLimit
;
}
public
void
setTopLimit
(
BigDecimal
topLimit
)
{
this
.
topLimit
=
topLimit
;
}
public
BigDecimal
getDownLimit
()
{
return
downLimit
;
}
public
void
setDownLimit
(
BigDecimal
downLimit
)
{
this
.
downLimit
=
downLimit
;
}
public
Integer
getManageLevel
()
{
return
manageLevel
;
}
public
void
setManageLevel
(
Integer
manageLevel
)
{
this
.
manageLevel
=
manageLevel
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* The persistent class for the risk_source database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_source"
)
@NamedQuery
(
name
=
"RiskSource.findAll"
,
query
=
"SELECT r FROM RiskSource r"
)
public
class
RiskSource
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
code
;
/**
* 3维坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
;
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
@Column
(
name
=
"parent_id"
)
private
Long
parentId
;
private
String
remark
;
@Column
(
name
=
"risk_level_id"
)
private
Long
riskLevelId
;
@Column
(
name
=
"status"
)
private
String
status
;
@Column
(
name
=
"is_region"
)
private
String
isRegion
;
private
BigDecimal
rpn
;
private
BigDecimal
increment
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
/**
* ue4缩放
*/
@Lob
private
String
ue4Extent
;
/**
* 区域路径
*/
@Lob
private
String
routePath
;
/**
* 闪烁频率
*/
@Column
(
name
=
"flicker_frequency"
)
private
Integer
flickerFrequency
;
private
List
<
Fmea
>
fmeaList
;
private
List
<
RpnChangeLog
>
rpnChangeLogList
;
private
BigDecimal
rpni
=
new
BigDecimal
(
0
)
;
public
BigDecimal
getRpni
()
{
return
rpni
;
}
public
Integer
getFlickerFrequency
()
{
return
flickerFrequency
;
}
public
void
setFlickerFrequency
(
Integer
flickerFrequency
)
{
this
.
flickerFrequency
=
flickerFrequency
;
}
public
void
setRpni
(
BigDecimal
rpni
)
{
this
.
rpni
=
rpni
;
}
public
BigDecimal
getIncrement
()
{
return
increment
;
}
public
void
setIncrement
(
BigDecimal
increment
)
{
this
.
increment
=
increment
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getIsRegion
()
{
return
isRegion
;
}
public
void
setIsRegion
(
String
isRegion
)
{
this
.
isRegion
=
isRegion
;
}
public
RiskSource
()
{
}
public
String
getCode
()
{
return
this
.
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
int
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
Long
getParentId
()
{
return
this
.
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Long
getRiskLevelId
()
{
return
this
.
riskLevelId
;
}
public
void
setRiskLevelId
(
Long
riskLevelId
)
{
this
.
riskLevelId
=
riskLevelId
;
}
public
BigDecimal
getRpn
()
{
return
this
.
rpn
;
}
public
void
setRpn
(
BigDecimal
rpn
)
{
this
.
rpn
=
rpn
;
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
Fmea
>
getFmeaList
()
{
return
fmeaList
;
}
public
void
setFmeaList
(
List
<
Fmea
>
fmeaList
)
{
this
.
fmeaList
=
fmeaList
;
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
RpnChangeLog
>
getRpnChangeLogList
()
{
return
rpnChangeLogList
;
}
public
void
setRpnChangeLogList
(
List
<
RpnChangeLog
>
rpnChangeLogList
)
{
this
.
rpnChangeLogList
=
rpnChangeLogList
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
@Column
(
name
=
"ue4_extent"
)
public
String
getUe4Extent
()
{
return
ue4Extent
;
}
public
void
setUe4Extent
(
String
ue4Extent
)
{
this
.
ue4Extent
=
ue4Extent
;
}
/**
* @return the routePath
*/
@Column
(
name
=
"route_path"
)
public
String
getRoutePath
()
{
return
routePath
;
}
/**
* @param routePath the routePath to set
*/
public
void
setRoutePath
(
String
routePath
)
{
this
.
routePath
=
routePath
;
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* The persistent class for the risk_source database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_source"
)
@NamedQuery
(
name
=
"RiskSource.findAll"
,
query
=
"SELECT r FROM RiskSource r"
)
public
class
RiskSource
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
code
;
/**
* 3维坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
;
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
name
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
@Column
(
name
=
"parent_id"
)
private
Long
parentId
;
private
String
remark
;
@Column
(
name
=
"risk_level_id"
)
private
Long
riskLevelId
;
@Column
(
name
=
"status"
)
private
String
status
;
@Column
(
name
=
"is_region"
)
private
String
isRegion
;
private
BigDecimal
rpn
;
private
BigDecimal
increment
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
/**
* ue4缩放
*/
@Lob
private
String
ue4Extent
;
/**
* 区域路径
*/
@Lob
private
String
routePath
;
/**
* 闪烁频率
*/
@Column
(
name
=
"flicker_frequency"
)
private
Integer
flickerFrequency
;
private
List
<
Fmea
>
fmeaList
;
private
List
<
RpnChangeLog
>
rpnChangeLogList
;
private
BigDecimal
rpni
=
new
BigDecimal
(
0
)
;
public
BigDecimal
getRpni
()
{
return
rpni
;
}
public
Integer
getFlickerFrequency
()
{
return
flickerFrequency
;
}
public
void
setFlickerFrequency
(
Integer
flickerFrequency
)
{
this
.
flickerFrequency
=
flickerFrequency
;
}
public
void
setRpni
(
BigDecimal
rpni
)
{
this
.
rpni
=
rpni
;
}
public
BigDecimal
getIncrement
()
{
return
increment
;
}
public
void
setIncrement
(
BigDecimal
increment
)
{
this
.
increment
=
increment
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getIsRegion
()
{
return
isRegion
;
}
public
void
setIsRegion
(
String
isRegion
)
{
this
.
isRegion
=
isRegion
;
}
public
RiskSource
()
{
}
public
String
getCode
()
{
return
this
.
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
this
.
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
Long
getParentId
()
{
return
this
.
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Long
getRiskLevelId
()
{
return
this
.
riskLevelId
;
}
public
void
setRiskLevelId
(
Long
riskLevelId
)
{
this
.
riskLevelId
=
riskLevelId
;
}
public
BigDecimal
getRpn
()
{
return
this
.
rpn
;
}
public
void
setRpn
(
BigDecimal
rpn
)
{
this
.
rpn
=
rpn
;
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
Fmea
>
getFmeaList
()
{
return
fmeaList
;
}
public
void
setFmeaList
(
List
<
Fmea
>
fmeaList
)
{
this
.
fmeaList
=
fmeaList
;
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
RpnChangeLog
>
getRpnChangeLogList
()
{
return
rpnChangeLogList
;
}
public
void
setRpnChangeLogList
(
List
<
RpnChangeLog
>
rpnChangeLogList
)
{
this
.
rpnChangeLogList
=
rpnChangeLogList
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
@Column
(
name
=
"ue4_extent"
)
public
String
getUe4Extent
()
{
return
ue4Extent
;
}
public
void
setUe4Extent
(
String
ue4Extent
)
{
this
.
ue4Extent
=
ue4Extent
;
}
/**
* @return the routePath
*/
@Column
(
name
=
"route_path"
)
public
String
getRoutePath
()
{
return
routePath
;
}
/**
* @param routePath the routePath to set
*/
public
void
setRoutePath
(
String
routePath
)
{
this
.
routePath
=
routePath
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
/**
* 水资源
* @author
*
*/
@Entity
@Table
(
name
=
"f_water_resource"
)
@NamedQuery
(
name
=
"WaterResource.findAll"
,
query
=
"SELECT f FROM WaterResource f"
)
public
class
WaterResource
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
private
String
name
;
/**
* 编号
*/
private
String
code
;
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
private
String
type
;
/**
* 区域
*/
@Column
(
name
=
"production_area"
)
private
String
productionArea
;
/**
* 3纬坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 是否室内
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
=
true
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 房间
*/
private
String
room
;
/**
* 位置
*/
private
String
address
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
int
createBy
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getProductionArea
()
{
return
productionArea
;
}
public
void
setProductionArea
(
String
productionArea
)
{
this
.
productionArea
=
productionArea
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
public
String
getRoom
()
{
return
room
;
}
public
void
setRoom
(
String
room
)
{
this
.
room
=
room
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
int
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
}
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
/**
* 水资源
* @author
*
*/
@Entity
@Table
(
name
=
"f_water_resource"
)
@NamedQuery
(
name
=
"WaterResource.findAll"
,
query
=
"SELECT f FROM WaterResource f"
)
public
class
WaterResource
extends
BasicEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
private
String
name
;
/**
* 编号
*/
private
String
code
;
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
private
String
type
;
/**
* 区域
*/
@Column
(
name
=
"production_area"
)
private
String
productionArea
;
/**
* 3纬坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 是否室内
*/
@Column
(
name
=
"is_indoor"
)
private
Boolean
isIndoor
=
true
;
/**
* 所属风险区域id
*/
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 房间
*/
private
String
room
;
/**
* 位置
*/
private
String
address
;
/**
* 组织
*/
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
/**
* 创建人
*/
@Column
(
name
=
"create_by"
)
private
String
createBy
;
/**
* ue4位置
*/
@Lob
private
String
ue4Location
;
/**
* ue4旋转
*/
@Lob
private
String
ue4Rotation
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getProductionArea
()
{
return
productionArea
;
}
public
void
setProductionArea
(
String
productionArea
)
{
this
.
productionArea
=
productionArea
;
}
public
String
getPosition3d
()
{
return
position3d
;
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
position3d
;
}
public
String
getFloor3d
()
{
return
floor3d
;
}
public
void
setFloor3d
(
String
floor3d
)
{
this
.
floor3d
=
floor3d
;
}
public
Boolean
getIsIndoor
()
{
return
isIndoor
;
}
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
this
.
isIndoor
=
isIndoor
;
}
public
String
getRoom
()
{
return
room
;
}
public
void
setRoom
(
String
room
)
{
this
.
room
=
room
;
}
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
@Column
(
name
=
"ue4_location"
)
public
String
getUe4Location
()
{
return
ue4Location
;
}
public
void
setUe4Location
(
String
ue4Location
)
{
this
.
ue4Location
=
ue4Location
;
}
@Column
(
name
=
"ue4_rotation"
)
public
String
getUe4Rotation
()
{
return
ue4Rotation
;
}
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/AccidentTypeController.java
View file @
0cb2f733
...
...
@@ -45,7 +45,7 @@ public class AccidentTypeController extends BaseController {
public
CommonResponse
queryRiskLevelPage
(
@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
>>
list
=
iAccidentTypeService
.
queryAccidentTypePage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iAccidentTypeService
.
queryAccidentTypePage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
...
@@ -12,25 +28,10 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"/api/impEquip"
)
...
...
@@ -249,7 +250,7 @@ public class EquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点装备详情"
,
notes
=
"重点装备详情"
)
@GetMapping
(
value
=
"/detail/{equipmentId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
findEquipDetail
(
@PathVariable
Long
equipmentId
)
{
return
CommonResponseUtil
.
success
(
iEquipService
.
findEquipDetailsById
(
equipmentId
));
return
CommonResponseUtil
.
success
(
iEquipService
.
findEquipDetailsById
(
getToken
(),
getProduct
(),
getAppKey
(),
equipmentId
));
}
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
0cb2f733
...
...
@@ -91,7 +91,7 @@ public class FireSourceController extends BaseController {
@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
(
id
);
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStationController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Date
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"/api/firestation"
)
@Api
(
tags
=
"消防小室API"
)
public
class
FireStationController
extends
BaseController
{
@Autowired
IFireStationService
iFireStationService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室"
,
notes
=
"添加消防小室"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireStation
fireStation
)
throws
Exception
{
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
||
StringUtils
.
isEmpty
(
fireStation
.
getPosition3d
())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
0
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
throw
new
Exception
(
"数据校验失败."
);
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
fireStationFireEquipment
.
setCreateBy
(
0
);
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
}
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
));
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iFireStationService
.
deleteStationFireEquipment
(
fireStationFireEquipments
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防小室"
,
notes
=
"编辑消防小室"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireStation
fireStation
)
{
fireStation
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
}
@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
(
iFireStationService
.
queryOne
(
id
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/{id}/fireequipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
id
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForFireEquemtPage
(
id
,
commonPageable
));
}
@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
(
iFireStationService
.
delete
(
idArray
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询消防小室"
,
notes
=
"分页查询消防小室"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forPage
(
@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
type
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表查询消防小室"
,
notes
=
"分页查询消防小室"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forList
(
@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
type
)
{
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForList
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
)));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室及上传图片"
,
notes
=
"添加消防小室及上传图片"
)
@RequestMapping
(
value
=
"createAndSaveImg"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createAndSaveImg
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
[]
file
,
FireStation
fireStation
)
throws
Exception
{
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
// || StringUtils.isEmpty(fireStation.getPosition3d())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
0
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveAndUpd
(
fireStation
,
file
));
}
/**
* 查询消防小室关联设备信息
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/fireEquipments/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentListById
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForEuqimentListById
(
id
));
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Date
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"/api/firestation"
)
@Api
(
tags
=
"消防小室API"
)
public
class
FireStationController
extends
BaseController
{
@Autowired
IFireStationService
iFireStationService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室"
,
notes
=
"添加消防小室"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireStation
fireStation
)
throws
Exception
{
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
||
StringUtils
.
isEmpty
(
fireStation
.
getPosition3d
())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
"0"
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
throw
new
Exception
(
"数据校验失败."
);
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
fireStationFireEquipment
.
setCreateBy
(
"0"
);
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
}
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
));
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iFireStationService
.
deleteStationFireEquipment
(
fireStationFireEquipments
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防小室"
,
notes
=
"编辑消防小室"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireStation
fireStation
)
{
fireStation
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
}
@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
(
iFireStationService
.
queryOne
(
id
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/{id}/fireequipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
id
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForFireEquemtPage
(
id
,
commonPageable
));
}
@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
(
iFireStationService
.
delete
(
idArray
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询消防小室"
,
notes
=
"分页查询消防小室"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forPage
(
@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
type
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表查询消防小室"
,
notes
=
"分页查询消防小室"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forList
(
@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
type
)
{
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForList
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
)));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室及上传图片"
,
notes
=
"添加消防小室及上传图片"
)
@RequestMapping
(
value
=
"createAndSaveImg"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createAndSaveImg
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
[]
file
,
FireStation
fireStation
)
throws
Exception
{
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
// || StringUtils.isEmpty(fireStation.getPosition3d())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
"0"
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveAndUpd
(
fireStation
,
file
));
}
/**
* 查询消防小室关联设备信息
* @param id
* @return
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/fireEquipments/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentListById
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForEuqimentListById
(
id
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStrengthController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RequestMapping
(
value
=
"/api/firestrength"
)
@Api
(
tags
=
"消防专职人API"
)
public
class
FireStrengthController
extends
BaseController
{
@Autowired
FireStengthService
fireStengthService
;
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加专职人员"
,
notes
=
"添加专职人员"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createPoint
(
@RequestBody
FireStrength
fireStrength
)
throws
Exception
{
if
(
fireStrength
==
null
||
StringUtils
.
isEmpty
(
fireStrength
.
getUsername
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPhoneNum
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPosition
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getCode
()
))
throw
new
Exception
(
"数据校验失败."
);
fireStrength
.
setCreateBy
(
0
);
fireStrength
.
setCreateDate
(
new
Date
());
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑专职人员"
,
notes
=
"编辑专职人员"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpatePoint
(
@PathVariable
Long
id
,
@RequestBody
FireStrength
fireStrength
)
{
fireStrength
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个专职人员"
,
notes
=
"查询单个专职人员"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryOne
(
id
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除专职人员"
,
notes
=
"查询单个专职人员"
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deletePoint
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
deletePoint
(
idArray
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询专职人员"
,
notes
=
"分页查询专职人员"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
pointList
(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryByFireEquimt
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
commonPageable
));
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RequestMapping
(
value
=
"/api/firestrength"
)
@Api
(
tags
=
"消防专职人API"
)
public
class
FireStrengthController
extends
BaseController
{
@Autowired
FireStengthService
fireStengthService
;
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加专职人员"
,
notes
=
"添加专职人员"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createPoint
(
@RequestBody
FireStrength
fireStrength
)
throws
Exception
{
if
(
fireStrength
==
null
||
StringUtils
.
isEmpty
(
fireStrength
.
getUsername
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPhoneNum
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPosition
())
||
StringUtils
.
isEmpty
(
fireStrength
.
getCode
()
))
throw
new
Exception
(
"数据校验失败."
);
fireStrength
.
setCreateBy
(
"0"
);
fireStrength
.
setCreateDate
(
new
Date
());
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑专职人员"
,
notes
=
"编辑专职人员"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpatePoint
(
@PathVariable
Long
id
,
@RequestBody
FireStrength
fireStrength
)
{
fireStrength
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个专职人员"
,
notes
=
"查询单个专职人员"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryOne
(
id
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除专职人员"
,
notes
=
"查询单个专职人员"
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deletePoint
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
deletePoint
(
idArray
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询专职人员"
,
notes
=
"分页查询专职人员"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
pointList
(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryByFireEquimt
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
commonPageable
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskFactorController.java
View file @
0cb2f733
...
...
@@ -41,7 +41,7 @@ public class RiskFactorController extends BaseController {
public
CommonResponse
queryRiskFactorPage
(
@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
>>
list
=
iRiskFactorService
.
queryRiskFactorPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskFactorService
.
queryRiskFactorPage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskLevelController.java
View file @
0cb2f733
...
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.common.enums.ManageLevelEum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
...
@@ -17,14 +18,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/api/riskLevel"
)
...
...
@@ -44,7 +42,7 @@ public class RiskLevelController extends BaseController {
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskLevelService
.
queryRiskLevelPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskLevelService
.
queryRiskLevelPage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
@@ -100,4 +98,10 @@ public class RiskLevelController extends BaseController {
}
}
@ApiOperation
(
value
=
"风险管控级别查询"
,
notes
=
"风险管控级别查询"
)
@GetMapping
(
value
=
"/manageLevel/list"
)
public
CommonResponse
getManageLevelEumList
(){
return
CommonResponseUtil
.
success
(
ManageLevelEum
.
getManageLevelEumList
());
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -30,10 +20,21 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RequestMapping
(
"/api/risksource"
)
...
...
@@ -484,7 +485,7 @@ public class RiskSourceController extends BaseController {
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageNumber
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageSize
)
{
try
{
Page
<
Map
<
String
,
Object
>>
list
=
riskSourceService
.
listFmeaPointInputitem
(
fmeaId
,
pageNumber
,
pageSize
);
Page
<
Map
<
String
,
Object
>>
list
=
riskSourceService
.
listFmeaPointInputitem
(
getToken
(),
getProduct
(),
getAppKey
(),
fmeaId
,
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
list
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WaterResourceController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RequestMapping
(
value
=
"/api/waterresource"
)
@Api
(
tags
=
"水资源API"
)
public
class
WaterResourceController
extends
BaseController
{
@Autowired
IWaterResourceService
iWaterResourceService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加水资源"
,
notes
=
"添加水资源"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
WaterResource
waterResource
)
throws
Exception
{
if
(
waterResource
==
null
||
StringUtils
.
isEmpty
(
waterResource
.
getType
())
||
StringUtils
.
isEmpty
(
waterResource
.
getFloor3d
())
// || StringUtils.isEmpty(waterResource.getPosition3d())
||
StringUtils
.
isEmpty
(
waterResource
.
getCode
()
))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
waterResource
.
setCreateBy
(
0
);
waterResource
.
setCreateDate
(
new
Date
());
waterResource
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑水资源"
,
notes
=
"编辑水资源"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
WaterResource
waterResource
)
{
waterResource
.
setId
(
id
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
waterResource
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个水资源"
,
notes
=
"查询单个水资源"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
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
(
iWaterResourceService
.
delete
(
idArray
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询水资源"
,
notes
=
"分页查询水资源"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forPage
(
@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
type
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询水资源"
,
notes
=
"分页查询水资源"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
list
()
{
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForList
());
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iWaterResourceService
.
saveBindFireEquipment
(
waterResourceEquipments
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iWaterResourceService
.
deleteBindFireEquipment
(
waterResourceEquipments
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/{waterResourceId}/fireEquipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
waterResourceId
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryBindFireEquemtPage
(
waterResourceId
,
commonPageable
));
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RequestMapping
(
value
=
"/api/waterresource"
)
@Api
(
tags
=
"水资源API"
)
public
class
WaterResourceController
extends
BaseController
{
@Autowired
IWaterResourceService
iWaterResourceService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加水资源"
,
notes
=
"添加水资源"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
WaterResource
waterResource
)
throws
Exception
{
if
(
waterResource
==
null
||
StringUtils
.
isEmpty
(
waterResource
.
getType
())
||
StringUtils
.
isEmpty
(
waterResource
.
getFloor3d
())
// || StringUtils.isEmpty(waterResource.getPosition3d())
||
StringUtils
.
isEmpty
(
waterResource
.
getCode
()
))
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
waterResource
.
setCreateBy
(
"0"
);
waterResource
.
setCreateDate
(
new
Date
());
waterResource
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑水资源"
,
notes
=
"编辑水资源"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
WaterResource
waterResource
)
{
waterResource
.
setId
(
id
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
waterResource
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
}
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个水资源"
,
notes
=
"查询单个水资源"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
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
(
iWaterResourceService
.
delete
(
idArray
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询水资源"
,
notes
=
"分页查询水资源"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forPage
(
@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
type
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询水资源"
,
notes
=
"分页查询水资源"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
list
()
{
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForList
());
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iWaterResourceService
.
saveBindFireEquipment
(
waterResourceEquipments
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
throw
new
Exception
(
"数据校验失败."
);
iWaterResourceService
.
deleteBindFireEquipment
(
waterResourceEquipments
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
@RequestMapping
(
value
=
"/{waterResourceId}/fireEquipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
waterResourceId
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryBindFireEquemtPage
(
waterResourceId
,
commonPageable
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/FeignConfiguration.java
View file @
0cb2f733
...
...
@@ -7,14 +7,6 @@ import feign.Logger;
@Configuration
public
class
FeignConfiguration
{
/**
* 日志级别
* @return
*/
@Bean
Logger
.
Level
feignLoggerLevel
()
{
return
Logger
.
Level
.
FULL
;
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/MultipartSupportConfig.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.context.request.RequestContextListener
;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public
class
MultipartSupportConfig
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
RequestContextListener
requestInterceptor
()
{
return
new
RequestContextListener
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PushFeign.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
org.springframework.cloud.openfeign.FeignClient
;
//推送
@FeignClient
(
name
=
"${Push.fegin.name}"
,
configuration
={
MultipartSupportConfig
.
class
})
public
interface
PushFeign
{
//
// @RequestMapping(value = "/api/user/sendMessage", method = RequestMethod.POST)
// CommonResponse sendMessage( @RequestBody List<PushMsgParam> responses);
@RequestMapping
(
value
=
"/api/user/sendMessageone"
,
method
=
RequestMethod
.
POST
)
CommonResponse
sendMessageone
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/pushNoticeMany"
,
method
=
RequestMethod
.
POST
)
CommonResponse
pushNoticeMany
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/buildPushPayload"
,
method
=
RequestMethod
.
POST
)
CommonResponse
buildPushPayload
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/pushDevice"
,
method
=
RequestMethod
.
GET
)
CommonResponse
PushDevice
(
@RequestParam
(
"alias"
)
String
alias
);
@RequestMapping
(
value
=
"/api/user/PushDeviceRegistration"
,
method
=
RequestMethod
.
GET
)
CommonResponse
PushDeviceRegistration
(
@RequestParam
(
"registrationId"
)
String
registrationId
,
@RequestParam
(
"alias"
)
String
alias
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PushFeignServer.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
@Service
(
"pushFeignServer"
)
public
class
PushFeignServer
{
private
final
RestTemplate
restTemplate
;
public
PushFeignServer
()
{
this
.
restTemplate
=
new
RestTemplate
();
}
@Value
(
"${Push.fegin.name}"
)
private
String
RPushFeginName
;
private
static
String
sendMessage
=
"/api/user/sendMessage"
;
public
String
geturls
(
String
url
){
return
"http://"
+
RPushFeginName
+
url
;
}
public
HttpHeaders
getHeader
(
String
toke
,
String
product
,
String
appKey
){
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
set
(
"Content-Type"
,
"application/json"
);
headers
.
set
(
"token"
,
toke
);
headers
.
set
(
"product"
,
product
);
headers
.
set
(
"appKey"
,
appKey
);
return
headers
;
}
public
CommonResponse
sendMessage
(
String
toke
,
String
product
,
String
appKey
,
List
<
PushMsgParam
>
pushMsgParam
){
try
{
HttpEntity
httpEntity
=
new
HttpEntity
<>(
pushMsgParam
,
getHeader
(
toke
,
product
,
appKey
));
CommonResponse
commonResponse1
=
restTemplate
.
postForObject
(
geturls
(
sendMessage
),
httpEntity
,
CommonResponse
.
class
);
return
commonResponse1
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"发送失败"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/jpush/AppMessagePushService.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
jpush
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.Platform
;
import
cn.jpush.api.push.model.PushPayload
;
import
cn.jpush.api.push.model.audience.Audience
;
import
cn.jpush.api.push.model.notification.Notification
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
@Value
(
"${params.isPush}"
)
private
String
isPush
;
private
static
final
String
APP_KEY
=
"1b3f7b961200f4b236811dfe"
;
private
static
final
String
MASTER_SECRET
=
"8b650e645fb3a43c96be02b2"
;
private
static
JPushClient
jpushClient
=
new
JPushClient
(
MASTER_SECRET
,
APP_KEY
);
public
void
sendMessage
(
List
<
PushMsgParam
>
responses
)
{
try
{
if
(
responses
!=
null
&&
"true"
.
equals
(
isPush
))
{
for
(
PushMsgParam
response
:
responses
)
{
PushPayload
payload
=
buildPushPayload
(
response
);
jpushClient
.
sendPush
(
payload
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"极光推送异常"
,
e
);
}
}
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
if
(
JPushTypeEnum
.
ALL
.
getCode
().
equals
(
response
.
getType
()))
{
return
PushPayload
.
newBuilder
()
.
setPlatform
(
Platform
.
android
())
.
setAudience
(
Audience
.
all
())
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
.
build
();
}
else
if
(
JPushTypeEnum
.
TAG
.
getCode
().
equals
(
response
.
getType
()))
{
return
PushPayload
.
newBuilder
()
.
setPlatform
(
Platform
.
android
())
.
setAudience
(
Audience
.
tag
(
response
.
getRecivers
()))
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
.
build
();
}
else
{
return
PushPayload
.
newBuilder
()
.
setPlatform
(
Platform
.
android
())
.
setAudience
(
Audience
.
alias
(
response
.
getRecivers
()))
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
.
build
();
}
}
public
void
sendMessage
(
PushMsgParam
response
)
{
try
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
PushPayload
payload
=
PushPayload
.
newBuilder
().
setPlatform
(
Platform
.
android
())
.
setAudience
(
Audience
.
all
())
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
.
build
();
jpushClient
.
sendPush
(
payload
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"极光推送异常"
,
e
);
}
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
jpush
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.Platform
;
import
cn.jpush.api.push.model.PushPayload
;
import
cn.jpush.api.push.model.audience.Audience
;
import
cn.jpush.api.push.model.notification.Notification
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
@Service
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
/*
@Value("${params.isPush}")
private String isPush;
private static final String APP_KEY = "1b3f7b961200f4b236811dfe";
private static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
*/
@Autowired
private
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
.
PushFeign
PushFeign
;
// public void sendMessage(List<PushMsgParam> responses) {
// try {
// if (responses != null && "true".equals(isPush)) {
// for (PushMsgParam response : responses) {
// PushPayload payload = buildPushPayload(response);
// jpushClient.sendPush(payload);
// }
// }
// } catch (Exception e) {
// log.error("极光推送异常", e);
// }
// }
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
return
(
PushPayload
)
commonResponse
.
getDataList
();
// if (JPushTypeEnum.ALL.getCode().equals(response.getType())) {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.all())
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// } else if (JPushTypeEnum.TAG.getCode().equals(response.getType())) {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.tag(response.getRecivers()))
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// } else {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.alias(response.getRecivers()))
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// }
}
public
void
sendMessage
(
PushMsgParam
response
)
{
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
// try {
// if (null != response && "true".equals(isPush)) {
// PushPayload payload = PushPayload.newBuilder().setPlatform(Platform.android())
// .setAudience(Audience.all())
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// jpushClient.sendPush(payload);
// }
// } catch (Exception e) {
// log.error("极光推送异常", e);
// }
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/AccidentTypeServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
@Service
(
"accidentTypeService"
)
public
class
AccidentTypeServiceImpl
implements
IAccidentTypeService
{
@Autowired
AccidentTypeMapper
accidentTypeMapper
;
@Autowired
IAccidentTypeDao
iAccidentTypeDao
;
@Autowired
IRiskFactorDao
iRiskFactorDao
;
@Override
public
void
detAccidentType
(
Long
[]
param
)
{
//1.校验
for
(
Long
id
:
param
){
checkBeforeDet
(
id
);
}
//2.删除
iAccidentTypeDao
.
deleteAllByIds
(
param
);
}
/**
* 关联数据校验
* @param id
*/
private
void
checkBeforeDet
(
Long
id
)
{
List
<
RiskFactor
>
list
=
iRiskFactorDao
.
findByAccidentTypeId
(
id
);
if
(
null
!=
list
&&
list
.
size
()>
0
){
throw
new
YeeException
(
"危险因素"
+
list
.
get
(
0
).
getName
()+
"在使用中,不能删除"
);
}
}
@Override
public
void
editAccidentType
(
HashMap
<
String
,
Object
>
map
)
{
AccidentType
param
=
(
AccidentType
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
Long
.
parseLong
(
deptId
));
param
.
setCreateBy
(
Long
.
parseLong
(
userId
));
param
.
setCreateDate
(
new
Date
());
iAccidentTypeDao
.
save
(
param
);
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
)
{
return
accidentTypeMapper
.
findAccidentTypeListByOrgCode
(
orgCode
);
}
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
CommonPageInfoParam
param
)
{
long
total
=
accidentTypeMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
accidentTypeMapper
.
findAccidentTypePage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
@Service
(
"accidentTypeService"
)
public
class
AccidentTypeServiceImpl
implements
IAccidentTypeService
{
@Autowired
AccidentTypeMapper
accidentTypeMapper
;
@Autowired
IAccidentTypeDao
iAccidentTypeDao
;
@Autowired
IRiskFactorDao
iRiskFactorDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
public
void
detAccidentType
(
Long
[]
param
)
{
//1.校验
for
(
Long
id
:
param
){
checkBeforeDet
(
id
);
}
//2.删除
iAccidentTypeDao
.
deleteAllByIds
(
param
);
}
/**
* 关联数据校验
* @param id
*/
private
void
checkBeforeDet
(
Long
id
)
{
List
<
RiskFactor
>
list
=
iRiskFactorDao
.
findByAccidentTypeId
(
id
);
if
(
null
!=
list
&&
list
.
size
()>
0
){
throw
new
YeeException
(
"危险因素"
+
list
.
get
(
0
).
getName
()+
"在使用中,不能删除"
);
}
}
@Override
public
void
editAccidentType
(
HashMap
<
String
,
Object
>
map
)
{
AccidentType
param
=
(
AccidentType
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
deptId
);
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
iAccidentTypeDao
.
save
(
param
);
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
)
{
return
accidentTypeMapper
.
findAccidentTypeListByOrgCode
(
orgCode
);
}
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
accidentTypeMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
accidentTypeMapper
.
findAccidentTypePage
(
param
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"createBy"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
e
.
get
(
"createBy"
)));
e
.
put
(
"deptName"
,
deptMap
.
get
(
e
.
get
(
"deptId"
)));
});
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse
;
import
com.yeejoin.amos.fas.core.util.DaoCriteria
;
import
com.yeejoin.amos.fas.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.PostConstruct
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.*
;
@Service
(
"equipService"
)
public
class
EquipmentServiceImpl
implements
IEquipmentService
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
EquipmentServiceImpl
.
class
);
@Autowired
ImpEquipMapper
impEquipMapper
;
@Autowired
FireEquipMapper
fireEquipMapper
;
@Autowired
IEquipmentDao
iEquipmentDao
;
@Autowired
IPreplanPictureDao
iPreplanPictureDao
;
@Autowired
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
@Autowired
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
ImpAndFireEquipMapper
impAndFireEquipMapper
;
@Autowired
private
IPreplanPictureDao
preplanPictureDao
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
private
EquipCommunicationDao
equipCommunicationDao
;
@Value
(
"${windows.img.path}"
)
private
String
winImgPath
;
@Value
(
"${linux.img.path}"
)
private
String
linuxImgPath
;
public
Equipment
save
(
Equipment
equipment
)
{
Long
eqId
=
equipment
.
getId
();
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
return
equipment
;
}
public
Equipment
queryOne
(
Long
id
)
{
Optional
<
Equipment
>
dict1
=
iEquipmentDao
.
findById
(
id
);
Equipment
dict
=
null
;
if
(
dict1
.
isPresent
()){
dict
=
dict1
.
get
();
}
return
dict
;
}
@Override
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
Equipment
>
equipment1
=
iEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
Equipment
equipment
=
null
;
if
(
equipment1
.
isPresent
()){
equipment
=
equipment1
.
get
();
}
if
(
equipment
!=
null
)
{
this
.
iEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
}
}
return
idArray
;
}
@Override
public
List
<
PreplanPicture
>
queryImgByIdAndType
(
List
<
DaoCriteria
>
criterias
)
{
BaseQuerySpecification
<
PreplanPicture
>
spec
=
new
BaseQuerySpecification
<>(
criterias
);
return
iPreplanPictureDao
.
findAll
(
spec
);
}
@Override
public
Page
<
Equipment
>
queryImpEquip
(
List
<
DaoCriteria
>
criterias
,
CommonPageable
commonPageable
)
{
String
name
=
""
;
String
id
=
""
;
for
(
DaoCriteria
criteria
:
criterias
)
{
if
(
criteria
.
getPropertyName
().
equals
(
"name"
))
{
name
=
String
.
valueOf
(
criteria
.
getValue
()
!=
null
?
criteria
.
getValue
().
toString
()
:
""
);
}
if
(
criteria
.
getPropertyName
().
equals
(
"id"
))
{
id
=
String
.
valueOf
(
criteria
.
getValue
()
!=
null
?
criteria
.
getValue
().
toString
()
:
""
);
}
}
Long
total
=
impEquipMapper
.
getEquipPageCount
(
name
,
id
);
List
<
Map
>
content
=
impEquipMapper
.
getEquipPage
(
name
,
id
,
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
commonPageable
,
total
);
return
result
;
}
@Override
public
List
<
Equipment
>
queryEquipNoPage
()
{
return
iEquipmentDao
.
findAll
();
}
/**
* 绑定消防设备
*
* @param list
* @return
* @throws Exception
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
Long
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
EquipmentFireEquipment
equipmentFireEquipment
:
list
)
{
int
count
=
equipmentFireEquipmentDao
.
findByEqmtIdAndFireEqmtId
(
equipmentId
,
equipmentFireEquipment
.
getFireEquipmentId
());
if
(
count
>
0
)
{
continue
;
}
equipmentFireEquipment
.
setEquipmentId
(
equipmentId
);
equipmentFireEquipment
.
setCreateDate
(
new
Date
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"exits"
,
false
);
Equipment
equipment
=
this
.
iEquipmentDao
.
getOne
(
equipmentFireEquipment
.
getEquipmentId
().
longValue
());
FireEquipment
fireEquipment
=
iFireEquipmentDao
.
getOne
(
equipmentFireEquipment
.
getFireEquipmentId
().
longValue
());
if
(
equipment
==
null
||
fireEquipment
==
null
)
throw
new
Exception
(
"找不到数据"
);
this
.
equipmentFireEquipmentDao
.
save
(
equipmentFireEquipment
);
//已存在的绑定关系
List
<
EquipmentFireEquipment
>
exits
=
impAndFireEquipMapper
.
queryForList
(
String
.
valueOf
(
equipmentFireEquipment
.
getFireEquipmentId
()),
null
);
if
(!
CollectionUtils
.
isEmpty
(
exits
))
result
.
put
(
"exits"
,
true
);
result
.
put
(
"newModel"
,
equipmentFireEquipment
);
resultList
.
add
(
result
);
}
return
resultList
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Long
>
removeFireEqmtBind
(
Long
equipmentId
,
String
[]
fireEquipmentIds
)
{
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
String
id
:
fireEquipmentIds
)
{
long
result
=
0
;
EquipmentFireEquipment
equipmentFireEquipment
=
impAndFireEquipMapper
.
queryForOne
(
String
.
valueOf
(
id
),
String
.
valueOf
(
equipmentId
));
if
(
equipmentFireEquipment
!=
null
)
{
result
=
equipmentFireEquipment
.
getId
();
this
.
equipmentFireEquipmentDao
.
deleteById
(
equipmentFireEquipment
.
getId
());
}
ids
.
add
(
result
);
}
return
ids
;
}
/**
* 查询指定重点设备已经绑定的消防设备
*
* @param equipmentId
* @return
*/
@Override
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
)
{
long
start
=
-
1
;
int
length
=
-
1
;
if
(
null
!=
commonPageable
)
{
start
=
commonPageable
.
getOffset
();
length
=
commonPageable
.
getPageSize
();
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
String
.
valueOf
(
equipmentId
));
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
}
@Override
public
Equipment
saveImg
(
MultipartFile
file
,
Equipment
equipment
,
int
type
,
Long
userId
)
{
// TODO Auto-generated method stub
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
if
(
pp
==
null
)
{
pp
=
new
PreplanPicture
();
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setType
(
type
);
pp
.
setCreateDate
(
new
Date
());
pp
.
setCreateBy
(
userId
.
intValue
());
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
+
equipment
.
getId
();
String
filePath
=
getRootPath
()
+
path
;
String
fileType
=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
),
file
.
getOriginalFilename
().
length
());
String
fileName
=
File
.
separator
+
type
+
fileType
;
try
{
File
dest
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
if
(!
dest
.
exists
())
{
if
(
dest
.
getParentFile
()
!=
null
&&
!
dest
.
getParentFile
().
exists
())
{
dest
.
getParentFile
().
mkdirs
();
}
dest
.
createNewFile
();
}
file
.
transferTo
(
dest
);
}
catch
(
IOException
e
)
{
throw
new
YeeException
(
"上传图片失败"
);
}
String
picture
=
path
+
fileName
;
pp
.
setCreateBy
(
userId
.
intValue
());
pp
.
setPicture
(
picture
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
());
}
preplanPictureDao
.
saveAndFlush
(
pp
);
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
return
equipment
;
}
private
String
getRootPath
()
{
String
localPath
=
""
;
if
(
"\\"
.
equals
(
File
.
separator
))
{
localPath
+=
winImgPath
;
}
else
if
(
"/"
.
equals
(
File
.
separator
))
{
localPath
+=
linuxImgPath
;
}
return
localPath
.
trim
();
}
@Override
public
Equipment
saveEquipmentAndImg
(
ImgParam
[]
imgs
,
Equipment
equipment
)
{
// TODO Auto-generated method stub
if
(
imgs
==
null
||
imgs
.
length
<
1
)
{
equipment
=
save
(
equipment
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
()
==
null
?
new
Date
()
:
equipment2
.
getCreateDate
());
}
}
else
{
equipment
=
save
(
equipment
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
()
==
null
?
new
Date
()
:
equipment2
.
getCreateDate
());
}
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
for
(
int
i
=
0
;
i
<
imgs
.
length
;
i
++)
{
MultipartFile
file
=
imgs
[
i
].
getFile
();
if
(
null
!=
file
)
{
int
type
=
imgs
[
i
].
getType
();
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
if
(
pp
==
null
)
{
pp
=
new
PreplanPicture
();
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setType
(
type
);
pp
.
setCreateDate
(
new
Date
());
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
+
equipment
.
getId
();
String
filePath
=
getRootPath
()
+
path
;
String
fileType
=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
),
file
.
getOriginalFilename
().
length
());
String
fileName
=
File
.
separator
+
type
+
fileType
;
try
{
File
dest
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
if
(!
dest
.
exists
())
{
if
(
dest
.
getParentFile
()
!=
null
&&
!
dest
.
getParentFile
().
exists
())
{
dest
.
getParentFile
().
mkdirs
();
}
dest
.
createNewFile
();
}
file
.
transferTo
(
dest
);
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
YeeException
(
"上传图片失败"
);
}
String
picture
=
path
+
fileName
;
pp
.
setPicture
(
picture
);
preplanPictureDao
.
saveAndFlush
(
pp
);
}
}
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
}
return
equipment
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
findEquipVideoList
()
{
List
<
Map
<
String
,
Object
>>
list
=
impAndFireEquipMapper
.
findEquipVideo
();
Map
<
String
,
Map
<
String
,
Object
>>
tempEquip
=
new
HashMap
<
String
,
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
Map
<
String
,
Object
>
temp
:
list
)
{
Map
<
String
,
Object
>
equip
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
video
=
new
HashMap
<
String
,
Object
>();
video
.
put
(
"id"
,
temp
.
get
(
"id"
));
video
.
put
(
"code"
,
temp
.
get
(
"code"
));
video
.
put
(
"name"
,
temp
.
get
(
"name"
));
video
.
put
(
"videoUrl"
,
temp
.
get
(
"url"
));
video
.
put
(
"equipName"
,
temp
.
get
(
"equipName"
));
video
.
put
(
"monitorTime"
,
new
Date
());
List
<
Map
<
String
,
Object
>>
videoList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
tempEquip
.
containsKey
(
temp
.
get
(
"equipId"
).
toString
()))
{
equip
=
tempEquip
.
get
(
temp
.
get
(
"equipId"
).
toString
());
videoList
=
(
List
<
Map
<
String
,
Object
>>)
equip
.
get
(
"children"
);
videoList
.
add
(
video
);
}
else
{
equip
.
put
(
"equipId"
,
temp
.
get
(
"equipId"
));
equip
.
put
(
"equipName"
,
temp
.
get
(
"equipName"
));
equip
.
put
(
"equipCode"
,
temp
.
get
(
"equipCode"
));
videoList
.
add
(
video
);
equip
.
put
(
"children"
,
videoList
);
tempEquip
.
put
(
temp
.
get
(
"equipId"
).
toString
(),
equip
);
result
.
add
(
equip
);
}
}
return
result
;
}
@Override
public
EquipDetailsResponse
findEquipDetailsById
(
Long
id
)
{
return
fireEquipMapper
.
findEquipDetailsById
(
id
);
}
@Override
public
List
<
Equipment
>
findAll
()
{
return
iEquipmentDao
.
findAll
();
}
@Override
@PostConstruct
public
void
findAllEquipPointInfo
()
{
List
<
EquipCommunicationData
>
list
=
fireEquipMapper
.
findAllEquipPointInfo
();
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
HashMap
<
String
,
EquipCommunicationData
>
map
=
new
HashMap
<>();
list
.
forEach
(
data
->
{
map
.
put
(
data
.
getPointCode
(),
data
);
});
redisTemplate
.
opsForHash
().
putAll
(
"fireEquipData"
,
map
);
}
}
@Override
public
EquipCommunicationData
findFireEquipmentByPointCode
(
String
code
)
{
EquipCommunicationData
data
=
(
EquipCommunicationData
)
redisTemplate
.
opsForHash
().
get
(
"fireEquipData"
,
code
);
if
(
ObjectUtils
.
isEmpty
(
data
))
{
data
=
fireEquipMapper
.
findOneByPointCode
(
code
);
}
return
data
;
}
@Override
public
EquipCommunicationData
findFireEquipDataByPointCode
(
String
code
)
{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"pointCode"
).
is
(
code
)).
limit
(
1
);
query
.
with
(
new
Sort
(
new
Order
(
Direction
.
DESC
,
"recDate"
)));
query
.
limit
(
1
);
List
<
EquipCommunicationData
>
data
=
mongoTemplate
.
find
(
query
,
EquipCommunicationData
.
class
);
if
(
data
.
isEmpty
())
{
return
null
;
}
return
data
.
get
(
0
);
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
javax.annotation.PostConstruct
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse
;
import
com.yeejoin.amos.fas.core.util.DaoCriteria
;
import
com.yeejoin.amos.fas.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
@Service
(
"equipService"
)
public
class
EquipmentServiceImpl
implements
IEquipmentService
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
EquipmentServiceImpl
.
class
);
@Autowired
ImpEquipMapper
impEquipMapper
;
@Autowired
FireEquipMapper
fireEquipMapper
;
@Autowired
IEquipmentDao
iEquipmentDao
;
@Autowired
IPreplanPictureDao
iPreplanPictureDao
;
@Autowired
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
@Autowired
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
ImpAndFireEquipMapper
impAndFireEquipMapper
;
@Autowired
private
IPreplanPictureDao
preplanPictureDao
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
MongoTemplate
mongoTemplate
;
@Autowired
private
EquipCommunicationDao
equipCommunicationDao
;
@Value
(
"${windows.img.path}"
)
private
String
winImgPath
;
@Value
(
"${linux.img.path}"
)
private
String
linuxImgPath
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
public
Equipment
save
(
Equipment
equipment
)
{
Long
eqId
=
equipment
.
getId
();
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
return
equipment
;
}
public
Equipment
queryOne
(
Long
id
)
{
Optional
<
Equipment
>
dict1
=
iEquipmentDao
.
findById
(
id
);
Equipment
dict
=
null
;
if
(
dict1
.
isPresent
()){
dict
=
dict1
.
get
();
}
return
dict
;
}
@Override
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
Equipment
>
equipment1
=
iEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
Equipment
equipment
=
null
;
if
(
equipment1
.
isPresent
()){
equipment
=
equipment1
.
get
();
}
if
(
equipment
!=
null
)
{
this
.
iEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
}
}
return
idArray
;
}
@Override
public
List
<
PreplanPicture
>
queryImgByIdAndType
(
List
<
DaoCriteria
>
criterias
)
{
BaseQuerySpecification
<
PreplanPicture
>
spec
=
new
BaseQuerySpecification
<>(
criterias
);
return
iPreplanPictureDao
.
findAll
(
spec
);
}
@Override
public
Page
<
Equipment
>
queryImpEquip
(
List
<
DaoCriteria
>
criterias
,
CommonPageable
commonPageable
)
{
String
name
=
""
;
String
id
=
""
;
for
(
DaoCriteria
criteria
:
criterias
)
{
if
(
criteria
.
getPropertyName
().
equals
(
"name"
))
{
name
=
String
.
valueOf
(
criteria
.
getValue
()
!=
null
?
criteria
.
getValue
().
toString
()
:
""
);
}
if
(
criteria
.
getPropertyName
().
equals
(
"id"
))
{
id
=
String
.
valueOf
(
criteria
.
getValue
()
!=
null
?
criteria
.
getValue
().
toString
()
:
""
);
}
}
Long
total
=
impEquipMapper
.
getEquipPageCount
(
name
,
id
);
List
<
Map
>
content
=
impEquipMapper
.
getEquipPage
(
name
,
id
,
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
commonPageable
,
total
);
return
result
;
}
@Override
public
List
<
Equipment
>
queryEquipNoPage
()
{
return
iEquipmentDao
.
findAll
();
}
/**
* 绑定消防设备
*
* @param list
* @return
* @throws Exception
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
Long
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
EquipmentFireEquipment
equipmentFireEquipment
:
list
)
{
int
count
=
equipmentFireEquipmentDao
.
findByEqmtIdAndFireEqmtId
(
equipmentId
,
equipmentFireEquipment
.
getFireEquipmentId
());
if
(
count
>
0
)
{
continue
;
}
equipmentFireEquipment
.
setEquipmentId
(
equipmentId
);
equipmentFireEquipment
.
setCreateDate
(
new
Date
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"exits"
,
false
);
Equipment
equipment
=
this
.
iEquipmentDao
.
getOne
(
equipmentFireEquipment
.
getEquipmentId
().
longValue
());
FireEquipment
fireEquipment
=
iFireEquipmentDao
.
getOne
(
equipmentFireEquipment
.
getFireEquipmentId
().
longValue
());
if
(
equipment
==
null
||
fireEquipment
==
null
)
throw
new
Exception
(
"找不到数据"
);
this
.
equipmentFireEquipmentDao
.
save
(
equipmentFireEquipment
);
//已存在的绑定关系
List
<
EquipmentFireEquipment
>
exits
=
impAndFireEquipMapper
.
queryForList
(
String
.
valueOf
(
equipmentFireEquipment
.
getFireEquipmentId
()),
null
);
if
(!
CollectionUtils
.
isEmpty
(
exits
))
result
.
put
(
"exits"
,
true
);
result
.
put
(
"newModel"
,
equipmentFireEquipment
);
resultList
.
add
(
result
);
}
return
resultList
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Long
>
removeFireEqmtBind
(
Long
equipmentId
,
String
[]
fireEquipmentIds
)
{
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
String
id
:
fireEquipmentIds
)
{
long
result
=
0
;
EquipmentFireEquipment
equipmentFireEquipment
=
impAndFireEquipMapper
.
queryForOne
(
String
.
valueOf
(
id
),
String
.
valueOf
(
equipmentId
));
if
(
equipmentFireEquipment
!=
null
)
{
result
=
equipmentFireEquipment
.
getId
();
this
.
equipmentFireEquipmentDao
.
deleteById
(
equipmentFireEquipment
.
getId
());
}
ids
.
add
(
result
);
}
return
ids
;
}
/**
* 查询指定重点设备已经绑定的消防设备
*
* @param equipmentId
* @return
*/
@Override
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
)
{
long
start
=
-
1
;
int
length
=
-
1
;
if
(
null
!=
commonPageable
)
{
start
=
commonPageable
.
getOffset
();
length
=
commonPageable
.
getPageSize
();
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
String
.
valueOf
(
equipmentId
));
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
}
@Override
public
Equipment
saveImg
(
MultipartFile
file
,
Equipment
equipment
,
int
type
,
Long
userId
)
{
// TODO Auto-generated method stub
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
if
(
pp
==
null
)
{
pp
=
new
PreplanPicture
();
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setType
(
type
);
pp
.
setCreateDate
(
new
Date
());
pp
.
setCreateBy
(
userId
.
intValue
()+
""
);
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
+
equipment
.
getId
();
String
filePath
=
getRootPath
()
+
path
;
String
fileType
=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
),
file
.
getOriginalFilename
().
length
());
String
fileName
=
File
.
separator
+
type
+
fileType
;
try
{
File
dest
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
if
(!
dest
.
exists
())
{
if
(
dest
.
getParentFile
()
!=
null
&&
!
dest
.
getParentFile
().
exists
())
{
dest
.
getParentFile
().
mkdirs
();
}
dest
.
createNewFile
();
}
file
.
transferTo
(
dest
);
}
catch
(
IOException
e
)
{
throw
new
YeeException
(
"上传图片失败"
);
}
String
picture
=
path
+
fileName
;
pp
.
setCreateBy
(
userId
.
intValue
()+
""
);
pp
.
setPicture
(
picture
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
());
}
preplanPictureDao
.
saveAndFlush
(
pp
);
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
return
equipment
;
}
private
String
getRootPath
()
{
String
localPath
=
""
;
if
(
"\\"
.
equals
(
File
.
separator
))
{
localPath
+=
winImgPath
;
}
else
if
(
"/"
.
equals
(
File
.
separator
))
{
localPath
+=
linuxImgPath
;
}
return
localPath
.
trim
();
}
@Override
public
Equipment
saveEquipmentAndImg
(
ImgParam
[]
imgs
,
Equipment
equipment
)
{
// TODO Auto-generated method stub
if
(
imgs
==
null
||
imgs
.
length
<
1
)
{
equipment
=
save
(
equipment
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
()
==
null
?
new
Date
()
:
equipment2
.
getCreateDate
());
}
}
else
{
equipment
=
save
(
equipment
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Equipment
equipment2
=
null
;
if
(
date
.
isPresent
()){
equipment2
=
date
.
get
();
}
equipment
.
setCreateDate
(
equipment2
.
getCreateDate
()
==
null
?
new
Date
()
:
equipment2
.
getCreateDate
());
}
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
for
(
int
i
=
0
;
i
<
imgs
.
length
;
i
++)
{
MultipartFile
file
=
imgs
[
i
].
getFile
();
if
(
null
!=
file
)
{
int
type
=
imgs
[
i
].
getType
();
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
if
(
pp
==
null
)
{
pp
=
new
PreplanPicture
();
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setType
(
type
);
pp
.
setCreateDate
(
new
Date
());
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
+
equipment
.
getId
();
String
filePath
=
getRootPath
()
+
path
;
String
fileType
=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
),
file
.
getOriginalFilename
().
length
());
String
fileName
=
File
.
separator
+
type
+
fileType
;
try
{
File
dest
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
if
(!
dest
.
exists
())
{
if
(
dest
.
getParentFile
()
!=
null
&&
!
dest
.
getParentFile
().
exists
())
{
dest
.
getParentFile
().
mkdirs
();
}
dest
.
createNewFile
();
}
file
.
transferTo
(
dest
);
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
YeeException
(
"上传图片失败"
);
}
String
picture
=
path
+
fileName
;
pp
.
setPicture
(
picture
);
preplanPictureDao
.
saveAndFlush
(
pp
);
}
}
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
}
return
equipment
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
findEquipVideoList
()
{
List
<
Map
<
String
,
Object
>>
list
=
impAndFireEquipMapper
.
findEquipVideo
();
Map
<
String
,
Map
<
String
,
Object
>>
tempEquip
=
new
HashMap
<
String
,
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
Map
<
String
,
Object
>
temp
:
list
)
{
Map
<
String
,
Object
>
equip
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
video
=
new
HashMap
<
String
,
Object
>();
video
.
put
(
"id"
,
temp
.
get
(
"id"
));
video
.
put
(
"code"
,
temp
.
get
(
"code"
));
video
.
put
(
"name"
,
temp
.
get
(
"name"
));
video
.
put
(
"videoUrl"
,
temp
.
get
(
"url"
));
video
.
put
(
"equipName"
,
temp
.
get
(
"equipName"
));
video
.
put
(
"monitorTime"
,
new
Date
());
List
<
Map
<
String
,
Object
>>
videoList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
tempEquip
.
containsKey
(
temp
.
get
(
"equipId"
).
toString
()))
{
equip
=
tempEquip
.
get
(
temp
.
get
(
"equipId"
).
toString
());
videoList
=
(
List
<
Map
<
String
,
Object
>>)
equip
.
get
(
"children"
);
videoList
.
add
(
video
);
}
else
{
equip
.
put
(
"equipId"
,
temp
.
get
(
"equipId"
));
equip
.
put
(
"equipName"
,
temp
.
get
(
"equipName"
));
equip
.
put
(
"equipCode"
,
temp
.
get
(
"equipCode"
));
videoList
.
add
(
video
);
equip
.
put
(
"children"
,
videoList
);
tempEquip
.
put
(
temp
.
get
(
"equipId"
).
toString
(),
equip
);
result
.
add
(
equip
);
}
}
return
result
;
}
@Override
public
EquipDetailsResponse
findEquipDetailsById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
)
{
EquipDetailsResponse
equipDetailsResponse
=
fireEquipMapper
.
findEquipDetailsById
(
id
);
AgencyUserModel
user
=
remoteSecurityService
.
getUserById
(
toke
,
product
,
appKey
,
equipDetailsResponse
.
getUserId
());
equipDetailsResponse
.
setUsername
(
user
.
getRealName
());
equipDetailsResponse
.
setTel
(
user
.
getMobile
());
if
(
user
.
getCompanys
().
get
(
0
)!=
null
)
{
CompanyModel
companyModel
=
user
.
getCompanys
().
get
(
0
);
if
(
user
.
getCompanyDepartments
().
get
(
companyModel
.
getSequenceNbr
())!=
null
)
{
List
<
DepartmentModel
>
departList
=
user
.
getCompanyDepartments
().
get
(
companyModel
.
getSequenceNbr
());
if
(!
departList
.
isEmpty
())
{
equipDetailsResponse
.
setDepName
(
departList
.
get
(
0
).
getDepartmentName
());
}
}
}
return
equipDetailsResponse
;
}
@Override
public
List
<
Equipment
>
findAll
()
{
return
iEquipmentDao
.
findAll
();
}
@Override
@PostConstruct
public
void
findAllEquipPointInfo
()
{
List
<
EquipCommunicationData
>
list
=
fireEquipMapper
.
findAllEquipPointInfo
();
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
HashMap
<
String
,
EquipCommunicationData
>
map
=
new
HashMap
<>();
list
.
forEach
(
data
->
{
map
.
put
(
data
.
getPointCode
(),
data
);
});
redisTemplate
.
opsForHash
().
putAll
(
"fireEquipData"
,
map
);
}
}
@Override
public
EquipCommunicationData
findFireEquipmentByPointCode
(
String
code
)
{
EquipCommunicationData
data
=
(
EquipCommunicationData
)
redisTemplate
.
opsForHash
().
get
(
"fireEquipData"
,
code
);
if
(
ObjectUtils
.
isEmpty
(
data
))
{
data
=
fireEquipMapper
.
findOneByPointCode
(
code
);
}
return
data
;
}
@Override
public
EquipCommunicationData
findFireEquipDataByPointCode
(
String
code
)
{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"pointCode"
).
is
(
code
)).
limit
(
1
);
query
.
with
(
new
Sort
(
new
Order
(
Direction
.
DESC
,
"recDate"
)));
query
.
limit
(
1
);
List
<
EquipCommunicationData
>
data
=
mongoTemplate
.
find
(
query
,
EquipCommunicationData
.
class
);
if
(
data
.
isEmpty
())
{
return
null
;
}
return
data
.
get
(
0
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireCarServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.assertj.core.util.Sets
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
...
...
@@ -11,19 +31,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireCarService;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.dao.entity.FireCar
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.assertj.core.util.Sets
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.*
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
@Service
(
"fireCarService"
)
...
...
@@ -109,8 +117,10 @@ public class FireCarServiceImpl implements IFireCarService {
}
@Override
public
FireCarDetailVo
findFireCarById
(
Long
truckId
)
{
public
FireCarDetailVo
findFireCarById
(
String
toke
,
String
product
,
String
appKey
,
Long
truckId
)
{
FireCarDetailVo
carVo
=
fireCarMapper
.
getFireCarDetailById
(
truckId
);
DepartmentModel
departmentModel
=
remoteSecurityService
.
getDepartmentByDeptId
(
toke
,
product
,
appKey
,
carVo
.
getDeptId
());
carVo
.
setDepartmentName
(
departmentModel
.
getDepartmentName
());
return
carVo
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
0cb2f733
...
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireCar
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
...
...
@@ -16,6 +17,10 @@ import com.yeejoin.amos.fas.dao.entity.Fmea;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.bouncycastle.util.Arrays
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
...
...
@@ -82,6 +87,71 @@ public class FmeaServiceImpl implements IFmeaService {
public
Page
<
HashMap
<
String
,
Object
>>
queryFmeaList
(
CommonPageInfoParam
param
)
{
long
total
=
fmeaMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
fmeaMapper
.
queryFmeaPage
(
param
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
//String[] ids = sb.toString().split(",");
//String companyLeaderId = String.valueOf(map.get("companyLeaderId"));
sb
.
append
(
map
.
get
(
"companyLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String departmentLeaderId = String.valueOf(map.get("departmentLeaderId"));
sb
.
append
(
map
.
get
(
"departmentLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String groupLeaderId = String.valueOf(map.get("groupLeaderId"));
sb
.
append
(
map
.
get
(
"groupLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String personLeaderId = String.valueOf(map.get("personLeaderId"));
sb
.
append
(
map
.
get
(
"personLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String identifyUserId = String.valueOf(map.get("identifyUserId"));
sb
.
append
(
map
.
get
(
"identifyUserId"
));
sb
.
append
(
map
.
get
(
","
));
}
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
FeignClientResult
<
List
<
AgencyUserModel
>>
resultSec
=
Privilege
.
agencyUserClient
.
queryByIds
(
sb
.
toString
());
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
companyLeaderId
=
String
.
valueOf
(
map
.
get
(
"companyLeaderId"
));
String
departmentLeaderId
=
String
.
valueOf
(
map
.
get
(
"departmentLeaderId"
));
String
groupLeaderId
=
String
.
valueOf
(
map
.
get
(
"groupLeaderId"
));
String
personLeaderId
=
String
.
valueOf
(
map
.
get
(
"personLeaderId"
));
String
identifyUserId
=
String
.
valueOf
(
map
.
get
(
"identifyUserId"
));
for
(
AgencyUserModel
user
:
resultSec
.
getResult
())
{
if
(
companyLeaderId
!=
null
&&
companyLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"companyLeaderName"
,
user
.
getRealName
());
}
if
(
departmentLeaderId
!=
null
&&
departmentLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"departmentLeaderName"
,
user
.
getRealName
());
}
if
(
groupLeaderId
!=
null
&&
groupLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"groupLeaderName"
,
user
.
getRealName
());
}
if
(
personLeaderId
!=
null
&&
personLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"personLeaderName"
,
user
.
getRealName
());
}
if
(
identifyUserId
!=
null
&&
identifyUserId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"identifyUserName"
,
user
.
getRealName
());
}
}
}
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskFactorServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskFactorMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
@Service
(
"riskFactorService"
)
public
class
RiskFactorServiceImpl
implements
IRiskFactorService
{
@Autowired
RiskFactorMapper
riskFactorMapper
;
@Autowired
IRiskFactorDao
iRiskFactorDao
;
@Autowired
IFmeaDao
iFmeaDao
;
@Autowired
RiskSourceMapper
riskSourceMapper
;
@Autowired
IRiskLevelDao
iRiskLevelDao
;
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
CommonPageInfoParam
param
)
{
long
total
=
riskFactorMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskFactorMapper
.
queryRiskFactorPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
@Override
public
List
<
RiskFactor
>
queryRiskFactor
()
{
return
iRiskFactorDao
.
findAll
();
}
@Override
public
void
editRiskFactor
(
HashMap
<
String
,
Object
>
map
)
{
RiskFactor
param
=
(
RiskFactor
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)
==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
Long
.
parseLong
(
deptId
));
param
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
param
.
setCreateDate
(
new
Date
());
iRiskFactorDao
.
save
(
param
);
}
@Override
public
void
detRiskFactor
(
Long
[]
param
)
{
//1.校验
for
(
Long
id
:
param
)
{
checkBeforeDet
(
id
);
}
//2.删除
iRiskFactorDao
.
deleteAllByIds
(
param
);
}
/**
* 删除前校验
*
* @param id
*/
private
void
checkBeforeDet
(
Long
id
)
{
List
<
Fmea
>
list
=
iFmeaDao
.
findByRiskFactorsId
(
id
);
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
throw
new
YeeException
(
"FMEA"
+
list
.
get
(
0
).
getId
()
+
"在使用中,不能删除"
);
}
}
@Override
public
Long
countRepeatData
(
RiskFactor
param
)
{
// TODO Auto-generated method stub
return
riskFactorMapper
.
countRepeatData
(
param
);
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskFactorMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
@Service
(
"riskFactorService"
)
public
class
RiskFactorServiceImpl
implements
IRiskFactorService
{
@Autowired
RiskFactorMapper
riskFactorMapper
;
@Autowired
IRiskFactorDao
iRiskFactorDao
;
@Autowired
IFmeaDao
iFmeaDao
;
@Autowired
RiskSourceMapper
riskSourceMapper
;
@Autowired
IRiskLevelDao
iRiskLevelDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
riskFactorMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskFactorMapper
.
queryRiskFactorPage
(
param
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"createBy"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
e
.
get
(
"createBy"
)));
e
.
put
(
"deptName"
,
deptMap
.
get
(
e
.
get
(
"deptId"
)));
});
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
@Override
public
List
<
RiskFactor
>
queryRiskFactor
()
{
return
iRiskFactorDao
.
findAll
();
}
@Override
public
void
editRiskFactor
(
HashMap
<
String
,
Object
>
map
)
{
RiskFactor
param
=
(
RiskFactor
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)
==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
deptId
);
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
iRiskFactorDao
.
save
(
param
);
}
@Override
public
void
detRiskFactor
(
Long
[]
param
)
{
//1.校验
for
(
Long
id
:
param
)
{
checkBeforeDet
(
id
);
}
//2.删除
iRiskFactorDao
.
deleteAllByIds
(
param
);
}
/**
* 删除前校验
*
* @param id
*/
private
void
checkBeforeDet
(
Long
id
)
{
List
<
Fmea
>
list
=
iFmeaDao
.
findByRiskFactorsId
(
id
);
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
throw
new
YeeException
(
"FMEA"
+
list
.
get
(
0
).
getId
()
+
"在使用中,不能删除"
);
}
}
@Override
public
Long
countRepeatData
(
RiskFactor
param
)
{
// TODO Auto-generated method stub
return
riskFactorMapper
.
countRepeatData
(
param
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskLevelServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.common.enums.ManageLevelEum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskLevelMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
@Service
(
"riskLevelService"
)
public
class
RiskLevelServiceImpl
implements
IRiskLevelService
{
@Autowired
...
...
@@ -26,22 +39,43 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
IRiskLevelDao
iRiskLevelDao
;
@Autowired
IRiskSourceDao
iRiskSourceDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
riskLevelMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskLevelMapper
.
queryRiskLevelPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
Set
<
String
>
userIdList
=
new
HashSet
<
String
>();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
userIdList
.
add
(
String
.
valueOf
(
map
.
get
(
"createBy"
)));
}
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
if
(
userIdList
.
size
()>
0
)
{
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"createBy"
))));
e
.
put
(
"manageLevelName"
,
StringUtil
.
isNotEmpty
(
e
.
get
(
"manageLevel"
))
?
ManageLevelEum
.
getNameByManageLevel
(
Integer
.
parseInt
(
e
.
get
(
"manageLevel"
).
toString
()))
:
""
);
});
return
new
PageImpl
<>(
content
,
param
,
total
);
}
@Override
public
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
)
{
RiskLevel
param
=
(
RiskLevel
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setCreateBy
(
Long
.
parseLong
(
userId
)
);
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
iRiskLevelDao
.
save
(
param
);
}
...
...
@@ -54,7 +88,6 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
}
//2.删除
iRiskLevelDao
.
deleteAllByIds
(
param
);
}
/**
...
...
@@ -87,3 +120,4 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
import
com.yeejoin.amos.fas.business.bo.RpnCalculationBo
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
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.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IDictDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRpnChangeLogDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
...
...
@@ -24,7 +82,12 @@ import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.*
;
import
com.yeejoin.amos.fas.business.service.model.CheckInputItemRo
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
...
...
@@ -34,31 +97,24 @@ import com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EvaluationModel
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentData
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem
;
import
com.yeejoin.amos.fas.dao.entity.PPoint
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RpnChangeLog
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
javax.annotation.PostConstruct
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.*
;
import
java.util.stream.Collectors
;
@Service
(
"riskSourceService"
)
...
...
@@ -174,7 +230,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
riskSource
.
setOrgCode
(
orgCode
);
riskSource
.
setCreateBy
(
Integer
.
parseInt
(
userId
)
);
riskSource
.
setCreateBy
(
userId
);
Optional
<
RiskSource
>
oldRiskSource1
=
iRiskSourceDao
.
findById
(
id
);
RiskSource
oldRiskSource
=
null
;
if
(
oldRiskSource1
.
isPresent
())
{
...
...
@@ -519,13 +575,51 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
@Override
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
if
(
total
==
0L
)
{
return
new
PageImpl
<>(
content
,
null
,
total
);
}
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
Map
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"userId"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
if
(
userIdList
.
size
()>
0
)
{
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
}
if
(
deptIdList
.
size
()>
0
)
{
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
}
content
.
forEach
(
e
->
{
e
.
put
(
"username"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"userId"
))));
e
.
put
(
"depName"
,
deptMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
))));
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
});
return
new
PageImpl
<>(
content
,
null
,
total
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IAccidentTypeService.java
View file @
0cb2f733
...
...
@@ -2,12 +2,10 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
public
interface
IAccidentTypeService
{
...
...
@@ -15,8 +13,9 @@ public interface IAccidentTypeService {
void
editAccidentType
(
HashMap
<
String
,
Object
>
map
);
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
);
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEquipmentService.java
View file @
0cb2f733
...
...
@@ -88,7 +88,7 @@ public interface IEquipmentService {
*/
List
<
Map
<
String
,
Object
>>
findEquipVideoList
();
EquipDetailsResponse
findEquipDetailsById
(
Long
id
);
EquipDetailsResponse
findEquipDetailsById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
);
/**
* 获取所有重点装备
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireCarService.java
View file @
0cb2f733
...
...
@@ -13,13 +13,10 @@ public interface IFireCarService {
Page
<
HashMap
<
String
,
Object
>>
queryFireCar
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
FireCarDetailVo
findFireCarById
(
Long
id
);
FireCarDetailVo
findFireCarById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
);
FireCar
save
(
FireCar
fireCar
);
FireCar
queryOne
(
Long
id
);
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskFactorService.java
View file @
0cb2f733
...
...
@@ -14,7 +14,7 @@ public interface IRiskFactorService {
* @param param
* @return
*/
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
/**
* 危险因素查询不分页
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskLevelService.java
View file @
0cb2f733
...
...
@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.RiskLevel;
public
interface
IRiskLevelService
{
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
0cb2f733
...
...
@@ -64,7 +64,7 @@ public interface IRiskSourceService {
List
<
Map
<
String
,
Object
>>
listEquipmentPointById
(
Long
fmeaId
,
Long
importantEquipId
,
Long
equipmentId
,
String
equipmentPointName
);
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
0cb2f733
spring.application.name
=
AMOS-FIREAUTOSYS-SUHG
server.port
=
8083
spring.profiles.active
=
dev
#spring.freemarker.cache=false
spring.devtools.restart.enabled
=
true
spring.devtools.restart.additional-paths
=
src/main/java
spring.devtools.restart.exclude
=
WEB-INF/**
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
#JPA Configuration:
# Show or not log for each sql query
spring.jpa.show-sql
=
true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto
=
none
# Naming strategy
#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming-strategy
=
org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.database-platform
=
org.hibernate.dialect.MySQLDialect
spring.jpa.open-in-view
=
true
#mybatis mapper file
mybatis.mapper-locations
=
classpath:db/mapper/*.xml
# mybatis entity package
mybatis.type-aliases-package
=
com.yeejoin.amos.fas.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase
=
true
logging.level.com.yeejoin.amos.fas.business.dao.mapper
=
debug
#liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
false
param.system.online.date
=
2020-02-12
visual.fegin.name
=
maas-visual
spring.http.multipart.maxFileSize
=
10480000
spring.http.multipart.MaxRequestSize
=
50480000
windows.img.path
=
D:
\\
linux.img.path
=
/
dutyMode.fegin.name
=
AMOSDUTYMODE
param.safetyIndexChange.cron
=
0 0 2 * * ?
spring.application.name
=
AMOS-AUTOSYS-XKQ1
server.port
=
8083
spring.profiles.active
=
dev
#spring.freemarker.cache=false
spring.devtools.restart.enabled
=
true
spring.devtools.restart.additional-paths
=
src/main/java
spring.devtools.restart.exclude
=
WEB-INF/**
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
#JPA Configuration:
# Show or not log for each sql query
spring.jpa.show-sql
=
true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto
=
none
# Naming strategy
#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming-strategy
=
org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.database-platform
=
org.hibernate.dialect.MySQLDialect
spring.jpa.open-in-view
=
true
#mybatis mapper file
mybatis.mapper-locations
=
classpath:db/mapper/*.xml
# mybatis entity package
mybatis.type-aliases-package
=
com.yeejoin.amos.fas.business.entity.mybatis
mybatis.configuration.mapUnderscoreToCamelCase
=
true
logging.level.com.yeejoin.amos.fas.business.dao.mapper
=
debug
#liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
false
param.system.online.date
=
2020-02-12
visual.fegin.name
=
maas-visual
spring.http.multipart.maxFileSize
=
10480000
spring.http.multipart.MaxRequestSize
=
50480000
windows.img.path
=
D:
\\
linux.img.path = /
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOSDUTYMODE
param.safetyIndexChange.cron
=
0 0 2 * * ?
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas-create-table.sql
View file @
0cb2f733
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for f_accident_type
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_accident_type`
;
CREATE
TABLE
`f_accident_type`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'事故类型'
,
`evaluation_sid`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'evaluation_model 中 type 为s 的id'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
20
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'事故类型表'
;
-- ----------------------------
-- Table structure for f_alarm
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_alarm`
;
CREATE
TABLE
`f_alarm`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'消防设备id'
,
`metric`
text
COMMENT
'指标'
,
`alarm_time`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'报警时间'
,
`alarm_type`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'报警类别:真实;误报'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'报警信息表'
;
-- ----------------------------
-- Table structure for f_dict
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_dict`
;
CREATE
TABLE
`f_dict`
(
`id`
bigint
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`dict_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`dict_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编码'
,
`parent_id`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'父ID'
,
`is_delete`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否已经删除'
,
`dict_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`dict_order`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'序号'
,
`remark`
longtext
COMMENT
'说明'
,
`dict_type`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
44
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for f_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment`
;
CREATE
TABLE
`f_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'设备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3位坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`charge_dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_user_id`
int
(
1
)
DEFAULT
'0'
COMMENT
'责任人'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`fire_station_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'消防小室id'
,
`reserve_plan`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'预案配置'
,
`sort_num`
int
(
11
)
DEFAULT
NULL
,
`fire_truck_route`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'消防车到重点设备行车路线'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
80
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备表'
;
-- ----------------------------
-- Table structure for f_equipment_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment_fire_equipment`
;
CREATE
TABLE
`f_equipment_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
970
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备与消防设备关联中间表'
;
-- ----------------------------
-- Table structure for f_evaluation_model
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_evaluation_model`
;
CREATE
TABLE
`f_evaluation_model`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`standard`
text
COMMENT
'模型内容'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`coefficient`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'系数'
,
`influence`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'影响'
,
`describe`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'描述'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'类型:S,D,O'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
52
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'评价模型表'
;
-- ----------------------------
-- Table structure for f_fire_car
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_car`
;
CREATE
TABLE
`f_fire_car`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'部门id'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆类别'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`car_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车牌号'
,
`engine_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'发动机号'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂牌型号'
,
`country`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'国别'
,
`state`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆状态'
,
`performance_index`
longtext
COMMENT
'性能指标'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`photo_path`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'消防车图片路径'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
7
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防车表'
;
-- ----------------------------
-- Table structure for f_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment`
;
CREATE
TABLE
`f_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`equip_classify`
int
(
11
)
DEFAULT
'0'
COMMENT
'装备分类:0-设备类;1-耗材类;2-视频监控;3-灭火器材'
,
`equip_type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备类型'
,
`equip_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备编码'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'规格型号'
,
`maintenance_cycle`
int
(
11
)
DEFAULT
'0'
COMMENT
'保养周期'
,
`manufacturer`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂商'
,
`brand`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'品牌'
,
`production_date`
date
DEFAULT
NULL
COMMENT
'生产日期'
,
`effective_date`
date
DEFAULT
NULL
COMMENT
'有效时间'
,
`number`
int
(
11
)
DEFAULT
'0'
COMMENT
'数量'
,
`unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'单位'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`equip_status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
`video_url`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'视频路径'
,
`weight`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'重量'
,
`action_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'动作状态'
,
`eruption_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'喷发状态'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2833
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_data
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_data`
;
CREATE
TABLE
`f_fire_equipment_data`
(
`id`
bigint
(
20
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备id'
,
`fire_equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备信息地址id'
,
`eq_point_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标名称'
,
`eq_point_unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标单位'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'数据类型:alarm(报警),monitor(监测)'
,
`common_address`
int
(
11
)
DEFAULT
NULL
COMMENT
'公共地址'
,
`information_address`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'信息地址'
,
`e_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`data_type`
int
(
11
)
DEFAULT
NULL
COMMENT
'数据类型:浮点型,整数,布尔类型'
,
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`occur_time`
datetime
DEFAULT
NULL
COMMENT
'品质描述'
,
`quality`
longtext
,
`is_blocked`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被锁'
,
`isSubstituted`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被取代'
,
`isNotTopical`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否非当前值'
,
`isInvalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
`isOverflow`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否越界'
,
`soe`
int
(
11
)
DEFAULT
'0'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
varchar
(
255
)
DEFAULT
NULL
,
`eq_point_code`
varchar
(
225
)
DEFAULT
''
COMMENT
'点位编码'
,
`is_invalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14912
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_point`
;
CREATE
TABLE
`f_fire_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_by`
varchar
(
225
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建日期'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
NOT
NULL
COMMENT
'类型:模拟量ANALOGUE,开关量SWITCH'
,
`value`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'当前值保存时若为开关量(1,0)默认为1'
,
`unit`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'指标项名称'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
bigint
(
20
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5734
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备点表'
;
-- ----------------------------
-- Table structure for f_fire_station
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station`
;
CREATE
TABLE
`f_fire_station`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型 1:消防小室,2:消防泡沫间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
23
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点'
;
-- ----------------------------
-- Table structure for f_fire_station_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station_equipment`
;
CREATE
TABLE
`f_fire_station_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`unit`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
56
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_strength
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_strength`
;
CREATE
TABLE
`f_fire_strength`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`username`
varchar
(
50
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`position`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'职位'
,
`tel`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'固话'
,
`phone_num`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'移动号码'
,
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
40
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防力量'
;
-- ----------------------------
-- Table structure for f_fmea
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea`
;
CREATE
TABLE
`f_fmea`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`risk_factors_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险因素id'
,
`evaluation_sid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险程度'
,
`evaluation_oid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'故障频数'
,
`evaluation_did`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'探测度'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'固有rpn'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`new_evaluation_oid`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'最新故障频数'
,
`engineering`
text
COMMENT
'工程措施'
,
`management`
text
COMMENT
'管理措施'
,
`train`
text
COMMENT
'培训教育'
,
`protection`
text
COMMENT
'个体防护'
,
`disposal`
text
COMMENT
'应急处置'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`company_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'公司负责人'
,
`department_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'部门负责人'
,
`group_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'班组负责人'
,
`person_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'个人负责人'
,
`identify_user`
int
(
11
)
DEFAULT
NULL
COMMENT
'辨识人'
,
`identify_method`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识方法'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'风险等级id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
406
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'FEMA表'
;
-- ----------------------------
-- Table structure for f_fmea_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_equipment_point`
;
CREATE
TABLE
`f_fmea_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'装备指标编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'装备指标状态(0:正常;1:告警)'
,
`important_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'所属重点设备id'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
110
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和装备指标的关系'
;
-- ----------------------------
-- Table structure for f_fmea_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_point_inputitem`
;
CREATE
TABLE
`f_fmea_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`point_inputitem_id`
bigint
(
20
)
NOT
NULL
COMMENT
'检查点和项关系编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'检查项状态(0:正常;1:不合格)'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
151
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和检查项的关系'
;
-- ----------------------------
-- Table structure for f_preplan_picture
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_preplan_picture`
;
CREATE
TABLE
`f_preplan_picture`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备编号'
,
`type`
int
(
11
)
NOT
NULL
COMMENT
'类型'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`picture`
text
COMMENT
'图片路径地址'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
161
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备预案图'
;
-- ----------------------------
-- Table structure for f_risk_factor
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_factor`
;
CREATE
TABLE
`f_risk_factor`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
136
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'危险因素表'
;
-- ----------------------------
-- Table structure for f_risk_level
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_level`
;
CREATE
TABLE
`f_risk_level`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`level`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'等级'
,
`evaluation_model_id`
bigint
(
20
)
DEFAULT
'1'
COMMENT
'评价模型id'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`top_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'上限'
,
`down_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'下限'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
6
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险等级表'
;
-- ----------------------------
-- Table structure for f_risk_source
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source`
;
CREATE
TABLE
`f_risk_source`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`parent_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'上级编号id'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`is_region`
varchar
(
16
)
DEFAULT
NULL
,
`status`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'状态(正常NORMAL,异常ANOMALY)'
,
`increment`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpn增量'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpni属性'
,
`sort_num`
int
(
10
)
DEFAULT
'0'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
263
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点表'
;
-- ----------------------------
-- Table structure for f_risk_source_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_equipment`
;
CREATE
TABLE
`f_risk_source_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`equipment_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'设备指标id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
13
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联重点设备表'
;
-- ----------------------------
-- Table structure for f_risk_source_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_point_inputitem`
;
CREATE
TABLE
`f_risk_source_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`point_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点id'
,
`point_inputitem_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点检查项id'
,
`status`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'检查项状态;合格/不合格/漏检'
,
`check_inputitem_id`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'检查项检查记录id(p_check_input 表id)'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
491
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联检查项表'
;
-- ----------------------------
-- Table structure for f_rpn_change_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_rpn_change_log`
;
CREATE
TABLE
`f_rpn_change_log`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmeaId'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'固有rpn'
,
`type`
int
(
11
)
DEFAULT
'0'
COMMENT
'变化类型:0-上升;1-下降'
,
`trigger_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'触发风险id'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
330
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'rpn变化流水表'
;
-- ----------------------------
-- Table structure for f_text_plan
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_text_plan`
;
CREATE
TABLE
`f_text_plan`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`app_id`
varchar
(
255
)
NOT
NULL
COMMENT
'预案id'
,
`text_name`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'文本预案名称'
,
`file_path`
varchar
(
255
)
NOT
NULL
COMMENT
'预案路径'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
88
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'文本预案'
;
-- ----------------------------
-- Table structure for f_topography_line
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_line`
;
CREATE
TABLE
`f_topography_line`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`clickable`
bit
(
1
)
DEFAULT
NULL
COMMENT
'可点击'
,
`from`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'起点'
,
`has_arrow`
bit
(
1
)
DEFAULT
NULL
COMMENT
'有箭头'
,
`is_dash`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是虚线'
,
`line_color`
int
(
11
)
DEFAULT
NULL
COMMENT
'线颜色'
,
`to`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'终点'
,
`from_port`
varchar
(
32
)
DEFAULT
NULL
,
`to_port`
varchar
(
32
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
`category`
varchar
(
32
)
DEFAULT
''
COMMENT
'类别'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node`
;
CREATE
TABLE
`f_topography_node`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`category`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'类别'
,
`group`
varchar
(
32
)
DEFAULT
''
COMMENT
'分组'
,
`is_group`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是否是组'
,
`key`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'key'
,
`loc`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`picture`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'图片'
,
`size`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'大小'
,
`source_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'资源id'
,
`text`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'文本'
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node_detail
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node_detail`
;
CREATE
TABLE
`f_topography_node_detail`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`node_detail`
text
COMMENT
'详情'
,
`nodeid`
varchar
(
36
)
DEFAULT
NULL
,
`nodekey`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'节点key'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_water_resource
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource`
;
CREATE
TABLE
`f_water_resource`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型: 1:消火栓,2:消防水池,3:喷淋'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
`max_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'最大液位'
,
`alarm_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'告警液位'
,
`area`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'水池面積'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
36
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源表'
;
-- ----------------------------
-- Table structure for f_water_resource_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource_equipment`
;
CREATE
TABLE
`f_water_resource_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`water_resource_id`
bigint
(
20
)
NOT
NULL
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`unit`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'单位'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源设备表'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for f_accident_type
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_accident_type`
;
CREATE
TABLE
`f_accident_type`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'事故类型'
,
`evaluation_sid`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'evaluation_model 中 type 为s 的id'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
20
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'事故类型表'
;
-- ----------------------------
-- Table structure for f_alarm
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_alarm`
;
CREATE
TABLE
`f_alarm`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'消防设备id'
,
`metric`
text
COMMENT
'指标'
,
`alarm_time`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'报警时间'
,
`alarm_type`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'报警类别:真实;误报'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'报警信息表'
;
-- ----------------------------
-- Table structure for f_dict
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_dict`
;
CREATE
TABLE
`f_dict`
(
`id`
bigint
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`dict_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`dict_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编码'
,
`parent_id`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'父ID'
,
`is_delete`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否已经删除'
,
`dict_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`dict_order`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'序号'
,
`remark`
longtext
COMMENT
'说明'
,
`dict_type`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
44
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for f_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment`
;
CREATE
TABLE
`f_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'设备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3位坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`charge_dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_user_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'责任人'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`fire_station_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'消防小室id'
,
`reserve_plan`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'预案配置'
,
`sort_num`
int
(
11
)
DEFAULT
NULL
,
`fire_truck_route`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'消防车到重点设备行车路线'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
80
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备表'
;
-- ----------------------------
-- Table structure for f_equipment_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment_fire_equipment`
;
CREATE
TABLE
`f_equipment_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
970
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备与消防设备关联中间表'
;
-- ----------------------------
-- Table structure for f_evaluation_model
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_evaluation_model`
;
CREATE
TABLE
`f_evaluation_model`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`standard`
text
COMMENT
'模型内容'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`coefficient`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'系数'
,
`influence`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'影响'
,
`describe`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'描述'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'类型:S,D,O'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
52
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'评价模型表'
;
-- ----------------------------
-- Table structure for f_fire_car
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_car`
;
CREATE
TABLE
`f_fire_car`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'部门id'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆类别'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`car_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车牌号'
,
`engine_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'发动机号'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂牌型号'
,
`country`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'国别'
,
`state`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆状态'
,
`performance_index`
longtext
COMMENT
'性能指标'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`photo_path`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'消防车图片路径'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
7
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防车表'
;
-- ----------------------------
-- Table structure for f_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment`
;
CREATE
TABLE
`f_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`equip_classify`
int
(
11
)
DEFAULT
'0'
COMMENT
'装备分类:0-设备类;1-耗材类;2-视频监控;3-灭火器材'
,
`equip_type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备类型'
,
`equip_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备编码'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'规格型号'
,
`maintenance_cycle`
int
(
11
)
DEFAULT
'0'
COMMENT
'保养周期'
,
`manufacturer`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂商'
,
`brand`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'品牌'
,
`production_date`
date
DEFAULT
NULL
COMMENT
'生产日期'
,
`effective_date`
date
DEFAULT
NULL
COMMENT
'有效时间'
,
`number`
int
(
11
)
DEFAULT
'0'
COMMENT
'数量'
,
`unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'单位'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`equip_status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
`video_url`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'视频路径'
,
`weight`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'重量'
,
`action_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'动作状态'
,
`eruption_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'喷发状态'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2833
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_data
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_data`
;
CREATE
TABLE
`f_fire_equipment_data`
(
`id`
bigint
(
20
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备id'
,
`fire_equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备信息地址id'
,
`eq_point_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标名称'
,
`eq_point_unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标单位'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'数据类型:alarm(报警),monitor(监测)'
,
`common_address`
int
(
11
)
DEFAULT
NULL
COMMENT
'公共地址'
,
`information_address`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'信息地址'
,
`e_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`data_type`
int
(
11
)
DEFAULT
NULL
COMMENT
'数据类型:浮点型,整数,布尔类型'
,
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`occur_time`
datetime
DEFAULT
NULL
COMMENT
'品质描述'
,
`quality`
longtext
,
`is_blocked`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被锁'
,
`isSubstituted`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被取代'
,
`isNotTopical`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否非当前值'
,
`isInvalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
`isOverflow`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否越界'
,
`soe`
int
(
11
)
DEFAULT
'0'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
varchar
(
255
)
DEFAULT
NULL
,
`eq_point_code`
varchar
(
225
)
DEFAULT
''
COMMENT
'点位编码'
,
`is_invalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14912
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_point`
;
CREATE
TABLE
`f_fire_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_by`
varchar
(
225
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建日期'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
NOT
NULL
COMMENT
'类型:模拟量ANALOGUE,开关量SWITCH'
,
`value`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'当前值保存时若为开关量(1,0)默认为1'
,
`unit`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'指标项名称'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
bigint
(
20
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5734
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备点表'
;
-- ----------------------------
-- Table structure for f_fire_station
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station`
;
CREATE
TABLE
`f_fire_station`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型 1:消防小室,2:消防泡沫间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
23
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点'
;
-- ----------------------------
-- Table structure for f_fire_station_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station_equipment`
;
CREATE
TABLE
`f_fire_station_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`unit`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
56
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_strength
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_strength`
;
CREATE
TABLE
`f_fire_strength`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`username`
varchar
(
50
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`position`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'职位'
,
`tel`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'固话'
,
`phone_num`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'移动号码'
,
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
40
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防力量'
;
-- ----------------------------
-- Table structure for f_fmea
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea`
;
CREATE
TABLE
`f_fmea`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`risk_factors_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险因素id'
,
`evaluation_sid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险程度'
,
`evaluation_oid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'故障频数'
,
`evaluation_did`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'探测度'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'固有rpn'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`new_evaluation_oid`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'最新故障频数'
,
`engineering`
text
COMMENT
'工程措施'
,
`management`
text
COMMENT
'管理措施'
,
`train`
text
COMMENT
'培训教育'
,
`protection`
text
COMMENT
'个体防护'
,
`disposal`
text
COMMENT
'应急处置'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`company_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'公司负责人'
,
`department_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'部门负责人'
,
`group_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'班组负责人'
,
`person_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'个人负责人'
,
`identify_user`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识人'
,
`identify_method`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识方法'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'风险等级id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
406
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'FEMA表'
;
-- ----------------------------
-- Table structure for f_fmea_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_equipment_point`
;
CREATE
TABLE
`f_fmea_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'装备指标编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'装备指标状态(0:正常;1:告警)'
,
`important_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'所属重点设备id'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
110
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和装备指标的关系'
;
-- ----------------------------
-- Table structure for f_fmea_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_point_inputitem`
;
CREATE
TABLE
`f_fmea_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`point_inputitem_id`
bigint
(
20
)
NOT
NULL
COMMENT
'检查点和项关系编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'检查项状态(0:正常;1:不合格)'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
151
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和检查项的关系'
;
-- ----------------------------
-- Table structure for f_preplan_picture
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_preplan_picture`
;
CREATE
TABLE
`f_preplan_picture`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备编号'
,
`type`
int
(
11
)
NOT
NULL
COMMENT
'类型'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`picture`
text
COMMENT
'图片路径地址'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
161
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备预案图'
;
-- ----------------------------
-- Table structure for f_risk_factor
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_factor`
;
CREATE
TABLE
`f_risk_factor`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
136
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'危险因素表'
;
-- ----------------------------
-- Table structure for f_risk_level
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_level`
;
CREATE
TABLE
`f_risk_level`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`level`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'等级'
,
`evaluation_model_id`
bigint
(
20
)
DEFAULT
'1'
COMMENT
'评价模型id'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`top_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'上限'
,
`down_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'下限'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
6
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险等级表'
;
-- ----------------------------
-- Table structure for f_risk_source
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source`
;
CREATE
TABLE
`f_risk_source`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`parent_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'上级编号id'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`is_region`
varchar
(
16
)
DEFAULT
NULL
,
`status`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'状态(正常NORMAL,异常ANOMALY)'
,
`increment`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpn增量'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpni属性'
,
`sort_num`
int
(
10
)
DEFAULT
'0'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
263
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点表'
;
-- ----------------------------
-- Table structure for f_risk_source_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_equipment`
;
CREATE
TABLE
`f_risk_source_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`equipment_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'设备指标id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
13
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联重点设备表'
;
-- ----------------------------
-- Table structure for f_risk_source_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_point_inputitem`
;
CREATE
TABLE
`f_risk_source_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`point_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点id'
,
`point_inputitem_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点检查项id'
,
`status`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'检查项状态;合格/不合格/漏检'
,
`check_inputitem_id`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'检查项检查记录id(p_check_input 表id)'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
491
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联检查项表'
;
-- ----------------------------
-- Table structure for f_rpn_change_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_rpn_change_log`
;
CREATE
TABLE
`f_rpn_change_log`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmeaId'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'固有rpn'
,
`type`
int
(
11
)
DEFAULT
'0'
COMMENT
'变化类型:0-上升;1-下降'
,
`trigger_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'触发风险id'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
330
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'rpn变化流水表'
;
-- ----------------------------
-- Table structure for f_text_plan
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_text_plan`
;
CREATE
TABLE
`f_text_plan`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`app_id`
varchar
(
255
)
NOT
NULL
COMMENT
'预案id'
,
`text_name`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'文本预案名称'
,
`file_path`
varchar
(
255
)
NOT
NULL
COMMENT
'预案路径'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
88
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'文本预案'
;
-- ----------------------------
-- Table structure for f_topography_line
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_line`
;
CREATE
TABLE
`f_topography_line`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`clickable`
bit
(
1
)
DEFAULT
NULL
COMMENT
'可点击'
,
`from`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'起点'
,
`has_arrow`
bit
(
1
)
DEFAULT
NULL
COMMENT
'有箭头'
,
`is_dash`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是虚线'
,
`line_color`
int
(
11
)
DEFAULT
NULL
COMMENT
'线颜色'
,
`to`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'终点'
,
`from_port`
varchar
(
32
)
DEFAULT
NULL
,
`to_port`
varchar
(
32
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
`category`
varchar
(
32
)
DEFAULT
''
COMMENT
'类别'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node`
;
CREATE
TABLE
`f_topography_node`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`category`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'类别'
,
`group`
varchar
(
32
)
DEFAULT
''
COMMENT
'分组'
,
`is_group`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是否是组'
,
`key`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'key'
,
`loc`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`picture`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'图片'
,
`size`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'大小'
,
`source_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'资源id'
,
`text`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'文本'
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node_detail
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node_detail`
;
CREATE
TABLE
`f_topography_node_detail`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`node_detail`
text
COMMENT
'详情'
,
`nodeid`
varchar
(
36
)
DEFAULT
NULL
,
`nodekey`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'节点key'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_water_resource
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource`
;
CREATE
TABLE
`f_water_resource`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型: 1:消火栓,2:消防水池,3:喷淋'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
`max_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'最大液位'
,
`alarm_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'告警液位'
,
`area`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'水池面積'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
36
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源表'
;
-- ----------------------------
-- Table structure for f_water_resource_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource_equipment`
;
CREATE
TABLE
`f_water_resource_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`water_resource_id`
bigint
(
20
)
NOT
NULL
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`unit`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'单位'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源设备表'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_accident_type.xml
View file @
0cb2f733
...
...
@@ -8,8 +8,6 @@
count(1) AS total_num
FROM
f_accident_type a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
...
...
@@ -21,15 +19,12 @@
a.name,
a.influence,
a.severity,
c.id as deptId ,
c.department_name as deptName,
b.name as userName ,
a.dept_id as deptId ,
a.create_by as createBy ,
a.create_date as createDate,
a.remark
FROM
f_accident_type a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
...
...
@@ -46,17 +41,14 @@
a.name,
CONCAT(fem.influence,'-',fem.`describe`) as influence,
fem.coefficient as severity,
c.id as deptId ,
c.department_name as deptName,
b.name as userName ,
a.dept_id as deptId ,
a.create_by as createBy ,
a.create_date as createDate,
a.evaluation_sid as evaluationSid,
a.remark
FROM
f_accident_type a
left join f_evaluation_model fem on fem.id = a.evaluation_sid
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
View file @
0cb2f733
...
...
@@ -27,7 +27,6 @@
a.remark,
a.create_by createBy,
date_format(a.create_date , '%Y-%m-%d %H:%i:%s') as createDate,
d.department_name AS departmentName,
a.performance_index AS performanceIndex,
a.floor3d,
a.org_code AS orgCode,
...
...
@@ -36,7 +35,6 @@
rs.name riskSourceName
FROM
f_fire_car a
LEFT JOIN s_department d ON d.id = a.dept_id
LEFT JOIN f_risk_source rs on rs.id = a.risk_source_id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and (a.name like concat(concat("%",#{name}),"%") or a.type like concat(concat("%",#{name}),"%"))
</if>
...
...
@@ -65,7 +63,6 @@
a.create_date,
'%Y-%m-%d %H:%i:%s'
) AS createDate,
d.department_name AS departmentName,
a.performance_index AS performanceIndex,
a.floor3d,
a.is_indoor as isIndoor,
...
...
@@ -75,7 +72,6 @@
a.risk_source_id as riskSourceId
FROM
f_fire_car a
LEFT JOIN s_department d ON d.id = a.dept_id
WHERE 1=1
<if
test=
"truckId!=null"
>
AND a.id = #{truckId}
</if>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
0cb2f733
...
...
@@ -297,13 +297,9 @@
eq.`code`,
eq.address,
fs.`name` stationName,
sd.department_name depName,
su.`name` username,
su.telephone tel
eq.charge_user_id userId
FROM
f_equipment eq
LEFT JOIN s_user su ON su.id = eq.charge_user_id
LEFT JOIN s_department sd ON sd.id = su.department_id
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
WHERE 1=1
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
View file @
0cb2f733
...
...
@@ -45,16 +45,16 @@
fm.department_leader as departmentLeader,
fm.group_leader as groupLeader,
fm.person_leader as personLeader,
(select name from s_user where id = fm.company_leader) as companyLeaderName,
(select name from s_user where id = fm.department_leader) as departmentLeaderName,
(select name from s_user where id = fm.group_leader) as groupLeaderName,
(select name from s_user where id = fm.person_leader) as personLeaderName,
fm.company_leader as companyLeaderId,
fm.department_leader as departmentLeaderId,
fm.group_leader as groupLeaderId,
fm.person_leader as personLeaderId,
fm.identify_user as identifyUserId,
rf.`name` AS riskFactorName,
fat.`name` AS accidentTypeName,
fat.id AS accidentTypeId,
concat(fems.influence,'-',fems.describe) as influence,
fm.identify_user as identifyUser,
(select name from s_user where id = fm.identify_user) as identifyUserName,
fm.identify_method as identifyMethod,
fr.name AS level
FROM
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
View file @
0cb2f733
...
...
@@ -54,10 +54,6 @@
p_input_item as pii on pii.id = b.input_item_id
left join
p_point as pp on pp.id = b.point_id
left join
s_user as su on su.id = pp.charge_person_id
left join
s_department as sd on sd.id = pp.charge_dept_id
where
a.fmea_id = #{fmeaId}
group by b.point_id
...
...
@@ -74,9 +70,8 @@
pp.id as pointId,
pp.point_no as pointNo,
pp.name as pointName,
sd.department_name as depName,
su.name as username,
su.telephone as tel,
pp.charge_person_id as userId,
pp.charge_dept_id as deptId,
group_concat(concat(pii.name, '##', a.state) SEPARATOR
<![CDATA[ '\n' ]]>
) as inputItems
from
f_fmea_point_inputitem a
...
...
@@ -86,10 +81,6 @@
p_input_item as pii on pii.id = b.input_item_id
left join
p_point as pp on pp.id = b.point_id
left join
s_user as su on su.id = pp.charge_person_id
left join
s_department as sd on sd.id = pp.charge_dept_id
where
a.fmea_id = #{fmeaId}
group by b.point_id
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_factor.xml
View file @
0cb2f733
...
...
@@ -21,14 +21,11 @@
d.name as accidentName,
a.type,
a.dept_id as deptId,
c.department_name as deptName,
b.name as userName,
a.create_by as createBy,
a.create_date as createDate,
a.remark
FROM
f_risk_factor a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
left join f_accident_type d on a.accident_type_id = d.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_level.xml
View file @
0cb2f733
...
...
@@ -23,12 +23,12 @@
a.severity,
a.name,
a.color,
b.name as userName
,
a.create_by as createBy
,
a.create_date as createDate,
a.remark
a.remark,
a.manage_level as manageLevel
FROM
f_risk_level a
left join s_user b on a.create_by = b.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"evalModelId!=null"
>
and a.evaluation_model_id = #{evalModelId}
</if>
</trim>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
0cb2f733
...
...
@@ -331,16 +331,13 @@
pp.id pointId,
pp.point_no pointNo,
pp.`name` pointName,
sd.department_name depName,
su.`name` username,
su.telephone tel,
pp.charge_person_id userId,
pp.charge_dept_id deptId,
GROUP_CONCAT(pii.`name`) inputItems
FROM
`f_risk_source_point_inputitem` rspi
LEFT JOIN p_point pp ON pp.id = rspi.point_id
LEFT JOIN p_input_item pii ON pii.id = rspi.point_inputitem_id
LEFT JOIN s_user su ON su.id = pp.charge_person_id
LEFT JOIN s_department sd ON sd.id = pp.charge_dept_id
WHERE pii.`name` is not NULL
AND rspi.risk_source_id = #{riskSourceId}
GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone
...
...
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