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
ca83c6de
Commit
ca83c6de
authored
Oct 11, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 自动风环对位界面,支持 看上一幅稳定数据
parent
0547219d
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
247 additions
and
55 deletions
+247
-55
UcThickHeat.xaml
...FeedbackRenZiJia.UI.Client/PgHeatAnalyse/UcThickHeat.xaml
+10
-6
UcThickHeatVm.cs
...FeedbackRenZiJia.UI.Client/PgHeatAnalyse/UcThickHeatVm.cs
+107
-38
BulkDbServiceClient.cs
...nZiJia/FLY.FeedbackRenZiJia/Client/BulkDbServiceClient.cs
+13
-0
IBulkDbService.cs
...kRenZiJia/FLY.FeedbackRenZiJia/IService/IBulkDbService.cs
+18
-2
HeatBuf.cs
...Y.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/HeatBuf.cs
+15
-3
HeatCell.cs
....FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/HeatCell.cs
+18
-5
HistoryDB.cs
...ckRenZiJia/FLY.FeedbackRenZiJia/Server/Model/HistoryDB.cs
+59
-0
GM_BlowingFix.cs
...Y.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
+6
-0
GM_BlowingScan.cs
...lowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
+1
-1
No files found.
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia.UI.Client/PgHeatAnalyse/UcThickHeat.xaml
View file @
ca83c6de
...
...
@@ -76,15 +76,19 @@
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
<StackPanel Orientation="Horizontal" Margin="48,0,0,-20" Opacity="0.8">
<Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding PreStableCmd}" >
<iconPacks:PackIconMaterial Kind="ChevronDoubleLeft" />
</Button>
<Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding PreCmd}" >
<Grid>
<iconPacks:PackIconMaterial Kind="ArrowLeft" />
</Grid>
<iconPacks:PackIconMaterial Kind="ChevronLeft" Width="10"/>
</Button>
<Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding NextCmd}">
<Grid>
<iconPacks:PackIconMaterial Kind="ArrowRight" />
</Grid>
<!--<iconPacks:PackIconMaterial Kind="ArrowRight" />-->
<iconPacks:PackIconMaterial Kind="ChevronRight" Width="10"/>
</Button>
<Button Style="{StaticResource ButtonStyle_RectangleIcon}" Command="{Binding NextStableCmd}" >
<iconPacks:PackIconMaterial Kind="ChevronDoubleRight" />
</Button>
</StackPanel>
<Grid Grid.Column="1" Grid.RowSpan="2" Panel.ZIndex="2"
...
...
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia.UI.Client/PgHeatAnalyse/UcThickHeatVm.cs
View file @
ca83c6de
...
...
@@ -116,6 +116,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client
public
RelayCommand
PreCmd
{
get
;
}
public
RelayCommand
NextCmd
{
get
;
}
public
RelayCommand
PreStableCmd
{
get
;
}
public
RelayCommand
NextStableCmd
{
get
;
}
public
Lc_ThickHeat
frame
;
IBulkDbService
bulkDbService
;
...
...
@@ -150,6 +152,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client
PreCmd
=
new
RelayCommand
(
Pre
);
NextCmd
=
new
RelayCommand
(
Next
);
PreStableCmd
=
new
RelayCommand
(
PreStable
);
NextStableCmd
=
new
RelayCommand
(
NextStable
);
}
...
...
@@ -174,6 +178,8 @@ namespace FLY.FeedbackRenZiJia.UI.Client
private
void
UcThickHeatVm_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
Number
))
{
if
(
IsSkipNumberChanged
)
return
;
UpdateFrame
();
}
}
...
...
@@ -186,6 +192,54 @@ namespace FLY.FeedbackRenZiJia.UI.Client
}
void
_updateFrame
()
{
if
(
IsGetStableFrame
)
{
IsGetStableFrame
=
false
;
bulkDbService
.
GetStableFrame
(
Number
,
IsPre
,(
asyncContext
,
retData
)
=>
{
var
reponce
=
retData
as
GetStableFrameReponse
;
if
(
reponce
.
thickHeat
!=
null
)
{
frame
=
reponce
.
thickHeat
;
Id
=
frame
.
ID
;
Time
=
frame
.
Time
;
EndTime
=
frame
.
EndTime
;
IsBackw
=
frame
.
IsBackw
;
RPeriod
=
frame
.
RPeriod
;
OrgBoltNo
=
frame
.
OrgBoltNo
;
RAngle
=
frame
.
RAngle
;
FilmLength
=
frame
.
FilmLength
;
Average
=
frame
.
Thicks
.
AverageNoNull
();
Sigma2Percent
=
frame
.
Thicks
.
Sigma
()
/
Average
*
2
;
Heats
.
Clear
();
Heats
.
AddRange
(
frame
.
Heats
);
XMax
=
frame
.
Heats
.
Count
()
+
1
;
double
[]
thickPercents
=
GetThickPercents
();
ThickPercents
.
Clear
();
ThickPercents
.
AddRange
(
thickPercents
);
IsStable
=
frame
.
IsStable
;
HTime
=
frame
.
HTime
;
IsVaild
=
true
;
IsSkipNumberChanged
=
true
;
Number
=
Id
;
IsSkipNumberChanged
=
false
;
}
else
{
IsVaild
=
false
;
}
FrameUpdated
?.
Invoke
();
},
null
);
}
else
{
bulkDbService
.
GetFrame
(
Number
,
(
asyncContext
,
retData
)
=>
{
...
...
@@ -228,6 +282,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client
FrameUpdated
?.
Invoke
();
},
null
);
}
}
private
void
Next
()
{
if
(
Number
<
bulkDbService
.
LastId
)
...
...
@@ -237,8 +292,22 @@ namespace FLY.FeedbackRenZiJia.UI.Client
{
Number
--;
}
bool
IsGetStableFrame
;
bool
IsPre
;
bool
IsSkipNumberChanged
;
private
void
NextStable
()
{
IsGetStableFrame
=
true
;
IsPre
=
false
;
Number
++;
}
private
void
PreStable
()
{
IsGetStableFrame
=
true
;
IsPre
=
true
;
Number
--;
}
/// <summary>
/// 以指定复位区号, 分区表 导出厚度%
/// </summary>
...
...
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Client/BulkDbServiceClient.cs
View file @
ca83c6de
...
...
@@ -20,6 +20,19 @@ namespace FLY.FeedbackRenZiJia.Client
{
Call
(
nameof
(
GetFrame
),
new
{
Id
},
asyncDelegate
,
asyncContext
);
}
/// <summary>
/// 获取一幅稳定的数据;
/// </summary>
/// <param name="Id">以Id为起始点, 向前或者向后或者最近稳定的一幅数据</param>
/// <param name="isPre"></param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
[
Call
(
typeof
(
GetStableFrameReponse
))]
public
void
GetStableFrame
(
long
id
,
bool
isPre
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
Call
(
nameof
(
GetStableFrame
),
new
{
id
,
isPre
},
asyncDelegate
,
asyncContext
);
}
}
}
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/IService/IBulkDbService.cs
View file @
ca83c6de
...
...
@@ -17,17 +17,33 @@ namespace FLY.FeedbackRenZiJia.IService
/// </summary>
long
LastId
{
get
;
}
/// <summary>
/// 获取一幅数据
/// 获取一幅数据
;
/// </summary>
/// <param name="
request
"></param>
/// <param name="
Id
"></param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
[
Call
(
typeof
(
GetFrameReponse
))]
void
GetFrame
(
long
Id
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
);
/// <summary>
/// 获取一幅稳定的数据;
/// </summary>
/// <param name="Id">以Id为起始点, 向前或者向后或者最近稳定的一幅数据</param>
/// <param name="isPre"></param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
[
Call
(
typeof
(
GetStableFrameReponse
))]
void
GetStableFrame
(
long
id
,
bool
isPre
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
);
}
public
class
GetFrameReponse
{
public
long
Id
;
public
Lc_ThickHeat
thickHeat
;
}
public
class
GetStableFrameReponse
{
public
long
id
;
public
bool
isPre
;
public
Lc_ThickHeat
thickHeat
;
}
}
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/HeatBuf.cs
View file @
ca83c6de
...
...
@@ -177,7 +177,7 @@ namespace FLY.FeedbackRenZiJia.Server
/// <summary>
/// 最后一幅数据,单位 channelcnt, 可以有double.NaN
/// </summary>
public
double
[]
ThickPercents
;
public
double
[]
ThickPercents
=
null
;
/// <summary>
/// 最后一幅数据的复位区号
/// </summary>
...
...
@@ -222,8 +222,9 @@ namespace FLY.FeedbackRenZiJia.Server
}
public
void
SetToBestThickPercents
()
{
ThickPercents
=
Common
.
MyMath
.
Move
(
ThickPercents
,
(
BestOrgBoltNo
-
OrgBoltNo
)*
ChannelCnt
/
BoltCnt
);
OrgBoltNo
=
BestOrgBoltNo
;
MoveThickPercents
(
BestOrgBoltNo
);
//ThickPercents = Common.MyMath.Move(ThickPercents, (BestOrgBoltNo - OrgBoltNo)* ChannelCnt/BoltCnt);
//OrgBoltNo = BestOrgBoltNo;
Stability
=
STABILITY
.
OK_CORREL
;
bool
[]
isStables
=
new
bool
[
ChannelCnt
];
for
(
int
i
=
0
;
i
<
isStables
.
Count
();
i
++)
...
...
@@ -232,6 +233,17 @@ namespace FLY.FeedbackRenZiJia.Server
CurrR
=
MaxR
;
BoltIsStable
=
isStables
;
}
public
bool
MoveThickPercents
(
int
orgBoltNo
)
{
if
(
ThickPercents
!=
null
&&
OrgBoltNo
!=
orgBoltNo
)
{
ThickPercents
=
Common
.
MyMath
.
Move
(
ThickPercents
,
(
orgBoltNo
-
OrgBoltNo
)
*
ChannelCnt
/
BoltCnt
);
OrgBoltNo
=
orgBoltNo
;
return
true
;
}
return
false
;
}
public
void
Init
(
int
boltCnt
,
int
channelCnt
)
{
BoltCnt
=
boltCnt
;
...
...
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/HeatCell.cs
View file @
ca83c6de
...
...
@@ -173,7 +173,18 @@ namespace FLY.FeedbackRenZiJia.Server
public
void
Init3
(
IBlowingService
blowingService
)
{
this
.
blowingService
=
blowingService
;
this
.
blowingService
.
PropertyChanged
+=
BlowingService_PropertyChanged
;
}
private
void
BlowingService_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
//当复位区号改变了,同时也修改heatCell 的 thickPercents
if
(
e
.
PropertyName
==
nameof
(
this
.
blowingService
.
OrgBoltNo
))
{
if
(
mHeatBuf
.
MoveThickPercents
(
this
.
blowingService
.
OrgBoltNo
))
SetThickPercents
(
mHeatBuf
.
ThickPercents
);
}
}
public
void
Init2
(
int
boltCnt
,
int
channelCnt
)
{
ChannelCnt
=
channelCnt
;
...
...
@@ -281,13 +292,15 @@ namespace FLY.FeedbackRenZiJia.Server
string
msg
=
"对位完成"
;
if
(
blowingService
.
OrgBoltNo
!=
mHeatBuf
.
BestOrgBoltNo
)
{
msg
+=
$",[复位号]
{
blowingService
.
OrgBoltNo
}
->
{
mHeatBuf
.
BestOrgBoltNo
}
"
;
blowingService
.
OrgBoltNo
=
mHeatBuf
.
BestOrgBoltNo
;
blowingService
.
Apply
();
//调节 mHeatBuf.ThickPercents 移动到 mHeatBuf.BestOrgBoltNo
//使mHeatBuf状态为稳定
mHeatBuf
.
SetToBestThickPercents
();
SetThickPercents
(
mHeatBuf
.
ThickPercents
);
msg
+=
$",[复位号]
{
blowingService
.
OrgBoltNo
}
->
{
mHeatBuf
.
BestOrgBoltNo
}
"
;
blowingService
.
OrgBoltNo
=
mHeatBuf
.
BestOrgBoltNo
;
blowingService
.
Apply
();
}
else
{
...
...
@@ -314,7 +327,7 @@ namespace FLY.FeedbackRenZiJia.Server
{
if
(
AutoONoId0
<
mHeatBuf
.
mData
.
First
().
thickHeat
.
ID
)
{
//失败,对位过程有大波动
//失败,对位过程有大波动
, 全部数据被清除?
AutoONoStatus
=
AutoONoStatusEnum
.
Fail
;
AutoONoMsg
=
"失败,对位过程有大波动"
;
return
;
...
...
@@ -856,7 +869,7 @@ namespace FLY.FeedbackRenZiJia.Server
/// <summary>
/// 自动对位
/// </summary>
public
bool
IsAutoONo
=
fals
e
;
public
bool
IsAutoONo
=
tru
e
;
/// <summary>
/// 最大加热量
...
...
Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia/Server/Model/HistoryDB.cs
View file @
ca83c6de
...
...
@@ -111,5 +111,64 @@ namespace FLY.FeedbackRenZiJia.Server.Model
asyncDelegate
(
asyncContext
,
reponse
);
}
/// <summary>
/// 获取一幅稳定的数据;
/// </summary>
/// <param name="Id">以Id为起始点, 向前或者向后或者最近稳定的一幅数据</param>
/// <param name="isPre"></param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
//[Call(typeof(GetStableFrameReponse))]
public
async
void
GetStableFrame
(
long
id
,
bool
isPre
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
var
reponse
=
new
GetStableFrameReponse
();
reponse
.
id
=
id
;
reponse
.
isPre
=
isPre
;
await
Task
.
Factory
.
StartNew
(()
=>
{
if
(
id
<=
0
)
{
string
sql
=
$"SELECT
{
nameof
(
Db_ThickHeat
.
ID
)}
FROM
{
dbModel
.
TbThickHeat
.
TableName
}
"
+
$" ORDER BY
{
nameof
(
Db_ThickHeat
.
ID
)}
DESC"
+
$" LIMIT 1 OFFSET
{-
id
}
"
;
var
ret
=
dbModel
.
sqliteHelper
.
ExecuteScalar
(
sql
);
if
(
ret
==
DBNull
.
Value
)
return
;
id
=
Convert
.
ToInt32
(
ret
);
}
List
<
Db_ThickHeat
>
db_thickHeats
=
null
;
if
(
isPre
)
{
db_thickHeats
=
dbModel
.
TbThickHeat
.
Find
(
$"WHERE
{
nameof
(
Db_ThickHeat
.
ID
)}
<=
{
id
}
"
+
$" AND
{
nameof
(
Db_ThickHeat
.
IsStable
)}
= true"
+
$" ORDER BY
{
nameof
(
Db_ThickHeat
.
ID
)}
DESC"
+
$" LIMIT 1"
);
}
else
{
db_thickHeats
=
dbModel
.
TbThickHeat
.
Find
(
$"WHERE
{
nameof
(
Db_ThickHeat
.
ID
)}
>=
{
id
}
"
+
$" AND
{
nameof
(
Db_ThickHeat
.
IsStable
)}
= true"
+
$" ORDER BY
{
nameof
(
Db_ThickHeat
.
ID
)}
"
+
$" LIMIT 1"
);
}
if
(
db_thickHeats
.
Count
()
==
0
)
{
return
;
}
var
lc_thickHeat
=
Lc_AutoMapperProfile
.
Mapper
.
Map
<
Lc_ThickHeat
>(
db_thickHeats
.
First
());
reponse
.
thickHeat
=
lc_thickHeat
;
});
asyncDelegate
(
asyncContext
,
reponse
);
}
}
}
Project.FLY.Thick.Blowing/FLY.Thick.Blowing/Server/GM_BlowingFix.cs
View file @
ca83c6de
...
...
@@ -1350,6 +1350,12 @@ namespace FLY.Thick.Blowing.Server
frame
=
frameinfo
.
frame
;
map
=
null
;
}
//限制小数点
for
(
int
j
=
0
;
j
<
frame
.
Count
();
j
++)
{
if
(!
double
.
IsNaN
(
frame
[
j
]))
frame
[
j
]
=
Math
.
Round
(
frame
[
j
],
2
);
}
frameinfo
.
renZiJiaDataEventArgs
=
new
RenZiJiaDataEventArgs
()
{
...
...
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan/Server/GM_BlowingScan.cs
View file @
ca83c6de
...
...
@@ -1065,7 +1065,7 @@ namespace FLY.Thick.BlowingScan.Server
return
frame
.
Select
(
t
=>
{
if
(
Misc
.
MyBase
.
ISVALIDATA
(
t
))
return
t
/
100.0
;
return
Math
.
Round
(
t
/
100.0
,
2
)
;
else
return
double
.
NaN
;
}).
ToArray
();
...
...
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