Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
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
潘栩锋
hemei
Commits
b6273c96
Commit
b6273c96
authored
Oct 14, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 FeedbackHeat 从测厚仪收的数据endtime可能比当前时间大于30秒,(AD盒时间异常导致)。
改为读取数据库最后一行,判断是否已经接收过
parent
0483e775
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
FeedbackHeat.cs
...dbackRenZiJia/FLY.FeedbackRenZiJia/Server/FeedbackHeat.cs
+15
-2
HistoryDB.cs
...ckRenZiJia/FLY.FeedbackRenZiJia/Server/Model/HistoryDB.cs
+4
-3
No files found.
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/FeedbackHeat.cs
View file @
b6273c96
...
...
@@ -487,7 +487,7 @@ namespace FLY.FeedbackRenZiJia.Server
}
}
}
DateTime
lastScanDataEndTime
;
public
void
Init
(
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingService
blowingService
,
FLY
.
Thick
.
Blowing
.
IService
.
IBlowingDetectService
bDetect
,
...
...
@@ -511,6 +511,15 @@ namespace FLY.FeedbackRenZiJia.Server
bulkDbService
.
PropertyChanged
+=
BulkDbService_PropertyChanged
;
this
.
bDetect
.
PropertyChanged
+=
MBDetect_PropertyChanged
;
mHistoryDb
.
GetFrame
(
0
,
(
asyncContext
,
retData
)
=>
{
var
reponse
=
retData
as
GetFrameReponse
;
if
(
reponse
.
thickHeat
!=
null
)
{
lastScanDataEndTime
=
reponse
.
thickHeat
.
EndTime
;
}
},
null
);
InitError
();
}
...
...
@@ -527,10 +536,14 @@ namespace FLY.FeedbackRenZiJia.Server
if
(
reponse
.
scanData
==
null
)
return
;
var
scanData
=
reponse
.
scanData
;
if
(
Math
.
Abs
((
DateTime
.
Now
-
scanData
.
EndTime
).
TotalSeconds
)
>
30
)
{
//读取数据库,
if
(
lastScanDataEndTime
==
scanData
.
EndTime
)
{
//这是以前的数据,不要
return
;
}
lastScanDataEndTime
=
scanData
.
EndTime
;
Add
(
scanData
.
Time
,
scanData
.
EndTime
,
...
...
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/Model/HistoryDB.cs
View file @
b6273c96
...
...
@@ -83,12 +83,12 @@ namespace FLY.FeedbackRenZiJia.Server.Model
LastId
=
thickHeat
.
ID
;
}
public
async
void
GetFrame
(
long
Id
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
public
void
GetFrame
(
long
Id
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
GetFrameReponse
reponse
=
new
GetFrameReponse
();
reponse
.
Id
=
Id
;
await
Task
.
Factory
.
StartNew
(()
=>
Task
.
Factory
.
StartNew
(()
=>
{
List
<
Db_ThickHeat
>
db_thickHeats
;
if
(
Id
<=
0
)
...
...
@@ -107,7 +107,8 @@ namespace FLY.FeedbackRenZiJia.Server.Model
var
lc_thickHeat
=
Lc_AutoMapperProfile
.
Mapper
.
Map
<
Lc_ThickHeat
>(
db_thickHeats
.
First
());
reponse
.
thickHeat
=
lc_thickHeat
;
});
}).
Wait
();
asyncDelegate
(
asyncContext
,
reponse
);
}
...
...
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