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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
1130 additions
and
777 deletions
+1130
-777
Alarm.java
.../src/main/java/com/yeejoin/amos/fas/dao/entity/Alarm.java
+11
-13
EquipmentFireEquipment.java
...m/yeejoin/amos/fas/dao/entity/EquipmentFireEquipment.java
+10
-13
Fmea.java
...n/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
+86
-22
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
+7
-10
RiskLevel.java
.../main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
+28
-6
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
+23
-15
SCompany.java
...c/main/java/com/yeejoin/amos/fas/dao/entity/SCompany.java
+25
-27
SDepartment.java
...ain/java/com/yeejoin/amos/fas/dao/entity/SDepartment.java
+17
-19
SUser.java
.../src/main/java/com/yeejoin/amos/fas/dao/entity/SUser.java
+25
-27
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+3
-4
RiskModelController.java
...oin/amos/fas/business/controller/RiskModelController.java
+11
-9
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+0
-0
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
+10
-5
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
+2
-5
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
+19
-5
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-0
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
+26
-21
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
+5
-0
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,20 +7,20 @@ import javax.persistence.NamedQuery;
...
@@ -10,20 +7,20 @@ 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
;
/**
/**
...
@@ -38,13 +35,13 @@ public class Alarm extends BasicEntity {
...
@@ -38,13 +35,13 @@ public class Alarm extends BasicEntity {
/**
/**
* 报警类别
* 报警类别
*/
*/
@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
;
...
@@ -68,11 +65,11 @@ public class Alarm extends BasicEntity {
...
@@ -68,11 +65,11 @@ public class Alarm extends BasicEntity {
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
;
}
}
...
@@ -91,6 +88,7 @@ public class Alarm extends BasicEntity {
...
@@ -91,6 +88,7 @@ public class Alarm extends BasicEntity {
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getMetric
()
{
public
String
getMetric
()
{
return
metric
;
return
metric
;
}
}
...
...
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,37 +8,36 @@ import javax.persistence.Table;
...
@@ -10,37 +8,36 @@ 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
;
}
}
...
...
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,21 +9,20 @@ import javax.persistence.Lob;
...
@@ -10,21 +9,20 @@ 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"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
int
createBy
;
@Lob
@Lob
...
@@ -33,14 +31,28 @@ public class Fmea extends BasicEntity {
...
@@ -33,14 +31,28 @@ public class Fmea extends BasicEntity {
@Lob
@Lob
private
String
engineering
;
private
String
engineering
;
@Column
(
name
=
"evaluation_did"
)
@Column
(
name
=
"evaluation_did"
)
private
BigInteger
evaluationDid
;
private
Long
evaluationDid
;
@Column
(
name
=
"evaluation_oid"
)
private
Long
evaluationOid
;
@Column
(
name
=
"evaluation_sid"
)
private
Long
evaluationSid
;
@Column
(
name
=
"new_evaluation_oid"
)
private
Long
newEvaluationOid
;
@Column
(
name
=
"rpn"
)
private
BigDecimal
rpn
;
@Column
(
name
=
"evaluation_oid"
)
private
String
didValue
;
private
BigInteger
evaluationOid
;
@Column
(
name
=
"evaluation_oid"
)
private
String
oidValue
;
private
BigInteger
evaluationSid
;
private
String
newOidValue
;
private
String
sidValue
;
@Lob
@Lob
private
String
management
;
private
String
management
;
...
@@ -50,10 +62,10 @@ public class Fmea extends BasicEntity {
...
@@ -50,10 +62,10 @@ public class Fmea extends BasicEntity {
private
String
remark
;
private
String
remark
;
@Column
(
name
=
"risk_factors_id"
)
@Column
(
name
=
"risk_factors_id"
)
private
Long
riskFactorsId
;
private
Long
riskFactorsId
;
@Column
(
name
=
"risk_source_id"
)
@Column
(
name
=
"risk_source_id"
)
private
Long
riskSourceId
;
private
Long
riskSourceId
;
private
BigDecimal
rpni
;
private
BigDecimal
rpni
;
...
@@ -90,27 +102,27 @@ public class Fmea extends BasicEntity {
...
@@ -90,27 +102,27 @@ public class Fmea extends BasicEntity {
this
.
engineering
=
engineering
;
this
.
engineering
=
engineering
;
}
}
public
BigInteger
getEvaluationDid
()
{
public
Long
getEvaluationDid
()
{
return
this
.
evaluationDid
;
return
this
.
evaluationDid
;
}
}
public
void
setEvaluationDid
(
BigInteger
evaluationDid
)
{
public
void
setEvaluationDid
(
Long
evaluationDid
)
{
this
.
evaluationDid
=
evaluationDid
;
this
.
evaluationDid
=
evaluationDid
;
}
}
public
BigInteger
getEvaluationOid
()
{
public
Long
getEvaluationOid
()
{
return
this
.
evaluationOid
;
return
this
.
evaluationOid
;
}
}
public
void
setEvaluationOid
(
BigInteger
evaluationOid
)
{
public
void
setEvaluationOid
(
Long
evaluationOid
)
{
this
.
evaluationOid
=
evaluationOid
;
this
.
evaluationOid
=
evaluationOid
;
}
}
public
BigInteger
getEvaluationSid
()
{
public
Long
getEvaluationSid
()
{
return
this
.
evaluationSid
;
return
this
.
evaluationSid
;
}
}
public
void
setEvaluationSid
(
BigInteger
evaluationSid
)
{
public
void
setEvaluationSid
(
Long
evaluationSid
)
{
this
.
evaluationSid
=
evaluationSid
;
this
.
evaluationSid
=
evaluationSid
;
}
}
...
@@ -181,4 +193,55 @@ public class Fmea extends BasicEntity {
...
@@ -181,4 +193,55 @@ public class Fmea extends BasicEntity {
this
.
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,19 +9,18 @@ import javax.persistence.Table;
...
@@ -11,19 +9,18 @@ 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
;
...
@@ -45,11 +42,11 @@ public class PreplanPicture extends BasicEntity {
...
@@ -45,11 +42,11 @@ public class PreplanPicture extends BasicEntity {
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
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
View file @
4f6fa381
...
@@ -4,24 +4,24 @@ import javax.persistence.Column;
...
@@ -4,24 +4,24 @@ 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"
)
@Column
(
name
=
"name"
)
...
@@ -38,9 +38,15 @@ public class RiskLevel extends BasicEntity {
...
@@ -38,9 +38,15 @@ public class RiskLevel extends BasicEntity {
@Column
(
name
=
"level"
)
@Column
(
name
=
"level"
)
private
Integer
level
;
private
Integer
level
;
@Column
(
name
=
"org_code"
)
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
@Column
(
name
=
"top_limit"
)
private
BigDecimal
topLimit
;
@Column
(
name
=
"down_limit"
)
private
BigDecimal
downLimit
;
private
String
remark
;
private
String
remark
;
private
String
severity
;
private
String
severity
;
...
@@ -104,4 +110,19 @@ public class RiskLevel extends BasicEntity {
...
@@ -104,4 +110,19 @@ public class RiskLevel extends BasicEntity {
this
.
evaluationModelId
=
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,31 +8,32 @@ import javax.persistence.JoinColumn;
...
@@ -9,31 +8,32 @@ 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
;
private
String
remark
;
@Column
(
name
=
"risk_source_id"
)
@Column
(
name
=
"risk_source_id"
)
private
BigInteger
riskSourceId
;
private
Long
riskSourceId
;
@Column
(
name
=
"fmea_id"
)
private
Long
fmeaId
;
private
BigDecimal
rpn
;
private
BigDecimal
rpn
;
private
BigDecimal
rpni
;
private
BigDecimal
rpni
;
@Column
(
name
=
"trigger_by"
)
@Column
(
name
=
"trigger_by"
)
private
BigInteger
triggerBy
;
private
Long
triggerBy
;
private
int
type
;
private
int
type
;
...
@@ -50,11 +50,11 @@ public class RpnChangeLog extends BasicEntity {
...
@@ -50,11 +50,11 @@ public class RpnChangeLog extends BasicEntity {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
BigInteger
getRiskSourceId
()
{
public
Long
getRiskSourceId
()
{
return
this
.
riskSourceId
;
return
this
.
riskSourceId
;
}
}
public
void
setRiskSourceId
(
BigInteger
riskSourceId
)
{
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
this
.
riskSourceId
=
riskSourceId
;
this
.
riskSourceId
=
riskSourceId
;
}
}
...
@@ -74,11 +74,11 @@ public class RpnChangeLog extends BasicEntity {
...
@@ -74,11 +74,11 @@ public class RpnChangeLog extends BasicEntity {
this
.
rpni
=
rpni
;
this
.
rpni
=
rpni
;
}
}
public
BigInteger
getTriggerBy
()
{
public
Long
getTriggerBy
()
{
return
this
.
triggerBy
;
return
this
.
triggerBy
;
}
}
public
void
setTriggerBy
(
BigInteger
triggerBy
)
{
public
void
setTriggerBy
(
Long
triggerBy
)
{
this
.
triggerBy
=
triggerBy
;
this
.
triggerBy
=
triggerBy
;
}
}
...
@@ -101,4 +101,11 @@ public class RpnChangeLog extends BasicEntity {
...
@@ -101,4 +101,11 @@ public class RpnChangeLog extends BasicEntity {
this
.
riskSource
=
riskSource
;
this
.
riskSource
=
riskSource
;
}
}
public
Long
getFmeaId
()
{
return
fmeaId
;
}
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,17 +8,15 @@ import javax.persistence.Table;
...
@@ -8,17 +8,15 @@ 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
;
...
@@ -27,55 +25,55 @@ public class SCompany implements Serializable {
...
@@ -27,55 +25,55 @@ public class SCompany implements Serializable {
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
()
{
...
@@ -177,11 +175,11 @@ public class SCompany implements Serializable {
...
@@ -177,11 +175,11 @@ public class SCompany implements Serializable {
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
;
}
}
...
@@ -193,19 +191,19 @@ public class SCompany implements Serializable {
...
@@ -193,19 +191,19 @@ public class SCompany implements Serializable {
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
;
}
}
...
@@ -217,11 +215,11 @@ public class SCompany implements Serializable {
...
@@ -217,11 +215,11 @@ public class SCompany implements Serializable {
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
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/SDepartment.java
View file @
4f6fa381
...
@@ -8,52 +8,50 @@ import javax.persistence.Table;
...
@@ -8,52 +8,50 @@ 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
()
{
...
@@ -67,11 +65,11 @@ public class SDepartment implements Serializable {
...
@@ -67,11 +65,11 @@ public class SDepartment implements Serializable {
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
;
}
}
...
@@ -123,11 +121,11 @@ public class SDepartment implements Serializable {
...
@@ -123,11 +121,11 @@ public class SDepartment implements Serializable {
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
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/SUser.java
View file @
4f6fa381
...
@@ -10,45 +10,43 @@ import javax.persistence.Table;
...
@@ -10,45 +10,43 @@ 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
;
...
@@ -56,33 +54,33 @@ public class SUser implements Serializable {
...
@@ -56,33 +54,33 @@ public class SUser implements Serializable {
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
()
{
...
@@ -96,11 +94,11 @@ public class SUser implements Serializable {
...
@@ -96,11 +94,11 @@ public class SUser implements Serializable {
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
;
}
}
...
@@ -128,11 +126,11 @@ public class SUser implements Serializable {
...
@@ -128,11 +126,11 @@ public class SUser implements Serializable {
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
;
}
}
...
@@ -218,11 +216,11 @@ public class SUser implements Serializable {
...
@@ -218,11 +216,11 @@ public class SUser implements Serializable {
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
;
}
}
...
...
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
This diff is collapsed.
Click to expand it.
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
* @param param
* @return
* @return
*/
*/
...
@@ -18,6 +20,7 @@ public interface FmeaMapper extends BaseMapper {
...
@@ -18,6 +20,7 @@ public interface FmeaMapper extends BaseMapper {
/**
/**
* 危险因素分页查询
* 危险因素分页查询
*
* @param param
* @param param
* @return
* @return
*/
*/
...
@@ -26,8 +29,10 @@ public interface FmeaMapper extends BaseMapper {
...
@@ -26,8 +29,10 @@ public interface FmeaMapper extends BaseMapper {
/**
/**
* FMEA信息列表
* FMEA信息列表
* @param riskSourceId
* @return
*/
*/
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
>
{
...
@@ -18,6 +15,6 @@ public interface IEquipmentFireEquipmentDao extends BaseDao<EquipmentFireEquipme
...
@@ -18,6 +15,6 @@ public interface IEquipmentFireEquipmentDao extends BaseDao<EquipmentFireEquipme
* @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"
);
fmeas
.
forEach
(
fmea
->
{
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
();
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
();
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
fmea
.
getRiskSourceId
());
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
fmea
.
getRiskSourceId
());
fmea
.
setRiskSource
(
riskSource
);
fmea
.
setRiskSource
(
riskSource
);
iFmeaDao
.
save
(
fmea
);
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
This diff is collapsed.
Click to expand it.
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
()
{
...
@@ -28,13 +25,13 @@ public class RsDataQueue {
...
@@ -28,13 +25,13 @@ public class RsDataQueue {
}
}
//获取RsDataQueue 的实例
//获取RsDataQueue 的实例
public
static
RsDataQueue
getInstance
(){
public
static
RsDataQueue
getInstance
()
{
//先检查实例是否存在,如果不存在才进入下面的同步块
//先检查实例是否存在,如果不存在才进入下面的同步块
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
//同步块,线程安全的创建实例
//同步块,线程安全的创建实例
synchronized
(
RsDataQueue
.
class
)
{
synchronized
(
RsDataQueue
.
class
)
{
//再次检查实例是否存在,如果不存在才真的创建实例
//再次检查实例是否存在,如果不存在才真的创建实例
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
instance
=
new
RsDataQueue
();
instance
=
new
RsDataQueue
();
}
}
}
}
...
@@ -51,18 +48,27 @@ public class RsDataQueue {
...
@@ -51,18 +48,27 @@ public class RsDataQueue {
service_apdu
.
execute
(
task_runnable
);
service_apdu
.
execute
(
task_runnable
);
}
}
public
void
add
(
Long
riskSourceId
)
{
public
void
addUpdateMessage
(
Long
fmeaId
)
{
blockingQueue
.
add
(
riskSourceId
);
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
"update"
));
}
public
void
addAbnormalMessage
(
Long
fmeaId
)
{
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
)
{
rpni
=
riskSourceService
.
updateRiskSourceRpni
(
riskSourceId
);
String
from
=
fmeaMessage
.
getNorifyFrom
();
Long
fmeaId
=
fmeaMessage
.
getFmeaId
();
if
(
from
.
equals
(
"abnormal"
))
{
riskSourceService
.
notifyFmeaFromAbnormal
(
fmeaId
);
}
else
if
(
from
.
equals
(
"update"
))
{
riskSourceService
.
notifyFmeaFromUpdate
(
fmeaId
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
...
@@ -73,5 +79,4 @@ public class RsDataQueue {
...
@@ -73,5 +79,4 @@ public class RsDataQueue {
};
};
}
}
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
...
@@ -215,6 +215,11 @@
...
@@ -215,6 +215,11 @@
<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