Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.SamplePackages.V4.0
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Client.SamplePackages.V4.0
Commits
d110c119
Commit
d110c119
authored
May 26, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
d35172c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
4 deletions
+46
-4
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+0
-0
FrmMain.cs
Src/FrmMain.cs
+45
-4
RestfulRequests.cs
Src/Requests/RestfulRequests.cs
+1
-0
No files found.
Src/FrmMain.Designer.cs
View file @
d110c119
This diff is collapsed.
Click to expand it.
Src/FrmMain.cs
View file @
d110c119
...
...
@@ -9,6 +9,7 @@ using System.ComponentModel;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Security.Cryptography
;
using
System.Text
;
using
System.Threading
;
using
System.Timers
;
...
...
@@ -62,6 +63,8 @@ namespace Kivii.Client.SamplePackages
btnLogin
.
Enabled
=
true
;
btnLogout
.
Enabled
=
false
;
btnScanRfid
.
Enabled
=
false
;
tbScanSample
.
Enabled
=
false
;
tbScanSample
.
Text
=
""
;
btnClearCurrentPackage
.
Enabled
=
false
;
tbCurrentLocation
.
Text
=
""
;
tbCurrentDepartment
.
Text
=
""
;
...
...
@@ -162,7 +165,7 @@ namespace Kivii.Client.SamplePackages
request
.
OwnerKvid
=
_userInfo
.
DepartmentKvid
;
//request.OwnerKvid = Guid.Parse("D4CE47D2-5FC8-479D-A0CA-BACDF1A891BF");//色牢度组
//request.OwnerKvid = Guid.Parse("9D026818-6E78-40F8-A715-2887F96F34DC");//纤检组
//
request.OwnerKvid = Guid.Parse("208C24FB-1443-4B9E-9886-02ED3B9A8F45");//安全组
request
.
OwnerKvid
=
Guid
.
Parse
(
"208C24FB-1443-4B9E-9886-02ED3B9A8F45"
);
//安全组
//request.OwnerKvid = Guid.Parse("7CF9CF7B-19F5-4A1A-A94C-5BC21EA8ED76");//纤维含量组
//request.OwnerKvid = Guid.Parse("BB355D5A-9D4E-4337-B577-7BB7A1625F68");//羽绒组
var
task
=
_client
.
PostAsync
(
request
);
...
...
@@ -220,11 +223,12 @@ namespace Kivii.Client.SamplePackages
});
}
private
void
samplePrepackaging
(
string
tid
)
private
void
samplePrepackaging
(
string
tid
,
string
bizId
=
null
)
{
if
(
tid
.
IsNullOrEmpty
())
return
;
if
(
tid
.
IsNullOrEmpty
()
&&
bizId
.
IsNullOrEmpty
()
)
return
;
var
request
=
new
SamplePrePackaging
();
request
.
Tid
=
tid
;
if
(!
tid
.
IsNullOrEmpty
())
request
.
Tid
=
tid
;
if
(!
bizId
.
IsNullOrEmpty
())
request
.
BizId
=
bizId
;
request
.
OwnerKvid
=
_currentLocation
.
OwnerKvid
;
try
{
...
...
@@ -350,6 +354,8 @@ namespace Kivii.Client.SamplePackages
btnClearCurrentPackage
.
Enabled
=
_currentPackage
!=
null
;
cbSetCurrentPackageNode
.
Enabled
=
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Empty
||
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Full
;
btnScanRfid
.
Enabled
=
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Empty
||
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Full
;
tbScanSample
.
Enabled
=
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Empty
||
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Full
;
tbScanSample
.
Text
=
""
;
if
(
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Full
||
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Inbound
)
{
querySampleInPackaged
();
...
...
@@ -360,6 +366,7 @@ namespace Kivii.Client.SamplePackages
return
;
}
cbSetCurrentPackageNode
.
SelectedIndex
=
0
;
Thread
.
Sleep
(
200
);
btnScanRfid_Click
(
null
,
null
);
});
task
.
Error
(
err
=>
...
...
@@ -371,6 +378,9 @@ namespace Kivii.Client.SamplePackages
cbSetCurrentPackageNode
.
SelectedItem
=
null
;
cbSetCurrentPackageNode
.
Enabled
=
false
;
btnScanRfid
.
Enabled
=
false
;
tbScanSample
.
Enabled
=
false
;
tbScanSample
.
Text
=
""
;
MessageBox
.
Show
(
err
.
Message
,
"箱号设置"
);
});
}
...
...
@@ -507,6 +517,9 @@ namespace Kivii.Client.SamplePackages
cbSetCurrentPackageNode
.
SelectedItem
=
null
;
cbSetCurrentPackageNode
.
Enabled
=
false
;
btnScanRfid
.
Enabled
=
false
;
tbScanSample
.
Enabled
=
false
;
tbScanSample
.
Text
=
""
;
dgvSamples
.
DataSource
=
null
;
}
...
...
@@ -621,5 +634,33 @@ namespace Kivii.Client.SamplePackages
if
(
currentRowSample
==
null
)
return
;
sampleUnpackaging
(
currentRowSample
);
}
private
void
tbScanSample_KeyDown
(
object
sender
,
KeyEventArgs
e
)
{
if
(
e
.
KeyCode
==
Keys
.
Enter
)
{
if
(
_client
==
null
)
{
MessageBox
.
Show
(
"请先登录."
);
return
;
}
if
(
_currentLocation
==
null
)
{
MessageBox
.
Show
(
"未获取当前位置."
);
return
;
}
if
(
_currentPackage
==
null
)
{
MessageBox
.
Show
(
"未获取当前箱号."
);
return
;
}
if
(
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Inbound
)
{
MessageBox
.
Show
(
"当前箱子已入库,无法继续操作!"
);
return
;
}
samplePrepackaging
(
null
,
tbScanSample
.
Text
);
}
}
}
}
Src/Requests/RestfulRequests.cs
View file @
d110c119
...
...
@@ -32,6 +32,7 @@ namespace Kivii.Samples.Transforms
public
class
SamplePrePackaging
:
IReturn
<
RestfulExecutionResponse
<
Sample
>>
{
public
string
Tid
{
get
;
set
;
}
public
string
BizId
{
get
;
set
;
}
public
Guid
OwnerKvid
{
get
;
set
;
}
//要打包的样品的所属信息
}
...
...
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