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
6180e459
Commit
6180e459
authored
Jan 04, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 13908 13912 13910 13925
parent
d36a8235
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
10 deletions
+29
-10
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+3
-3
TimeLineController.java
...join/amos/fas/business/controller/TimeLineController.java
+11
-1
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+12
-3
IContingencyInstance.java
...amos/fas/business/service/intfc/IContingencyInstance.java
+2
-2
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
6180e459
...
...
@@ -471,7 +471,7 @@ public class ContingencyAction implements CustomerAction {
try
{
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
buttonJson
,
ButtonJsonVO
.
class
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
());
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
()
,
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"optionarea 加入队列失败-->"
+
e
.
getMessage
());
}
...
...
@@ -779,7 +779,7 @@ public class ContingencyAction implements CustomerAction {
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
try
{
iContingencyInstance
.
setButtonExecuted
(
contingencyRo
.
getBatchNo
(),
contingencyPlanInstance
.
getId
(),
buttonCode
,
"CONFIRM"
);
iContingencyInstance
.
setButtonExecuted
(
contingencyRo
.
getBatchNo
(),
contingencyPlanInstance
.
getId
(),
buttonCode
,
"CONFIRM"
,
null
);
iContingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
contingencyPlanInstance
.
getId
(),
buttonCode
,
"CONFIRM"
,
stepState
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -867,7 +867,7 @@ public class ContingencyAction implements CustomerAction {
// contingencyPlanInstanceMapper.updateMessageById(contingencyPlanInstance);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
// }
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
());
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/TimeLineController.java
View file @
6180e459
...
...
@@ -16,17 +16,25 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
javafx.application.Application
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContextEntityType
;
import
java.applet.AppletContext
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -71,7 +79,9 @@ public class TimeLineController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"点击按钮"
,
notes
=
"点击按钮"
)
@RequestMapping
(
value
=
"/fire"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
fire
(
@RequestBody
PlanExecuteVo
vo
)
throws
Exception
{
iContingencyInstance
.
fire
(
vo
.
getBatchNo
(),
vo
.
getStepCode
(),
vo
.
getButtonJson
(),
vo
.
getContingencyPlanId
(),
vo
.
getButtonCode
(),
vo
.
getConfirm
(),
vo
.
getStepState
(),
"true"
,
getToken
(),
getProduct
(),
getAppKey
());
AgencyUserModel
userInfo
=
getUserInfo
();
String
user
=
userInfo
.
getRealName
();
iContingencyInstance
.
fire
(
vo
.
getBatchNo
(),
vo
.
getStepCode
(),
vo
.
getButtonJson
(),
vo
.
getContingencyPlanId
(),
vo
.
getButtonCode
(),
vo
.
getConfirm
(),
vo
.
getStepState
(),
"true"
,
getToken
(),
getProduct
(),
getAppKey
(),
user
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
6180e459
...
...
@@ -45,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContextEntityType
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
...
...
@@ -331,12 +332,16 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
@Transactional
public
void
setButtonExecuted
(
String
batchNo
,
String
contingencyPlanId
,
String
code
,
String
buttonState
)
throws
Exception
{
public
void
setButtonExecuted
(
String
batchNo
,
String
contingencyPlanId
,
String
code
,
String
buttonState
,
String
user
)
throws
Exception
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ContingencyPlanInstance
contingencyPlanInstance
=
contingencyInstance
.
getMessageById
(
contingencyPlanId
);
if
(
contingencyPlanInstance
!=
null
)
{
if
(
"OPERATE"
.
equals
(
contingencyPlanInstance
.
getRecordType
()))
{
String
operateJson
=
contingencyPlanInstance
.
getContent
();
if
(
user
!=
null
)
{
contingencyPlanInstance
.
setStartUserName
(
user
);
}
OperateGroup
operateGroup
=
objectMapper
.
readValue
(
operateJson
,
OperateGroup
.
class
);
List
<
Operate
>
operates
=
operateGroup
.
getOperate
();
...
...
@@ -448,7 +453,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
@Override
public
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
token
,
String
product
,
String
appKey
)
throws
Exception
{
public
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"stepCode"
,
stepCode
);
...
...
@@ -457,6 +462,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"stepState"
,
stepStateOnbutton
);
map
.
put
(
"isExecute"
,
isExecute
);
if
(
startUserName
!=
null
)
{
map
.
put
(
"startUserName"
,
startUserName
);
}
map
.
put
(
"buttonJson"
,
buttonJson
);
if
(
StringUtils
.
isBlank
(
token
)
||
StringUtils
.
isBlank
(
product
))
{
...
...
@@ -584,13 +592,14 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
String
appKey
=
map
.
get
(
"appKey"
);
String
product
=
map
.
get
(
"product"
);
String
token
=
map
.
get
(
"token"
);
String
user
=
map
.
containsKey
(
"startUserName"
)
?
map
.
get
(
"startUserName"
)
:
null
;
try
{
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setToken
(
token
);
// planVisual3dService.updatePlanStep(batchNo, stepCode, buttonJson, contingencyPlanId, buttonCode, isExecute);
planVisual3dService
.
updatePlanStepToRedis
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
isExecute
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
,
user
);
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
}
catch
(
Exception
e
)
{
throw
e
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyInstance.java
View file @
6180e459
...
...
@@ -16,7 +16,7 @@ public interface IContingencyInstance {
List
<
ContingencyPlanInstance
>
queryForTimeLine
(
String
instanceNo
,
String
recordType
)
throws
Exception
;
void
setButtonExecuted
(
String
batchNo
,
String
contingencyPlanId
,
String
code
,
String
buttonState
)
throws
Exception
;
void
setButtonExecuted
(
String
batchNo
,
String
contingencyPlanId
,
String
code
,
String
buttonState
,
String
user
)
throws
Exception
;
void
setButtonWait
(
String
batchNo
,
String
contingencyPlanId
,
String
buttonState
)
throws
Exception
;
...
...
@@ -24,7 +24,7 @@ public interface IContingencyInstance {
void
updateStep
(
String
step
,
String
batchNo
);
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
token
,
String
product
,
String
appKey
)
throws
Exception
;
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
;
/**
* 扩展属性赋值
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
6180e459
...
...
@@ -61,7 +61,7 @@
</if>
</where>
order by cpi.`create_date`
order by cpi.`create_date`
desc
LIMIT #{current}, #{size}
</select>
<select
id=
"selectCountDisposalActionPage"
resultType=
"java.lang.Integer"
>
...
...
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