Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
operating-vehicle
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜发飞
operating-vehicle
Commits
bfbd3eb8
Commit
bfbd3eb8
authored
Oct 18, 2019
by
杜发飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
109b0e80
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
src/main/scala/com/hikcreate/data/client/IgniteClient.scala
+24
-0
No files found.
src/main/scala/com/hikcreate/data/client/IgniteClient.scala
View file @
bfbd3eb8
...
...
@@ -228,6 +228,30 @@ object IgniteClient {
ignite
.
binary
()
println
(
a
.
fieldTypeName
(
"warnType"
))
//无法自动更新修改后的字段类型
dailyAlarmProcessCache
.
clear
()
val
json1
=
JSON
.
parseObject
(
"{\"appId\":\"10030\",\"businessTime\":\"2019-10-18 17:42:40\",\"dataType\":\"0x9401\",\"msgId\":\"0x9400\",\"superVisionEndTime\":\"1571391220\",\"superVisionId\":\"-566810\",\"superVisionLevel\":\"0\",\"superVisor\":\"supervisor\",\"superVisorEmail\":\"supervisor\",\"superVisorTel\":\"supervisor\",\"vehicleColor\":\"2\",\"vehicleNo\":\"浙D22717\",\"warnSrc\":\"1\",\"warnTime\":\"1571391217\",\"warnType\":\"100\"}"
)
val
vehicleNo
=
json1
.
getString
(
"vehicleNo"
)
val
vehicleColor
=
json1
.
getString
(
"vehicleColor"
)
val
superVisionId
=
json1
.
getString
(
"superVisionId"
)
val
timestamp
=
json1
.
getLong
(
"warnTime"
)
*
1000
val
time
=
new
DateTime
(
timestamp
)
val
warnTime
=
time
.
toString
(
"yyyy-MM-dd HH:mm:ss"
)
val
key
=
IgniteClient
.
getBinaryObject
(
new
PrimaryKey
(
vehicleNo
,
vehicleColor
,
superVisionId
))
val
value
=
new
DailyAlarmProcess
(
""
,
superVisionId
,
warnTime
,
false
)
if
(!
IgniteClient
.
dailyAlarmProcessCache
.
withKeepBinary
().
putIfAbsent
(
key
,
value
)){
updateDailyAlarmDealCache
(
key
,
Map
(
"useNature"
->
""
,
"superVisionId"
->
superVisionId
,
"warnTime"
->
warnTime
))
}
val
key1
=
IgniteClient
.
getBinaryObject
(
new
PrimaryKey
(
vehicleNo
,
vehicleColor
,
superVisionId
))
val
value1
=
new
DailyAlarmProcess
(
true
)
if
(!
IgniteClient
.
dailyAlarmProcessCache
.
withKeepBinary
().
putIfAbsent
(
key1
,
value1
)){
println
(
"aaaaa"
)
updateDailyAlarmDealCache
(
key1
,
Map
(
"isDeal"
->
(
true
:
java.lang.Boolean
)))
}
//alarmDetailCache.destroy()
//basicCompanyInfo.clear()
//basicVehicleInfo.clear()
...
...
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