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
bcd1fb16
Commit
bcd1fb16
authored
Feb 03, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade-1225' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into eqintegration
parents
d5c5a728
0084c668
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
242 additions
and
50 deletions
+242
-50
PlanOperationRecord.java
.../com/yeejoin/amos/fas/dao/entity/PlanOperationRecord.java
+12
-0
PlanDetailMapper.java
...eejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
+1
-1
IPlanDocDao.java
...yeejoin/amos/fas/business/dao/repository/IPlanDocDao.java
+4
-0
IPlanEquipmentDao.java
...n/amos/fas/business/dao/repository/IPlanEquipmentDao.java
+3
-1
IPlanRuleDao.java
...eejoin/amos/fas/business/dao/repository/IPlanRuleDao.java
+4
-2
IDutyModeServer.java
.../com/yeejoin/amos/fas/business/feign/IDutyModeServer.java
+3
-3
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+5
-4
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+33
-12
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+12
-12
ReserveEnum.java
...ain/java/com/yeejoin/amos/fas/core/enums/ReserveEnum.java
+4
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+153
-12
PlanDetailMapper.xml
...ysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
+3
-0
PlanOperationRecordMapper.xml
...rc/main/resources/db/mapper/PlanOperationRecordMapper.xml
+2
-0
dbTemplate_fmea_point_inputitem.xml
...n/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
+1
-1
dbTemplate_impt_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
+2
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PlanOperationRecord.java
View file @
bcd1fb16
...
@@ -83,5 +83,16 @@ public class PlanOperationRecord extends BasicEntity {
...
@@ -83,5 +83,16 @@ public class PlanOperationRecord extends BasicEntity {
*/
*/
@Column
(
name
=
"equipment_name"
)
@Column
(
name
=
"equipment_name"
)
private
String
equipmentName
;
private
String
equipmentName
;
/**
* 装备id
*/
@Column
(
name
=
"equipment_id"
)
private
Long
equipmentId
;
/**
* 电力装备id
*/
@Column
(
name
=
"fire_equipment_id"
)
private
Long
fireEquipmentId
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
View file @
bcd1fb16
...
@@ -44,5 +44,5 @@ public interface PlanDetailMapper {
...
@@ -44,5 +44,5 @@ public interface PlanDetailMapper {
*/
*/
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
);
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
);
String
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPlanDocDao.java
View file @
bcd1fb16
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.fas.dao.entity.PlanDoc
;
import
com.yeejoin.amos.fas.dao.entity.PlanDoc
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -21,4 +22,7 @@ public interface IPlanDocDao extends BaseDao<PlanDoc, Long> {
...
@@ -21,4 +22,7 @@ public interface IPlanDocDao extends BaseDao<PlanDoc, Long> {
List
<
PlanDoc
>
findAllByPlanIdIn
(
List
<
Long
>
planId
);
List
<
PlanDoc
>
findAllByPlanIdIn
(
List
<
Long
>
planId
);
List
<
PlanDoc
>
findAllByIsDelete
(
Boolean
isDelete
);
List
<
PlanDoc
>
findAllByIsDelete
(
Boolean
isDelete
);
@Query
(
value
=
"SELECT * from c_plan_doc where plan_id in (?1) AND is_delete = 0 "
,
nativeQuery
=
true
)
List
<
PlanDoc
>
findAllByPlanId
(
Long
planId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPlanEquipmentDao.java
View file @
bcd1fb16
...
@@ -20,12 +20,14 @@ public interface IPlanEquipmentDao extends BaseDao<PlanEquipment, Long> {
...
@@ -20,12 +20,14 @@ public interface IPlanEquipmentDao extends BaseDao<PlanEquipment, Long> {
void
deleteByPlanId
(
long
planId
);
void
deleteByPlanId
(
long
planId
);
List
<
PlanEquipment
>
getPlanDocsByPlanId
(
Long
planId
);
List
<
PlanEquipment
>
getPlanDocsByPlanId
(
Long
planId
);
@Query
(
value
=
"SELECT * from c_plan_equipment where plan_id = ?1 AND is_delete = 0 "
,
nativeQuery
=
true
)
List
<
PlanEquipment
>
findByPlanId
(
Long
planId
);
List
<
PlanEquipment
>
findByPlanId
(
Long
planId
);
List
<
PlanEquipment
>
findAllByIsDelete
(
Boolean
isDelete
);
List
<
PlanEquipment
>
findAllByIsDelete
(
Boolean
isDelete
);
List
<
PlanEquipment
>
findAllByPlanIdIn
(
List
<
Long
>
planId
);
List
<
PlanEquipment
>
findAllByPlanIdIn
(
List
<
Long
>
planId
);
@Query
(
value
=
"SELECT * from c_plan_equipment where fire_equipment_id in (?1) AND is_delete = 0 "
,
nativeQuery
=
true
)
List
<
PlanEquipment
>
findAllByFireEquipmentIdIn
(
List
<
Long
>
id
);
List
<
PlanEquipment
>
findAllByFireEquipmentIdIn
(
List
<
Long
>
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPlanRuleDao.java
View file @
bcd1fb16
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.fas.dao.entity.PlanDoc
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <h1><h1>
* <h1><h1>
...
@@ -23,4 +22,7 @@ public interface IPlanRuleDao extends BaseDao<PlanRule, Long>{
...
@@ -23,4 +22,7 @@ public interface IPlanRuleDao extends BaseDao<PlanRule, Long>{
List
<
PlanRule
>
findAllByIsDelete
(
Boolean
isDelete
);
List
<
PlanRule
>
findAllByIsDelete
(
Boolean
isDelete
);
List
<
PlanRule
>
findAllByPlanIdIn
(
List
<
Long
>
planIds
);
List
<
PlanRule
>
findAllByPlanIdIn
(
List
<
Long
>
planIds
);
@Query
(
value
=
"SELECT * from c_plan_rule where plan_id in (?1) AND is_delete = 0 "
,
nativeQuery
=
true
)
List
<
PlanRule
>
findAllByPlanId
(
Long
planId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/IDutyModeServer.java
View file @
bcd1fb16
...
@@ -8,8 +8,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -8,8 +8,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
@FeignClient
(
name
=
"${dutyMode.fegin.name}"
,
fallback
=
DutyModeServerFallback
.
class
,
configuration
=
FeignConfiguration
.
class
)
@FeignClient
(
name
=
"${dutyMode.fegin.name}"
,
fallback
=
DutyModeServerFallback
.
class
,
configuration
=
FeignConfiguration
.
class
)
public
interface
IDutyModeServer
{
public
interface
IDutyModeServer
{
@RequestMapping
(
value
=
"/duty/listByDay"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"/duty/
duty/
listByDay"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
public
CommonResponse
dutyListByDay
(
public
CommonResponse
dutyListByDay
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
...
@@ -17,7 +17,7 @@ public interface IDutyModeServer {
...
@@ -17,7 +17,7 @@ public interface IDutyModeServer {
@RequestHeader
(
name
=
"orgCode"
,
required
=
true
)
String
orgCode
,
@RequestHeader
(
name
=
"orgCode"
,
required
=
true
)
String
orgCode
,
@RequestBody
String
param
);
@RequestBody
String
param
);
@RequestMapping
(
value
=
"/duty/dutyListByDate"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"/duty/duty
/duty
ListByDate"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
public
CommonResponse
dutyListByDate
(
public
CommonResponse
dutyListByDate
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
bcd1fb16
...
@@ -196,8 +196,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -196,8 +196,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
String
plan
=
this
.
getNumberPlan
(
Long
.
parseLong
(
contingencyRo
.
getEquipmentId
()));
List
<
String
>
plan
=
this
.
getNumberPlan
(
Long
.
parseLong
(
contingencyRo
.
getEquipmentId
()));
ruleTrigger
.
publish
(
contingencyRo
,
"换流站消防专项预案/"
+
plan
,
ArrayUtils
.
toArray
(
equipment
.
getName
()));
ruleTrigger
.
publish
(
contingencyRo
,
"换流站消防专项预案/"
+
plan
.
get
(
0
),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
}
}
...
@@ -309,8 +310,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -309,8 +310,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
iContingencyOriginalDataDao
.
updateByButtonStep
(
step
,
batchNo
);
iContingencyOriginalDataDao
.
updateByButtonStep
(
step
,
batchNo
);
}
}
public
String
getNumberPlan
(
Long
id
)
{
public
List
<
String
>
getNumberPlan
(
Long
id
)
{
String
ruleId
=
planDetailMapper
.
getRuleIdByEquipment
(
id
);
List
<
String
>
ruleId
=
planDetailMapper
.
getRuleIdByEquipment
(
id
);
return
ruleId
;
return
ruleId
;
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
bcd1fb16
...
@@ -107,36 +107,41 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -107,36 +107,41 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
//状态校验
//状态校验
ReserveEnum
reserveEnum
=
this
.
runCheck
(
vo
);
ReserveEnum
reserveEnum
=
this
.
runCheck
(
vo
);
result
.
setMessage
(
reserveEnum
.
getText
());
result
.
setMessage
(
reserveEnum
.
getText
());
if
(
ReserveEnum
.
THISRUNNING
.
getStatus
()
==
reserveEnum
.
getStatus
(
))
{
if
(
ReserveEnum
.
THISRUNNING
.
getStatus
()
.
equals
(
reserveEnum
.
getStatus
()
))
{
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByPlanId1
(
Long
.
valueOf
(
vo
.
getPlanId
()));
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByPlanId1
(
Long
.
valueOf
(
vo
.
getPlanId
()));
result
.
setMessage
(
ReserveEnum
.
THISRUNNING
.
getText
());
result
.
setMessage
(
ReserveEnum
.
THISRUNNING
.
getText
());
result
.
setBatchNo
(
recordList
.
get
(
0
).
getBatchNo
());
result
.
setBatchNo
(
recordList
.
get
(
0
).
getBatchNo
());
return
result
;
return
result
;
}
else
if
(
ReserveEnum
.
RUN
.
getStatus
()
==
reserveEnum
.
getStatus
(
))
{
}
else
if
(
ReserveEnum
.
RUN
.
getStatus
()
.
equals
(
reserveEnum
.
getStatus
()
))
{
Optional
<
PlanDetail
>
PlanDetailOp
=
planDetailDao
.
findById
(
Long
.
valueOf
(
vo
.
getPlanId
()));
Optional
<
PlanDetail
>
PlanDetailOp
=
planDetailDao
.
findById
(
Long
.
valueOf
(
vo
.
getPlanId
()));
List
<
PlanEquipment
>
equipmentList
=
planEquipmentDao
.
findByPlanId
(
PlanDetailOp
.
get
().
getId
());
List
<
PlanEquipment
>
equipmentList
=
planEquipmentDao
.
findByPlanId
(
PlanDetailOp
.
get
().
getId
());
//预案启动
//预案启动
if
(
PlanDetailOp
.
get
()
!=
null
)
{
if
(
PlanDetailOp
.
get
()
!=
null
)
{
//电力设备
Equipment
equipment
=
equipmentService
.
queryOne
(
equipmentList
.
get
(
0
).
getFireEquipmentId
());
//获取规则名称
//获取规则名称
List
<
PlanRule
>
planRuleList
=
planRuleDao
.
getPlanDocsByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
List
<
PlanRule
>
planRuleList
=
planRuleDao
.
getPlanDocsByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
if
(
planRuleList
.
size
()
==
0
)
{
if
(
planRuleList
.
size
()
==
0
)
{
result
.
setMessage
(
ReserveEnum
.
NOPLAN
.
getText
());
result
.
setMessage
(
ReserveEnum
.
NOPLAN
.
getText
());
return
result
;
}
}
equipment
.
setReservePlan
(
"换流站消防专项预案"
+
"/"
+
planRuleList
.
get
(
0
).
getRuleId
());
//电力设备
Equipment
equipment
=
equipmentService
.
queryOne
(
equipmentList
.
get
(
0
).
getFireEquipmentId
());
if
(
equipment
==
null
)
{
if
(
equipment
==
null
)
{
result
.
setMessage
(
ReserveEnum
.
NOEQUIP
.
getText
());
result
.
setMessage
(
ReserveEnum
.
NOEQUIP
.
getText
());
return
result
;
}
}
equipment
.
setReservePlan
(
"换流站消防专项预案"
+
"/"
+
planRuleList
.
get
(
0
).
getRuleId
());
//电力设备绑定装备
//电力设备绑定装备
List
<
EquipmentFireEquipment
>
equipmentFireEquipmentList
=
equipmentFireEquipmentDao
.
findAllByEquipmentId
(
equipmentList
.
get
(
0
).
getFireEquipmentId
());
List
<
EquipmentFireEquipment
>
equipmentFireEquipmentList
=
equipmentFireEquipmentDao
.
findAllByEquipmentId
(
equipmentList
.
get
(
0
).
getFireEquipmentId
());
if
(
equipmentFireEquipmentList
.
size
()
==
0
)
{
if
(
equipmentFireEquipmentList
.
size
()
==
0
)
{
result
.
setMessage
(
ReserveEnum
.
NOFIRE
.
getText
());
result
.
setMessage
(
"该预案保护的电力设备尚未绑定配套的火灾报警设备"
);
return
result
;
}
}
//查询设备
//查询设备
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
equipmentFireEquipmentList
.
get
(
0
).
getFireEquipmentId
());
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
equipmentFireEquipmentList
.
get
(
0
).
getFireEquipmentId
());
if
(
equipmentSpecific
==
null
)
{
if
(
equipmentSpecific
==
null
)
{
result
.
setMessage
(
ReserveEnum
.
NOFIRE
.
getText
());
result
.
setMessage
(
"该预案保护的电力设备尚未绑定配套的火灾报警设备"
);
return
result
;
}
}
//插入运行记录表
//插入运行记录表
...
@@ -150,7 +155,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -150,7 +155,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
planOperationRecord
.
setStartUserName
(
vo
.
getUserName
());
planOperationRecord
.
setStartUserName
(
vo
.
getUserName
());
planOperationRecord
.
setEquipmentCode
(
equipmentSpecific
.
getCode
());
planOperationRecord
.
setEquipmentCode
(
equipmentSpecific
.
getCode
());
planOperationRecord
.
setEquipmentName
(
equipmentSpecific
.
getName
());
planOperationRecord
.
setEquipmentName
(
equipmentSpecific
.
getName
());
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
()
==
vo
.
getStatus
())
{
planOperationRecord
.
setEquipmentId
(
equipmentSpecific
.
getId
());
planOperationRecord
.
setFireEquipmentId
(
equipment
.
getId
());
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
().
equals
(
vo
.
getStatus
()))
{
planOperationRecord
.
setExecutionType
(
ExecutionTypeEnum
.
PLANCHECK
.
getCode
());
planOperationRecord
.
setExecutionType
(
ExecutionTypeEnum
.
PLANCHECK
.
getCode
());
}
else
{
}
else
{
planOperationRecord
.
setExecutionType
(
ExecutionTypeEnum
.
FIREMANAGEMENT
.
getCode
());
planOperationRecord
.
setExecutionType
(
ExecutionTypeEnum
.
FIREMANAGEMENT
.
getCode
());
...
@@ -226,8 +233,22 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -226,8 +233,22 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
public
ReserveEnum
runCheck
(
ContingencyPlanParamVo
vo
)
throws
Exception
{
public
ReserveEnum
runCheck
(
ContingencyPlanParamVo
vo
)
throws
Exception
{
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
vo
.
getRiskType
())
||
StringUtils
.
isBlank
(
vo
.
getRiskType
()))
{
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
vo
.
getRiskType
())
||
StringUtils
.
isBlank
(
vo
.
getRiskType
()))
{
List
<
PlanDoc
>
planDocs
=
planDocDao
.
findAllByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
if
(
planDocs
.
size
()==
0
){
return
ReserveEnum
.
PLAN_DOC_IS_DELETE
;
}
//判断预案文档是否删除
List
<
PlanRule
>
planRules
=
planRuleDao
.
findAllByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
if
(
planRules
.
size
()==
0
){
return
ReserveEnum
.
PLAN_RULE_IS_DELETE
;
}
//判断预案装备是否删除
List
<
PlanEquipment
>
planEquipments
=
planEquipmentDao
.
findByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
if
(
planEquipments
.
isEmpty
()){
return
ReserveEnum
.
PLAN_EQUIP_IS_DELETE
;
}
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByPlanId1
(
Long
.
valueOf
(
vo
.
getPlanId
()));
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByPlanId1
(
Long
.
valueOf
(
vo
.
getPlanId
()));
if
(
recordList
.
size
()
>
0
&&
vo
.
getStatus
()!=
ContingencyPlanStatusEnum
.
ONGOING
.
getCode
(
))
{
if
(
recordList
.
size
()
>
0
&&
!
vo
.
getStatus
().
equals
(
ContingencyPlanStatusEnum
.
ONGOING
.
getCode
()
))
{
return
ReserveEnum
.
THISRUNNING
;
return
ReserveEnum
.
THISRUNNING
;
}
}
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
().
equals
(
vo
.
getStatus
()))
{
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
().
equals
(
vo
.
getStatus
()))
{
...
@@ -476,9 +497,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -476,9 +497,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Override
@Override
public
Boolean
delete
(
List
<
Long
>
idList
)
{
public
Boolean
delete
(
List
<
Long
>
idList
)
{
planDetailMapper
.
updateIsDeleteByIdList
(
idList
,
true
);
planDetailMapper
.
updateIsDeleteByIdList
(
idList
,
true
);
//
planDocMapper.updateIsDeleteByPlanIdList(idList, true);
planDocMapper
.
updateIsDeleteByPlanIdList
(
idList
,
true
);
//
planEquipmentMapper.updateIsDeleteByPlanIdList(idList, true);
planEquipmentMapper
.
updateIsDeleteByPlanIdList
(
idList
,
true
);
//
planRuleMapper.updateIsDeleteByPlanIdList(idList, true);
planRuleMapper
.
updateIsDeleteByPlanIdList
(
idList
,
true
);
return
true
;
return
true
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
bcd1fb16
...
@@ -592,15 +592,15 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -592,15 +592,15 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
contingencyRo
.
setTelemetryMap
(
telemetryMap
);
contingencyRo
.
setTelemetryMap
(
telemetryMap
);
String
plan
=
this
.
getNumberPlan
(
Long
.
parseLong
(
contingencyRo
.
getEquipmentId
()));
List
<
String
>
plan
=
this
.
getNumberPlan
(
Long
.
parseLong
(
contingencyRo
.
getEquipmentId
()));
log
.
debug
(
"开始调用规则"
);
if
(
plan
.
size
()>
0
){
Object
result
=
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
(),
ArrayUtils
.
toArray
(
equipment
.
getName
())
);
log
.
debug
(
"开始调用规则"
);
Object
result
=
ruleTrigger
.
publish
(
contingencyRo
,
"换流站消防专项预案/"
+
plan
.
get
(
0
),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
log
.
debug
(
"规则调用返回=="
,
result
);
log
.
debug
(
"规则调用返回=="
,
result
);
ContingencyOriginalData
contingencyOriginalData
=
new
ContingencyOriginalData
();
ContingencyOriginalData
contingencyOriginalData
=
new
ContingencyOriginalData
(
);
BeanUtils
.
copyProperties
(
contingencyRo
,
contingencyOriginalData
);
BeanUtils
.
copyProperties
(
contingencyRo
,
contingencyOriginalData
);
iContingencyOriginalDataDao
.
save
(
contingencyOriginalData
);
iContingencyOriginalDataDao
.
save
(
contingencyOriginalData
);
}
}
}
...
@@ -705,7 +705,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -705,7 +705,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
List
<
Long
>
failIds
=
Lists
.
newArrayList
();
List
<
Long
>
failIds
=
Lists
.
newArrayList
();
List
<
Long
>
successIds
=
Lists
.
newArrayList
();
List
<
Long
>
successIds
=
Lists
.
newArrayList
();
fmeaPointInputitems
.
forEach
(
fmeaPointInputitem
->
{
fmeaPointInputitems
.
forEach
(
fmeaPointInputitem
->
{
CheckInputItemRo
checkInputItemRo
=
map
.
get
(
fmeaPointInputitem
.
get
InputI
temId
());
CheckInputItemRo
checkInputItemRo
=
map
.
get
(
fmeaPointInputitem
.
get
PointInputi
temId
());
if
(
checkInputItemRo
.
getStatus
().
equals
(
"2"
))
{
if
(
checkInputItemRo
.
getStatus
().
equals
(
"2"
))
{
failIds
.
add
(
fmeaPointInputitem
.
getId
());
failIds
.
add
(
fmeaPointInputitem
.
getId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
...
@@ -1953,8 +1953,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1953,8 +1953,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
null
;
return
null
;
}
}
public
String
getNumberPlan
(
Long
id
){
public
List
<
String
>
getNumberPlan
(
Long
id
){
String
ruleId
=
planDetailMapper
.
getRuleIdByEquipment
(
id
);
List
<
String
>
ruleId
=
planDetailMapper
.
getRuleIdByEquipment
(
id
);
return
ruleId
;
return
ruleId
;
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/enums/ReserveEnum.java
View file @
bcd1fb16
...
@@ -17,7 +17,10 @@ public enum ReserveEnum {
...
@@ -17,7 +17,10 @@ public enum ReserveEnum {
NOFIRENOPLAN
(
5
,
"非火灾告警没有预案"
),
NOFIRENOPLAN
(
5
,
"非火灾告警没有预案"
),
PLANSTATUSERROR
(
6
,
"预案启动状态不正确"
),
PLANSTATUSERROR
(
6
,
"预案启动状态不正确"
),
NOPLAN
(
7
,
"预案模型未绑定预案"
),
NOPLAN
(
7
,
"预案模型未绑定预案"
),
THISRUNNING
(
8
,
"此预案正在启动中"
);
THISRUNNING
(
8
,
"此预案正在启动中"
),
PLAN_DOC_IS_DELETE
(
9
,
"预案文档已经被删除,无法启动"
),
PLAN_RULE_IS_DELETE
(
10
,
"预案规则已经被删除,无法启动"
),
PLAN_EQUIP_IS_DELETE
(
10
,
"电力设备已经被删除,无法启动"
);
private
Integer
status
;
private
Integer
status
;
private
String
text
;
private
String
text
;
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
bcd1fb16
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<databaseChangeLog
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-1"
>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
);
);
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
id=
"1587882668719-1"
author=
"suhuiguang"
>
<changeSet
id=
"1587882668719-1"
author=
"suhuiguang"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
...
@@ -279,7 +279,7 @@
...
@@ -279,7 +279,7 @@
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1591672147780-1"
>
<changeSet
author=
"shanqiyun"
id=
"1591672147780-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<viewExists
viewName=
"toip_biz_message"
/>
<viewExists
viewName=
"toip_biz_message"
/>
...
@@ -298,9 +298,9 @@
...
@@ -298,9 +298,9 @@
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `f_equipment` `n` )
( `toip_sys_message` `m` JOIN `f_equipment` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
SELECT
SELECT
...
@@ -314,9 +314,9 @@
...
@@ -314,9 +314,9 @@
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `p_point` `n` )
( `toip_sys_message` `m` JOIN `p_point` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
SELECT
SELECT
...
@@ -330,9 +330,9 @@
...
@@ -330,9 +330,9 @@
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
</sql>
</sql>
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-2"
>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
...
@@ -404,7 +404,7 @@
...
@@ -404,7 +404,7 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-3"
>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
...
@@ -573,4 +573,144 @@
...
@@ -573,4 +573,144 @@
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_classify_tree"
/>
</not>
</preConditions>
<comment>
create table c_plan_classify_tree
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_classify_tree;
CREATE TABLE `c_plan_classify_tree` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`classify_name` varchar(255) DEFAULT NULL COMMENT '预案分类名称',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父类id',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`org_code` varchar(255) DEFAULT NULL COMMENT '组织机构',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预案分类树';
</sql>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_detail"
/>
</not>
</preConditions>
<comment>
create table c_plan_detail
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_detail;
CREATE TABLE `c_plan_detail` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '数字预案ID',
`plan_name` varchar(255) DEFAULT NULL COMMENT '预案名称',
`code` varchar(255) DEFAULT NULL COMMENT '预案编号',
`classify_id` bigint(20) DEFAULT NULL COMMENT '预案类型',
`plan_range` varchar(255) DEFAULT NULL COMMENT '适用范围',
`edit_org_name` varchar(255) DEFAULT NULL COMMENT '编写部门',
`edition` varchar(255) DEFAULT NULL COMMENT '版次',
`implementation_time` datetime DEFAULT NULL COMMENT '实施时间',
`create_date` datetime NOT NULL COMMENT '录入时间',
`remark` text COMMENT '备注',
`status` int(255) DEFAULT NULL COMMENT '预案状态',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`reviser` varchar(255) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`org_code` varchar(255) DEFAULT NULL COMMENT '部门code',
`is_delete` tinyint(1) DEFAULT '0' COMMENT '删除状态(0、正常,1、删除)',
`input_time` datetime DEFAULT NULL COMMENT '录入时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='预案详情表';
</sql>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_doc"
/>
</not>
</preConditions>
<comment>
create table c_plan_doc
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_doc;
CREATE TABLE `c_plan_doc` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`doc_id` bigint(20) DEFAULT NULL COMMENT '文档ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案文档关系表';
</sql>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_equipment"
/>
</not>
</preConditions>
<comment>
create table c_plan_equipment
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_equipment;
CREATE TABLE `c_plan_equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`fire_equipment_id` bigint(20) DEFAULT NULL COMMENT '电力装备ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案电力设备关系表';
</sql>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_operation_record"
/>
</not>
</preConditions>
<comment>
create table c_plan_operation_record
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_operation_record;
CREATE TABLE `c_plan_operation_record` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_pattern` tinyint(4) DEFAULT NULL COMMENT '运行模式(4、模拟,5、自动)',
`status` tinyint(4) DEFAULT NULL COMMENT '运行状态(0、运行中,1、完毕,3、中断)',
`execution_type` tinyint(4) DEFAULT NULL COMMENT '执行方式(0、预案验证 1、火灾处置)',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`batch_no` varchar(255) DEFAULT NULL COMMENT '批次号',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`start_user_name` varchar(255) DEFAULT NULL COMMENT '启动人名称',
`start_user_id` varchar(255) DEFAULT NULL COMMENT '启动人id',
`equipment_code` varchar(20) DEFAULT NULL COMMENT '装备code',
`equipment_name` varchar(255) DEFAULT NULL COMMENT '装备名称',
`equipment_id` bigint(11) DEFAULT NULL COMMENT '装备ID',
`fire_equipment_id` bigint(255) DEFAULT NULL COMMENT '电力设备ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COMMENT='预案运行记录表';
</sql>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_plan_rule"
/>
</not>
</preConditions>
<comment>
create table c_plan_rule
</comment>
<sql>
DROP TABLE IF EXISTS c_plan_rule;
CREATE TABLE `c_plan_rule` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`rule_id` varchar(32) DEFAULT NULL COMMENT '规则ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
`pic_url` varchar(100) DEFAULT NULL COMMENT '规则树形图路径',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
View file @
bcd1fb16
...
@@ -115,5 +115,7 @@
...
@@ -115,5 +115,7 @@
LEFT JOIN f_equipment equipment ON equipment.id = equip.fire_equipment_id
LEFT JOIN f_equipment equipment ON equipment.id = equip.fire_equipment_id
where
where
equipment.id = #{id}
equipment.id = #{id}
AND equip.is_delete != 1
AND rule.is_delete !=1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
bcd1fb16
...
@@ -50,6 +50,8 @@
...
@@ -50,6 +50,8 @@
, cpor.plan_pattern planPattern
, cpor.plan_pattern planPattern
, cpor.start_user_name startUserName
, cpor.start_user_name startUserName
, cpd.plan_name planName
, cpd.plan_name planName
, cpor.equipment_id equipmentId
, cpor.fire_equipment_id fireEquipmentId
, (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName
, (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName
, cpd.plan_range planRange
, cpd.plan_range planRange
, TIMESTAMPDIFF(SECOND, cpor.start_time, cpor.end_time) spendTime
, TIMESTAMPDIFF(SECOND, cpor.start_time, cpor.end_time) spendTime
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
View file @
bcd1fb16
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
where
where
b.point_id = #{pointId}
b.point_id = #{pointId}
and
and
b.i
nput_item_i
d in
b.id in
<foreach
collection=
"inputIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"inputIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
View file @
bcd1fb16
...
@@ -36,10 +36,11 @@
...
@@ -36,10 +36,11 @@
eq.address,
eq.address,
eq.building,
eq.building,
eq.room,
eq.room,
frs.name
riskSourceName
if (frs.name is null,frss.name,frs.name) as
riskSourceName
FROM
FROM
f_equipment eq
f_equipment eq
left join f_risk_source frs on frs.id = eq.risk_source_id
left join f_risk_source frs on frs.id = eq.risk_source_id
left join f_risk_source frss on frss.source_id = eq.risk_source_id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
...
...
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