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
4f6fa381
Commit
4f6fa381
authored
Feb 13, 2020
by
taabe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feture-xkq' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into develop
parents
959c7e9b
31395915
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
2399 additions
and
1851 deletions
+2399
-1851
Alarm.java
.../src/main/java/com/yeejoin/amos/fas/dao/entity/Alarm.java
+92
-93
EquipmentFireEquipment.java
...m/yeejoin/amos/fas/dao/entity/EquipmentFireEquipment.java
+23
-25
Fmea.java
...n/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
+189
-125
FmeaEquipmentPoint.java
...a/com/yeejoin/amos/fas/dao/entity/FmeaEquipmentPoint.java
+51
-0
FmeaPointInputitem.java
...a/com/yeejoin/amos/fas/dao/entity/FmeaPointInputitem.java
+51
-0
PreplanPicture.java
.../java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
+52
-54
RiskLevel.java
.../main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
+93
-71
RiskSource.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
+0
-20
RiskSourceEquipment.java
.../com/yeejoin/amos/fas/dao/entity/RiskSourceEquipment.java
+0
-83
RiskSourcePointInputitem.java
...yeejoin/amos/fas/dao/entity/RiskSourcePointInputitem.java
+0
-112
RpnChangeLog.java
...in/java/com/yeejoin/amos/fas/dao/entity/RpnChangeLog.java
+74
-66
SCompany.java
...c/main/java/com/yeejoin/amos/fas/dao/entity/SCompany.java
+167
-168
SDepartment.java
...ain/java/com/yeejoin/amos/fas/dao/entity/SDepartment.java
+95
-96
SUser.java
.../src/main/java/com/yeejoin/amos/fas/dao/entity/SUser.java
+170
-171
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+3
-4
RiskModelController.java
...oin/amos/fas/business/controller/RiskModelController.java
+12
-10
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+55
-72
FireEquipMapper.java
...yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
+10
-0
FmeaEquipmentPointMapper.java
...mos/fas/business/dao/mapper/FmeaEquipmentPointMapper.java
+33
-0
FmeaMapper.java
.../com/yeejoin/amos/fas/business/dao/mapper/FmeaMapper.java
+29
-24
FmeaPointInputitemMapper.java
...mos/fas/business/dao/mapper/FmeaPointInputitemMapper.java
+33
-0
RiskSourceEquimentMapper.java
...mos/fas/business/dao/mapper/RiskSourceEquimentMapper.java
+0
-39
RiskSourceMapper.java
...eejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
+1
-7
IDeptmentDao.java
...eejoin/amos/fas/business/dao/repository/IDeptmentDao.java
+1
-2
IEquipmentFireEquipmentDao.java
...s/business/dao/repository/IEquipmentFireEquipmentDao.java
+10
-13
IPreplanPictureDao.java
.../amos/fas/business/dao/repository/IPreplanPictureDao.java
+5
-7
IRiskSourceEquipmentDao.java
.../fas/business/dao/repository/IRiskSourceEquipmentDao.java
+18
-18
IRiskSourcePointInputitemDao.java
...business/dao/repository/IRiskSourcePointInputitemDao.java
+20
-20
IUserDao.java
...om/yeejoin/amos/fas/business/dao/repository/IUserDao.java
+1
-2
FmeaBindParam.java
...va/com/yeejoin/amos/fas/business/param/FmeaBindParam.java
+56
-0
FmeaParam.java
...n/java/com/yeejoin/amos/fas/business/param/FmeaParam.java
+16
-0
PointListParam.java
...a/com/yeejoin/amos/fas/business/param/PointListParam.java
+5
-5
QueryParamUtil.java
...a/com/yeejoin/amos/fas/business/param/QueryParamUtil.java
+2
-2
RiskSourceParam.java
.../com/yeejoin/amos/fas/business/param/RiskSourceParam.java
+0
-16
CommonService.java
...yeejoin/amos/fas/business/service/impl/CommonService.java
+2
-3
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+6
-10
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+25
-11
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+424
-218
IEquipmentService.java
...in/amos/fas/business/service/intfc/IEquipmentService.java
+4
-6
IFmeaService.java
...yeejoin/amos/fas/business/service/intfc/IFmeaService.java
+1
-1
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+14
-70
CheckInputItemRo.java
...oin/amos/fas/business/service/model/CheckInputItemRo.java
+57
-0
ProtalDataRo.java
...yeejoin/amos/fas/business/service/model/ProtalDataRo.java
+6
-12
JexlUtil.java
...ain/java/com/yeejoin/amos/fas/business/util/JexlUtil.java
+18
-0
FmeaMessage.java
.../java/com/yeejoin/amos/fas/client/invoke/FmeaMessage.java
+29
-0
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+58
-53
dbTemplate_common.xml
...sStart/src/main/resources/db/mapper/dbTemplate_common.xml
+5
-4
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+34
-0
dbTemplate_fmea.xml
...SysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
+39
-0
dbTemplate_fmea_equipment_point.xml
...n/resources/db/mapper/dbTemplate_fmea_equipment_point.xml
+154
-0
dbTemplate_fmea_point_inputitem.xml
...n/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
+148
-0
dbTemplate_risk_level.xml
...rt/src/main/resources/db/mapper/dbTemplate_risk_level.xml
+2
-0
dbTemplate_risk_source_fireequiment.xml
...sources/db/mapper/dbTemplate_risk_source_fireequiment.xml
+0
-137
pom.xml
pom.xml
+6
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Alarm.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.Lob
;
...
@@ -10,101 +7,102 @@ import javax.persistence.NamedQuery;
...
@@ -10,101 +7,102 @@ import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
javax.persistence.TemporalType
;
import
java.util.Date
;
/**
/**
* The persistent class for the alarm database table.
* The persistent class for the alarm database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_alarm"
)
@Table
(
name
=
"f_alarm"
)
@NamedQuery
(
name
=
"Alarm.findAll"
,
query
=
"SELECT a FROM Alarm a"
)
@NamedQuery
(
name
=
"Alarm.findAll"
,
query
=
"SELECT a FROM Alarm a"
)
public
class
Alarm
extends
BasicEntity
{
public
class
Alarm
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"alarm_time"
)
@Column
(
name
=
"alarm_time"
)
private
Date
alarmTime
;
private
Date
alarmTime
;
/**
/**
* 指标或者报警信息
* 指标或者报警信息
*/
*/
@Lob
@Lob
private
String
metric
;
private
String
metric
;
private
String
code
;
private
String
code
;
/**
/**
* 报警类别
* 报警类别
*/
*/
@Column
(
name
=
"alarm_type"
)
@Column
(
name
=
"alarm_type"
)
private
String
alarmType
;
private
String
alarmType
;
@Column
(
name
=
"fire_equipment_id"
)
@Column
(
name
=
"fire_equipment_id"
)
private
BigInteger
fireEquipmentId
;
private
Long
fireEquipmentId
;
@Column
(
name
=
"org_code"
)
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
private
String
remark
;
private
String
remark
;
public
Alarm
()
{
public
Alarm
()
{
}
}
public
Date
getAlarmTime
()
{
public
Date
getAlarmTime
()
{
return
this
.
alarmTime
;
return
this
.
alarmTime
;
}
}
public
void
setAlarmTime
(
Date
alarmTime
)
{
public
void
setAlarmTime
(
Date
alarmTime
)
{
this
.
alarmTime
=
alarmTime
;
this
.
alarmTime
=
alarmTime
;
}
}
public
String
getCode
()
{
public
String
getCode
()
{
return
this
.
code
;
return
this
.
code
;
}
}
public
void
setCode
(
String
code
)
{
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
public
BigInteger
getFireEquipmentId
()
{
public
Long
getFireEquipmentId
()
{
return
this
.
fireEquipmentId
;
return
this
.
fireEquipmentId
;
}
}
public
void
setFireEquipmentId
(
BigInteger
fireEquipmentId
)
{
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
this
.
fireEquipmentId
=
fireEquipmentId
;
}
}
public
String
getOrgCode
()
{
public
String
getOrgCode
()
{
return
this
.
orgCode
;
return
this
.
orgCode
;
}
}
public
void
setOrgCode
(
String
orgCode
)
{
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
this
.
remark
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getMetric
()
{
return
metric
;
public
String
getMetric
()
{
}
return
metric
;
}
public
void
setMetric
(
String
metric
)
{
this
.
metric
=
metric
;
public
void
setMetric
(
String
metric
)
{
}
this
.
metric
=
metric
;
}
public
String
getAlarmType
()
{
return
alarmType
;
public
String
getAlarmType
()
{
}
return
alarmType
;
}
public
void
setAlarmType
(
String
alarmType
)
{
this
.
alarmType
=
alarmType
;
public
void
setAlarmType
(
String
alarmType
)
{
}
this
.
alarmType
=
alarmType
;
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EquipmentFireEquipment.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.math.BigInteger
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
...
@@ -10,38 +8,37 @@ import javax.persistence.Table;
...
@@ -10,38 +8,37 @@ import javax.persistence.Table;
/**
/**
* The persistent class for the equipment_fire_equipment database table.
* The persistent class for the equipment_fire_equipment database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_equipment_fire_equipment"
)
@Table
(
name
=
"f_equipment_fire_equipment"
)
@NamedQuery
(
name
=
"EquipmentFireEquipment.findAll"
,
query
=
"SELECT e FROM EquipmentFireEquipment e"
)
@NamedQuery
(
name
=
"EquipmentFireEquipment.findAll"
,
query
=
"SELECT e FROM EquipmentFireEquipment e"
)
public
class
EquipmentFireEquipment
extends
BasicEntity
{
public
class
EquipmentFireEquipment
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"equipment_id"
)
@Column
(
name
=
"equipment_id"
)
private
BigInteger
equipmentId
;
private
Long
equipmentId
;
@Column
(
name
=
"fire_equipment_id"
)
@Column
(
name
=
"fire_equipment_id"
)
private
BigInteger
fireEquipmentId
;
private
Long
fireEquipmentId
;
public
EquipmentFireEquipment
()
{
public
EquipmentFireEquipment
()
{
}
}
public
BigInteger
getEquipmentId
()
{
public
Long
getEquipmentId
()
{
return
this
.
equipmentId
;
return
this
.
equipmentId
;
}
}
public
void
setEquipmentId
(
BigInteger
equipmentId
)
{
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
this
.
equipmentId
=
equipmentId
;
}
}
public
BigInteger
getFireEquipmentId
()
{
public
Long
getFireEquipmentId
()
{
return
this
.
fireEquipmentId
;
return
this
.
fireEquipmentId
;
}
}
public
void
setFireEquipmentId
(
BigInteger
fireEquipmentId
)
{
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
this
.
fireEquipmentId
=
fireEquipmentId
;
}
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
java.math.BigInteger
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
@@ -10,175 +9,239 @@ import javax.persistence.Lob;
...
@@ -10,175 +9,239 @@ import javax.persistence.Lob;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
java.math.BigDecimal
;
/**
/**
* The persistent class for the fmea database table.
* The persistent class for the fmea database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_fmea"
)
@Table
(
name
=
"f_fmea"
)
@NamedQuery
(
name
=
"Fmea.findAll"
,
query
=
"SELECT f FROM Fmea f"
)
@NamedQuery
(
name
=
"Fmea.findAll"
,
query
=
"SELECT f FROM Fmea f"
)
public
class
Fmea
extends
BasicEntity
{
public
class
Fmea
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
private
int
createBy
;
@Lob
private
String
disposal
;
@Lob
private
String
engineering
;
@Column
(
name
=
"create_by
"
)
@Column
(
name
=
"evaluation_did
"
)
private
int
createBy
;
private
Long
evaluationDid
;
@Lob
@Column
(
name
=
"evaluation_oid"
)
private
String
disposal
;
private
Long
evaluationOid
;
@Lob
@Column
(
name
=
"evaluation_sid"
)
private
String
engineering
;
private
Long
evaluationSid
;
@Column
(
name
=
"evaluation_d
id"
)
@Column
(
name
=
"new_evaluation_o
id"
)
private
BigInteger
evaluationD
id
;
private
Long
newEvaluationO
id
;
@Column
(
name
=
"evaluation_oid
"
)
@Column
(
name
=
"rpn
"
)
private
BigInteger
evaluationOid
;
private
BigDecimal
rpn
;
@Column
(
name
=
"evaluation_oid"
)
private
String
didValue
;
private
BigInteger
evaluationSid
;
@Lob
private
String
oidValue
;
private
String
management
;
@Lob
private
String
newOidValue
;
private
String
protection
;
private
String
remark
;
private
String
sidValue
;
@Column
(
name
=
"risk_factors_id"
)
@Lob
private
Long
riskFactorsId
;
private
String
management
;
@Column
(
name
=
"risk_source_id"
)
@Lob
private
Long
riskSourceId
;
private
String
protection
;
private
BigDecimal
rpni
;
private
String
remark
;
@Lob
@Column
(
name
=
"risk_factors_id"
)
private
String
train
;
private
Long
riskFactorsId
;
private
RiskSource
riskSource
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
public
Fmea
()
{
}
public
int
getCreateBy
()
{
private
BigDecimal
rpni
;
return
this
.
createBy
;
}
public
void
setCreateBy
(
int
createBy
)
{
@Lob
this
.
createBy
=
createBy
;
private
String
train
;
}
public
String
getDisposal
()
{
private
RiskSource
riskSource
;
return
this
.
disposal
;
}
public
void
setDisposal
(
String
disposal
)
{
public
Fmea
()
{
this
.
disposal
=
disposal
;
}
}
public
String
getEngineering
()
{
public
int
getCreateBy
()
{
return
this
.
engineering
;
return
this
.
createBy
;
}
}
public
void
setEngineering
(
String
engineering
)
{
public
void
setCreateBy
(
int
createBy
)
{
this
.
engineering
=
engineering
;
this
.
createBy
=
createBy
;
}
}
public
BigInteger
getEvaluationDid
()
{
public
String
getDisposal
()
{
return
this
.
evaluationDid
;
return
this
.
disposal
;
}
}
public
void
setEvaluationDid
(
BigInteger
evaluationDid
)
{
public
void
setDisposal
(
String
disposal
)
{
this
.
evaluationDid
=
evaluationDid
;
this
.
disposal
=
disposal
;
}
}
public
BigInteger
getEvaluationOid
()
{
public
String
getEngineering
()
{
return
this
.
evaluationOid
;
return
this
.
engineering
;
}
}
public
void
setEvaluationOid
(
BigInteger
evaluationOid
)
{
public
void
setEngineering
(
String
engineering
)
{
this
.
evaluationOid
=
evaluationOid
;
this
.
engineering
=
engineering
;
}
}
public
BigInteger
getEvaluationS
id
()
{
public
Long
getEvaluationD
id
()
{
return
this
.
evaluationS
id
;
return
this
.
evaluationD
id
;
}
}
public
void
setEvaluationSid
(
BigInteger
evaluationS
id
)
{
public
void
setEvaluationDid
(
Long
evaluationD
id
)
{
this
.
evaluationSid
=
evaluationS
id
;
this
.
evaluationDid
=
evaluationD
id
;
}
}
public
String
getManagement
()
{
public
Long
getEvaluationOid
()
{
return
this
.
management
;
return
this
.
evaluationOid
;
}
}
public
void
setManagement
(
String
management
)
{
public
void
setEvaluationOid
(
Long
evaluationOid
)
{
this
.
management
=
management
;
this
.
evaluationOid
=
evaluationOid
;
}
}
public
String
getProtection
()
{
public
Long
getEvaluationSid
()
{
return
this
.
protection
;
return
this
.
evaluationSid
;
}
}
public
void
setProtection
(
String
protection
)
{
public
void
setEvaluationSid
(
Long
evaluationSid
)
{
this
.
protection
=
protection
;
this
.
evaluationSid
=
evaluationSid
;
}
}
public
String
getRemark
()
{
public
String
getManagement
()
{
return
this
.
remark
;
return
this
.
management
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setManagement
(
String
management
)
{
this
.
remark
=
remark
;
this
.
management
=
management
;
}
}
public
Long
getRiskFactorsId
()
{
public
String
getProtection
()
{
return
this
.
riskFactorsId
;
return
this
.
protection
;
}
}
public
void
setRiskFactorsId
(
Long
riskFactorsId
)
{
public
void
setProtection
(
String
protection
)
{
this
.
riskFactorsId
=
riskFactorsId
;
this
.
protection
=
protection
;
}
}
public
Long
getRiskSourceId
()
{
public
String
getRemark
()
{
return
this
.
riskSourceId
;
return
this
.
remark
;
}
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
public
void
setRemark
(
String
remark
)
{
this
.
riskSourceId
=
riskSourceId
;
this
.
remark
=
remark
;
}
}
public
BigDecimal
getRpni
()
{
public
Long
getRiskFactorsId
()
{
return
this
.
rpni
;
return
this
.
riskFactorsId
;
}
}
public
void
setRpni
(
BigDecimal
rpni
)
{
public
void
setRiskFactorsId
(
Long
riskFactorsId
)
{
this
.
rpni
=
rpni
;
this
.
riskFactorsId
=
riskFactorsId
;
}
}
public
String
getTrain
()
{
return
this
.
train
;
}
public
void
setTrain
(
String
train
)
{
public
Long
getRiskSourceId
(
)
{
this
.
train
=
train
;
return
this
.
riskSourceId
;
}
}
@ManyToOne
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
this
.
riskSourceId
=
riskSourceId
;
public
RiskSource
getRiskSource
()
{
}
return
riskSource
;
}
@JsonBackReference
public
BigDecimal
getRpni
()
{
public
void
setRiskSource
(
RiskSource
riskSource
)
{
return
this
.
rpni
;
this
.
riskSource
=
riskSource
;
}
}
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
;
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FmeaEquipmentPoint.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//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 f_fmea_equipment_point database table.
*/
@Entity
@Table
(
name
=
"f_fmea_equipment_point"
)
@NamedQuery
(
name
=
"FmeaEquipmentPoint.findAll"
,
query
=
"SELECT r FROM FmeaEquipmentPoint r"
)
public
class
FmeaEquipmentPoint
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"equipment_point_id"
)
private
Long
equipmentPointId
;
@Column
(
name
=
"fmea_id"
)
private
Long
fmeaId
;
@Column
(
name
=
"state"
)
private
Integer
state
;
public
Long
getEquipmentPointId
()
{
return
equipmentPointId
;
}
public
void
setEquipmentPointId
(
Long
equipmentPointId
)
{
this
.
equipmentPointId
=
equipmentPointId
;
}
public
Long
getFmeaId
()
{
return
fmeaId
;
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
public
Integer
getState
()
{
return
state
;
}
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FmeaPointInputitem.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//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 f_fmea_point_inputitem database table.
*/
@Entity
@Table
(
name
=
"f_fmea_point_inputitem"
)
@NamedQuery
(
name
=
"FmeaPointInputitem.findAll"
,
query
=
"SELECT r FROM FmeaPointInputitem r"
)
public
class
FmeaPointInputitem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"point_inputitem_id"
)
private
Long
PointInputitemId
;
@Column
(
name
=
"fmea_id"
)
private
Long
fmeaId
;
@Column
(
name
=
"state"
)
private
Integer
state
;
public
Long
getPointInputitemId
()
{
return
PointInputitemId
;
}
public
void
setPointInputitemId
(
Long
pointInputitemId
)
{
PointInputitemId
=
pointInputitemId
;
}
public
Long
getFmeaId
()
{
return
fmeaId
;
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
public
Integer
getState
()
{
return
state
;
}
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.math.BigInteger
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.Lob
;
...
@@ -11,78 +9,77 @@ import javax.persistence.Table;
...
@@ -11,78 +9,77 @@ import javax.persistence.Table;
/**
/**
* The persistent class for the preplan_picture database table.
* The persistent class for the preplan_picture database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_preplan_picture"
)
@Table
(
name
=
"f_preplan_picture"
)
@NamedQuery
(
name
=
"PreplanPicture.findAll"
,
query
=
"SELECT p FROM PreplanPicture p"
)
@NamedQuery
(
name
=
"PreplanPicture.findAll"
,
query
=
"SELECT p FROM PreplanPicture p"
)
public
class
PreplanPicture
extends
BasicEntity
{
public
class
PreplanPicture
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
int
createBy
;
@Column
(
name
=
"equipment_id"
)
@Column
(
name
=
"equipment_id"
)
private
BigInteger
equipmentId
;
private
Long
equipmentId
;
private
String
name
;
private
String
name
;
@Lob
@Lob
private
String
picture
;
private
String
picture
;
private
String
remark
;
private
String
remark
;
private
int
type
;
private
int
type
;
public
PreplanPicture
()
{
public
PreplanPicture
()
{
}
}
public
int
getCreateBy
()
{
public
int
getCreateBy
()
{
return
this
.
createBy
;
return
this
.
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
int
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
public
BigInteger
getEquipmentId
()
{
public
Long
getEquipmentId
()
{
return
this
.
equipmentId
;
return
this
.
equipmentId
;
}
}
public
void
setEquipmentId
(
BigInteger
equipmentId
)
{
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
this
.
equipmentId
=
equipmentId
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getPicture
()
{
public
String
getPicture
()
{
return
this
.
picture
;
return
this
.
picture
;
}
}
public
void
setPicture
(
String
picture
)
{
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
this
.
picture
=
picture
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
this
.
remark
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
int
getType
()
{
public
int
getType
()
{
return
this
.
type
;
return
this
.
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
View file @
4f6fa381
...
@@ -4,104 +4,125 @@ import javax.persistence.Column;
...
@@ -4,104 +4,125 @@ import javax.persistence.Column;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
/**
/**
* The persistent class for the risk_level database table.
* The persistent class for the risk_level database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_risk_level"
)
@Table
(
name
=
"f_risk_level"
)
@NamedQuery
(
name
=
"RiskLevel.findAll"
,
query
=
"SELECT r FROM RiskLevel r"
)
@NamedQuery
(
name
=
"RiskLevel.findAll"
,
query
=
"SELECT r FROM RiskLevel r"
)
public
class
RiskLevel
extends
BasicEntity
{
public
class
RiskLevel
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
String
color
;
private
String
color
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
private
Long
createBy
;
@Column
(
name
=
"evaluation_model_id"
)
@Column
(
name
=
"evaluation_model_id"
)
private
Long
evaluationModelId
;
private
Long
evaluationModelId
;
@Column
(
name
=
"name"
)
private
String
name
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
@Column
(
name
=
"name"
)
this
.
name
=
name
;
private
String
name
;
}
@Column
(
name
=
"level"
)
public
String
getName
()
{
private
Integer
level
;
return
name
;
}
@Column
(
name
=
"org_code"
)
public
void
setName
(
String
name
)
{
private
String
orgCode
;
this
.
name
=
name
;
}
private
String
remark
;
@Column
(
name
=
"level"
)
private
Integer
level
;
private
String
severity
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
public
RiskLevel
()
{
@Column
(
name
=
"top_limit"
)
}
private
BigDecimal
topLimit
;
public
String
getColor
()
{
@Column
(
name
=
"down_limit"
)
return
this
.
color
;
private
BigDecimal
downLimit
;
}
public
void
setColor
(
String
color
)
{
private
String
remark
;
this
.
color
=
color
;
}
public
Long
getCreateBy
()
{
private
String
severity
;
return
this
.
createBy
;
}
public
void
setCreateBy
(
Long
createBy
)
{
public
RiskLevel
()
{
this
.
createBy
=
createBy
;
}
}
public
Integer
getLevel
()
{
public
String
getColor
()
{
return
this
.
level
;
return
this
.
color
;
}
}
public
void
setLevel
(
Integer
level
)
{
public
void
setColor
(
String
color
)
{
this
.
level
=
level
;
this
.
color
=
color
;
}
}
public
String
getOrgCode
()
{
public
Long
getCreateBy
()
{
return
this
.
orgCode
;
return
this
.
createBy
;
}
}
public
void
setOrgCode
(
String
orgCode
)
{
public
void
setCreateBy
(
Long
createBy
)
{
this
.
orgCode
=
orgCode
;
this
.
createBy
=
createBy
;
}
}
public
String
getRemark
()
{
public
Integer
getLevel
()
{
return
this
.
remark
;
return
this
.
level
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setLevel
(
Integer
level
)
{
this
.
remark
=
remark
;
this
.
level
=
level
;
}
}
public
String
getSeverity
()
{
public
String
getOrgCode
()
{
return
this
.
severity
;
return
this
.
orgCode
;
}
}
public
void
setSeverity
(
String
severity
)
{
public
void
setOrgCode
(
String
orgCode
)
{
this
.
severity
=
severity
;
this
.
orgCode
=
orgCode
;
}
}
public
Long
getEvaluationModelId
()
{
return
evaluationModelId
;
}
public
void
setEvaluationModelId
(
Long
evaluationModelId
)
{
public
String
getRemark
(
)
{
this
.
evaluationModelId
=
evaluationModelId
;
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
;
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
View file @
4f6fa381
...
@@ -56,8 +56,6 @@ public class RiskSource extends BasicEntity {
...
@@ -56,8 +56,6 @@ public class RiskSource extends BasicEntity {
private
BigDecimal
increment
;
private
BigDecimal
increment
;
private
List
<
Fmea
>
fmeaList
;
private
List
<
Fmea
>
fmeaList
;
private
List
<
RiskSourceEquipment
>
riskSourceEquipment
;
private
List
<
RiskSourcePointInputitem
>
riskSourcePointInputitem
;
private
List
<
RpnChangeLog
>
rpnChangeLogList
;
private
List
<
RpnChangeLog
>
rpnChangeLogList
;
...
@@ -173,15 +171,6 @@ public class RiskSource extends BasicEntity {
...
@@ -173,15 +171,6 @@ public class RiskSource extends BasicEntity {
}
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
RiskSourceEquipment
>
getRiskSourceEquipment
()
{
return
riskSourceEquipment
;
}
public
void
setRiskSourceEquipment
(
List
<
RiskSourceEquipment
>
riskSourceEquipment
)
{
this
.
riskSourceEquipment
=
riskSourceEquipment
;
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
RpnChangeLog
>
getRpnChangeLogList
()
{
public
List
<
RpnChangeLog
>
getRpnChangeLogList
()
{
return
rpnChangeLogList
;
return
rpnChangeLogList
;
}
}
...
@@ -190,15 +179,6 @@ public class RiskSource extends BasicEntity {
...
@@ -190,15 +179,6 @@ public class RiskSource extends BasicEntity {
this
.
rpnChangeLogList
=
rpnChangeLogList
;
this
.
rpnChangeLogList
=
rpnChangeLogList
;
}
}
@OneToMany
(
mappedBy
=
"riskSource"
,
cascade
=
{
CascadeType
.
REMOVE
})
public
List
<
RiskSourcePointInputitem
>
getRiskSourcePointInputitem
()
{
return
riskSourcePointInputitem
;
}
public
void
setRiskSourcePointInputitem
(
List
<
RiskSourcePointInputitem
>
riskSourcePointInputitem
)
{
this
.
riskSourcePointInputitem
=
riskSourcePointInputitem
;
}
public
String
getPosition3d
()
{
public
String
getPosition3d
()
{
return
position3d
;
return
position3d
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSourceEquipment.java
deleted
100644 → 0
View file @
959c7e9b
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
/**
* The persistent class for the risk_source_equipment database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_source_equipment"
)
@NamedQuery
(
name
=
"RiskSourceEquipment.findAll"
,
query
=
"SELECT r FROM RiskSourceEquipment r"
)
public
class
RiskSourceEquipment
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"equipment_id"
)
private
Long
equipmentId
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
/**
* 消防设备id
*/
@Column
(
name
=
"fire_equipment_id"
)
private
Long
fireEquipmentId
;
private
RiskSource
riskSource
;
public
RiskSourceEquipment
()
{
}
public
Long
getEquipmentId
()
{
return
this
.
equipmentId
;
}
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
public
Long
getRiskSourceId
()
{
return
this
.
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
Long
getFireEquipmentId
()
{
return
fireEquipmentId
;
}
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
}
@ManyToOne
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
public
RiskSource
getRiskSource
()
{
return
riskSource
;
}
@JsonBackReference
public
void
setRiskSource
(
RiskSource
riskSource
)
{
this
.
riskSource
=
riskSource
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSourcePointInputitem.java
deleted
100644 → 0
View file @
959c7e9b
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
/**
* The persistent class for the risk_source_point_inputitem database table.
*
*/
@Entity
@Table
(
name
=
"f_risk_source_point_inputitem"
)
@NamedQuery
(
name
=
"RiskSourcePointInputitem.findAll"
,
query
=
"SELECT r FROM RiskSourcePointInputitem r"
)
public
class
RiskSourcePointInputitem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"point_id"
)
private
Long
pointId
;
@Column
(
name
=
"point_inputitem_id"
)
private
Long
pointInputitemId
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
@Column
(
name
=
"status"
)
private
String
status
;
/**
* 检查项检查记录id(p_check_input 表id)
*/
@Column
(
name
=
"check_inputitem_id"
)
private
Long
checkInputitemId
;
private
String
pointInputitemName
;
private
String
originalTaskState
;
private
RiskSource
riskSource
;
public
RiskSourcePointInputitem
()
{
}
@Transient
public
String
getPointInputitemName
()
{
return
pointInputitemName
;
}
public
void
setPointInputitemName
(
String
pointInputitemName
)
{
this
.
pointInputitemName
=
pointInputitemName
;
}
@Transient
public
String
getOriginalTaskState
()
{
return
originalTaskState
;
}
public
void
setOriginalTaskState
(
String
originalTaskState
)
{
this
.
originalTaskState
=
originalTaskState
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
Long
getPointId
()
{
return
this
.
pointId
;
}
public
void
setPointId
(
Long
pointId
)
{
this
.
pointId
=
pointId
;
}
public
Long
getPointInputitemId
()
{
return
this
.
pointInputitemId
;
}
public
void
setPointInputitemId
(
Long
pointInputitemId
)
{
this
.
pointInputitemId
=
pointInputitemId
;
}
public
Long
getRiskSourceId
()
{
return
this
.
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
public
Long
getCheckInputitemId
()
{
return
checkInputitemId
;
}
public
void
setCheckInputitemId
(
Long
checkInputitemId
)
{
this
.
checkInputitemId
=
checkInputitemId
;
}
@ManyToOne
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
public
RiskSource
getRiskSource
()
{
return
riskSource
;
}
@JsonBackReference
public
void
setRiskSource
(
RiskSource
riskSource
)
{
this
.
riskSource
=
riskSource
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RpnChangeLog.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
java.math.BigInteger
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
@@ -9,96 +8,104 @@ import javax.persistence.JoinColumn;
...
@@ -9,96 +8,104 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
/**
/**
* The persistent class for the rpn_change_log database table.
* The persistent class for the rpn_change_log database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"f_rpn_change_log"
)
@Table
(
name
=
"f_rpn_change_log"
)
@NamedQuery
(
name
=
"RpnChangeLog.findAll"
,
query
=
"SELECT r FROM RpnChangeLog r"
)
@NamedQuery
(
name
=
"RpnChangeLog.findAll"
,
query
=
"SELECT r FROM RpnChangeLog r"
)
public
class
RpnChangeLog
extends
BasicEntity
{
public
class
RpnChangeLog
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
String
remark
;
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
@Column
(
name
=
"fmea_id"
)
private
Long
fmeaId
;
private
String
remark
;
private
BigDecimal
rpn
;
@Column
(
name
=
"risk_source_id"
)
private
BigDecimal
rpni
;
private
BigInteger
riskSourceId
;
private
BigDecimal
rpn
;
@Column
(
name
=
"trigger_by"
)
private
Long
triggerBy
;
private
BigDecimal
rpni
;
private
int
type
;
@Column
(
name
=
"trigger_by"
)
private
RiskSource
riskSource
;
private
BigInteger
triggerBy
;
private
int
type
;
public
RpnChangeLog
()
{
}
private
RiskSource
riskSource
;
public
RpnChangeLog
()
{
public
String
getRemark
()
{
}
return
this
.
remark
;
}
public
String
getRemark
(
)
{
public
void
setRemark
(
String
remark
)
{
return
this
.
remark
;
this
.
remark
=
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
Long
getRiskSourceId
(
)
{
this
.
remark
=
remark
;
return
this
.
riskSourceId
;
}
}
public
BigInteger
getRiskSourceId
(
)
{
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
return
this
.
riskSourceId
;
this
.
riskSourceId
=
riskSourceId
;
}
}
public
void
setRiskSourceId
(
BigInteger
riskSourceId
)
{
public
BigDecimal
getRpn
(
)
{
this
.
riskSourceId
=
riskSourceId
;
return
this
.
rpn
;
}
}
public
BigDecimal
getRpn
(
)
{
public
void
setRpn
(
BigDecimal
rpn
)
{
return
this
.
rpn
;
this
.
rpn
=
rpn
;
}
}
public
void
setRpn
(
BigDecimal
rpn
)
{
public
BigDecimal
getRpni
(
)
{
this
.
rpn
=
rpn
;
return
this
.
rpni
;
}
}
public
BigDecimal
getRpni
(
)
{
public
void
setRpni
(
BigDecimal
rpni
)
{
return
this
.
rpni
;
this
.
rpni
=
rpni
;
}
}
public
void
setRpni
(
BigDecimal
rpni
)
{
public
Long
getTriggerBy
(
)
{
this
.
rpni
=
rpni
;
return
this
.
triggerBy
;
}
}
public
BigInteger
getTriggerBy
(
)
{
public
void
setTriggerBy
(
Long
triggerBy
)
{
return
this
.
triggerBy
;
this
.
triggerBy
=
triggerBy
;
}
}
public
void
setTriggerBy
(
BigInteger
triggerBy
)
{
public
int
getType
(
)
{
this
.
triggerBy
=
triggerBy
;
return
this
.
type
;
}
}
public
int
getType
(
)
{
public
void
setType
(
int
type
)
{
return
this
.
type
;
this
.
type
=
type
;
}
}
public
void
setType
(
int
type
)
{
@ManyToOne
this
.
type
=
type
;
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
}
public
RiskSource
getRiskSource
()
{
return
riskSource
;
}
@ManyToOne
@JsonBackReference
@JoinColumn
(
name
=
"riskSourceId"
,
referencedColumnName
=
"id"
,
updatable
=
false
,
insertable
=
false
)
public
void
setRiskSource
(
RiskSource
riskSource
)
{
public
RiskSource
getRiskSource
()
{
this
.
riskSource
=
riskSource
;
return
riskSource
;
}
}
@JsonBackReference
public
Long
getFmeaId
()
{
public
void
setRiskSource
(
RiskSource
riskSource
)
{
return
fmeaId
;
this
.
riskSource
=
riskSource
;
}
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/SCompany.java
View file @
4f6fa381
...
@@ -8,245 +8,243 @@ import javax.persistence.Table;
...
@@ -8,245 +8,243 @@ import javax.persistence.Table;
import
javax.persistence.Temporal
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
javax.persistence.TemporalType
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* The persistent class for the s_company database table.
* The persistent class for the s_company database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"s_company"
)
@Table
(
name
=
"s_company"
)
@NamedQuery
(
name
=
"SCompany.findAll"
,
query
=
"SELECT s FROM SCompany s"
)
@NamedQuery
(
name
=
"SCompany.findAll"
,
query
=
"SELECT s FROM SCompany s"
)
public
class
SCompany
implements
Serializable
{
public
class
SCompany
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
private
String
id
;
private
String
id
;
private
String
address
;
private
String
address
;
@Column
(
name
=
"comp_code"
)
@Column
(
name
=
"comp_code"
)
private
String
compCode
;
private
String
compCode
;
@Column
(
name
=
"company_level"
)
@Column
(
name
=
"company_level"
)
private
String
companyLevel
;
private
String
companyLevel
;
@Column
(
name
=
"company_name"
)
@Column
(
name
=
"company_name"
)
private
String
companyName
;
private
String
companyName
;
private
String
contact
;
private
String
contact
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"create_date"
)
@Column
(
name
=
"create_date"
)
private
Date
createDate
;
private
Date
createDate
;
@Column
(
name
=
"create_user"
)
@Column
(
name
=
"create_user"
)
private
String
createUser
;
private
String
createUser
;
private
String
description
;
private
String
description
;
private
String
email
;
private
String
email
;
@Column
(
name
=
"is_delete"
)
@Column
(
name
=
"is_delete"
)
private
byte
isDelete
;
private
byte
isDelete
;
private
Double
latitude
;
private
Double
latitude
;
private
BigInteger
level
;
private
Long
level
;
private
Double
longitude
;
private
Double
longitude
;
@Column
(
name
=
"parent_id"
)
@Column
(
name
=
"parent_id"
)
private
BigInteger
parentId
;
private
Long
parentId
;
@Column
(
name
=
"register_type_id"
)
@Column
(
name
=
"register_type_id"
)
private
BigInteger
registerTypeId
;
private
Long
registerTypeId
;
private
String
remark
;
private
String
remark
;
@Column
(
name
=
"site_id"
)
@Column
(
name
=
"site_id"
)
private
BigInteger
siteId
;
private
Long
siteId
;
private
String
telephone
;
private
String
telephone
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"update_date"
)
@Column
(
name
=
"update_date"
)
private
Date
updateDate
;
private
Date
updateDate
;
@Column
(
name
=
"update_user"
)
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
private
String
updateUser
;
public
SCompany
()
{
public
SCompany
()
{
}
}
public
String
getId
()
{
public
String
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
String
id
)
{
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getAddress
()
{
public
String
getAddress
()
{
return
this
.
address
;
return
this
.
address
;
}
}
public
void
setAddress
(
String
address
)
{
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
this
.
address
=
address
;
}
}
public
String
getCompCode
()
{
public
String
getCompCode
()
{
return
this
.
compCode
;
return
this
.
compCode
;
}
}
public
void
setCompCode
(
String
compCode
)
{
public
void
setCompCode
(
String
compCode
)
{
this
.
compCode
=
compCode
;
this
.
compCode
=
compCode
;
}
}
public
String
getCompanyLevel
()
{
public
String
getCompanyLevel
()
{
return
this
.
companyLevel
;
return
this
.
companyLevel
;
}
}
public
void
setCompanyLevel
(
String
companyLevel
)
{
public
void
setCompanyLevel
(
String
companyLevel
)
{
this
.
companyLevel
=
companyLevel
;
this
.
companyLevel
=
companyLevel
;
}
}
public
String
getCompanyName
()
{
public
String
getCompanyName
()
{
return
this
.
companyName
;
return
this
.
companyName
;
}
}
public
void
setCompanyName
(
String
companyName
)
{
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
this
.
companyName
=
companyName
;
}
}
public
String
getContact
()
{
public
String
getContact
()
{
return
this
.
contact
;
return
this
.
contact
;
}
}
public
void
setContact
(
String
contact
)
{
public
void
setContact
(
String
contact
)
{
this
.
contact
=
contact
;
this
.
contact
=
contact
;
}
}
public
Date
getCreateDate
()
{
public
Date
getCreateDate
()
{
return
this
.
createDate
;
return
this
.
createDate
;
}
}
public
void
setCreateDate
(
Date
createDate
)
{
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
this
.
createDate
=
createDate
;
}
}
public
String
getCreateUser
()
{
public
String
getCreateUser
()
{
return
this
.
createUser
;
return
this
.
createUser
;
}
}
public
void
setCreateUser
(
String
createUser
)
{
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
this
.
createUser
=
createUser
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
this
.
description
;
return
this
.
description
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
String
getEmail
()
{
public
String
getEmail
()
{
return
this
.
email
;
return
this
.
email
;
}
}
public
void
setEmail
(
String
email
)
{
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
this
.
email
=
email
;
}
}
public
byte
getIsDelete
()
{
public
byte
getIsDelete
()
{
return
this
.
isDelete
;
return
this
.
isDelete
;
}
}
public
void
setIsDelete
(
byte
isDelete
)
{
public
void
setIsDelete
(
byte
isDelete
)
{
this
.
isDelete
=
isDelete
;
this
.
isDelete
=
isDelete
;
}
}
public
Double
getLatitude
()
{
public
Double
getLatitude
()
{
return
this
.
latitude
;
return
this
.
latitude
;
}
}
public
void
setLatitude
(
Double
latitude
)
{
public
void
setLatitude
(
Double
latitude
)
{
this
.
latitude
=
latitude
;
this
.
latitude
=
latitude
;
}
}
public
BigInteger
getLevel
()
{
public
Long
getLevel
()
{
return
this
.
level
;
return
this
.
level
;
}
}
public
void
setLevel
(
BigInteger
level
)
{
public
void
setLevel
(
Long
level
)
{
this
.
level
=
level
;
this
.
level
=
level
;
}
}
public
Double
getLongitude
()
{
public
Double
getLongitude
()
{
return
this
.
longitude
;
return
this
.
longitude
;
}
}
public
void
setLongitude
(
Double
longitude
)
{
public
void
setLongitude
(
Double
longitude
)
{
this
.
longitude
=
longitude
;
this
.
longitude
=
longitude
;
}
}
public
BigInteger
getParentId
()
{
public
Long
getParentId
()
{
return
this
.
parentId
;
return
this
.
parentId
;
}
}
public
void
setParentId
(
BigInteger
parentId
)
{
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
this
.
parentId
=
parentId
;
}
}
public
BigInteger
getRegisterTypeId
()
{
public
Long
getRegisterTypeId
()
{
return
this
.
registerTypeId
;
return
this
.
registerTypeId
;
}
}
public
void
setRegisterTypeId
(
BigInteger
registerTypeId
)
{
public
void
setRegisterTypeId
(
Long
registerTypeId
)
{
this
.
registerTypeId
=
registerTypeId
;
this
.
registerTypeId
=
registerTypeId
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
this
.
remark
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
BigInteger
getSiteId
()
{
public
Long
getSiteId
()
{
return
this
.
siteId
;
return
this
.
siteId
;
}
}
public
void
setSiteId
(
BigInteger
siteId
)
{
public
void
setSiteId
(
Long
siteId
)
{
this
.
siteId
=
siteId
;
this
.
siteId
=
siteId
;
}
}
public
String
getTelephone
()
{
public
String
getTelephone
()
{
return
this
.
telephone
;
return
this
.
telephone
;
}
}
public
void
setTelephone
(
String
telephone
)
{
public
void
setTelephone
(
String
telephone
)
{
this
.
telephone
=
telephone
;
this
.
telephone
=
telephone
;
}
}
public
Date
getUpdateDate
()
{
public
Date
getUpdateDate
()
{
return
this
.
updateDate
;
return
this
.
updateDate
;
}
}
public
void
setUpdateDate
(
Date
updateDate
)
{
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
this
.
updateDate
=
updateDate
;
}
}
public
String
getUpdateUser
()
{
public
String
getUpdateUser
()
{
return
this
.
updateUser
;
return
this
.
updateUser
;
}
}
public
void
setUpdateUser
(
String
updateUser
)
{
public
void
setUpdateUser
(
String
updateUser
)
{
this
.
updateUser
=
updateUser
;
this
.
updateUser
=
updateUser
;
}
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/SDepartment.java
View file @
4f6fa381
...
@@ -8,143 +8,141 @@ import javax.persistence.Table;
...
@@ -8,143 +8,141 @@ import javax.persistence.Table;
import
javax.persistence.Temporal
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
javax.persistence.TemporalType
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* The persistent class for the s_department database table.
* The persistent class for the s_department database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"s_department"
)
@Table
(
name
=
"s_department"
)
@NamedQuery
(
name
=
"SDepartment.findAll"
,
query
=
"SELECT s FROM SDepartment s"
)
@NamedQuery
(
name
=
"SDepartment.findAll"
,
query
=
"SELECT s FROM SDepartment s"
)
public
class
SDepartment
implements
Serializable
{
public
class
SDepartment
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
private
String
id
;
private
String
id
;
@Column
(
name
=
"company_id"
)
@Column
(
name
=
"company_id"
)
private
BigInteger
companyId
;
private
Long
companyId
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"create_date"
)
@Column
(
name
=
"create_date"
)
private
Date
createDate
;
private
Date
createDate
;
@Column
(
name
=
"create_user"
)
@Column
(
name
=
"create_user"
)
private
String
createUser
;
private
String
createUser
;
@Column
(
name
=
"department_name"
)
@Column
(
name
=
"department_name"
)
private
String
departmentName
;
private
String
departmentName
;
@Column
(
name
=
"depm_code"
)
@Column
(
name
=
"depm_code"
)
private
String
depmCode
;
private
String
depmCode
;
private
String
description
;
private
String
description
;
@Column
(
name
=
"is_delete"
)
@Column
(
name
=
"is_delete"
)
private
byte
isDelete
;
private
byte
isDelete
;
@Column
(
name
=
"parent_id"
)
@Column
(
name
=
"parent_id"
)
private
BigInteger
parentId
;
private
Long
parentId
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"update_date"
)
@Column
(
name
=
"update_date"
)
private
Date
updateDate
;
private
Date
updateDate
;
@Column
(
name
=
"update_user"
)
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
private
String
updateUser
;
public
SDepartment
()
{
public
SDepartment
()
{
}
}
public
String
getId
()
{
public
String
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
String
id
)
{
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
BigInteger
getCompanyId
()
{
public
Long
getCompanyId
()
{
return
this
.
companyId
;
return
this
.
companyId
;
}
}
public
void
setCompanyId
(
BigInteger
companyId
)
{
public
void
setCompanyId
(
Long
companyId
)
{
this
.
companyId
=
companyId
;
this
.
companyId
=
companyId
;
}
}
public
Date
getCreateDate
()
{
public
Date
getCreateDate
()
{
return
this
.
createDate
;
return
this
.
createDate
;
}
}
public
void
setCreateDate
(
Date
createDate
)
{
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
this
.
createDate
=
createDate
;
}
}
public
String
getCreateUser
()
{
public
String
getCreateUser
()
{
return
this
.
createUser
;
return
this
.
createUser
;
}
}
public
void
setCreateUser
(
String
createUser
)
{
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
this
.
createUser
=
createUser
;
}
}
public
String
getDepartmentName
()
{
public
String
getDepartmentName
()
{
return
this
.
departmentName
;
return
this
.
departmentName
;
}
}
public
void
setDepartmentName
(
String
departmentName
)
{
public
void
setDepartmentName
(
String
departmentName
)
{
this
.
departmentName
=
departmentName
;
this
.
departmentName
=
departmentName
;
}
}
public
String
getDepmCode
()
{
public
String
getDepmCode
()
{
return
this
.
depmCode
;
return
this
.
depmCode
;
}
}
public
void
setDepmCode
(
String
depmCode
)
{
public
void
setDepmCode
(
String
depmCode
)
{
this
.
depmCode
=
depmCode
;
this
.
depmCode
=
depmCode
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
this
.
description
;
return
this
.
description
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
byte
getIsDelete
()
{
public
byte
getIsDelete
()
{
return
this
.
isDelete
;
return
this
.
isDelete
;
}
}
public
void
setIsDelete
(
byte
isDelete
)
{
public
void
setIsDelete
(
byte
isDelete
)
{
this
.
isDelete
=
isDelete
;
this
.
isDelete
=
isDelete
;
}
}
public
BigInteger
getParentId
()
{
public
Long
getParentId
()
{
return
this
.
parentId
;
return
this
.
parentId
;
}
}
public
void
setParentId
(
BigInteger
parentId
)
{
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
this
.
parentId
=
parentId
;
}
}
public
Date
getUpdateDate
()
{
public
Date
getUpdateDate
()
{
return
this
.
updateDate
;
return
this
.
updateDate
;
}
}
public
void
setUpdateDate
(
Date
updateDate
)
{
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
this
.
updateDate
=
updateDate
;
}
}
public
String
getUpdateUser
()
{
public
String
getUpdateUser
()
{
return
this
.
updateUser
;
return
this
.
updateUser
;
}
}
public
void
setUpdateUser
(
String
updateUser
)
{
public
void
setUpdateUser
(
String
updateUser
)
{
this
.
updateUser
=
updateUser
;
this
.
updateUser
=
updateUser
;
}
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/SUser.java
View file @
4f6fa381
...
@@ -10,252 +10,250 @@ import javax.persistence.Table;
...
@@ -10,252 +10,250 @@ import javax.persistence.Table;
import
javax.persistence.Temporal
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
javax.persistence.TemporalType
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* The persistent class for the s_user database table.
* The persistent class for the s_user database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"s_user"
)
@Table
(
name
=
"s_user"
)
@NamedQuery
(
name
=
"SUser.findAll"
,
query
=
"SELECT s FROM SUser s"
)
@NamedQuery
(
name
=
"SUser.findAll"
,
query
=
"SELECT s FROM SUser s"
)
@Where
(
clause
=
"is_delete=0"
)
//表示未删除的数据
@Where
(
clause
=
"is_delete=0"
)
//表示未删除的数据
public
class
SUser
implements
Serializable
{
public
class
SUser
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
private
long
id
;
private
long
id
;
@Column
(
name
=
"company_id"
)
@Column
(
name
=
"company_id"
)
private
BigInteger
companyId
;
private
Long
companyId
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"create_date"
)
@Column
(
name
=
"create_date"
)
private
Date
createDate
;
private
Date
createDate
;
@Column
(
name
=
"create_user"
)
@Column
(
name
=
"create_user"
)
private
String
createUser
;
private
String
createUser
;
private
byte
deletable
;
private
byte
deletable
;
@Column
(
name
=
"department_id"
)
@Column
(
name
=
"department_id"
)
private
BigInteger
departmentId
;
private
Long
departmentId
;
private
String
email
;
private
String
email
;
private
byte
enabled
;
private
byte
enabled
;
@Column
(
name
=
"is_delete"
)
@Column
(
name
=
"is_delete"
)
private
byte
isDelete
;
private
byte
isDelete
;
private
String
mobile
;
private
String
mobile
;
private
String
name
;
private
String
name
;
@Column
(
name
=
"org_code"
)
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
private
String
password
;
private
String
password
;
@Column
(
name
=
"register_code"
)
@Column
(
name
=
"register_code"
)
private
String
registerCode
;
private
String
registerCode
;
@Column
(
name
=
"remark_1"
)
@Column
(
name
=
"remark_1"
)
private
String
remark1
;
private
String
remark1
;
@Column
(
name
=
"remark_2"
)
@Column
(
name
=
"remark_2"
)
private
String
remark2
;
private
String
remark2
;
@Column
(
name
=
"role_id"
)
@Column
(
name
=
"role_id"
)
private
BigInteger
roleId
;
private
Long
roleId
;
private
String
telephone
;
private
String
telephone
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"update_date"
)
@Column
(
name
=
"update_date"
)
private
Date
updateDate
;
private
Date
updateDate
;
@Column
(
name
=
"update_user"
)
@Column
(
name
=
"update_user"
)
private
String
updateUser
;
private
String
updateUser
;
@Column
(
name
=
"user_name"
)
@Column
(
name
=
"user_name"
)
private
String
userName
;
private
String
userName
;
public
SUser
()
{
public
SUser
()
{
}
}
public
long
getId
()
{
public
long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
long
id
)
{
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
BigInteger
getCompanyId
()
{
public
Long
getCompanyId
()
{
return
this
.
companyId
;
return
this
.
companyId
;
}
}
public
void
setCompanyId
(
BigInteger
companyId
)
{
public
void
setCompanyId
(
Long
companyId
)
{
this
.
companyId
=
companyId
;
this
.
companyId
=
companyId
;
}
}
public
Date
getCreateDate
()
{
public
Date
getCreateDate
()
{
return
this
.
createDate
;
return
this
.
createDate
;
}
}
public
void
setCreateDate
(
Date
createDate
)
{
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
this
.
createDate
=
createDate
;
}
}
public
String
getCreateUser
()
{
public
String
getCreateUser
()
{
return
this
.
createUser
;
return
this
.
createUser
;
}
}
public
void
setCreateUser
(
String
createUser
)
{
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
this
.
createUser
=
createUser
;
}
}
public
byte
getDeletable
()
{
public
byte
getDeletable
()
{
return
this
.
deletable
;
return
this
.
deletable
;
}
}
public
void
setDeletable
(
byte
deletable
)
{
public
void
setDeletable
(
byte
deletable
)
{
this
.
deletable
=
deletable
;
this
.
deletable
=
deletable
;
}
}
public
BigInteger
getDepartmentId
()
{
public
Long
getDepartmentId
()
{
return
this
.
departmentId
;
return
this
.
departmentId
;
}
}
public
void
setDepartmentId
(
BigInteger
departmentId
)
{
public
void
setDepartmentId
(
Long
departmentId
)
{
this
.
departmentId
=
departmentId
;
this
.
departmentId
=
departmentId
;
}
}
public
String
getEmail
()
{
public
String
getEmail
()
{
return
this
.
email
;
return
this
.
email
;
}
}
public
void
setEmail
(
String
email
)
{
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
this
.
email
=
email
;
}
}
public
byte
getEnabled
()
{
public
byte
getEnabled
()
{
return
this
.
enabled
;
return
this
.
enabled
;
}
}
public
void
setEnabled
(
byte
enabled
)
{
public
void
setEnabled
(
byte
enabled
)
{
this
.
enabled
=
enabled
;
this
.
enabled
=
enabled
;
}
}
public
byte
getIsDelete
()
{
public
byte
getIsDelete
()
{
return
this
.
isDelete
;
return
this
.
isDelete
;
}
}
public
void
setIsDelete
(
byte
isDelete
)
{
public
void
setIsDelete
(
byte
isDelete
)
{
this
.
isDelete
=
isDelete
;
this
.
isDelete
=
isDelete
;
}
}
public
String
getMobile
()
{
public
String
getMobile
()
{
return
this
.
mobile
;
return
this
.
mobile
;
}
}
public
void
setMobile
(
String
mobile
)
{
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
this
.
mobile
=
mobile
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getOrgCode
()
{
public
String
getOrgCode
()
{
return
this
.
orgCode
;
return
this
.
orgCode
;
}
}
public
void
setOrgCode
(
String
orgCode
)
{
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
String
getPassword
()
{
public
String
getPassword
()
{
return
this
.
password
;
return
this
.
password
;
}
}
public
void
setPassword
(
String
password
)
{
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
this
.
password
=
password
;
}
}
public
String
getRegisterCode
()
{
public
String
getRegisterCode
()
{
return
this
.
registerCode
;
return
this
.
registerCode
;
}
}
public
void
setRegisterCode
(
String
registerCode
)
{
public
void
setRegisterCode
(
String
registerCode
)
{
this
.
registerCode
=
registerCode
;
this
.
registerCode
=
registerCode
;
}
}
public
String
getRemark1
()
{
public
String
getRemark1
()
{
return
this
.
remark1
;
return
this
.
remark1
;
}
}
public
void
setRemark1
(
String
remark1
)
{
public
void
setRemark1
(
String
remark1
)
{
this
.
remark1
=
remark1
;
this
.
remark1
=
remark1
;
}
}
public
String
getRemark2
()
{
public
String
getRemark2
()
{
return
this
.
remark2
;
return
this
.
remark2
;
}
}
public
void
setRemark2
(
String
remark2
)
{
public
void
setRemark2
(
String
remark2
)
{
this
.
remark2
=
remark2
;
this
.
remark2
=
remark2
;
}
}
public
BigInteger
getRoleId
()
{
public
Long
getRoleId
()
{
return
this
.
roleId
;
return
this
.
roleId
;
}
}
public
void
setRoleId
(
BigInteger
roleId
)
{
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
this
.
roleId
=
roleId
;
}
}
public
String
getTelephone
()
{
public
String
getTelephone
()
{
return
this
.
telephone
;
return
this
.
telephone
;
}
}
public
void
setTelephone
(
String
telephone
)
{
public
void
setTelephone
(
String
telephone
)
{
this
.
telephone
=
telephone
;
this
.
telephone
=
telephone
;
}
}
public
Date
getUpdateDate
()
{
public
Date
getUpdateDate
()
{
return
this
.
updateDate
;
return
this
.
updateDate
;
}
}
public
void
setUpdateDate
(
Date
updateDate
)
{
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
this
.
updateDate
=
updateDate
;
}
}
public
String
getUpdateUser
()
{
public
String
getUpdateUser
()
{
return
this
.
updateUser
;
return
this
.
updateUser
;
}
}
public
void
setUpdateUser
(
String
updateUser
)
{
public
void
setUpdateUser
(
String
updateUser
)
{
this
.
updateUser
=
updateUser
;
this
.
updateUser
=
updateUser
;
}
}
public
String
getUserName
()
{
public
String
getUserName
()
{
return
this
.
userName
;
return
this
.
userName
;
}
}
public
void
setUserName
(
String
userName
)
{
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
this
.
userName
=
userName
;
}
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentController.java
View file @
4f6fa381
...
@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -135,7 +134,7 @@ public class EquipmentController extends BaseController {
...
@@ -135,7 +134,7 @@ public class EquipmentController extends BaseController {
@Authorization
(
ingore
=
true
)
@Authorization
(
ingore
=
true
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@RequestMapping
(
value
=
"/{id}/fireeqmt"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/{id}/fireeqmt"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
bindFireEqumt
(
@PathVariable
(
"id"
)
BigInteger
equipmentId
,
@RequestBody
List
<
EquipmentFireEquipment
>
equipmentFireEquipment
)
throws
Exception
{
public
CommonResponse
bindFireEqumt
(
@PathVariable
(
"id"
)
Long
equipmentId
,
@RequestBody
List
<
EquipmentFireEquipment
>
equipmentFireEquipment
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
equipmentFireEquipment
))
if
(
CollectionUtils
.
isEmpty
(
equipmentFireEquipment
))
throw
new
Exception
(
"数据校验失败"
);
throw
new
Exception
(
"数据校验失败"
);
return
CommonResponseUtil
.
success
(
iEquipService
.
bindFireEqumt
(
equipmentId
,
equipmentFireEquipment
));
return
CommonResponseUtil
.
success
(
iEquipService
.
bindFireEqumt
(
equipmentId
,
equipmentFireEquipment
));
...
@@ -151,7 +150,7 @@ public class EquipmentController extends BaseController {
...
@@ -151,7 +150,7 @@ public class EquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
@RequestMapping
(
value
=
"/{equipmentId}/fireeqmt/{fireEquipmentIds}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/{equipmentId}/fireeqmt/{fireEquipmentIds}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
bindFireEqumt
(
public
CommonResponse
bindFireEqumt
(
@PathVariable
(
"equipmentId"
)
BigInteger
equipmentId
,
@PathVariable
(
"equipmentId"
)
Long
equipmentId
,
@PathVariable
(
"fireEquipmentIds"
)
String
fireEquipmentIds
)
{
@PathVariable
(
"fireEquipmentIds"
)
String
fireEquipmentIds
)
{
String
[]
idArray
=
fireEquipmentIds
.
split
(
","
);
String
[]
idArray
=
fireEquipmentIds
.
split
(
","
);
...
@@ -168,7 +167,7 @@ public class EquipmentController extends BaseController {
...
@@ -168,7 +167,7 @@ public class EquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定重点设备已经绑定的消防设备"
,
notes
=
"查询指定重点设备已经绑定的消防设备"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定重点设备已经绑定的消防设备"
,
notes
=
"查询指定重点设备已经绑定的消防设备"
)
@RequestMapping
(
value
=
"/{equipmentId}/fireeqmt/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{equipmentId}/fireeqmt/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryBindFirEqumtList
(
public
CommonResponse
queryBindFirEqumtList
(
@PathVariable
(
"equipmentId"
)
BigInteger
equipmentId
,
@PathVariable
(
"equipmentId"
)
Long
equipmentId
,
@ApiParam
(
value
=
"当前页码"
,
required
=
false
)
@RequestParam
int
pageNumber
,
@ApiParam
(
value
=
"当前页码"
,
required
=
false
)
@RequestParam
int
pageNumber
,
@ApiParam
(
value
=
"页面大小"
,
required
=
false
)
@RequestParam
int
pageSize
)
{
@ApiParam
(
value
=
"页面大小"
,
required
=
false
)
@RequestParam
int
pageSize
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskModelController.java
View file @
4f6fa381
...
@@ -120,18 +120,19 @@ public class RiskModelController extends BaseController {
...
@@ -120,18 +120,19 @@ public class RiskModelController extends BaseController {
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型新增及维护"
,
notes
=
"Fmea模型新增及维护"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型新增及维护"
,
notes
=
"Fmea模型新增及维护"
)
@RequestMapping
(
value
=
"/fmea/editFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/fmea/editFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
Fmea
param
)
{
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
List
<
Fmea
>
params
)
{
try
{
try
{
User
user
=
getUserInfo
();
User
user
=
getUserInfo
();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"user_id"
,
user
.
getId
());
map
.
put
(
"user_id"
,
user
.
getId
());
map
.
put
(
"fmea
"
,
param
);
map
.
put
(
"fmea
s"
,
params
);
fmeaService
.
editFmea
(
map
);
fmeaService
.
editFmea
(
map
);
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
if
(!
ObjectUtils
.
isEmpty
(
param
.
getRiskSourceId
()))
{
params
.
forEach
(
param
->
{
rs
.
add
(
param
.
getRiskSourceId
());
if
(!
ObjectUtils
.
isEmpty
(
param
.
getId
()))
{
}
rs
.
addUpdateMessage
(
param
.
getId
());
}
});
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
@@ -149,11 +150,12 @@ public class RiskModelController extends BaseController {
...
@@ -149,11 +150,12 @@ public class RiskModelController extends BaseController {
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
Long
riskSourceId
=
param
.
getRiskSourceId
();
Long
riskSourceId
=
param
.
getRiskSourceId
();
fmeaService
.
deleteFmea
(
fmeaIds
);
fmeaService
.
deleteFmea
(
fmeaIds
);
fmeaService
.
updateRpniInfo
(
riskSourceId
);
fmeaService
.
updateRpniInfo
(
riskSourceId
);
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
if
(
fmeaIds
.
length
>
0
)
{
if
(!
ObjectUtils
.
isEmpty
(
riskSourceId
))
{
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
rs
.
add
(
riskSourceId
);
for
(
Long
fmeaId
:
fmeaIds
)
{
rsDataQueue
.
addUpdateMessage
(
fmeaId
);
}
}
}
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.
RiskSource
Param
;
import
com.yeejoin.amos.fas.business.param.
FmeaBind
Param
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
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.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
...
@@ -9,8 +9,6 @@ import com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo;
...
@@ -9,8 +9,6 @@ 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.ProtalDataRo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourceEquipment
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem
;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.security.authorization.Authorization
;
import
com.yeejoin.amos.security.authorization.Authorization
;
...
@@ -46,7 +44,7 @@ public class RiskSourceController extends BaseController {
...
@@ -46,7 +44,7 @@ public class RiskSourceController extends BaseController {
IRiskFactorService
iRiskFactorService
;
IRiskFactorService
iRiskFactorService
;
@Autowired
@Autowired
IRiskSourceService
riskSourceService
;
IRiskSourceService
riskSourceService
;
@Authorization
(
ingore
=
true
)
@Authorization
(
ingore
=
true
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
...
@@ -107,7 +105,7 @@ public class RiskSourceController extends BaseController {
...
@@ -107,7 +105,7 @@ public class RiskSourceController extends BaseController {
@Authorization
(
ingore
=
true
)
@Authorization
(
ingore
=
true
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取风险点树型结构"
,
notes
=
"获取风险点树型结构"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取风险点树型结构"
,
notes
=
"获取风险点树型结构"
)
@RequestMapping
(
value
=
"/riskSourceTress"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/riskSourceTress"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getRiskSourceTress
()
throws
Exception
{
public
CommonResponse
getRiskSourceTress
()
{
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
();
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
();
return
CommonResponseUtil
.
success
(
getRiskSourcesTree
(
riskSources
));
return
CommonResponseUtil
.
success
(
getRiskSourcesTree
(
riskSources
));
}
}
...
@@ -438,9 +436,9 @@ public class RiskSourceController extends BaseController {
...
@@ -438,9 +436,9 @@ public class RiskSourceController extends BaseController {
}
}
int
count
=
0
;
int
count
=
0
;
if
(
"ANOMALY"
.
equals
(
status
))
{
if
(
"ANOMALY"
.
equals
(
status
))
{
count
+=
(
riskSource
.
getQualified
()
==
null
?
0
:
riskSource
.
getQualified
());
count
+=
(
riskSource
.
getQualified
()
==
null
?
0
:
riskSource
.
getQualified
());
}
else
{
}
else
{
count
+=
(
riskSource
.
getUnplan
()
==
null
?
0
:
riskSource
.
getUnplan
());
count
+=
(
riskSource
.
getUnplan
()
==
null
?
0
:
riskSource
.
getUnplan
());
}
}
for
(
RiskSourceTreeResponse
action
:
riskSource
.
getChildren
())
{
for
(
RiskSourceTreeResponse
action
:
riskSource
.
getChildren
())
{
if
(
ObjectUtils
.
isEmpty
(
action
.
getPosition3d
()))
{
if
(
ObjectUtils
.
isEmpty
(
action
.
getPosition3d
()))
{
...
@@ -468,7 +466,7 @@ public class RiskSourceController extends BaseController {
...
@@ -468,7 +466,7 @@ public class RiskSourceController extends BaseController {
for
(
RiskSourceTreeResponse
treeNode
:
list
)
{
for
(
RiskSourceTreeResponse
treeNode
:
list
)
{
if
(
treeNode
.
getParentId
().
longValue
()
==
tree
.
getId
())
{
if
(
treeNode
.
getParentId
().
longValue
()
==
tree
.
getId
())
{
if
(
tree
.
getChildren
()
==
null
)
{
if
(
tree
.
getChildren
()
==
null
)
{
tree
.
setChildren
(
new
ArrayList
<
RiskSourceTreeResponse
>());
tree
.
setChildren
(
new
ArrayList
<>());
}
}
tree
.
getChildren
().
add
(
treeNode
);
tree
.
getChildren
().
add
(
treeNode
);
}
}
...
@@ -479,70 +477,51 @@ public class RiskSourceController extends BaseController {
...
@@ -479,70 +477,51 @@ public class RiskSourceController extends BaseController {
/**
/**
* 根据风险点查询关联巡检点
* 根据风险点查询关联巡检点
*
* @param riskSourceId
* @param commonPageable
* @return
*/
*/
@ApiOperation
(
value
=
"根据风险点查询关联巡检点"
,
notes
=
"根据风险点查询关联巡检点"
)
@ApiOperation
(
value
=
"根据风险点查询关联巡检点"
,
notes
=
"根据风险点查询关联巡检点"
)
@GetMapping
(
value
=
"/getBindPoints"
,
produces
=
"application/json;charset=UTF-8"
)
@GetMapping
(
value
=
"/getBindPoints"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getRiskEquipments
(
@ApiParam
(
value
=
"风险点id"
,
required
=
true
)
@RequestParam
Long
riskSource
Id
,
public
CommonResponse
listFmeaPointInputitem
(
@ApiParam
(
value
=
"fmeaId"
,
required
=
true
)
@RequestParam
Long
fmea
Id
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
,
defaultValue
=
"pageNumber=0&pageSize=10"
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageNumber
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageSize
)
{
try
{
try
{
RiskSourceParam
param
=
new
RiskSourceParam
();
Page
<
Map
<
String
,
Object
>>
list
=
riskSourceService
.
listFmeaPointInputitem
(
fmeaId
,
pageNumber
,
pageSize
);
param
.
setRiskSourceId
(
riskSourceId
);
return
CommonResponseUtil
.
success
(
list
);
Page
<
HashMap
<
String
,
Object
>>
pointInputList
=
riskSourceService
.
getRiskSourcePoints
(
param
);
return
CommonResponseUtil
.
success
(
pointInputList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"查询巡检点信息失败"
);
return
CommonResponseUtil
.
failure
(
"查询巡检点信息失败"
);
}
}
}
}
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定风险点绑定关系"
,
notes
=
"查询指定风险点绑定关系"
)
* 绑定巡检点检查项
@RequestMapping
(
value
=
"/{fmeaId}/fireequiment/relations"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
*
public
CommonResponse
queryBoundRelation
(
@PathVariable
Long
fmeaId
,
* @param riskSourceId
@RequestParam
int
pageNumber
,
* @param list
@RequestParam
int
pageSize
)
{
* @return
return
CommonResponseUtil
.
success
(
riskSourceService
.
listFeamEquipmentPoint
(
fmeaId
,
pageNumber
,
pageSize
));
* @throws Exception
*/
@ApiOperation
(
value
=
"绑定巡检点检查项"
,
notes
=
"绑定巡检点检查项"
)
@PostMapping
(
value
=
"/bindPoints/{riskSourceId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
bindingPoints
(
@PathVariable
Long
riskSourceId
,
@RequestBody
List
<
RiskSourcePointInputitem
>
pointInputitems
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
bindPointInputitem
(
riskSourceId
,
pointInputitems
));
}
}
@ApiOperation
(
value
=
"绑定巡检点检查项"
,
notes
=
"绑定巡检点检查项"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
@PostMapping
(
value
=
"/bindFmea/pointInputitem"
)
@RequestMapping
(
value
=
"/{riskSourceId}/fireequiment/relation"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
bindFmeaPointInputitem
(
@RequestBody
FmeaBindParam
pointInputitems
)
{
public
CommonResponse
bindFireEquiment
(
@PathVariable
String
riskSourceId
,
@RequestBody
List
<
RiskSourceEquipment
>
list
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
bindPointInputitem
(
pointInputitems
));
return
CommonResponseUtil
.
success
(
this
.
riskSourceService
.
bindFireEquiment
(
Long
.
parseLong
(
riskSourceId
),
list
));
}
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"移除消防设备绑定关系"
,
notes
=
"移除消防设备绑定关系"
)
@ApiOperation
(
value
=
"绑定消防设备指标"
,
notes
=
"绑定消防设备指标"
)
@RequestMapping
(
value
=
"/fireequiment/relation/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
@PostMapping
(
value
=
"/bingFmea/equimentPoint"
)
public
CommonResponse
removeFireEquiment
(
@PathVariable
(
"ids"
)
String
ids
)
throws
Exception
{
public
CommonResponse
bindFmeaEquimentPoint
(
@RequestBody
FmeaBindParam
fmeaBindParam
)
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
bindFireEquiment
(
fmeaBindParam
));
String
[]
idArray
=
ids
.
split
(
","
);
return
CommonResponseUtil
.
success
(
this
.
riskSourceService
.
removeBoundRelation
(
idArray
));
}
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定风险点绑定关系"
,
notes
=
"查询指定风险点绑定关系"
)
// @ApiOperation(httpMethod = "DELETE", value = "移除消防设备绑定关系", notes = "移除消防设备绑定关系")
@RequestMapping
(
value
=
"/{riskSourceId}/fireequiment/relations"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
// @RequestMapping(value = "/fireequiment/relation/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
queryBoundRelation
(
@PathVariable
String
riskSourceId
,
// public CommonResponse removeFireEquiment(@PathVariable("ids") String ids) throws Exception {
@RequestParam
int
pageNumber
,
// String[] idArray = ids.split(",");
@RequestParam
int
pageSize
)
throws
Exception
{
// return CommonResponseUtil.success(this.riskSourceService.removeBoundRelation(idArray));
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
// }
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryForView
(
commonPageable
,
riskSourceId
));
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询绑定关系
包含已绑定和未绑定
"
,
notes
=
"查询绑定关系包含已绑定和未绑定"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询绑定关系
设备
"
,
notes
=
"查询绑定关系包含已绑定和未绑定"
)
@RequestMapping
(
value
=
"/
{riskSourceId}/
fireequiment/relation/all"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/fireequiment/relation/all"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryRelationWithNoBound
(
public
CommonResponse
queryRelationWithNoBound
(
@PathVariable
String
riskSourceId
,
@RequestParam
String
equimentId
,
@RequestParam
String
equimentId
,
@RequestParam
(
value
=
"fname"
,
required
=
false
)
String
fname
,
@RequestParam
(
value
=
"fname"
,
required
=
false
)
String
fname
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageNumber
,
...
@@ -550,14 +529,21 @@ public class RiskSourceController extends BaseController {
...
@@ -550,14 +529,21 @@ public class RiskSourceController extends BaseController {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
fname
=
StringUtils
.
trimToNull
(
fname
);
fname
=
StringUtils
.
trimToNull
(
fname
);
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryEquimentRelation
(
commonPageable
,
riskSourceId
,
equimentId
,
fname
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryEquimentRelation
(
commonPageable
,
equimentId
,
fname
));
}
@ApiOperation
(
value
=
"查询设备指标"
,
notes
=
"查询设备指标"
)
@GetMapping
(
value
=
"/listEquipmentPointById"
)
public
CommonResponse
listEquipmentPointById
(
@RequestParam
Long
fmeaId
,
@RequestParam
Long
equimentId
,
@RequestParam
(
required
=
false
)
String
equipmentPointName
)
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
listEquipmentPointById
(
fmeaId
,
equimentId
,
equipmentPointName
));
}
}
@Authorization
(
ingore
=
true
)
@Authorization
(
ingore
=
true
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
@RequestMapping
(
value
=
"/data/fireqeuiment"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/data/fireqeuiment"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
postFireEqumentData
(
@RequestBody
FireEquimentDataRo
deviceData
)
throws
Exception
{
public
CommonResponse
postFireEqumentData
(
@RequestBody
FireEquimentDataRo
deviceData
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
processFireEqumtData
(
deviceData
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
processFireEqumtData
(
deviceData
));
}
}
...
@@ -574,7 +560,7 @@ public class RiskSourceController extends BaseController {
...
@@ -574,7 +560,7 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
@RequestMapping
(
value
=
"/data/fireqeuiment/all"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/data/fireqeuiment/all"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
postFireEqumentData
(
@RequestBody
List
<
AlarmParam
>
deviceDatas
)
throws
Exception
{
public
CommonResponse
postFireEqumentData
(
@RequestBody
List
<
AlarmParam
>
deviceDatas
)
throws
Exception
{
riskSourceService
.
saveData
(
deviceDatas
,
"all"
);
riskSourceService
.
saveData
(
deviceDatas
,
"all"
);
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
...
@@ -595,18 +581,18 @@ public class RiskSourceController extends BaseController {
...
@@ -595,18 +581,18 @@ public class RiskSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
riskSourceService
.
processTaskData
(
taskData
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
processTaskData
(
taskData
));
}
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"删除风险点巡检点检查项"
,
notes
=
"删除风险点巡检点检查项"
)
//
@ApiOperation(httpMethod = "POST", value = "删除风险点巡检点检查项", notes = "删除风险点巡检点检查项")
@RequestMapping
(
value
=
"/removeByRSIdAndPId"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/removeByRSIdAndPId", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
@Authorization
(
ingore
=
true
)
//
@Authorization(ingore = true)
public
CommonResponse
removeByRSIdAndPId
(
@RequestBody
List
<
HashMap
<
String
,
String
>>
list
)
throws
Exception
{
//
public CommonResponse removeByRSIdAndPId(@RequestBody List<HashMap<String, String>> list) throws Exception {
try
{
//
try {
riskSourceService
.
removeByRSIdAndPId
(
list
);
//
riskSourceService.removeByRSIdAndPId(list);
return
CommonResponseUtil
.
success
();
//
return CommonResponseUtil.success();
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
log
.
error
(
e
.
getMessage
(),
e
);
//
log.error(e.getMessage(), e);
return
CommonResponseUtil
.
failure
(
"删除失败"
);
//
return CommonResponseUtil.failure("删除失败");
}
//
}
}
//
}
/**
/**
* 查询风险点明细
* 查询风险点明细
...
@@ -632,9 +618,6 @@ public class RiskSourceController extends BaseController {
...
@@ -632,9 +618,6 @@ public class RiskSourceController extends BaseController {
/**
/**
* 获取厂区下所有区域的风险点的rpn值
* 获取厂区下所有区域的风险点的rpn值
*
* @param id
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取厂区下所有区域的风险点的rpn值"
,
notes
=
"获取厂区下所有区域的风险点的rpn值"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取厂区下所有区域的风险点的rpn值"
,
notes
=
"获取厂区下所有区域的风险点的rpn值"
)
@RequestMapping
(
value
=
"/queryRiskAreaRpn"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryRiskAreaRpn"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
View file @
4f6fa381
...
@@ -66,4 +66,14 @@ public interface FireEquipMapper extends BaseMapper {
...
@@ -66,4 +66,14 @@ public interface FireEquipMapper extends BaseMapper {
List
<
FireEquipmentEntity
>
listByCodes
(
@Param
(
"codes"
)
Set
<
String
>
codes
);
List
<
FireEquipmentEntity
>
listByCodes
(
@Param
(
"codes"
)
Set
<
String
>
codes
);
List
<
FireEquipmentEntity
>
listByType
(
@Param
(
"type"
)
Integer
type
);
List
<
FireEquipmentEntity
>
listByType
(
@Param
(
"type"
)
Integer
type
);
List
<
Map
>
queryEquimentRelation
(
@Param
(
"start"
)
int
start
,
@Param
(
"length"
)
int
length
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"fname"
)
String
fname
);
Long
queryEquimentRelationCount
(
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"fname"
)
String
fname
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FmeaEquipmentPointMapper.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
public
interface
FmeaEquipmentPointMapper
extends
BaseMapper
{
void
deleteByFmeaIdAndEquipmentPointIds
(
@Param
(
"fmeaId"
)
Long
fmeaId
,
@Param
(
"equipmentPointIds"
)
List
<
Long
>
equipmentPointIds
);
void
deleteByFmeaIds
(
Long
[]
fmeaIds
);
Long
saveBatch
(
List
<
FmeaEquipmentPoint
>
list
);
Long
countByFmeaId
(
Long
fmeaId
);
List
<
Map
<
String
,
Object
>>
listByFmeaId
(
@Param
(
"fmeaId"
)
Long
fmeaId
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"limit"
)
Integer
limit
);
Long
countEquipmentPoint
(
Long
equipmentId
);
List
<
Long
>
listEquipmentPointIdsByEquipmentId
(
Long
equipmentId
);
List
<
Map
<
String
,
Object
>>
listEquipmentPoint
(
@Param
(
"fmeaId"
)
Long
fmeaId
,
@Param
(
"equipmentId"
)
Long
equipmentId
,
@Param
(
"equipmentPointName"
)
String
equipmentPointName
);
List
<
FmeaEquipmentPoint
>
listByEquipmentPointId
(
Long
equipmentPointId
);
List
<
FmeaEquipmentPoint
>
listFmeaByFmeaId
(
Long
fmeaId
);
void
updateStateByIds
(
@Param
(
"state"
)
Integer
state
,
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FmeaMapper.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FmeaMapper
extends
BaseMapper
{
public
interface
FmeaMapper
extends
BaseMapper
{
/**
/**
* Fmea查询,分页查询统计用
* Fmea查询,分页查询统计用
* @param param
*
* @return
* @param param
*/
* @return
long
countPageData
(
CommonPageInfoParam
param
);
*/
long
countPageData
(
CommonPageInfoParam
param
);
/**
* 危险因素分页查询
/**
* @param param
* 危险因素分页查询
* @return
*
*/
* @param param
List
<
HashMap
<
String
,
Object
>>
queryFmeaPage
(
CommonPageInfoParam
param
);
* @return
*/
List
<
HashMap
<
String
,
Object
>>
queryFmeaPage
(
CommonPageInfoParam
param
);
/**
* FMEA信息列表
* @param riskSourceId
/**
* @return
* FMEA信息列表
*/
*/
List
<
Map
>
queryForFmeaList
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
List
<
Map
>
queryForFmeaList
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
Fmea
getById
(
Long
id
);
List
<
Fmea
>
listByRiskSourceId
(
Long
riskSourceId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FmeaPointInputitemMapper.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
public
interface
FmeaPointInputitemMapper
extends
BaseMapper
{
void
deleteByFmeaIdAndPointInputitemIds
(
@Param
(
"fmeaId"
)
Long
fmeaId
,
@Param
(
"pointInputitemIds"
)
List
<
Long
>
pointInputitemIds
);
void
deleteByFmeaIds
(
Long
[]
fmeaIds
);
Long
saveBatch
(
List
<
FmeaPointInputitem
>
list
);
Long
countByFmeaId
(
Long
fmeaId
);
List
<
Long
>
listPointInputitemIdsByPointId
(
Long
pointId
);
List
<
Map
<
String
,
Object
>>
listByFmeaId
(
@Param
(
"fmeaId"
)
Long
fmeaId
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"limit"
)
Integer
limit
);
List
<
FmeaPointInputitem
>
listByPointIdAndInputItemIds
(
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"inputIds"
)
List
<
Long
>
inputIds
);
List
<
FmeaPointInputitem
>
listFmeaByFmeaId
(
Long
fmeaId
);
void
updateStateByIds
(
@Param
(
"state"
)
Integer
state
,
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RiskSourceEquimentMapper.java
deleted
100644 → 0
View file @
959c7e9b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
public
interface
RiskSourceEquimentMapper
extends
BaseMapper
{
/**
* 列表展示关联关系查询
* @return
*/
List
<
Map
>
queryForView
(
@Param
(
"start"
)
int
start
,
@Param
(
"length"
)
int
length
,
@Param
(
"riskSourceId"
)
String
riskSourceId
);
Long
queryForViewCount
(
@Param
(
"riskSourceId"
)
String
riskSourceId
);
/**
* 查询指定重点设备的消防设备绑定关系,包含已绑定和未绑定
* @return
*/
List
<
Map
>
queryEquimentRelation
(
@Param
(
"start"
)
int
start
,
@Param
(
"length"
)
int
length
,
@Param
(
"riskSourceId"
)
String
riskSourceId
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"fname"
)
String
fname
);
Long
queryEquimentRelationCount
(
@Param
(
"riskSourceId"
)
String
riskSourceId
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"fname"
)
String
fname
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.RiskSourceParam
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -44,18 +43,13 @@ public interface RiskSourceMapper extends BaseMapper {
...
@@ -44,18 +43,13 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
List
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
long
getRiskSourcePointCount
(
RiskSourceParam
param
);
List
<
RiskSource
>
queryByFireEqument
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
);
List
<
RiskSource
>
queryByFireEqument
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
);
List
<
RiskSource
>
queryByPoint
(
@Param
(
"pointId"
)
Long
pointId
);
List
<
RiskSource
>
queryByPoint
(
@Param
(
"pointId"
)
Long
pointId
);
//厂区rpn,重点设备个数,风险点个数,巡检点个数
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map
statistics3dCount
();
Map
<
String
,
List
>
statistics3dCount
();
//消防设备按分类统计个数
//消防设备按分类统计个数
List
<
Map
>
statisticsEquipClassify
();
List
<
Map
>
statisticsEquipClassify
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IDeptmentDao.java
View file @
4f6fa381
...
@@ -4,11 +4,10 @@ import com.yeejoin.amos.fas.dao.entity.SDepartment;
...
@@ -4,11 +4,10 @@ import com.yeejoin.amos.fas.dao.entity.SDepartment;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.List
;
@Repository
(
"deptmentDao"
)
@Repository
(
"deptmentDao"
)
public
interface
IDeptmentDao
extends
BaseDao
<
SDepartment
,
Long
>
{
public
interface
IDeptmentDao
extends
BaseDao
<
SDepartment
,
Long
>
{
@Query
(
"select u from SDepartment u where u.isDelete = ?2 and u.companyId = ?1"
)
@Query
(
"select u from SDepartment u where u.isDelete = ?2 and u.companyId = ?1"
)
public
List
<
SDepartment
>
findDeptmentByCompanyId
(
BigInteger
companyId
,
byte
isDel
);
public
List
<
SDepartment
>
findDeptmentByCompanyId
(
Long
companyId
,
byte
isDel
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IEquipmentFireEquipmentDao.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
java.math.BigInteger
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
@Repository
(
"iEquipmentFireEquipmentDao"
)
@Repository
(
"iEquipmentFireEquipmentDao"
)
public
interface
IEquipmentFireEquipmentDao
extends
BaseDao
<
EquipmentFireEquipment
,
Long
>
{
public
interface
IEquipmentFireEquipmentDao
extends
BaseDao
<
EquipmentFireEquipment
,
Long
>
{
/**
/**
* 根据设备ID和配套装备ID查询
* 根据设备ID和配套装备ID查询
*
*
* @param equipmentId
* @param equipmentId
* @param fireEquipmentId
* @param fireEquipmentId
* @return
* @return
*/
*/
@Query
(
value
=
"select count(1) from f_equipment_fire_equipment WHERE equipment_id = ?1 and fire_equipment_id = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select count(1) from f_equipment_fire_equipment WHERE equipment_id = ?1 and fire_equipment_id = ?2"
,
nativeQuery
=
true
)
int
findByEqmtIdAndFireEqmtId
(
BigInteger
equipmentId
,
BigInteger
fireEquipmentId
);
int
findByEqmtIdAndFireEqmtId
(
Long
equipmentId
,
Long
fireEquipmentId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPreplanPictureDao.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
java.math.BigInteger
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
java.util.List
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
java.util.List
;
@Repository
(
"iPreplanPictureDao"
)
@Repository
(
"iPreplanPictureDao"
)
public
interface
IPreplanPictureDao
extends
BaseDao
<
PreplanPicture
,
Long
>
{
public
interface
IPreplanPictureDao
extends
BaseDao
<
PreplanPicture
,
Long
>
{
@Query
(
value
=
"select * from f_preplan_picture where equipment_id=?1 and type = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from f_preplan_picture where equipment_id=?1 and type = ?2"
,
nativeQuery
=
true
)
PreplanPicture
selectOne
(
BigInteger
id
,
int
type
);
PreplanPicture
selectOne
(
Long
id
,
int
type
);
List
<
PreplanPicture
>
findByEquipmentId
(
BigInteger
equipmentId
);
List
<
PreplanPicture
>
findByEquipmentId
(
Long
equipmentId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IRiskSourceEquipmentDao.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.RiskSourceEquipme
nt
;
//import com.yeejoin.amos.fas.dao.entity.RiskSourceEquipmentPoi
nt;
//
import
java.util.List
;
//
import java.util.List;
//
@Repository
(
"iRiskSourceEquipmentDao"
)
//
@Repository("iRiskSourceEquipmentDao")
public
interface
IRiskSourceEquipmentDao
extends
BaseDao
<
RiskSourceEquipme
nt
,
Long
>
{
//public interface IRiskSourceEquipmentDao extends BaseDao<RiskSourceEquipmentPoi
nt, Long> {
//
/**
//
/**
* 查询指定风险点的所有关联设备信息
//
* 查询指定风险点的所有关联设备信息
* @param riskSourceId
//
* @param riskSourceId
* @return
//
* @return
*/
//
*/
List
<
RiskSourceEquipment
>
findByRiskSourceIdAndEquipmentId
(
Long
riskSourceId
,
Long
equipmentId
);
// List<RiskSourceEquipmentPoint> findByRiskSourceIdAndEquipmentId(Long riskSourceId,
Long equipmentId);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IRiskSourcePointInputitemDao.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.List
;
//
import java.util.List;
//
import
org.springframework.data.jpa.repository.Modifying
;
//
import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem
;
//
import com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem;
//
@Repository
(
"iRiskSourcePointInputitemDao"
)
//
@Repository("iRiskSourcePointInputitemDao")
public
interface
IRiskSourcePointInputitemDao
extends
BaseDao
<
RiskSourcePointInputitem
,
Long
>{
//
public interface IRiskSourcePointInputitemDao extends BaseDao<RiskSourcePointInputitem, Long>{
//
List
<
RiskSourcePointInputitem
>
findAllByRiskSourceIdAndPointId
(
Long
riskSourceId
,
Long
pointId
);
//
List<RiskSourcePointInputitem> findAllByRiskSourceIdAndPointId(Long riskSourceId, Long pointId);
RiskSourcePointInputitem
findAllByRiskSourceIdAndPointIdAndPointInputitemId
(
Long
riskSourceId
,
Long
pointId
,
Long
pointInputitemId
);
//
RiskSourcePointInputitem findAllByRiskSourceIdAndPointIdAndPointInputitemId(Long riskSourceId, Long pointId,Long pointInputitemId);
//
@Modifying
//
@Modifying
@Query
(
value
=
"delete from f_risk_source_point_inputitem where risk_source_id = (?1) and point_id = (?2)"
,
nativeQuery
=
true
)
//
@Query(value="delete from f_risk_source_point_inputitem where risk_source_id = (?1) and point_id = (?2)", nativeQuery = true)
void
removeByRSIdAndPId
(
String
riskSourceId
,
String
pointId
);
//
void removeByRSIdAndPId(String riskSourceId,String pointId);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IUserDao.java
View file @
4f6fa381
...
@@ -3,12 +3,11 @@ package com.yeejoin.amos.fas.business.dao.repository;
...
@@ -3,12 +3,11 @@ package com.yeejoin.amos.fas.business.dao.repository;
import
com.yeejoin.amos.fas.dao.entity.SUser
;
import
com.yeejoin.amos.fas.dao.entity.SUser
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.List
;
public
interface
IUserDao
extends
BaseDao
<
SUser
,
Long
>
{
public
interface
IUserDao
extends
BaseDao
<
SUser
,
Long
>
{
@Query
(
"select u from SUser u where u.isDelete = ?2 and u.departmentId = ?1"
)
@Query
(
"select u from SUser u where u.isDelete = ?2 and u.departmentId = ?1"
)
public
List
<
SUser
>
findUserByDeptmentId
(
BigInteger
departmentId
,
byte
isDel
);
public
List
<
SUser
>
findUserByDeptmentId
(
Long
departmentId
,
byte
isDel
);
SUser
findById
(
Long
id
);
SUser
findById
(
Long
id
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FmeaBindParam.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
import
java.util.List
;
public
class
FmeaBindParam
{
private
Long
fmeaId
;
private
Long
pointId
;
private
Long
equipmentId
;
private
List
<
Long
>
equipmentPointIds
;
private
List
<
Long
>
pointInputitemIds
;
public
Long
getFmeaId
()
{
return
fmeaId
;
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
public
List
<
Long
>
getEquipmentPointIds
()
{
return
equipmentPointIds
;
}
public
void
setEquipmentPointIds
(
List
<
Long
>
equipmentPointIds
)
{
this
.
equipmentPointIds
=
equipmentPointIds
;
}
public
List
<
Long
>
getPointInputitemIds
()
{
return
pointInputitemIds
;
}
public
void
setPointInputitemIds
(
List
<
Long
>
pointInputitemIds
)
{
this
.
pointInputitemIds
=
pointInputitemIds
;
}
public
Long
getPointId
()
{
return
pointId
;
}
public
void
setPointId
(
Long
pointId
)
{
this
.
pointId
=
pointId
;
}
public
Long
getEquipmentId
()
{
return
equipmentId
;
}
public
void
setEquipmentId
(
Long
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FmeaParam.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
public
class
FmeaParam
extends
CommonPageable
{
private
Long
fmeaId
;
public
Long
getFmeaId
()
{
return
fmeaId
;
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/PointListParam.java
View file @
4f6fa381
...
@@ -29,7 +29,7 @@ public class PointListParam extends CommonPageable{
...
@@ -29,7 +29,7 @@ public class PointListParam extends CommonPageable{
*/
*/
private
String
inputType
;
private
String
inputType
;
private
Long
riskSource
Id
;
private
Long
fmea
Id
;
/**
/**
* 公司
* 公司
...
@@ -84,11 +84,11 @@ public class PointListParam extends CommonPageable{
...
@@ -84,11 +84,11 @@ public class PointListParam extends CommonPageable{
this
.
inputType
=
inputType
;
this
.
inputType
=
inputType
;
}
}
public
Long
get
RiskSource
Id
()
{
public
Long
get
Fmea
Id
()
{
return
riskSource
Id
;
return
fmea
Id
;
}
}
public
void
set
RiskSourceId
(
Long
riskSource
Id
)
{
public
void
set
FmeaId
(
Long
fmea
Id
)
{
this
.
riskSourceId
=
riskSource
Id
;
this
.
fmeaId
=
fmea
Id
;
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/QueryParamUtil.java
View file @
4f6fa381
...
@@ -25,8 +25,8 @@ public class QueryParamUtil {
...
@@ -25,8 +25,8 @@ public class QueryParamUtil {
param
.
setPointId
(
Long
.
valueOf
(
value
));
param
.
setPointId
(
Long
.
valueOf
(
value
));
}
else
if
(
"inputType"
.
equals
(
name
)){
}
else
if
(
"inputType"
.
equals
(
name
)){
param
.
setInputType
(
value
);
param
.
setInputType
(
value
);
}
else
if
(
"
riskSource
Id"
.
equals
(
name
)){
}
else
if
(
"
fmea
Id"
.
equals
(
name
)){
param
.
set
RiskSource
Id
(
Long
.
valueOf
(
value
));
param
.
set
Fmea
Id
(
Long
.
valueOf
(
value
));
}
}
}
}
if
(
commonPageable
!=
null
)
{
if
(
commonPageable
!=
null
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/RiskSourceParam.java
deleted
100644 → 0
View file @
959c7e9b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
public
class
RiskSourceParam
extends
CommonPageable
{
private
Long
riskSourceId
;
public
Long
getRiskSourceId
()
{
return
riskSourceId
;
}
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/CommonService.java
View file @
4f6fa381
...
@@ -12,7 +12,6 @@ import org.springframework.data.domain.Page;
...
@@ -12,7 +12,6 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -30,7 +29,7 @@ public class CommonService implements ICommonService {
...
@@ -30,7 +29,7 @@ public class CommonService implements ICommonService {
@Override
@Override
public
List
<
SDepartment
>
getDepartment
(
Long
companyId
)
{
public
List
<
SDepartment
>
getDepartment
(
Long
companyId
)
{
return
deptmentDao
.
findDeptmentByCompanyId
(
BigInteger
.
valueOf
(
companyId
),
(
byte
)
0
);
return
deptmentDao
.
findDeptmentByCompanyId
(
Long
.
valueOf
(
companyId
),
(
byte
)
0
);
}
}
@Override
@Override
...
@@ -51,7 +50,7 @@ public class CommonService implements ICommonService {
...
@@ -51,7 +50,7 @@ public class CommonService implements ICommonService {
@Override
@Override
public
List
<
SUser
>
getUsers
(
Long
departmentId
)
{
public
List
<
SUser
>
getUsers
(
Long
departmentId
)
{
return
userDao
.
findUserByDeptmentId
(
new
BigInteger
(
departmentId
.
toString
()),
(
byte
)
0
);
return
userDao
.
findUserByDeptmentId
(
new
Long
(
departmentId
.
toString
()),
(
byte
)
0
);
}
}
@Override
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
4f6fa381
...
@@ -11,7 +11,6 @@ import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
...
@@ -11,7 +11,6 @@ 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.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
...
@@ -24,8 +23,6 @@ import com.yeejoin.amos.fas.dao.entity.FireEquipment;
...
@@ -24,8 +23,6 @@ import com.yeejoin.amos.fas.dao.entity.FireEquipment;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.op.core.common.query.DaoCriteria
;
import
com.yeejoin.amos.op.core.common.query.DaoCriteria
;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -48,7 +45,6 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -48,7 +45,6 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -168,7 +164,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -168,7 +164,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
* @throws Exception
* @throws Exception
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
BigInteger
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
{
public
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
Long
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
EquipmentFireEquipment
equipmentFireEquipment
:
list
)
{
for
(
EquipmentFireEquipment
equipmentFireEquipment
:
list
)
{
int
count
=
equipmentFireEquipmentDao
.
findByEqmtIdAndFireEqmtId
(
equipmentId
,
equipmentFireEquipment
.
getFireEquipmentId
());
int
count
=
equipmentFireEquipmentDao
.
findByEqmtIdAndFireEqmtId
(
equipmentId
,
equipmentFireEquipment
.
getFireEquipmentId
());
...
@@ -202,7 +198,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -202,7 +198,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Long
>
removeFireEqmtBind
(
BigInteger
equipmentId
,
String
[]
fireEquipmentIds
)
{
public
List
<
Long
>
removeFireEqmtBind
(
Long
equipmentId
,
String
[]
fireEquipmentIds
)
{
List
<
Long
>
ids
=
new
ArrayList
<>();
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
String
id
:
fireEquipmentIds
)
{
for
(
String
id
:
fireEquipmentIds
)
{
long
result
=
0
;
long
result
=
0
;
...
@@ -225,7 +221,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -225,7 +221,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
* @param equipmentId
* @param equipmentId
* @return
* @return
*/
*/
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
BigInteger
equipmentId
)
{
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
)
{
int
start
=
-
1
;
int
start
=
-
1
;
int
length
=
-
1
;
int
length
=
-
1
;
if
(
null
!=
commonPageable
)
{
if
(
null
!=
commonPageable
)
{
...
@@ -242,7 +238,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -242,7 +238,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override
@Override
public
Equipment
saveImg
(
MultipartFile
file
,
Equipment
equipment
,
int
type
,
Long
userId
)
{
public
Equipment
saveImg
(
MultipartFile
file
,
Equipment
equipment
,
int
type
,
Long
userId
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
BigInteger
equipmentId
=
BigInteger
.
valueOf
(
equipment
.
getId
());
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
PreplanPicture
pp
=
preplanPictureDao
.
selectOne
(
equipmentId
,
type
);
if
(
pp
==
null
)
{
if
(
pp
==
null
)
{
...
@@ -309,7 +305,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -309,7 +305,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
if
(
equipment
.
getCreateDate
()
==
null
)
{
if
(
equipment
.
getCreateDate
()
==
null
)
{
equipment
.
setCreateDate
(
iEquipmentDao
.
findById
(
equipment
.
getId
()).
getCreateDate
()
==
null
?
new
Date
()
:
iEquipmentDao
.
findById
(
equipment
.
getId
()).
getCreateDate
());
equipment
.
setCreateDate
(
iEquipmentDao
.
findById
(
equipment
.
getId
()).
getCreateDate
()
==
null
?
new
Date
()
:
iEquipmentDao
.
findById
(
equipment
.
getId
()).
getCreateDate
());
}
}
BigInteger
equipmentId
=
BigInteger
.
valueOf
(
equipment
.
getId
());
Long
equipmentId
=
Long
.
valueOf
(
equipment
.
getId
());
for
(
int
i
=
0
;
i
<
imgs
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
imgs
.
length
;
i
++)
{
MultipartFile
file
=
imgs
[
i
].
getFile
();
MultipartFile
file
=
imgs
[
i
].
getFile
();
if
(
null
!=
file
)
{
if
(
null
!=
file
)
{
...
@@ -370,7 +366,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -370,7 +366,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
equipment.setCreateDate(iEquipmentDao.findOne(equipment.getId()).getCreateDate()==null?new Date():iEquipmentDao.findOne(equipment.getId()).getCreateDate());
equipment.setCreateDate(iEquipmentDao.findOne(equipment.getId()).getCreateDate()==null?new Date():iEquipmentDao.findOne(equipment.getId()).getCreateDate());
}
}
BigInteger equipmentId = BigInteger.valueOf(equipment.getId());
Long equipmentId = Long.valueOf(equipment.getId());
PreplanPicture pp = preplanPictureDao.selectOne(equipmentId, type);
PreplanPicture pp = preplanPictureDao.selectOne(equipmentId, type);
if(pp == null){
if(pp == null){
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
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.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
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.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
...
@@ -21,7 +23,11 @@ import org.springframework.stereotype.Service;
...
@@ -21,7 +23,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
@Service
(
"fmeaService"
)
@Service
(
"fmeaService"
)
public
class
FmeaServiceImpl
implements
IFmeaService
{
public
class
FmeaServiceImpl
implements
IFmeaService
{
...
@@ -48,21 +54,29 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -48,21 +54,29 @@ public class FmeaServiceImpl implements IFmeaService {
@Autowired
@Autowired
private
RemoteRuleServer
remoteRuleServer
;
private
RemoteRuleServer
remoteRuleServer
;
@Autowired
private
FmeaEquipmentPointMapper
fmeaEquipmentPointMapper
;
@Autowired
private
FmeaPointInputitemMapper
fmeaPointInputitemMapper
;
@Override
@Override
public
Fmea
editFmea
(
HashMap
<
String
,
Object
>
paramMap
)
{
public
void
editFmea
(
HashMap
<
String
,
Object
>
paramMap
)
{
Fmea
fmea
=
(
Fmea
)
paramMap
.
get
(
"fmea
"
);
List
<
Fmea
>
fmeas
=
(
List
<
Fmea
>)
paramMap
.
get
(
"fmeas
"
);
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
();
fmeas
.
forEach
(
fmea
->
{
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
)
);
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
(
);
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
fmea
.
getRiskSourceId
(
));
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
fmea
.
setRiskSource
(
riskSource
);
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
fmea
.
getRiskSourceId
()
);
iFmeaDao
.
save
(
fmea
);
fmea
.
setRiskSource
(
riskSource
);
iFmeaDao
.
save
(
fmea
);
updateRpniInfo
(
fmea
.
getRiskSourceId
());
updateRpniInfo
(
fmea
.
getRiskSourceId
());
return
fmea
;
})
;
}
}
@Override
@Override
public
void
deleteFmea
(
Long
[]
fmeaIds
)
{
public
void
deleteFmea
(
Long
[]
fmeaIds
)
{
fmeaEquipmentPointMapper
.
deleteByFmeaIds
(
fmeaIds
);
fmeaPointInputitemMapper
.
deleteByFmeaIds
(
fmeaIds
);
iFmeaDao
.
deleteById
(
fmeaIds
);
iFmeaDao
.
deleteById
(
fmeaIds
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
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.FireEquipPointMapper
;
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.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.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceEquimentMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
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.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
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.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.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDataDao
;
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.IFireEquipmentPointDao
;
...
@@ -19,42 +24,44 @@ import com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao;
...
@@ -19,42 +24,44 @@ import com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
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.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourcePointInputitemDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRpnChangeLogDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRpnChangeLogDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IUserDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IUserDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.
RiskSource
Param
;
import
com.yeejoin.amos.fas.business.param.
FmeaBind
Param
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
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.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.Node3dVoService
;
import
com.yeejoin.amos.fas.business.service.intfc.Node3dVoService
;
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.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyRo
;
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.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRo
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRo
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
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.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentData
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentData
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
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.PPoint
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourceEquipment
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem
;
import
com.yeejoin.amos.fas.dao.entity.RpnChangeLog
;
import
com.yeejoin.amos.fas.dao.entity.RpnChangeLog
;
import
com.yeejoin.amos.fas.dao.entity.SUser
;
import
com.yeejoin.amos.fas.dao.entity.SUser
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
...
@@ -68,7 +75,6 @@ import org.springframework.data.redis.core.HashOperations;
...
@@ -68,7 +75,6 @@ import org.springframework.data.redis.core.HashOperations;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.Redis
;
...
@@ -76,7 +82,6 @@ import org.typroject.tyboot.component.cache.enumeration.CacheType;
...
@@ -76,7 +82,6 @@ import org.typroject.tyboot.component.cache.enumeration.CacheType;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -85,6 +90,7 @@ import java.util.Date;
...
@@ -85,6 +90,7 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.UUID
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
...
@@ -99,16 +105,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -99,16 +105,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
RiskSourceServiceImpl
.
class
);
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
RiskSourceServiceImpl
.
class
);
p
ublic
static
final
String
DATETYPE_YYYYMMDD
=
"yyyyMMdd"
;
//天
p
rivate
static
final
String
DATETYPE_YYYYMMDD
=
"yyyyMMdd"
;
//天
p
ublic
static
final
String
DATETYPE_YYYYWW
=
"yyyyWW"
;
//周
p
rivate
static
final
String
DATETYPE_YYYYWW
=
"yyyyWW"
;
//周
p
ublic
static
final
String
DATETYPE_YYYYS
=
"yyyyS"
;
//季节
p
rivate
static
final
String
DATETYPE_YYYYS
=
"yyyyS"
;
//季节
p
ublic
static
final
String
DATETYPE_YYYYMM
=
"yyyyMM"
;
//月
p
rivate
static
final
String
DATETYPE_YYYYMM
=
"yyyyMM"
;
//月
p
ublic
static
final
String
DATETYPE_YYYY
=
"yyyy"
;
//年
p
rivate
static
final
String
DATETYPE_YYYY
=
"yyyy"
;
//年
private
static
final
String
PACKAGE_ID
=
"风险管控/risk"
;
//计算风险点rpni对应规则packageid
private
static
final
String
PACKAGE_ID_COUNT_RPNI
=
"风险管控/countRPNi"
;
@Autowired
@Autowired
private
IRiskSourceDao
iRiskSourceDao
;
private
IRiskSourceDao
iRiskSourceDao
;
...
@@ -117,6 +127,12 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -117,6 +127,12 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
IFmeaDao
iFmeaDao
;
private
IFmeaDao
iFmeaDao
;
@Autowired
@Autowired
private
IRiskLevelDao
riskLevelDao
;
@Autowired
private
IEvaluationModelDao
iEvaluationModelDao
;
@Autowired
private
FmeaMapper
fmeaMapper
;
private
FmeaMapper
fmeaMapper
;
@Autowired
@Autowired
...
@@ -126,13 +142,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -126,13 +142,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
RiskSourceMapper
riskSourceMapper
;
private
RiskSourceMapper
riskSourceMapper
;
@Autowired
@Autowired
private
Node3dVoService
node3dVoService
;
private
FireEquipMapper
fireEquipMapper
;
@Autowired
private
RiskSourceEquimentMapper
riskSourceEquimentMapper
;
@Autowired
@Autowired
private
IRiskSourceEquipmentDao
iRiskSourceEquipmentDao
;
private
Node3dVoService
node3dVoService
;
@Autowired
@Autowired
private
IFireEquipmentDao
iFireEquipmentDao
;
private
IFireEquipmentDao
iFireEquipmentDao
;
...
@@ -140,19 +153,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -140,19 +153,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
ImpAndFireEquipMapper
impAndFireEquipMapper
;
private
ImpAndFireEquipMapper
impAndFireEquipMapper
;
@Autowired
@Autowired
private
IPreplanPictureDao
iPreplanPictureDao
;
private
IPreplanPictureDao
iPreplanPictureDao
;
@Autowired
@Autowired
private
FireEquipPointMapper
fireEquipPointMapper
;
private
FireEquipPointMapper
fireEquipPointMapper
;
@Autowired
@Autowired
private
IRiskSourcePointInputitemDao
iRiskSourcePointInputitemDao
;
private
IRiskLevelDao
iRiskLevelDao
;
@Autowired
IRiskLevelDao
iRiskLevelDao
;
@Autowired
@Autowired
private
IPPointDao
iPPointDao
;
private
IPPointDao
iPPointDao
;
...
@@ -160,12 +168,12 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -160,12 +168,12 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
IUserDao
iUserDao
;
private
IUserDao
iUserDao
;
@Autowired
@Autowired
private
IRpnChangeLogDao
iRpnChangeLogDao
;
private
IRpnChangeLogDao
iRpnChangeLogDao
;
@Autowired
@Autowired
IContingencyOriginalDataDao
iContingencyOriginalDataDao
;
IContingencyOriginalDataDao
iContingencyOriginalDataDao
;
@Autowired
@Autowired
IFireEquipmentPointDao
iFireEquipmentPointDao
;
IFireEquipmentPointDao
iFireEquipmentPointDao
;
...
@@ -174,15 +182,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -174,15 +182,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
RemoteRuleServer
remoteRuleServer
;
private
RemoteRuleServer
remoteRuleServer
;
private
static
final
String
PACKAGE_ID
=
"风险管控/risk"
;
@Autowired
@Autowired
private
RemoteWebSocketServer
remoteWebSocketServer
;
private
RemoteWebSocketServer
remoteWebSocketServer
;
//计算风险点rpni对应规则packageid
private
static
final
String
PACKAGE_ID_COUNT_RPNI
=
"风险管控/countRPNi"
;
@Autowired
@Autowired
private
EquipCommunicationDao
equipCommunicationDao
;
private
EquipCommunicationDao
equipCommunicationDao
;
@Autowired
@Autowired
private
IEquipmentService
equipmentService
;
private
IEquipmentService
equipmentService
;
...
@@ -195,6 +201,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -195,6 +201,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
IContingencyInstance
iContingencyInstance
;
IContingencyInstance
iContingencyInstance
;
@Autowired
private
FmeaEquipmentPointMapper
fmeaEquipmentPointMapper
;
@Autowired
private
FmeaPointInputitemMapper
fmeaPointInputitemMapper
;
public
static
String
cacheKeyForCanBeRunning
()
{
public
static
String
cacheKeyForCanBeRunning
()
{
return
Redis
.
genKey
(
CacheType
.
ERASABLE
.
name
(),
"CONTINGENCYRUNING"
);
return
Redis
.
genKey
(
CacheType
.
ERASABLE
.
name
(),
"CONTINGENCYRUNING"
);
...
@@ -217,8 +228,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -217,8 +228,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource
.
setCreateDate
(
oldRiskSource
.
getCreateDate
());
riskSource
.
setCreateDate
(
oldRiskSource
.
getCreateDate
());
riskSource
.
setFmeaList
(
oldRiskSource
.
getFmeaList
());
riskSource
.
setFmeaList
(
oldRiskSource
.
getFmeaList
());
riskSource
.
setIncrement
(
oldRiskSource
.
getIncrement
());
riskSource
.
setIncrement
(
oldRiskSource
.
getIncrement
());
riskSource
.
setRiskSourceEquipment
(
oldRiskSource
.
getRiskSourceEquipment
());
//
riskSource.setRiskSourceEquipment(oldRiskSource.getRiskSourceEquipment());
riskSource
.
setRiskSourcePointInputitem
(
oldRiskSource
.
getRiskSourcePointInputitem
());
//
riskSource.setRiskSourcePointInputitem(oldRiskSource.getRiskSourcePointInputitem());
riskSource
.
setRpn
(
oldRiskSource
.
getRpn
());
riskSource
.
setRpn
(
oldRiskSource
.
getRpn
());
riskSource
.
setRpnChangeLogList
(
oldRiskSource
.
getRpnChangeLogList
());
riskSource
.
setRpnChangeLogList
(
oldRiskSource
.
getRpnChangeLogList
());
riskSource
.
setRpni
(
oldRiskSource
.
getRpni
());
riskSource
.
setRpni
(
oldRiskSource
.
getRpni
());
...
@@ -240,7 +251,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -240,7 +251,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Override
public
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
{
public
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
{
Long
id
=
Collections
.
min
(
Arrays
.
asList
(
riskSourceId
));
Long
id
=
Collections
.
min
(
Arrays
.
asList
(
riskSourceId
));
Long
parentId
=
0
l
;
Long
parentId
=
0
L
;
if
(
null
!=
id
)
{
if
(
null
!=
id
)
{
RiskSource
rs
=
iRiskSourceDao
.
findById
(
id
);
RiskSource
rs
=
iRiskSourceDao
.
findById
(
id
);
parentId
=
rs
.
getParentId
();
parentId
=
rs
.
getParentId
();
...
@@ -252,9 +263,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -252,9 +263,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
iRiskSourceDao
.
delete
(
rId
);
iRiskSourceDao
.
delete
(
rId
);
}
}
if
(
null
!=
parentId
)
{
//
if (null != parentId) {
updateRiskSourceRpni
(
parentId
);
////
updateRiskSourceRpni(parentId);
}
////
}
//同步数据
//同步数据
node3dVoService
.
syncData
(()
->
node3dVoService
.
incrementalRemove
(
Node3dVoService
.
DATATYPE_RISKSOURCE
));
node3dVoService
.
syncData
(()
->
node3dVoService
.
incrementalRemove
(
Node3dVoService
.
DATATYPE_RISKSOURCE
));
...
@@ -265,8 +276,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -265,8 +276,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
)
{
long
total
=
riskSourceMapper
.
countPageData
(
param
);
long
total
=
riskSourceMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskSourceMapper
.
queryRiskSourceByPage
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskSourceMapper
.
queryRiskSourceByPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
}
}
...
@@ -283,7 +293,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -283,7 +293,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
Map
queryFor3DStatistics
()
{
public
Map
queryFor3DStatistics
()
{
Map
result
=
this
.
riskSourceMapper
.
statistics3dCount
();
Map
<
String
,
List
>
result
=
riskSourceMapper
.
statistics3dCount
();
result
.
put
(
"equipClassify"
,
riskSourceMapper
.
statisticsEquipClassify
());
result
.
put
(
"equipClassify"
,
riskSourceMapper
.
statisticsEquipClassify
());
result
.
put
(
"pointStatus"
,
riskSourceMapper
.
statisticsPointStatus
());
result
.
put
(
"pointStatus"
,
riskSourceMapper
.
statisticsPointStatus
());
result
.
put
(
"riskLevel"
,
riskSourceMapper
.
statisticsRiskLevel
());
result
.
put
(
"riskLevel"
,
riskSourceMapper
.
statisticsRiskLevel
());
...
@@ -299,7 +309,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -299,7 +309,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
Map
queryForRiseUp
()
throws
Exception
{
public
Map
queryForRiseUp
()
throws
Exception
{
Map
<
String
,
Map
>
result
=
new
HashMap
<>();
Map
<
String
,
Map
>
result
=
new
HashMap
<>();
String
startTime
,
endTime
=
""
;
String
startTime
,
endTime
;
Date
now
=
new
Date
();
Date
now
=
new
Date
();
Date
[]
timeArrayMonth
=
getDateInfo
(
now
,
DATETYPE_YYYYMM
);
Date
[]
timeArrayMonth
=
getDateInfo
(
now
,
DATETYPE_YYYYMM
);
Date
[]
timeArraySeason
=
getDateInfo
(
now
,
DATETYPE_YYYYS
);
Date
[]
timeArraySeason
=
getDateInfo
(
now
,
DATETYPE_YYYYS
);
...
@@ -329,13 +339,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -329,13 +339,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
result
;
return
result
;
}
}
public
List
<
Map
>
queryForMatrix
()
{
public
List
<
Map
>
queryForMatrix
()
{
return
this
.
riskSourceMapper
.
queryForMatrix
();
return
this
.
riskSourceMapper
.
queryForMatrix
();
}
}
private
static
Date
[]
getDateInfo
(
Date
date
,
String
datetype
)
throws
Exception
{
public
static
Date
[]
getDateInfo
(
Date
date
,
String
datetype
)
throws
Exception
{
Date
[]
returnDate
=
new
Date
[
2
];
Date
[]
returnDate
=
new
Date
[
2
];
...
@@ -372,110 +380,84 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -372,110 +380,84 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Override
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
()
{
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
()
{
// TODO Auto-generated method stub
return
riskSourceMapper
.
getRiskSources
();
return
riskSourceMapper
.
getRiskSources
();
}
}
@Override
// @Override
public
Page
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
)
{
// public Page<HashMap<String, Object>> getRiskSourcePoints(RiskSourceParam param) {
long
total
=
riskSourceMapper
.
getRiskSourcePointCount
(
param
);
// long total = riskSourceMapper.getRiskSourcePointCount(param);
List
<
HashMap
<
String
,
Object
>>
content
=
riskSourceMapper
.
getRiskSourcePoints
(
param
);
// List<HashMap<String, Object>> content = riskSourceMapper.getRiskSourcePoints(param);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
// Page<HashMap<String, Object>> result = new PageImpl<HashMap<String, Object>>(content, param, total);
return
result
;
// return result;
}
// }
/**
* 创建绑定关系
*
* @param riskSourceEquipments
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
List
<
RiskSourceEquipment
>
bindFireEquiment
(
Long
riskSourceId
,
List
<
RiskSourceEquipment
>
riskSourceEquipments
)
{
public
List
<
FmeaEquipmentPoint
>
bindFireEquiment
(
FmeaBindParam
fmeaBindParam
)
{
List
<
RiskSourceEquipment
>
returnList
=
new
ArrayList
<>();
Long
fmeaId
=
fmeaBindParam
.
getFmeaId
();
List
<
Long
>
equipmentPointIds
=
fmeaEquipmentPointMapper
.
listEquipmentPointIdsByEquipmentId
(
fmeaBindParam
.
getEquipmentId
());
//删除已有的所有关联
if
(!
CollectionUtils
.
isEmpty
(
equipmentPointIds
))
{
for
(
RiskSourceEquipment
riskSourceEquipment
:
riskSourceEquipments
)
{
fmeaEquipmentPointMapper
.
deleteByFmeaIdAndEquipmentPointIds
(
fmeaId
,
equipmentPointIds
);
List
<
RiskSourceEquipment
>
existRelation
=
iRiskSourceEquipmentDao
.
findByRiskSourceIdAndEquipmentId
(
riskSourceId
,
riskSourceEquipment
.
getEquipmentId
());
if
(!
CollectionUtils
.
isEmpty
(
existRelation
))
for
(
RiskSourceEquipment
relation
:
existRelation
)
iRiskSourceEquipmentDao
.
delete
(
relation
.
getId
());
}
}
List
<
FmeaEquipmentPoint
>
returnList
=
new
ArrayList
<>();
for
(
Long
equipmentPointId
:
fmeaBindParam
.
getEquipmentPointIds
())
{
//添加新的关联关系
FmeaEquipmentPoint
fmeaEquipmentPoint
=
new
FmeaEquipmentPoint
();
for
(
RiskSourceEquipment
riskSourceEquipment
:
riskSourceEquipments
)
{
fmeaEquipmentPoint
.
setFmeaId
(
fmeaId
);
riskSourceEquipment
.
setCreateDate
(
new
Date
());
fmeaEquipmentPoint
.
setEquipmentPointId
(
equipmentPointId
);
riskSourceEquipment
=
this
.
iRiskSourceEquipmentDao
.
save
(
riskSourceEquipment
);
returnList
.
add
(
fmeaEquipmentPoint
);
returnList
.
add
(
riskSourceEquipment
);
}
if
(!
CollectionUtils
.
isEmpty
(
returnList
))
{
fmeaEquipmentPointMapper
.
saveBatch
(
returnList
);
}
}
return
returnList
;
return
returnList
;
}
}
@Override
public
String
[]
removeBoundRelation
(
String
[]
idArray
)
{
public
List
<
FmeaPointInputitem
>
bindPointInputitem
(
FmeaBindParam
fmeaBindParam
)
{
for
(
String
id
:
idArray
)
Long
fmeaId
=
fmeaBindParam
.
getFmeaId
();
this
.
iRiskSourceEquipmentDao
.
delete
(
Long
.
parseLong
(
id
));
List
<
Long
>
pointInputitemIds
=
fmeaPointInputitemMapper
.
listPointInputitemIdsByPointId
(
fmeaBindParam
.
getPointId
());
return
idArray
;
if
(!
CollectionUtils
.
isEmpty
(
pointInputitemIds
))
{
}
fmeaPointInputitemMapper
.
deleteByFmeaIdAndPointInputitemIds
(
fmeaId
,
pointInputitemIds
);
}
List
<
FmeaPointInputitem
>
returnList
=
new
ArrayList
<>();
//解除绑定
for
(
Long
pointInputitemId
:
fmeaBindParam
.
getPointInputitemIds
())
{
FmeaPointInputitem
fmeaPointInputitem
=
new
FmeaPointInputitem
();
/**
fmeaPointInputitem
.
setFmeaId
(
fmeaId
);
* 查询所有已绑定的关系列表
fmeaPointInputitem
.
setPointInputitemId
(
pointInputitemId
);
*
returnList
.
add
(
fmeaPointInputitem
);
* @param riskSourceId
}
* @return
if
(!
CollectionUtils
.
isEmpty
(
returnList
))
{
*/
fmeaPointInputitemMapper
.
saveBatch
(
returnList
);
public
Page
queryForView
(
CommonPageable
commonPageable
,
String
riskSourceId
)
{
}
Long
total
=
riskSourceEquimentMapper
.
queryForViewCount
(
riskSourceId
);
return
returnList
;
List
list
=
riskSourceEquimentMapper
.
queryForView
(
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
(),
riskSourceId
);
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
}
}
// public String[] removeBoundRelation(String[] idArray) {
// for (String id : idArray)
// this.iRiskSourceEquipmentDao.delete(Long.parseLong(id));
// return idArray;
// }
/**
/**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
*
* @param equipmentId
* @return
*/
*/
public
Page
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
riskSourceId
,
String
equipmentId
,
String
fname
)
{
public
Page
<
Map
>
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
equipmentId
,
String
fname
)
{
Long
total
=
riskSourceEquimentMapper
.
queryEquimentRelationCount
(
riskSourceId
,
equipmentId
,
fname
);
Long
total
=
fireEquipMapper
.
queryEquimentRelationCount
(
equipmentId
,
fname
);
List
list
=
this
.
riskSourceEquimentMapper
.
queryEquimentRelation
(
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
(),
riskSourceId
,
equipmentId
,
fname
);
List
<
Map
>
list
=
fireEquipMapper
.
queryEquimentRelation
(
commonPageable
.
getOffset
(),
commonPageable
.
getPageSize
(),
equipmentId
,
fname
);
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
new
PageImpl
<>(
list
,
commonPageable
,
total
);
return
result
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
listEquipmentPointById
(
Long
fmeaId
,
Long
equipmentId
,
String
equipmentPointName
)
{
public
List
<
RiskSourcePointInputitem
>
bindPointInputitem
(
Long
riskSourceId
,
List
<
Map
<
String
,
Object
>>
list
=
fmeaEquipmentPointMapper
.
listEquipmentPoint
(
fmeaId
,
equipmentId
,
equipmentPointName
);
List
<
RiskSourcePointInputitem
>
pointInputitems
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
Lists
.
newArrayList
();
//删除已有的所有关联
for
(
RiskSourcePointInputitem
riskSourcePointInputitem
:
pointInputitems
)
{
List
<
RiskSourcePointInputitem
>
existRelation
=
iRiskSourcePointInputitemDao
.
findAllByRiskSourceIdAndPointId
(
riskSourceId
,
riskSourcePointInputitem
.
getPointId
());
if
(!
CollectionUtils
.
isEmpty
(
existRelation
))
for
(
RiskSourcePointInputitem
relation
:
existRelation
)
{
iRiskSourcePointInputitemDao
.
delete
(
relation
.
getId
());
}
}
}
return
list
;
//新增
for
(
RiskSourcePointInputitem
riskSourcePointInputitem
:
pointInputitems
)
{
riskSourcePointInputitem
.
setCreateDate
(
new
Date
());
iRiskSourcePointInputitemDao
.
save
(
riskSourcePointInputitem
);
}
return
pointInputitems
;
}
}
@Async
@Async
public
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
{
public
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
{
//处理设备和巡检数据
//处理设备和巡检数据
deviceData
.
setNodeState
(
deviceData
.
getValue
());
deviceData
.
setNodeState
(
deviceData
.
getValue
());
String
batchNo
=
UUID
.
randomUUID
().
toString
();
String
batchNo
=
UUID
.
randomUUID
().
toString
();
deviceData
.
setBatchNo
(
batchNo
);
deviceData
.
setBatchNo
(
batchNo
);
...
@@ -530,7 +512,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -530,7 +512,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
contingencyRo
.
setFireEquipmentPosition
(
fireEquipment
.
getPosition3d
());
contingencyRo
.
setFireEquipmentPosition
(
fireEquipment
.
getPosition3d
());
List
<
PreplanPicture
>
pictures
=
iPreplanPictureDao
.
findByEquipmentId
(
BigInteger
.
valueOf
(
equipment
.
getId
()));
List
<
PreplanPicture
>
pictures
=
iPreplanPictureDao
.
findByEquipmentId
(
Long
.
valueOf
(
equipment
.
getId
()));
if
(!
CollectionUtils
.
isEmpty
(
pictures
))
{
if
(!
CollectionUtils
.
isEmpty
(
pictures
))
{
for
(
PreplanPicture
picture
:
pictures
)
{
for
(
PreplanPicture
picture
:
pictures
)
{
if
(
1
==
picture
.
getType
())
if
(
1
==
picture
.
getType
())
...
@@ -554,7 +536,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -554,7 +536,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
public
boolean
asymbleWithParent
(
String
bacthNo
,
List
<
RiskSource
>
riskSourceList
,
String
from
,
Long
fromId
,
String
nodeState
,
String
originalNodeState
,
List
<
RiskSource
PointInputitem
>
pointInputitems
)
throws
Exception
{
public
boolean
asymbleWithParent
(
String
bacthNo
,
List
<
RiskSource
>
riskSourceList
,
String
from
,
Long
fromId
,
String
nodeState
,
String
originalNodeState
,
List
<
Fmea
PointInputitem
>
pointInputitems
)
throws
Exception
{
if
(!
CollectionUtils
.
isEmpty
(
riskSourceList
))
{
if
(!
CollectionUtils
.
isEmpty
(
riskSourceList
))
{
for
(
RiskSource
riskSource
:
riskSourceList
)
{
for
(
RiskSource
riskSource
:
riskSourceList
)
{
//当前规则
//当前规则
...
@@ -599,7 +581,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -599,7 +581,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
private
RiskSourceRo
transfer
(
String
bacthNo
,
RiskSource
riskSource
,
String
from
,
String
nodeState
,
String
originalNodeState
,
BigDecimal
rpni
,
List
<
RiskSource
PointInputitem
>
pointInputitems
)
{
private
RiskSourceRo
transfer
(
String
bacthNo
,
RiskSource
riskSource
,
String
from
,
String
nodeState
,
String
originalNodeState
,
BigDecimal
rpni
,
List
<
Fmea
PointInputitem
>
pointInputitems
)
{
RiskSourceRo
riskSourceRo
=
new
RiskSourceRo
();
RiskSourceRo
riskSourceRo
=
new
RiskSourceRo
();
riskSourceRo
.
setBatchNo
(
bacthNo
);
riskSourceRo
.
setBatchNo
(
bacthNo
);
riskSourceRo
.
setId
(
String
.
valueOf
(
riskSource
.
getId
()));
riskSourceRo
.
setId
(
String
.
valueOf
(
riskSource
.
getId
()));
...
@@ -656,60 +638,60 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -656,60 +638,60 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
ProtalDataRo
.
class
.
getSimpleName
().
equals
(
from
))
{
if
(
ProtalDataRo
.
class
.
getSimpleName
().
equals
(
from
))
{
if
(!
CollectionUtils
.
isEmpty
(
pointInputitems
))
{
if
(!
CollectionUtils
.
isEmpty
(
pointInputitems
))
{
for
(
RiskSourcePointInputitem
pointInputitem
:
pointInputitems
)
{
//
for (RiskSourcePointInputitem pointInputitem : pointInputitems) {
RiskSourcePointInputitem
riskSourcePointInputitem
=
iRiskSourcePointInputitemDao
.
findAllByRiskSourceIdAndPointIdAndPointInputitemId
(
riskSource
.
getId
(),
pointInputitem
.
getPointId
(),
pointInputitem
.
getPointInputitemId
());
//
RiskSourcePointInputitem riskSourcePointInputitem = iRiskSourcePointInputitemDao.findAllByRiskSourceIdAndPointIdAndPointInputitemId(riskSource.getId(), pointInputitem.getPointId(), pointInputitem.getPointInputitemId());
//
if
(
riskSourcePointInputitem
!=
null
)
{
//
if (riskSourcePointInputitem != null) {
riskSourcePointInputitem
.
setCheckInputitemId
(
pointInputitem
.
getCheckInputitemId
());
//
riskSourcePointInputitem.setCheckInputitemId(pointInputitem.getCheckInputitemId());
/*//正常1,异常2 正常变异常 负的,异常变正常 正的
//
/*//正常1,异常2 正常变异常 负的,异常变正常 正的
String status = pointInputitem.getStatus();
//
String status = pointInputitem.getStatus();
String oldStatus = riskSourcePointInputitem.getStatus();
//
String oldStatus = riskSourcePointInputitem.getStatus();
//
*//*if(StringUtils.isEmpty(oldStatus))
//
*//*if(StringUtils.isEmpty(oldStatus))
oldStatus = "1";
//
oldStatus = "1";
//
if("1".equals(oldStatus) && "2".equals(status))
//
if("1".equals(oldStatus) && "2".equals(status))
{
//
{
if(!CollectionUtils.isEmpty(fmeaList))
//
if(!CollectionUtils.isEmpty(fmeaList))
{
//
{
for(Fmea fmea:fmeaList)
//
for(Fmea fmea:fmeaList)
{
//
{
Map<String,BigDecimal> map = new HashMap<>();
//
Map<String,BigDecimal> map = new HashMap<>();
//
//正常变异常 累加负的
//
//正常变异常 累加负的
map.put("rpni",fmea.getRpni().multiply(new BigDecimal(-1)));
//
map.put("rpni",fmea.getRpni().multiply(new BigDecimal(-1)));
RPNiSum.add(map);
//
RPNiSum.add(map);
}
//
}
}
//
}
riskSourcePointInputitem.setStatus(status);
//
riskSourcePointInputitem.setStatus(status);
}
//
}
//
if("2".equals(oldStatus) && "1".equals(status))
//
if("2".equals(oldStatus) && "1".equals(status))
{
//
{
if(!CollectionUtils.isEmpty(fmeaList))
//
if(!CollectionUtils.isEmpty(fmeaList))
{
//
{
for(Fmea fmea:fmeaList)
//
for(Fmea fmea:fmeaList)
{
//
{
Map<String,BigDecimal> map = new HashMap<>();
//
Map<String,BigDecimal> map = new HashMap<>();
map.put("rpni",fmea.getRpni());
//
map.put("rpni",fmea.getRpni());
RPNiSum.add(map);
//
RPNiSum.add(map);
}
//
}
}
//
}
riskSourcePointInputitem.setStatus(status);
//
riskSourcePointInputitem.setStatus(status);
}*//*
//
}*//*
//
//
for(Fmea fmea:fmeaList)
//
for(Fmea fmea:fmeaList)
{
//
{
Map<String,BigDecimal> map = new HashMap<>();
//
Map<String,BigDecimal> map = new HashMap<>();
map.put("rpni",fmea.getRpni());
//
map.put("rpni",fmea.getRpni());
RPNiSum.add(map);
//
RPNiSum.add(map);
}
//
}
// riskSourcePointInputitem.setStatus(status);*/
//
// riskSourcePointInputitem.setStatus(status);*/
riskSourcePointInputitem
.
setStatus
(
pointInputitem
.
getStatus
());
//
riskSourcePointInputitem.setStatus(pointInputitem.getStatus());
iRiskSourcePointInputitemDao
.
save
(
riskSourcePointInputitem
);
//
iRiskSourcePointInputitemDao.save(riskSourcePointInputitem);
}
//
}
}
//
}
}
}
}
}
...
@@ -792,14 +774,32 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -792,14 +774,32 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
void
createRpnChangeLog
(
BigDecimal
rpni
,
BigDecimal
rpnr
,
Long
riskSourceId
,
Long
fromId
)
{
private
void
createRpnChangeLog
(
BigDecimal
rpni
,
BigDecimal
rpnr
,
Long
riskSourceId
,
Long
fromId
)
{
RpnChangeLog
rpnChangeLog
=
new
RpnChangeLog
();
RpnChangeLog
rpnChangeLog
=
new
RpnChangeLog
();
rpnChangeLog
.
setCreateDate
(
new
Date
());
rpnChangeLog
.
setCreateDate
(
new
Date
());
rpnChangeLog
.
setRiskSourceId
(
BigInteger
.
valueOf
(
riskSourceId
));
rpnChangeLog
.
setRiskSourceId
(
Long
.
valueOf
(
riskSourceId
));
rpnChangeLog
.
setRpn
(
rpnr
);
rpnChangeLog
.
setRpn
(
rpnr
);
rpnChangeLog
.
setRpni
(
rpni
);
rpnChangeLog
.
setRpni
(
rpni
);
rpnChangeLog
.
setTriggerBy
(
BigInteger
.
valueOf
(
fromId
));
rpnChangeLog
.
setTriggerBy
(
Long
.
valueOf
(
fromId
));
rpnChangeLog
.
setType
(
rpni
.
doubleValue
()
>
0
?
0
:
1
);
rpnChangeLog
.
setType
(
rpni
.
doubleValue
()
>
0
?
0
:
1
);
iRpnChangeLogDao
.
save
(
rpnChangeLog
);
iRpnChangeLogDao
.
save
(
rpnChangeLog
);
}
}
@Override
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
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
);
return
new
PageImpl
<>(
content
,
null
,
total
);
}
@Override
public
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
long
total
=
fmeaEquipmentPointMapper
.
countByFmeaId
(
fmeaId
);
List
<
Map
<
String
,
Object
>>
content
=
fmeaEquipmentPointMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
return
new
PageImpl
<>(
content
,
null
,
total
);
}
public
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
{
public
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
{
taskData
.
setBatchNo
(
UUID
.
randomUUID
().
toString
());
taskData
.
setBatchNo
(
UUID
.
randomUUID
().
toString
());
...
@@ -811,7 +811,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -811,7 +811,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Async
@Async
public
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
{
public
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
{
String
bacthNo
=
UUID
.
randomUUID
().
toString
();
String
bacthNo
=
UUID
.
randomUUID
().
toString
();
protalData
.
setBatchNo
(
bacthNo
);
protalData
.
setBatchNo
(
bacthNo
);
PPoint
pPoint
=
iPPointDao
.
findById
(
protalData
.
getId
());
PPoint
pPoint
=
iPPointDao
.
findById
(
protalData
.
getId
());
...
@@ -829,10 +828,24 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -829,10 +828,24 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
getPointInputitems
()))
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
getItems
()))
{
for
(
RiskSourcePointInputitem
pointInputitem
:
protalData
.
getPointInputitems
())
Long
pointId
=
protalData
.
getId
();
pointInputitem
.
setPointId
(
protalData
.
getId
());
List
<
Long
>
inputIds
=
Lists
.
newArrayList
();
for
(
CheckInputItemRo
checkInputItemRo
:
protalData
.
getItems
())
{
inputIds
.
add
(
checkInputItemRo
.
getPointInputitemId
());
}
List
<
FmeaPointInputitem
>
fmeaPointInputitems
=
fmeaPointInputitemMapper
.
listByPointIdAndInputItemIds
(
pointId
,
inputIds
);
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
fmeaPointInputitems
.
forEach
(
fmeaPointInputitem
->
{
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
ids
.
add
(
fmeaPointInputitem
.
getId
());
});
Integer
state
=
1
;
fmeaPointInputitemMapper
.
updateStateByIds
(
state
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
Object
result
=
remoteRuleServer
.
fireRule
(
protalData
,
"风险管控/patrol"
);
Object
result
=
remoteRuleServer
.
fireRule
(
protalData
,
"风险管控/patrol"
);
//处理返回结果
//处理返回结果
...
@@ -855,18 +868,18 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -855,18 +868,18 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
true
;
return
true
;
}
}
@Override
//
@Override
@Transactional
//
@Transactional
public
void
removeByRSIdAndPId
(
List
<
HashMap
<
String
,
String
>>
list
)
{
//
public void removeByRSIdAndPId(List<HashMap<String, String>> list) {
// TODO Auto-generated method stub
//
// TODO Auto-generated method stub
if
(
list
.
size
()
>
0
)
{
//
if (list.size() > 0) {
for
(
HashMap
<
String
,
String
>
hashMap
:
list
)
{
//
for (HashMap<String, String> hashMap : list) {
iRiskSourcePointInputitemDao
.
removeByRSIdAndPId
(
hashMap
.
get
(
"riskId"
),
hashMap
.
get
(
"pointId"
));
//
iRiskSourcePointInputitemDao.removeByRSIdAndPId(hashMap.get("riskId"), hashMap.get("pointId"));
}
//
}
//
}
//
}
//
}
//
}
@Override
@Override
public
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
)
{
public
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
)
{
...
@@ -889,25 +902,25 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -889,25 +902,25 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
returnMap
;
return
returnMap
;
}
}
@Override
//
@Override
public
BigDecimal
updateRiskSourceRpni
(
Long
riskSourceId
)
throws
Exception
{
//
public BigDecimal updateRiskSourceRpni(Long riskSourceId) throws Exception {
BigDecimal
newRpni
=
new
BigDecimal
(
0
);
//
BigDecimal newRpni = new BigDecimal(0);
//风险点添加或删除风险因素时
//
//风险点添加或删除风险因素时
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
riskSourceId
);
//
RiskSource riskSource = iRiskSourceDao.findById(riskSourceId);
if
(
null
!=
riskSource
)
{
//
if (null != riskSource) {
List
<
BigDecimal
>
childRpniList
=
new
ArrayList
<>();
//
List<BigDecimal> childRpniList = new ArrayList<>();
List
<
RiskSource
>
children
=
iRiskSourceDao
.
findByParentId
(
riskSource
.
getId
());
//
List<RiskSource> children = iRiskSourceDao.findByParentId(riskSource.getId());
for
(
RiskSource
child
:
children
)
{
//
for (RiskSource child : children) {
childRpniList
.
add
(
child
.
getRpni
());
//
childRpniList.add(child.getRpni());
}
//
}
RiskSourceRo
riskSourceRo
=
fillRiskSourceRo
(
riskSource
,
childRpniList
);
//
RiskSourceRo riskSourceRo = fillRiskSourceRo(riskSource, childRpniList);
//Object result = remoteRuleServer.fireRule(riskSourceRo, PACKAGE_ID_COUNT_RPNI);
//
//Object result = remoteRuleServer.fireRule(riskSourceRo, PACKAGE_ID_COUNT_RPNI);
//BigDecimal RPNi = updateRpni(result, riskSource);
//
//BigDecimal RPNi = updateRpni(result, riskSource);
//findParent(riskSource, RPNi);
//
//findParent(riskSource, RPNi);
//newRpni = RPNi;
//
//newRpni = RPNi;
}
//
}
return
newRpni
;
//
return newRpni;
}
//
}
private
RiskSourceRo
fillRiskSourceRo
(
RiskSource
riskSource
,
List
<
BigDecimal
>
rpniList
)
{
private
RiskSourceRo
fillRiskSourceRo
(
RiskSource
riskSource
,
List
<
BigDecimal
>
rpniList
)
{
RiskSourceRo
riskSourceRo
=
new
RiskSourceRo
();
RiskSourceRo
riskSourceRo
=
new
RiskSourceRo
();
...
@@ -1191,6 +1204,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1191,6 +1204,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
param
.
getState
());
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
param
.
getState
());
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
valueOf
(
data
.
getFireEquipmentId
()));
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
valueOf
(
data
.
getFireEquipmentId
()));
if
(!
ObjectUtils
.
isEmpty
(
equipment
))
{
if
(!
ObjectUtils
.
isEmpty
(
equipment
))
{
if
(
"true"
.
equals
(
data
.
getState
()))
{
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
ids
.
add
(
fmeaEquipmentPoint
.
getId
());
});
Integer
state
=
1
;
fmeaEquipmentPointMapper
.
updateStateByIds
(
state
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
String
batchNo
=
UUID
.
randomUUID
().
toString
();
String
batchNo
=
UUID
.
randomUUID
().
toString
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
ruleData
.
setBatchNo
(
batchNo
);
ruleData
.
setBatchNo
(
batchNo
);
...
@@ -1224,7 +1250,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1224,7 +1250,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
void
sendAnalogue
(
EquipCommunicationData
data
)
{
public
void
sendAnalogue
(
EquipCommunicationData
data
)
{
try
{
try
{
redisTemplate
.
opsForHash
().
put
(
"Analogue"
,
data
.
getPointCode
(),
data
);
redisTemplate
.
opsForHash
().
put
(
"Analogue"
,
data
.
getPointCode
(),
data
);
remoteWebSocketServer
.
sendMessage
(
"plan"
,
JSON
.
toJSONString
(
data
)
.
toString
()
);
remoteWebSocketServer
.
sendMessage
(
"plan"
,
JSON
.
toJSONString
(
data
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -1358,4 +1384,184 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1358,4 +1384,184 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
return
3
;
return
3
;
}
}
/**
* 修改、添加、删除f_fmea导致rpn、rpni改变
*/
@Override
public
void
notifyFmeaFromUpdate
(
Long
fmeaId
)
{
Fmea
fmea
=
fmeaMapper
.
getById
(
fmeaId
);
if
(
fmea
==
null
)
{
return
;
}
if
(
fmea
.
getEvaluationOid
()
!=
null
&&
fmea
.
getEvaluationSid
()
!=
null
&&
fmea
.
getEvaluationDid
()
!=
null
)
{
BigDecimal
oidValue
=
new
BigDecimal
(
fmea
.
getOidValue
());
BigDecimal
sidValue
=
new
BigDecimal
(
fmea
.
getSidValue
());
BigDecimal
didValue
=
new
BigDecimal
(
fmea
.
getDidValue
());
BigDecimal
rpni
=
oidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
BigDecimal
rpn
=
null
;
if
(
fmea
.
getNewEvaluationOid
()
==
null
)
{
fmea
.
setNewEvaluationOid
(
fmea
.
getEvaluationOid
());
rpn
=
rpni
;
}
else
{
BigDecimal
newOidValue
=
new
BigDecimal
(
fmea
.
getNewOidValue
());
rpn
=
newOidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
}
fmea
.
setRpni
(
rpni
);
fmea
.
setRpn
(
rpn
);
iFmeaDao
.
save
(
fmea
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
rpni
);
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
}
}
/**
* 告警或者不合格项导致fmea的rpn、new_evaluation_oid改变
*/
@Override
public
void
notifyFmeaFromAbnormal
(
Long
fmeaId
)
{
Fmea
fmea
=
fmeaMapper
.
getById
(
fmeaId
);
if
(
fmea
==
null
)
{
return
;
}
List
<
FmeaEquipmentPoint
>
equipmentPoints
=
fmeaEquipmentPointMapper
.
listFmeaByFmeaId
(
fmeaId
);
List
<
FmeaPointInputitem
>
pointInputitems
=
fmeaPointInputitemMapper
.
listFmeaByFmeaId
(
fmeaId
);
Double
maxRate
=
getMaxRate
(
equipmentPoints
,
pointInputitems
);
if
(
maxRate
!=
null
)
{
List
<
EvaluationModel
>
oModels
=
iEvaluationModelDao
.
findAllByType
(
"O"
);
EvaluationModel
oEvaluationModel
=
getBetweenModel
(
maxRate
,
oModels
);
if
(
oEvaluationModel
!=
null
)
{
BigDecimal
newOidValue
=
new
BigDecimal
(
oEvaluationModel
.
getCoefficient
());
BigDecimal
sidValue
=
new
BigDecimal
(
fmea
.
getSidValue
());
BigDecimal
didValue
=
new
BigDecimal
(
fmea
.
getDidValue
());
BigDecimal
rpn
=
newOidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
fmea
.
setRpn
(
rpn
);
fmea
.
setNewEvaluationOid
(
oEvaluationModel
.
getId
());
iFmeaDao
.
save
(
fmea
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
fmea
.
getRpni
());
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
}
}
}
private
void
saveRpnLog
(
Long
riskSourceId
,
Long
fmeaId
,
BigDecimal
rpn
,
BigDecimal
rpni
)
{
RpnChangeLog
rpnChangeLog
=
new
RpnChangeLog
();
rpnChangeLog
.
setRiskSourceId
(
riskSourceId
);
rpnChangeLog
.
setFmeaId
(
fmeaId
);
rpnChangeLog
.
setRpn
(
rpn
);
rpnChangeLog
.
setRpni
(
rpni
);
iRpnChangeLogDao
.
save
(
rpnChangeLog
);
}
private
EvaluationModel
getBetweenModel
(
Double
maxRate
,
List
<
EvaluationModel
>
oModels
)
{
for
(
EvaluationModel
model
:
oModels
)
{
String
str
=
model
.
getDescribe
().
replaceAll
(
"O"
,
maxRate
.
toString
());
if
(
JexlUtil
.
convertToCode
(
str
))
{
return
model
;
}
}
return
null
;
}
private
Double
getMaxRate
(
List
<
FmeaEquipmentPoint
>
equipmentPoints
,
List
<
FmeaPointInputitem
>
pointInputitems
)
{
Double
pointInputitemRate
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
pointInputitems
))
{
int
totalPointInputitem
=
pointInputitems
.
size
();
int
pointInputitemUnNormal
=
0
;
for
(
FmeaPointInputitem
pointInputitem
:
pointInputitems
)
{
if
(
pointInputitem
.
getState
()
==
1
)
{
pointInputitemUnNormal
++;
}
}
pointInputitemRate
=
pointInputitemUnNormal
*
1.0
/
totalPointInputitem
;
}
Double
equipmentPointRate
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
equipmentPoints
))
{
int
totalEquipmentPoint
=
equipmentPoints
.
size
();
int
equipmentPointUnNormal
=
0
;
for
(
FmeaEquipmentPoint
equipmentPoint
:
equipmentPoints
)
{
if
(
equipmentPoint
.
getState
()
==
1
)
{
equipmentPointUnNormal
++;
}
}
equipmentPointRate
=
equipmentPointUnNormal
*
1.0
/
totalEquipmentPoint
;
}
if
(
equipmentPointRate
==
null
)
{
if
(
pointInputitemRate
==
null
)
{
return
null
;
}
else
{
return
pointInputitemRate
;
}
}
else
{
if
(
pointInputitemRate
==
null
)
{
return
equipmentPointRate
;
}
else
{
if
(
pointInputitemRate
<
equipmentPointRate
)
{
return
equipmentPointRate
;
}
else
{
return
pointInputitemRate
;
}
}
}
}
/**
* fmea的更新导致rpn、rpni的值改变
*/
public
void
notifyRiskSource
(
Long
riskSourceId
)
{
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
riskSourceId
);
if
(
riskSource
==
null
)
{
return
;
}
List
<
Fmea
>
fmeas
=
fmeaMapper
.
listByRiskSourceId
(
riskSourceId
);
BigDecimal
maxSidValue
=
new
BigDecimal
(
"0"
);
BigDecimal
maxDidValue
=
new
BigDecimal
(
"0"
);
BigDecimal
totalOidValue
=
new
BigDecimal
(
"0"
);
BigDecimal
totalNewOidValue
=
new
BigDecimal
(
"0"
);
long
count
=
0L
;
for
(
Fmea
fmea
:
fmeas
)
{
if
(
fmea
.
getEvaluationDid
()
!=
null
&&
fmea
.
getEvaluationSid
()
!=
null
&&
fmea
.
getEvaluationOid
()
!=
null
&&
fmea
.
getNewEvaluationOid
()
!=
null
)
{
BigDecimal
didValue
=
new
BigDecimal
(
fmea
.
getDidValue
());
BigDecimal
sidValue
=
new
BigDecimal
(
fmea
.
getSidValue
());
BigDecimal
oidValue
=
new
BigDecimal
(
fmea
.
getOidValue
());
BigDecimal
newOidValue
=
new
BigDecimal
(
fmea
.
getNewOidValue
());
if
(
didValue
.
compareTo
(
maxDidValue
)
==
1
)
{
maxDidValue
=
didValue
;
}
if
(
sidValue
.
compareTo
(
maxSidValue
)
==
1
)
{
maxSidValue
=
sidValue
;
}
totalOidValue
=
totalOidValue
.
add
(
oidValue
);
totalNewOidValue
=
totalNewOidValue
.
add
(
newOidValue
);
count
++;
}
}
BigDecimal
averageOidValue
=
totalOidValue
.
divide
(
BigDecimal
.
valueOf
(
count
));
BigDecimal
averageNewOidValue
=
totalNewOidValue
.
divide
(
BigDecimal
.
valueOf
(
count
));
BigDecimal
rpn
=
maxDidValue
.
multiply
(
maxSidValue
).
multiply
(
averageNewOidValue
);
BigDecimal
rpni
=
maxDidValue
.
multiply
(
maxSidValue
).
multiply
(
averageOidValue
);
List
<
RiskLevel
>
levels
=
riskLevelDao
.
findAll
();
RiskLevel
newLevel
=
getBetweenLevel
(
rpn
,
levels
);
if
(
newLevel
!=
null
)
{
riskSource
.
setRpn
(
rpn
);
riskSource
.
setRpni
(
rpni
);
riskSource
.
setRiskLevelId
(
newLevel
.
getId
());
iRiskSourceDao
.
save
(
riskSource
);
}
}
private
RiskLevel
getBetweenLevel
(
BigDecimal
rpni
,
List
<
RiskLevel
>
levels
)
{
if
(
CollectionUtils
.
isEmpty
(
levels
))
{
return
null
;
}
for
(
RiskLevel
level
:
levels
)
{
int
downResult
=
level
.
getDownLimit
().
compareTo
(
rpni
);
int
topResult
=
level
.
getTopLimit
().
compareTo
(
rpni
);
if
(
downResult
==
-
1
&&
topResult
!=
-
1
)
{
return
level
;
}
}
return
null
;
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEquipmentService.java
View file @
4f6fa381
...
@@ -8,11 +8,9 @@ import com.yeejoin.amos.fas.dao.entity.Equipment;
...
@@ -8,11 +8,9 @@ import com.yeejoin.amos.fas.dao.entity.Equipment;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.op.core.common.query.DaoCriteria
;
import
com.yeejoin.amos.op.core.common.query.DaoCriteria
;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -66,7 +64,7 @@ public interface IEquipmentService {
...
@@ -66,7 +64,7 @@ public interface IEquipmentService {
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
BigInteger
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
bindFireEqumt
(
Long
equipmentId
,
List
<
EquipmentFireEquipment
>
list
)
throws
Exception
;
/**
/**
...
@@ -74,14 +72,14 @@ public interface IEquipmentService {
...
@@ -74,14 +72,14 @@ public interface IEquipmentService {
*
*
* @param equipmentId
* @param equipmentId
*/
*/
List
<
Long
>
removeFireEqmtBind
(
BigInteger
equipmentId
,
String
[]
fireEquipmentIds
);
List
<
Long
>
removeFireEqmtBind
(
Long
equipmentId
,
String
[]
fireEquipmentIds
);
/**
/**
* @param equipmentId
* @param equipmentId
* @return
* @return
*/
*/
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
BigInteger
equipmentId
);
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
);
/**
/**
* 获取重点装备监控设备
* 获取重点装备监控设备
...
@@ -101,7 +99,7 @@ public interface IEquipmentService {
...
@@ -101,7 +99,7 @@ public interface IEquipmentService {
void
findAllEquipPointInfo
();
void
findAllEquipPointInfo
();
public
EquipCommunicationData
findFireEquipmentByPointCode
(
String
code
);
EquipCommunicationData
findFireEquipmentByPointCode
(
String
code
);
EquipCommunicationData
findFireEquipDataByPointCode
(
String
code
);
EquipCommunicationData
findFireEquipDataByPointCode
(
String
code
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFmeaService.java
View file @
4f6fa381
...
@@ -18,7 +18,7 @@ public interface IFmeaService {
...
@@ -18,7 +18,7 @@ public interface IFmeaService {
* @param map
* @param map
* @return
* @return
*/
*/
Fmea
editFmea
(
HashMap
<
String
,
Object
>
map
);
void
editFmea
(
HashMap
<
String
,
Object
>
map
);
/**
/**
* 根据ID删除Fmea
* 根据ID删除Fmea
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
4f6fa381
...
@@ -2,19 +2,17 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -2,19 +2,17 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.
RiskSource
Param
;
import
com.yeejoin.amos.fas.business.param.
FmeaBind
Param
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
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.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourceEquipment
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -23,127 +21,69 @@ public interface IRiskSourceService {
...
@@ -23,127 +21,69 @@ public interface IRiskSourceService {
/**
/**
* 新增及维护风险点
* 新增及维护风险点
*
* @param map
* @return
*/
*/
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
;
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
;
/**
/**
* 删除风险点
* 删除风险点
*
* @param riskSourceId
*/
*/
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
;
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
;
/**
/**
* 根据参数分页查询风险点信息
* 根据参数分页查询风险点信息
*
* @param param
* @return
*/
*/
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
List
<
Map
>
queryForRegion
();
List
<
Map
>
queryForRegion
();
List
<
Map
>
queryRPNReport
();
List
<
Map
>
queryRPNReport
();
/**
/**
* 上升率
* 上升率
*
* @return
*/
*/
Map
queryForRiseUp
()
throws
Exception
;
Map
queryForRiseUp
()
throws
Exception
;
List
<
Map
>
queryForMatrix
();
List
<
Map
>
queryForMatrix
();
/**
/**
* 获取所有风险点
* 获取所有风险点
*
* @return
*/
*/
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
FmeaEquipmentPoint
>
bindFireEquiment
(
FmeaBindParam
fmeaBindParam
);
List
<
RiskSourceEquipment
>
bindFireEquiment
(
Long
riskSourceId
,
List
<
RiskSourceEquipment
>
riskSourceEquipments
);
List
<
FmeaPointInputitem
>
bindPointInputitem
(
FmeaBindParam
fmeaBindParam
);
String
[]
removeBoundRelation
(
String
[]
idArray
);
//解除绑定
/**
* 查询所有已绑定的关系列表
*
* @param riskSourceId
* @return
*/
Page
queryForView
(
CommonPageable
commonPageable
,
String
riskSourceId
);
/**
/**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
*
* @param equipmentId
* @return
*/
*/
Page
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
riskSourceId
,
String
equipmentId
,
String
fname
);
Page
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
equipmentId
,
String
fname
);
/**
List
<
Map
<
String
,
Object
>>
listEquipmentPointById
(
Long
fmeaId
,
Long
equipmentId
,
String
equipmentPointName
);
* 获取
*
* @param param
* @return
*/
Page
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
/**
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
* 绑定巡检点检查项
*
* @param riskSourceId
* @param pointInputitems
* @return
*/
List
<
RiskSourcePointInputitem
>
bindPointInputitem
(
Long
riskSourceId
,
List
<
RiskSourcePointInputitem
>
pointInputitems
);
/**
/**
* 处理巡检数据和设备数据
* 处理巡检数据和设备数据
*
* @param deviceData
*/
*/
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
;
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
;
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
;
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
;
/**
* 删除风险点巡检点检查项
*/
void
removeByRSIdAndPId
(
List
<
HashMap
<
String
,
String
>>
list
);
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
;
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
;
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
);
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
);
/**
/**
* 三维图统计
* 三维图统计
*
* @return
*/
*/
Map
queryFor3DStatistics
();
Map
queryFor3DStatistics
();
Map
earlyWarning
(
Long
riskSourceId
);
Map
earlyWarning
(
Long
riskSourceId
);
BigDecimal
updateRiskSourceRpni
(
Long
riskSourceId
)
throws
Exception
;
//
BigDecimal updateRiskSourceRpni(Long riskSourceId) throws Exception;
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
...
@@ -166,4 +106,8 @@ public interface IRiskSourceService {
...
@@ -166,4 +106,8 @@ public interface IRiskSourceService {
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
);
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
);
Integer
getChildTypeByPid
(
Long
riskSourceId
);
Integer
getChildTypeByPid
(
Long
riskSourceId
);
void
notifyFmeaFromAbnormal
(
Long
fmeaId
);
void
notifyFmeaFromUpdate
(
Long
fmeaId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/CheckInputItemRo.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
public
class
CheckInputItemRo
{
/**
* 检查项id
*/
private
long
pointInputitemId
;
/**
* 检查项状态
*/
private
String
status
;
/**
* 检查项名称
*/
private
String
pointInputitemName
;
/**
* 检查项检查id
*/
private
Long
checkInputitemId
;
public
long
getPointInputitemId
()
{
return
pointInputitemId
;
}
public
void
setPointInputitemId
(
long
pointInputitemId
)
{
this
.
pointInputitemId
=
pointInputitemId
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getPointInputitemName
()
{
return
pointInputitemName
;
}
public
void
setPointInputitemName
(
String
pointInputitemName
)
{
this
.
pointInputitemName
=
pointInputitemName
;
}
public
Long
getCheckInputitemId
()
{
return
checkInputitemId
;
}
public
void
setCheckInputitemId
(
Long
checkInputitemId
)
{
this
.
checkInputitemId
=
checkInputitemId
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/ProtalDataRo.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
import
com.yeejoin.amos.fas.dao.entity.RiskSourcePointInputitem
;
import
java.util.List
;
import
java.util.List
;
public
class
ProtalDataRo
extends
BasicsRo
public
class
ProtalDataRo
extends
BasicsRo
{
{
private
long
id
;
private
long
id
;
private
String
name
;
//名称
private
String
name
;
//名称
...
@@ -14,7 +11,6 @@ public class ProtalDataRo extends BasicsRo
...
@@ -14,7 +11,6 @@ public class ProtalDataRo extends BasicsRo
private
String
level
;
//巡检点级别
private
String
level
;
//巡检点级别
/**
/**
* 巡检点编号
* 巡检点编号
*/
*/
...
@@ -46,16 +42,14 @@ public class ProtalDataRo extends BasicsRo
...
@@ -46,16 +42,14 @@ public class ProtalDataRo extends BasicsRo
private
String
pointName
;
//巡检点名称
private
String
pointName
;
//巡检点名称
private
List
<
CheckInputItemRo
>
items
;
List
<
RiskSourcePointInputitem
>
pointInputitems
;
public
List
<
CheckInputItemRo
>
getItems
()
{
return
items
;
public
List
<
RiskSourcePointInputitem
>
getPointInputitems
()
{
return
pointInputitems
;
}
}
public
void
set
PointInputitems
(
List
<
RiskSourcePointInputitem
>
pointInput
items
)
{
public
void
set
Items
(
List
<
CheckInputItemRo
>
items
)
{
this
.
pointInputitems
=
pointInput
items
;
this
.
items
=
items
;
}
}
public
String
getPointNo
()
{
public
String
getPointNo
()
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/util/JexlUtil.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
business
.
util
;
import
org.apache.commons.jexl2.Expression
;
import
org.apache.commons.jexl2.JexlEngine
;
public
class
JexlUtil
{
public
static
boolean
convertToCode
(
String
jexlExp
)
{
JexlEngine
jexl
=
new
JexlEngine
();
Expression
e
=
jexl
.
createExpression
(
jexlExp
);
Object
object
=
e
.
evaluate
(
null
);
if
(
null
==
object
)
{
return
false
;
}
return
Boolean
.
valueOf
(
object
.
toString
());
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/FmeaMessage.java
0 → 100644
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
client
.
invoke
;
public
class
FmeaMessage
{
private
Long
fmeaId
;
private
String
norifyFrom
;
public
FmeaMessage
(
Long
fmeaId
,
String
norifyFrom
)
{
this
.
fmeaId
=
fmeaId
;
this
.
norifyFrom
=
norifyFrom
;
}
public
Long
getFmeaId
()
{
return
fmeaId
;
}
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
public
String
getNorifyFrom
()
{
return
norifyFrom
;
}
public
void
setNorifyFrom
(
String
norifyFrom
)
{
this
.
norifyFrom
=
norifyFrom
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
View file @
4f6fa381
package
com
.
yeejoin
.
amos
.
fas
.
client
.
invoke
;
package
com
.
yeejoin
.
amos
.
fas
.
client
.
invoke
;
import
java.math.BigDecimal
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
org.apache.log4j.Logger
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledExecutorService
;
import
org.apache.log4j.Logger
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.context.IotContext
;
/**
/**
*
* 风险点消费队列
* 风险点消费队列
*/
*/
public
class
RsDataQueue
{
public
class
RsDataQueue
{
private
static
final
BlockingQueue
<
Long
>
blockingQueue
=
new
LinkedBlockingQueue
<
Long
>();
private
static
final
BlockingQueue
<
FmeaMessage
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
ScheduledExecutorService
service_apdu
=
null
;
private
ScheduledExecutorService
service_apdu
=
null
;
IRiskSourceService
riskSourceService
=
null
;
private
IRiskSourceService
riskSourceService
;
private
volatile
static
RsDataQueue
instance
=
null
;
private
volatile
static
RsDataQueue
instance
=
null
;
private
RsDataQueue
()
{
private
RsDataQueue
()
{
riskSourceService
=
(
IRiskSourceService
)
IotContext
.
getInstance
().
getBean
(
IRiskSourceService
.
class
);
riskSourceService
=
(
IRiskSourceService
)
IotContext
.
getInstance
().
getBean
(
IRiskSourceService
.
class
);
}
//获取RsDataQueue 的实例
public
static
RsDataQueue
getInstance
(){
//先检查实例是否存在,如果不存在才进入下面的同步块
if
(
instance
==
null
){
//同步块,线程安全的创建实例
synchronized
(
RsDataQueue
.
class
){
//再次检查实例是否存在,如果不存在才真的创建实例
if
(
instance
==
null
){
instance
=
new
RsDataQueue
();
}
}
}
return
instance
;
}
}
//获取RsDataQueue 的实例
public
static
RsDataQueue
getInstance
()
{
//先检查实例是否存在,如果不存在才进入下面的同步块
if
(
instance
==
null
)
{
//同步块,线程安全的创建实例
synchronized
(
RsDataQueue
.
class
)
{
//再次检查实例是否存在,如果不存在才真的创建实例
if
(
instance
==
null
)
{
instance
=
new
RsDataQueue
();
}
}
}
return
instance
;
}
/**
/**
* 启动apdu数据消费任务
* 启动apdu数据消费任务
*/
*/
public
void
start
()
{
public
void
start
()
{
service_apdu
=
Executors
.
newSingleThreadScheduledExecutor
();
service_apdu
=
Executors
.
newSingleThreadScheduledExecutor
();
// 第二个参数为首次执行的延时时间,第三个参数为定时执行的间隔时间
// 第二个参数为首次执行的延时时间,第三个参数为定时执行的间隔时间
service_apdu
.
execute
(
task_runnable
);
service_apdu
.
execute
(
task_runnable
);
}
public
void
addUpdateMessage
(
Long
fmeaId
)
{
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
"update"
));
}
}
public
void
add
(
Long
riskSource
Id
)
{
public
void
addAbnormalMessage
(
Long
fmea
Id
)
{
blockingQueue
.
add
(
riskSourceId
);
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
"abnormal"
)
);
}
}
Runnable
task_runnable
=
new
Runnable
()
{
Runnable
task_runnable
=
new
Runnable
()
{
public
void
run
()
{
public
void
run
()
{
while
(
true
)
{
while
(
true
)
{
try
{
try
{
Long
riskSourceId
=
blockingQueue
.
take
();
FmeaMessage
fmeaMessage
=
blockingQueue
.
take
();
BigDecimal
rpni
=
new
BigDecimal
(
0
);
if
(
riskSourceService
!=
null
)
{
if
(
riskSourceService
!=
null
)
{
String
from
=
fmeaMessage
.
getNorifyFrom
();
rpni
=
riskSourceService
.
updateRiskSourceRpni
(
riskSourceId
);
Long
fmeaId
=
fmeaMessage
.
getFmeaId
();
}
if
(
from
.
equals
(
"abnormal"
))
{
}
catch
(
Exception
e
)
{
riskSourceService
.
notifyFmeaFromAbnormal
(
fmeaId
);
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
}
else
if
(
from
.
equals
(
"update"
))
{
e
.
printStackTrace
();
riskSourceService
.
notifyFmeaFromUpdate
(
fmeaId
);
}
}
}
}
catch
(
Exception
e
)
{
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
e
.
printStackTrace
();
}
}
}
}
}
};
};
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_common.xml
View file @
4f6fa381
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
</select>
</select>
<select
id=
"getPointInputList"
resultType=
"java.util.HashMap"
>
<select
id=
"getPointInputList"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
ppi.id as pointInputitemId,
ppi.point_id pointId,
ppi.point_id pointId,
pii.`name` inputName,
pii.`name` inputName,
pii.item_type inputType,
pii.item_type inputType,
...
@@ -60,11 +61,11 @@
...
@@ -60,11 +61,11 @@
'noBound'
'noBound'
END
END
FROM
FROM
f_
risk_source
_point_inputitem se
f_
fmea
_point_inputitem se
WHERE
WHERE
se.point_inputitem_id = p
i
i.id
se.point_inputitem_id = p
p
i.id
AND
se.point_id = ppi.point_id
AND
AND se.risk_source_id = #{riskSource
Id}
se.fmea_id = #{fmea
Id}
) isBound
) isBound
FROM
FROM
`p_point_inputitem` ppi
`p_point_inputitem` ppi
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
4f6fa381
...
@@ -470,4 +470,37 @@
...
@@ -470,4 +470,37 @@
where id = #{item.id}
where id = #{item.id}
</foreach>
</foreach>
</update>
</update>
<select
id=
"queryEquimentRelation"
resultType=
"java.util.Map"
>
SELECT
fe.id,
fe.`code` fCode,
fe.`name` fName
FROM
f_equipment_fire_equipment efe
JOIN f_fire_equipment fe ON efe.fire_equipment_id = fe.id
WHERE
efe.equipment_id = ${equipmentId}
<if
test=
"fname != null"
>
AND fe.`name` like '%${fname}%'
</if>
<if
test=
"length > 0"
>
LIMIT ${start},${length} ;
</if>
</select>
<select
id=
"queryEquimentRelationCount"
resultType=
"long"
>
SELECT
count(1)
FROM
f_equipment_fire_equipment efe
JOIN f_fire_equipment fe ON efe.fire_equipment_id = fe.id
WHERE
efe.equipment_id = ${equipmentId}
<if
test=
"fname != null"
>
AND fe.`name` like '%${fname}%'
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
View file @
4f6fa381
...
@@ -77,7 +77,45 @@
...
@@ -77,7 +77,45 @@
f.risk_source_id = ${riskSourceId};
f.risk_source_id = ${riskSourceId};
</select>
</select>
<select
id=
"getById"
resultType=
"com.yeejoin.amos.fas.dao.entity.Fmea"
>
select
id,
risk_source_id as riskSourceId,
risk_factors_id as riskFactorsId,
evaluation_sid as evaluationSid,
evaluation_oid as evaluationOid,
evaluation_did as evaluationDid,
rpni,
rpn,
(select coefficient from f_evaluation_model where id = a.evaluation_sid) as sidValue,
(select coefficient from f_evaluation_model where id = a.evaluation_oid) as oidValue,
(select coefficient from f_evaluation_model where id = a.evaluation_did) as didValue,
(select coefficient from f_evaluation_model where id = a.new_evaluation_oid) as newOidValue
from
f_fmea
where
id = #{id}
</select>
<select
id=
"listByRiskSourceId"
resultType=
"com.yeejoin.amos.fas.dao.entity.Fmea"
>
select
id,
risk_source_id as riskSourceId,
risk_factors_id as riskFactorsId,
evaluation_sid as evaluationSid,
evaluation_oid as evaluationOid,
evaluation_did as evaluationDid,
rpni,
rpn,
(select coefficient from f_evaluation_model where id = a.evaluation_sid) as sidValue,
(select coefficient from f_evaluation_model where id = a.evaluation_oid) as oidValue,
(select coefficient from f_evaluation_model where id = a.evaluation_did) as didValue,
(select coefficient from f_evaluation_model where id = a.new_evaluation_oid) as newOidValue
from
f_fmea
where
risk_source_id = #{riskSourceId}
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_equipment_point.xml
0 → 100644
View file @
4f6fa381
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper"
>
<delete
id=
"deleteByFmeaIdAndEquipmentPointIds"
>
delete from
f_fmea_equipment_point
where
fmea_id = #{fmeaId}
and
equipment_point_id in
<foreach
collection=
"equipmentPointIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
<delete
id=
"deleteByFmeaIds"
>
delete from f_fmea_equipment_point where fmea_id in
<foreach
collection=
"array"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
<insert
id=
"saveBatch"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint"
useGeneratedKeys=
"true"
>
insert into f_fmea_equipment_point
(
fmea_id,
equipment_point_id
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.fmeaId},
#{item.equipmentPointId}
)
</foreach>
</insert>
<select
id=
"countByFmeaId"
resultType=
"long"
>
select
count(1)
from
(
select
c.fmea_id as fmeaId
from
f_fire_equipment as a
left join
f_fire_equipment_point as b on b.fire_equipment_id = a.id
left join
f_fmea_equipment_point as c on c.equipment_point_id = b.id
where
c.fmea_id = #{fmeaId}
group by b.fire_equipment_id
) as d
</select>
<select
id=
"listByFmeaId"
resultType=
"java.util.Map"
>
select
c.fmea_id as fmeaId,
a.id as equipmentId,
group_concat(b.name) as equipmentPointNames,
a.name as equipmentName,
a.code as equipmentCode
from
f_fire_equipment as a
left join
f_fire_equipment_point as b on b.fire_equipment_id = a.id
left join
f_fmea_equipment_point as c on c.equipment_point_id = b.id
where
c.fmea_id = #{fmeaId}
group by b.fire_equipment_id
limit #{offset},#{limit}
</select>
<select
id=
"countEquipmentPoint"
resultType=
"long"
>
select
count(1)
from
f_fire_equipment_point as a
where
a.fire_equipment_id = #{equipmentId}
</select>
<select
id=
"listEquipmentPointIdsByEquipmentId"
resultType=
"java.lang.Long"
>
select id from f_fire_equipment_point where fire_equipment_id = #{equipmentId}
</select>
<select
id=
"listByEquipmentPointId"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint"
>
select
id,fmea_id as fmeaId,equipment_point_id as equipmentPointId,state
from
f_fmea_equipment_point
where
equipment_point_id = #{equipmentPointId}
</select>
<select
id=
"listEquipmentPoint"
resultType=
"java.util.Map"
>
select
a.id,
a.name,
a.code,
(
select
case when count(1) > 0 then 'bound' else 'noBound' end
from
f_fmea_equipment_point d
where
d.equipment_point_id = a.id
and
d.fmea_id = #{fmeaId}
) isBound
from
f_fire_equipment_point as a
<where>
<if
test=
"equipmentId!=null"
>
and a.fire_equipment_id = #{equipmentId}
</if>
<if
test=
"equipmentPointName!=null and equipmentPointName!=''"
>
and a.name like concat("%",#{equipmentPointName},"%")
</if>
</where>
</select>
<select
id=
"listFmeaByFmeaId"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint"
>
select
id,
fmea_id as fmeaId,
equipment_point_id as equipmentPointId,
state
from
f_fmea_equipment_point
where
fmea_id = #{fmeaId}
</select>
<update
id=
"updateStateByIds"
>
update
f_fmea_equipment_point
set
state = #{state}
where
id in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
0 → 100644
View file @
4f6fa381
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper"
>
<delete
id=
"deleteByFmeaIdAndPointInputitemIds"
>
delete from
f_fmea_point_inputitem
where
fmea_id = #{fmeaId}
and
point_inputitem_id in
<foreach
collection=
"pointInputitemIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
<delete
id=
"deleteByFmeaIds"
>
delete from f_fmea_point_inputitem where fmea_id in
<foreach
collection=
"array"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</delete>
<insert
id=
"saveBatch"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
useGeneratedKeys=
"true"
>
insert into f_fmea_point_inputitem
(
fmea_id,
point_inputitem_id
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.fmeaId},
#{item.pointInputitemId}
)
</foreach>
</insert>
<select
id=
"countByFmeaId"
resultType=
"long"
>
select
count(1)
from
(
select
b.point_id
from
f_fmea_point_inputitem a
inner join
p_point_inputitem as b on b.id = a.point_inputitem_id
left join
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
) as d
</select>
<select
id=
"listPointInputitemIdsByPointId"
resultType=
"java.lang.Long"
>
select id from p_point_inputitem where point_id = #{pointId}
</select>
<select
id=
"listByFmeaId"
resultType=
"java.util.Map"
>
select
a.fmea_id as fmeaId,
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,
group_concat(pii.name) as inputItems
from
f_fmea_point_inputitem a
inner join
p_point_inputitem as b on b.id = a.point_inputitem_id
left join
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
limit #{offset},#{limit}
</select>
<select
id=
"listByPointIdAndInputItemIds"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
select
id,
fmea_id as fmeaId,
point_inputitem_id as pointInputitemId,
state
from
f_fmea_point_inputitem
where
point_inputitem_id in
(
select
id
from
p_point_inputitem
where
point_id = #{pointId}
and
input_item_id in
<foreach
collection=
"inputIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
)
</select>
<select
id=
"listFmeaByFmeaId"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
select
id,
fmea_id as fmeaId,
point_inputitem_id as pointInputitemId,
state
from
f_fmea_point_inputitem
where
fmea_id = #{fmeaId}
</select>
<update
id=
"updateStateByIds"
>
update
f_fmea_point_inputitem
set
state = #{state}
where
id in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_level.xml
View file @
4f6fa381
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
SELECT
SELECT
a.id,
a.id,
a.level,
a.level,
a.top_limit as topLimit,
a.down_limit as downLimit,
a.evaluation_model_id as evaluationModelId,
a.evaluation_model_id as evaluationModelId,
a.severity,
a.severity,
a.name,
a.name,
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source_fireequiment.xml
deleted
100644 → 0
View file @
959c7e9b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.RiskSourceEquimentMapper"
>
<select
id=
"queryForView"
resultType=
"java.util.Map"
>
SELECT
se.id,
(
SELECT
fe.`code`
FROM
f_fire_equipment fe
WHERE
fe.id = se.fire_equipment_id
) fCode,
(
SELECT
fe.`name`
FROM
f_fire_equipment fe
WHERE
fe.id = se.fire_equipment_id
) fName,
(
SELECT
fe.production_area
FROM
f_fire_equipment fe
WHERE
fe.id = se.fire_equipment_id
) productionArea,
(
SELECT
fe.floor3d
FROM
f_fire_equipment fe
WHERE
fe.id = se.fire_equipment_id
) floor,
(
SELECT
fe.room
FROM
f_fire_equipment fe
WHERE
fe.id = se.fire_equipment_id
) room,
(
SELECT
e.`name`
FROM
f_equipment e
WHERE
e.id = se.equipment_id
) eName,
(
SELECT
e.`code`
FROM
f_equipment e
WHERE
e.id = se.equipment_id
) eCode,
(
SELECT
e.`id`
FROM
f_equipment e
WHERE
e.id = se.equipment_id
) eId
FROM
f_risk_source_equipment se
WHERE
se.risk_source_id = ${riskSourceId}
LIMIT ${start},${length} ;
</select>
<select
id=
"queryForViewCount"
resultType=
"long"
>
SELECT
count(1)
FROM
f_risk_source_equipment se
WHERE
se.risk_source_id = ${riskSourceId}
</select>
<select
id=
"queryEquimentRelation"
resultType=
"java.util.Map"
>
SELECT
fe.id,
fe.`code` fCode,
fe.`name` fName,
(
SELECT
CASE
WHEN count(1) > 0 THEN
'bound'
ELSE
'noBound'
END
FROM
f_risk_source_equipment se
WHERE
se.fire_equipment_id = fe.id
AND se.equipment_id = efe.equipment_id
AND se.risk_source_id = ${riskSourceId}
) isBound
FROM
f_equipment_fire_equipment efe
JOIN f_fire_equipment fe ON efe.fire_equipment_id = fe.id
WHERE
efe.equipment_id = ${equipmentId}
<if
test=
"fname != null"
>
AND fe.`name` like '%${fname}%'
</if>
<if
test=
"length > 0"
>
LIMIT ${start},${length} ;
</if>
</select>
<select
id=
"queryEquimentRelationCount"
resultType=
"long"
>
SELECT
count(1)
FROM
f_equipment_fire_equipment efe
JOIN f_fire_equipment fe ON efe.fire_equipment_id = fe.id
WHERE
efe.equipment_id = ${equipmentId}
<if
test=
"fname != null"
>
AND fe.`name` like '%${fname}%'
</if>
</select>
</mapper>
\ No newline at end of file
pom.xml
View file @
4f6fa381
...
@@ -214,7 +214,12 @@
...
@@ -214,7 +214,12 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-jexl
</artifactId>
<version>
2.1.1
</version>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
...
...
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