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
5ba47548
Commit
5ba47548
authored
Mar 08, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_upgrade' into dev_upgrade
parents
f8b583d3
3d46920d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
203 additions
and
7 deletions
+203
-7
PlanMessage.java
...ain/java/com/yeejoin/amos/fas/dao/entity/PlanMessage.java
+50
-0
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+0
-6
PlanMessageController.java
...n/amos/fas/business/controller/PlanMessageController.java
+36
-0
PlanMessageMapper.java
...ejoin/amos/fas/business/dao/mapper/PlanMessageMapper.java
+20
-0
WarehouseStructureMapper.java
...mos/fas/business/dao/mapper/WarehouseStructureMapper.java
+2
-0
IPlanMessageDao.java
...oin/amos/fas/business/dao/repository/IPlanMessageDao.java
+15
-0
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+1
-1
PlanMessageServiceImpl.java
...mos/fas/business/service/impl/PlanMessageServiceImpl.java
+27
-0
IPlanMessageService.java
.../amos/fas/business/service/intfc/IPlanMessageService.java
+15
-0
PlanMessage.xml
...AutoSysStart/src/main/resources/db/mapper/PlanMessage.xml
+28
-0
WarehouseStructureMapper.xml
...src/main/resources/db/mapper/WarehouseStructureMapper.xml
+9
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PlanMessage.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* @author Gao Jianqiang
* @title: PlanMessage
* <pre>
* @description: TODO
* </pre>
* @date 2023/3/8 11:20
*/
@Entity
@Table
(
name
=
"c_plan_message"
)
@NamedQuery
(
name
=
"PlanMessage.findAll"
,
query
=
"SELECT e FROM PlanMessage e"
)
public
class
PlanMessage
extends
BasicEntity
{
@Column
(
name
=
"batch_no"
)
private
String
batchNo
;
@Column
(
name
=
"step_code"
)
private
String
stepCode
;
@Column
(
name
=
"step_index"
)
private
Integer
stepIndex
;
@Column
(
name
=
"equip_name"
)
private
String
equipName
;
@Column
(
name
=
"index_key"
)
private
String
indexKey
;
@Column
(
name
=
"index_name"
)
private
String
indexName
;
@Column
(
name
=
"index_value"
)
private
String
indexValue
;
@Column
(
name
=
"index_value_desc"
)
private
String
indexValueDesc
;
@Column
(
name
=
"index_create_time"
)
private
Date
indexCreateTime
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
5ba47548
...
...
@@ -20,7 +20,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanDetailDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanOperationRecordDao
;
import
com.yeejoin.amos.fas.business.feign.JcsFeign
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
...
...
@@ -857,16 +856,11 @@ public class ContingencyAction implements CustomerAction {
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
String
batchNo
=
contingencyRo
.
getBatchNo
();
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
// String contingencyPlanId = getContingencyPlanId(contingencyRo.getBatchNo(), actionName, icon, tips, buttonJson);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
try
{
// ContingencyPlanInstance instance = contingencyInstance.getMessageById(contingencyPlanId);
// if (contingencyPlanInstance != null) {
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
// contingencyPlanInstanceMapper.updateMessageById(contingencyPlanInstance);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
// }
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanMessageController.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanMessageService
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 预案报文 Controller 接口
*
* @author Gao Jianqiang
* @date 2023-03-08
*/
@RestController
@RequestMapping
(
value
=
"/planMessage"
)
@Api
(
tags
=
"重点设备配套设施调整Api"
)
public
class
PlanMessageController
extends
BaseController
{
@Autowired
private
IPlanMessageService
planMessageService
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取预案指定步骤报文集合"
,
notes
=
"获取预案指定步骤报文集合"
)
@RequestMapping
(
value
=
"/getPlanMessageList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanMessageList
(
@RequestParam
String
batchNo
,
@RequestParam
Integer
stepIndex
)
{
return
CommonResponseUtil
.
success
(
planMessageService
.
getPlanMessageList
(
batchNo
,
stepIndex
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanMessageMapper.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.dao.entity.PlanMessage
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Map
;
/**
* 预案报文 Mapper 接口
*
* @author Gao Jianqiang
* @date 2023-03-08
*/
@Repository
public
interface
PlanMessageMapper
extends
BaseMapper
<
PlanMessage
>
{
List
<
Map
<
String
,
String
>>
getPlanMessageList
(
String
batchNo
,
Integer
stepIndex
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/WarehouseStructureMapper.java
View file @
5ba47548
...
...
@@ -13,4 +13,6 @@ import org.apache.ibatis.annotations.Param;
public
interface
WarehouseStructureMapper
extends
BaseMapper
<
WarehouseStructure
>
{
WarehouseStructure
getMessageById
(
@Param
(
"id"
)
Long
id
);
WarehouseStructure
getMessageByRiskId
(
@Param
(
"id"
)
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPlanMessageDao.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.fas.dao.entity.PlanMessage
;
import
org.springframework.stereotype.Repository
;
/**
* <h1><h1>
*
* @author tiantao
* @date 2021/1/15 10:36
*/
@Repository
public
interface
IPlanMessageDao
extends
BaseDao
<
PlanMessage
,
Long
>
{
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
5ba47548
...
...
@@ -227,7 +227,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
instanceInfo
.
setName
(
detail
.
getPlanName
());
instanceInfo
.
setOrgCode
(
detail
.
getOrgCode
());
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
getMessageBy
Id
(
equipmentSpecific
.
getWarehouseStructure
Id
());
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
getMessageBy
RiskId
(
equipmentSpecific
.
get
Id
());
if
(
warehouseStructure
!=
null
)
{
instanceInfo
.
setPosition
(
warehouseStructure
.
getName
());
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanMessageServiceImpl.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanMessageMapper
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanMessageService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 预案报文 Service 接口
*
* @author Gao Jianqiang
* @date 2023-03-08
*/
@Service
public
class
PlanMessageServiceImpl
implements
IPlanMessageService
{
@Autowired
private
PlanMessageMapper
planMessageMapper
;
@Override
public
List
<
Map
<
String
,
String
>>
getPlanMessageList
(
String
batchNo
,
Integer
stepIndex
)
{
return
planMessageMapper
.
getPlanMessageList
(
batchNo
,
stepIndex
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanMessageService.java
0 → 100644
View file @
5ba47548
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
java.util.List
;
import
java.util.Map
;
/**
* 预案报文 IPlanMessageService 接口
*
* @author Gao Jianqiang
* @date 2023-03-08
*/
public
interface
IPlanMessageService
{
List
<
Map
<
String
,
String
>>
getPlanMessageList
(
String
batchNo
,
Integer
stepIndex
);
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanMessage.xml
0 → 100644
View file @
5ba47548
<?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.PlanMessageMapper"
>
<select
id=
"getPlanMessageList"
resultType=
"java.util.Map"
>
SELECT
m.equip_name AS equipName,
m.index_name AS indexName,
m.index_key AS `indexKey`,
m.index_value AS indexValue,
m.index_value_desc AS indexValueDesc,
m.index_create_time AS indexCreateTime
FROM
c_plan_message m
<where>
<if
test=
"batchNo != null and batchNo != ''"
>
m.batch_no = #{batchNo}
</if>
<if
test=
"stepIndex != null"
>
AND m.step_index = ${stepIndex}
</if>
</where>
ORDER BY
m.index_create_time DESC
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/WarehouseStructureMapper.xml
View file @
5ba47548
...
...
@@ -7,4 +7,12 @@
select * from wl_warehouse_structure where id = #{id}
</select>
<select
id=
"getMessageByRiskId"
resultType=
"com.yeejoin.amos.fas.dao.entity.WarehouseStructure"
>
select * from wl_warehouse_structure where id = (
SELECT risk_source_id from f_equipment where id = (
select equipment_id from f_equipment_fire_equipment where fire_equipment_id = #{id}
)
)
</select>
</mapper>
\ No newline at end of file
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