Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weishida_DBbrower
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
潘栩锋
weishida_DBbrower
Commits
51eee7d0
Commit
51eee7d0
authored
Jul 28, 2020
by
health
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加班组列
parent
ee534964
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
+17
-4
DBHelper.cs
WSDDBBrower/WSDDBBrower/Core/DBHelper.cs
+8
-2
PgSelect.xaml
WSDDBBrower/WSDDBBrower/PgSelect.xaml
+1
-1
PgSelect.xaml.cs
WSDDBBrower/WSDDBBrower/PgSelect.xaml.cs
+7
-0
TechInfoDialog.xaml
WSDDBBrower/WSDDBBrower/TechInfoDialog.xaml
+1
-1
No files found.
WSDDBBrower/WSDDBBrower/Core/DBHelper.cs
View file @
51eee7d0
...
...
@@ -92,14 +92,16 @@ namespace WSDDBBrowser.Core
DataSet
dataset
=
new
DataSet
();
var
connection
=
dBModel
.
Database
.
Connection
as
SqlConnection
;
string
njb
=
stepNo
==
null
?
"null"
:
stepNo
.
ToString
();
string
njt
=
machineNo
==
null
?
"null"
:
machineNo
.
ToString
();
var
command
=
connection
.
CreateCommand
();
connection
.
Open
();
command
.
CommandText
=
$"exec g_found_iserr "
+
$"@ddbh = '
{
orderNo
}
',"
+
$"@njb =
{
stepNo
}
,"
+
$"@njt =
{
machineNo
}
,"
+
$"@njb =
{
njb
}
,"
+
$"@njt =
{
njt
}
,"
+
$"@timestar = '
{
starttime
:
yyyy
-
MM
-
dd
}
',"
+
$"@timestop = '
{
endtime
:
yyyy
-
MM
-
dd
}
',"
+
$"@iserr =
{(
isJustSearchError
?
1
:
0
)}
,"
+
...
...
@@ -152,6 +154,7 @@ namespace WSDDBBrowser.Core
techInfo
.
Tolerance
=
Convert
.
ToDouble
(
row
[
"nTolerance"
]);
techInfo
.
Avg
=
Convert
.
ToDouble
(
row
[
"nAvg"
]);
techInfo
.
IsError
=
Convert
.
ToInt32
(
row
[
"bIsError"
])==
1
;
techInfo
.
userName
=
(
row
[
"cUserName"
]
as
string
).
Trim
();
techInfos
.
Add
(
techInfo
);
}
}
...
...
@@ -306,6 +309,7 @@ namespace WSDDBBrowser.Core
techInfo
.
Tolerance
=
5
;
techInfo
.
Avg
=
r
.
NextDouble
()
*
10
-
5
+
techInfo
.
Target
;
techInfo
.
IsError
=
Math
.
Abs
(
techInfo
.
Target
-
techInfo
.
Avg
)
>
techInfo
.
Tolerance
;
techInfo
.
userName
=
i
.
ToString
(
"00"
);
techInfos
.
Add
(
techInfo
);
}
for
(
int
i
=
0
;
i
<
5
;
i
++)
...
...
@@ -318,6 +322,7 @@ namespace WSDDBBrowser.Core
techInfo
.
Tolerance
=
5
;
techInfo
.
Avg
=
r
.
NextDouble
()
*
10
-
5
+
techInfo
.
Target
;
techInfo
.
IsError
=
Math
.
Abs
(
techInfo
.
Target
-
techInfo
.
Avg
)
>
techInfo
.
Tolerance
;
techInfo
.
userName
=
i
.
ToString
(
"00"
);
techInfos
.
Add
(
techInfo
);
}
...
...
@@ -528,6 +533,7 @@ namespace WSDDBBrowser.Core
public
double
Tolerance
{
get
;
set
;
}
public
double
Avg
{
get
;
set
;
}
public
bool
IsError
{
get
;
set
;
}
public
string
userName
{
get
;
set
;
}
}
}
WSDDBBrower/WSDDBBrower/PgSelect.xaml
View file @
51eee7d0
...
...
@@ -46,7 +46,7 @@
<StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TitleStyle}" Text="工序号"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding StepNo}"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding StepNo
, Converter={StaticResource intNullConv}
}"/>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TitleStyle}" Text="机台号"/>
...
...
WSDDBBrower/WSDDBBrower/PgSelect.xaml.cs
View file @
51eee7d0
...
...
@@ -153,6 +153,13 @@ namespace WSDDBBrowser
private
async
void
Search
()
{
if
(
StepNo
==
null
)
{
await
App
.
MetroWindow
.
ShowMessageAsync
(
"参数异常"
,
$"工序号为空"
);
return
;
}
//开始加载
var
controller
=
await
App
.
MetroWindow
.
ShowProgressAsync
(
"请等待..."
,
"开始查找数据"
,
settings
:
new
MetroDialogSettings
()
...
...
WSDDBBrower/WSDDBBrower/TechInfoDialog.xaml
View file @
51eee7d0
...
...
@@ -28,7 +28,7 @@
<DataGridTextColumn Binding="{Binding Target,StringFormat={}{0:F1}}" Header="目标值"/>
<DataGridTextColumn Binding="{Binding Tolerance,StringFormat={}{0:F1}}" Header="公差"/>
<DataGridTextColumn Binding="{Binding Avg,StringFormat={}{0:F1}}" Header="平均值"/>
<DataGridTextColumn Binding="{Binding userName}" Header="班组"/>
</DataGrid.Columns>
</DataGrid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20" Grid.Row="1">
...
...
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