Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20242OutBound
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 24c36711
由
LN
编写于
2023-09-06 16:44:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加清理料架按钮
1 个父辈
cd6dd4a7
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
120 行增加
和
3 行删除
DeviceLibrary/DeviceLibrary/HttpServer.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
DeviceLibrary/DeviceLibrary/HttpServer.cs
查看文件 @
24c3671
...
...
@@ -17,6 +17,7 @@ namespace DeviceLibrary
private
static
string
Addr_ShelfFinish
=
"/rest/api/shelf/putShelfFinished"
;
private
static
string
Addr_getLocation
=
"/rest/api/shelf/getLocation"
;
private
static
string
Addr_getShelfEmptySlot
=
"/rest/api/shelf/getShelfEmptySlot"
;
private
static
string
Addr_clearRfid
=
"/rest/api/shelf/clearRfid"
;
/// <summary>
/// rest/api/dcs/device/getShelfEmptySlot
/// 获取当前任务数及料架的剩余空位
...
...
@@ -267,7 +268,29 @@ namespace DeviceLibrary
return
tray
;
}
public
static
string
ClearRfid
(
string
rfid
,
string
orderNo
)
{
DateTime
startTime
=
DateTime
.
Now
;
try
{
string
api
=
Addr_clearRfid
;
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"orderNo"
,
orderNo
);
paramMap
.
Add
(
"rfid"
,
rfid
);
string
url
=
GetAddr
(
api
,
paramMap
);
LogUtil
.
debug
(
"http :URL:"
+
url
);
string
resultStr
=
HttpHelper
.
Get
(
url
);
LogUtil
.
info
(
"http :URL:"
+
url
+
" :Response:"
+
resultStr
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
return
resultStr
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"http error : "
+
ex
.
ToString
());
}
return
""
;
}
}
public
class
TrayInfo
{
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
24c3671
...
...
@@ -32,14 +32,21 @@ namespace TheMachine
this
.
button_positiontool
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage_set
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
group
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label_newpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_oldpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtRfid
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtOrderNo
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button_Clear
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
group
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// button_positiontool
//
this
.
button_positiontool
.
Location
=
new
System
.
Drawing
.
Point
(
36
,
32
);
this
.
button_positiontool
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
290
);
this
.
button_positiontool
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
button_positiontool
.
Name
=
"button_positiontool"
;
this
.
button_positiontool
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
36
);
...
...
@@ -60,6 +67,7 @@ namespace TheMachine
//
// tabPage_set
//
this
.
tabPage_set
.
Controls
.
Add
(
this
.
group
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
button_positiontool
);
this
.
tabPage_set
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
...
...
@@ -70,13 +78,74 @@ namespace TheMachine
this
.
tabPage_set
.
Text
=
"常规设置"
;
this
.
tabPage_set
.
UseVisualStyleBackColor
=
true
;
//
// group
//
this
.
group
.
Controls
.
Add
(
this
.
button_Clear
);
this
.
group
.
Controls
.
Add
(
this
.
label_newpwd
);
this
.
group
.
Controls
.
Add
(
this
.
label_oldpwd
);
this
.
group
.
Controls
.
Add
(
this
.
txtRfid
);
this
.
group
.
Controls
.
Add
(
this
.
txtOrderNo
);
this
.
group
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
group
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
group
.
Name
=
"group"
;
this
.
group
.
Size
=
new
System
.
Drawing
.
Size
(
411
,
271
);
this
.
group
.
TabIndex
=
8
;
this
.
group
.
TabStop
=
false
;
this
.
group
.
Text
=
"清空料架"
;
//
// label_newpwd
//
this
.
label_newpwd
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
94
);
this
.
label_newpwd
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
,
0
,
5
,
0
);
this
.
label_newpwd
.
Name
=
"label_newpwd"
;
this
.
label_newpwd
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
23
);
this
.
label_newpwd
.
TabIndex
=
4
;
this
.
label_newpwd
.
Text
=
"RFID:"
;
this
.
label_newpwd
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// label_oldpwd
//
this
.
label_oldpwd
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
49
);
this
.
label_oldpwd
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
,
0
,
5
,
0
);
this
.
label_oldpwd
.
Name
=
"label_oldpwd"
;
this
.
label_oldpwd
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
23
);
this
.
label_oldpwd
.
TabIndex
=
5
;
this
.
label_oldpwd
.
Text
=
"工单号:"
;
this
.
label_oldpwd
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// txtRfid
//
this
.
txtRfid
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
91
);
this
.
txtRfid
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
txtRfid
.
Name
=
"txtRfid"
;
this
.
txtRfid
.
Size
=
new
System
.
Drawing
.
Size
(
165
,
26
);
this
.
txtRfid
.
TabIndex
=
2
;
//
// txtOrderNo
//
this
.
txtOrderNo
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
46
);
this
.
txtOrderNo
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
txtOrderNo
.
Name
=
"txtOrderNo"
;
this
.
txtOrderNo
.
Size
=
new
System
.
Drawing
.
Size
(
165
,
26
);
this
.
txtOrderNo
.
TabIndex
=
3
;
//
// button_Clear
//
this
.
button_Clear
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
152
);
this
.
button_Clear
.
Name
=
"button_Clear"
;
this
.
button_Clear
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
33
);
this
.
button_Clear
.
TabIndex
=
6
;
this
.
button_Clear
.
Text
=
"清理料架"
;
this
.
button_Clear
.
UseVisualStyleBackColor
=
true
;
this
.
button_Clear
.
Click
+=
new
System
.
EventHandler
(
this
.
button_Clear_Click
);
//
// uC_SetUserPassword1
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
335
,
8
);
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
425
,
6
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
533
,
596
);
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
411
,
271
);
this
.
uC_SetUserPassword1
.
TabIndex
=
7
;
//
// SettingControl
...
...
@@ -88,6 +157,8 @@ namespace TheMachine
this
.
Load
+=
new
System
.
EventHandler
(
this
.
SettingControl_Load
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage_set
.
ResumeLayout
(
false
);
this
.
group
.
ResumeLayout
(
false
);
this
.
group
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
...
...
@@ -97,5 +168,11 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
TabControl
tabControl1
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_set
;
private
UC_SetUserPassword
uC_SetUserPassword1
;
private
System
.
Windows
.
Forms
.
GroupBox
group
;
private
System
.
Windows
.
Forms
.
Label
label_newpwd
;
private
System
.
Windows
.
Forms
.
Label
label_oldpwd
;
private
System
.
Windows
.
Forms
.
TextBox
txtRfid
;
private
System
.
Windows
.
Forms
.
TextBox
txtOrderNo
;
private
System
.
Windows
.
Forms
.
Button
button_Clear
;
}
}
TheMachine/SettingControl.cs
查看文件 @
24c3671
...
...
@@ -52,5 +52,22 @@ namespace TheMachine
frmPositionTool
.
ShowDialog
();
}
}
private
void
button_Clear_Click
(
object
sender
,
EventArgs
e
)
{
string
rfid
=
txtRfid
.
Text
.
Trim
();
string
orderNo
=
txtOrderNo
.
Text
.
Trim
();
if
(
rfid
==
""
&&
orderNo
==
""
)
{
MessageBox
.
Show
(
"请输入要清理的RFID"
,
"提示"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
return
;
}
LogUtil
.
info
(
$
"点击按钮 {button_Clear.Text.ToString()} ,rfid=[{rfid}],orderNo=[{orderNo}],调用接口清理料架信息"
);
string
result
=
HttpServer
.
ClearRfid
(
rfid
,
orderNo
);
MessageBox
.
Show
(
$
"清理料架,rfid={rfid} ,orderNo={orderNo} 结果:\r\n {result}"
,
"提示"
,
MessageBoxButtons
.
OK
);
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论