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
3d46920d
Commit
3d46920d
authored
Mar 08, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:预案报文相关接口新增
parent
81688c72
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
191 additions
and
6 deletions
+191
-6
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
IPlanMessageDao.java
...oin/amos/fas/business/dao/repository/IPlanMessageDao.java
+15
-0
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
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PlanMessage.java
0 → 100644
View file @
3d46920d
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 @
3d46920d
...
@@ -20,7 +20,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper;
...
@@ -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.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanDetailDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanDetailDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanOperationRecordDao
;
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.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl
;
import
com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
...
@@ -857,16 +856,11 @@ public class ContingencyAction implements CustomerAction {
...
@@ -857,16 +856,11 @@ public class ContingencyAction implements CustomerAction {
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
String
batchNo
=
contingencyRo
.
getBatchNo
();
String
batchNo
=
contingencyRo
.
getBatchNo
();
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
// String contingencyPlanId = getContingencyPlanId(contingencyRo.getBatchNo(), actionName, icon, tips, buttonJson);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
try
{
try
{
// ContingencyPlanInstance instance = contingencyInstance.getMessageById(contingencyPlanId);
// if (contingencyPlanInstance != null) {
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
// contingencyPlanInstanceMapper.updateMessageById(contingencyPlanInstance);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
// }
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanMessageController.java
0 → 100644
View file @
3d46920d
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 @
3d46920d
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/repository/IPlanMessageDao.java
0 → 100644
View file @
3d46920d
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/PlanMessageServiceImpl.java
0 → 100644
View file @
3d46920d
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 @
3d46920d
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 @
3d46920d
<?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
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