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
5dc0ec7a
Commit
5dc0ec7a
authored
Jun 24, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
b1d72671
8bb63e3a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
TimeLineController.java
...join/amos/fas/business/controller/TimeLineController.java
+11
-8
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+4
-3
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/TimeLineController.java
View file @
5dc0ec7a
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.impl.ContingencyInstanceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyOriginalDataService
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyOriginalDataService
;
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.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
...
@@ -18,9 +16,12 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -18,9 +16,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
javax.xml.bind.ValidationEvent
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/timeline"
)
@RequestMapping
(
value
=
"/api/timeline"
)
...
@@ -56,7 +57,6 @@ public class TimeLineController extends BaseController{
...
@@ -56,7 +57,6 @@ public class TimeLineController extends BaseController{
@RequestParam
(
"contingencyPlanId"
)
String
contingencyPlanId
,
@RequestParam
(
"contingencyPlanId"
)
String
contingencyPlanId
,
@RequestParam
(
"stepState"
)
String
stepState
)
throws
Exception
{
@RequestParam
(
"stepState"
)
String
stepState
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"stepCode"
,
stepCode
);
map
.
put
(
"stepCode"
,
stepCode
);
...
@@ -64,8 +64,9 @@ public class TimeLineController extends BaseController{
...
@@ -64,8 +64,9 @@ public class TimeLineController extends BaseController{
map
.
put
(
"confirm"
,
confirm
);
map
.
put
(
"confirm"
,
confirm
);
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"stepState"
,
stepState
);
map
.
put
(
"stepState"
,
stepState
);
map
.
put
(
"token"
,
getToken
());
map
.
put
(
"product"
,
getProduct
());
fireQueue
.
addLast
(
map
);
fireQueue
.
addLast
(
map
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
}
...
@@ -78,13 +79,14 @@ public class TimeLineController extends BaseController{
...
@@ -78,13 +79,14 @@ public class TimeLineController extends BaseController{
return
;
return
;
Map
<
String
,
String
>
map
=
fireQueue
.
getFirst
();
Map
<
String
,
String
>
map
=
fireQueue
.
getFirst
();
String
batchNo
=
map
.
get
(
"batchNo"
);
String
batchNo
=
map
.
get
(
"batchNo"
);
String
stepCode
=
map
.
get
(
"stepCode"
);
String
stepCode
=
map
.
get
(
"stepCode"
);
String
buttonCode
=
map
.
get
(
"buttonCode"
);
String
buttonCode
=
map
.
get
(
"buttonCode"
);
String
confirm
=
map
.
get
(
"confirm"
);
String
confirm
=
map
.
get
(
"confirm"
);
String
contingencyPlanId
=
map
.
get
(
"contingencyPlanId"
);
String
contingencyPlanId
=
map
.
get
(
"contingencyPlanId"
);
String
stepState
=
map
.
get
(
"stepState"
);
String
stepState
=
map
.
get
(
"stepState"
);
String
token
=
map
.
get
(
"token"
);
String
product
=
map
.
get
(
"product"
);
try
try
{
{
log
.
info
(
"fireQueue-size:"
+
fireQueue
.
size
());
log
.
info
(
"fireQueue-size:"
+
fireQueue
.
size
());
...
@@ -92,7 +94,8 @@ public class TimeLineController extends BaseController{
...
@@ -92,7 +94,8 @@ public class TimeLineController extends BaseController{
log
.
info
(
"buttonCode:"
+
map
.
get
(
"buttonCode"
));
log
.
info
(
"buttonCode:"
+
map
.
get
(
"buttonCode"
));
log
.
info
(
"confirm:"
+
map
.
get
(
"confirm"
));
log
.
info
(
"confirm:"
+
map
.
get
(
"confirm"
));
log
.
info
(
"stepState:"
+
map
.
get
(
"stepState"
));
log
.
info
(
"stepState:"
+
map
.
get
(
"stepState"
));
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
iContingencyInstance
.
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
);
iContingencyInstance
.
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
);
iContingencyInstance
.
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
iContingencyInstance
.
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
}
catch
(
Exception
e
)
}
catch
(
Exception
e
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
5dc0ec7a
...
@@ -47,6 +47,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -47,6 +47,7 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
fas
.
business
.
constants
.
FasConstant
.
token
;
import
static
com
.
yeejoin
.
amos
.
fas
.
business
.
constants
.
FasConstant
.
token
;
...
@@ -323,11 +324,11 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -323,11 +324,11 @@ public class View3dServiceImpl implements IView3dService {
//2.按照 风险等级id进行分组,加工数据
//2.按照 风险等级id进行分组,加工数据
Map
<
Long
,
List
<
RiskPointRpnChangeBo
>>
map
=
risks
.
stream
().
collect
(
Collectors
.
groupingBy
(
RiskPointRpnChangeBo:
:
getRiskLevelId
));
Map
<
Long
,
List
<
RiskPointRpnChangeBo
>>
map
=
risks
.
stream
().
collect
(
Collectors
.
groupingBy
(
RiskPointRpnChangeBo:
:
getRiskLevelId
));
List
<
RiskLevel
>
riskLevelList
=
iRiskLevelDao
.
findAll
();
List
<
RiskLevel
>
riskLevelList
=
iRiskLevelDao
.
findAll
();
Map
<
Long
,
String
>
riskLevelMap
=
riskLevelList
.
stream
().
collect
(
Collectors
.
toMap
(
RiskLevel:
:
getId
,
RiskLevel:
:
getName
));
Map
<
Long
,
RiskLevel
>
riskLevelMap
=
riskLevelList
.
stream
().
collect
(
Collectors
.
toMap
(
RiskLevel:
:
getId
,
Function
.
identity
()
));
map
.
forEach
((
k
,
v
)->{
map
.
forEach
((
k
,
v
)->{
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
safetyIndexDetailVo
.
setTypeCode
(
Long
.
toString
(
k
));
safetyIndexDetailVo
.
setTypeCode
(
String
.
valueOf
(
riskLevelMap
.
get
(
k
).
getLevel
()
));
safetyIndexDetailVo
.
setTypeName
(
riskLevelMap
.
get
(
k
));
safetyIndexDetailVo
.
setTypeName
(
riskLevelMap
.
get
(
k
)
.
getName
()
);
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
resultList
.
add
(
safetyIndexDetailVo
);
resultList
.
add
(
safetyIndexDetailVo
);
});
});
...
...
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