Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 07355ddd
由
张东亮
编写于
2022-02-16 10:06:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
屏蔽库位功能
1 个父辈
6cebbc55
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
82 行增加
和
15 行删除
source/DeviceLibrary/manager/SServerManager.cs
source/XLRStoreClient/FrmXLRStore.Designer.cs
source/XLRStoreClient/FrmXLRStore.cs
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
07355dd
...
@@ -48,10 +48,68 @@ namespace OnlineStore.DeviceLibrary
...
@@ -48,10 +48,68 @@ namespace OnlineStore.DeviceLibrary
//http://localhost/myproject/service/store/emptyPosForPutin
//http://localhost/myproject/service/store/emptyPosForPutin
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
/// <summary>
/// <summary>
/// 屏蔽库位接口
/// </summary>
private
static
string
Addr_disabledPos
=
"/service/store/disabledPos"
;
/// <summary>
/// 屏蔽库位
/// </summary>
/// <param name="deviceName"></param>
/// <param name="barcode"></param>
/// <param name="poid"></param>
/// <returns></returns>
public
static
string
DisablePos
(
string
deviceName
,
string
barcode
,
string
poid
)
{
string
msg
=
""
;
try
{
if
(
String
.
IsNullOrEmpty
(
barcode
))
{
return
msg
;
}
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"DisablePos ["
+
barcode
+
"] ["
+
poid
+
"] :未找到服务器地址"
);
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"posId"
,
poid
);
//posId:库位号
paramMap
.
Add
(
"barcode"
,
barcode
);
// barcode = 料盘的条码
string
server
=
GetAddr
(
Addr_disabledPos
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
"DisablePos "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
// 返回: { "code": 0, "msg":"ok", "data":""}
ServerData
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ServerData
>(
resultStr
);
if
(
serverResult
==
null
)
{
msg
=
deviceName
+
"DisablePos【 "
+
barcode
+
"】【"
+
poid
+
"】没有收到服务器反馈"
;
}
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg
=
deviceName
+
" DisablePos【 "
+
barcode
+
"】【"
+
poid
+
"】:"
+
"["
+
serverResult
.
code
+
"]"
+
serverResult
.
msg
;
}
if
(!
msg
.
Equals
(
""
))
{
LogUtil
.
error
(
msg
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
msg
;
}
/// <summary>
/// 1 皮带线扫码后调用,用于获取尺寸后升起气缸
/// 1 皮带线扫码后调用,用于获取尺寸后升起气缸
/// 地址: /rest/api/qisda/device/getSize
/// 地址: /rest/api/qisda/device/getSize
/// </summary>
/// </summary>
private
static
string
Addr_getSize
=
"/rest/api/qisda/device/getSize"
;
//
private static string Addr_getSize = "/rest/api/qisda/device/getSize";
/// <summary>
/// <summary>
/// 2 料盘流转位置信息更新
/// 2 料盘流转位置信息更新
...
...
source/XLRStoreClient/FrmXLRStore.Designer.cs
查看文件 @
07355dd
...
@@ -369,54 +369,54 @@
...
@@ -369,54 +369,54 @@
// toolStripSeparator1
// toolStripSeparator1
//
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
//
// 启动AToolStripMenuItem
// 启动AToolStripMenuItem
//
//
this
.
启动
AToolStripMenuItem
.
Name
=
"启动AToolStripMenuItem"
;
this
.
启动
AToolStripMenuItem
.
Name
=
"启动AToolStripMenuItem"
;
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
启动
AToolStripMenuItem
.
Text
=
"启动 "
;
this
.
启动
AToolStripMenuItem
.
Text
=
"启动 "
;
this
.
启动
AToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动所有料仓
AToolStripMenuItem_Click
);
this
.
启动
AToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动所有料仓
AToolStripMenuItem_Click
);
//
//
// toolStripSeparator4
// toolStripSeparator4
//
//
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
//
// 复位RToolStripMenuItem
// 复位RToolStripMenuItem
//
//
this
.
复位
RToolStripMenuItem
.
Name
=
"复位RToolStripMenuItem"
;
this
.
复位
RToolStripMenuItem
.
Name
=
"复位RToolStripMenuItem"
;
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
复位
RToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
RToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
RToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
RToolStripMenuItem_Click
);
this
.
复位
RToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
RToolStripMenuItem_Click
);
//
//
// toolStripSeparator3
// toolStripSeparator3
//
//
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
//
// 停止TToolStripMenuItem
// 停止TToolStripMenuItem
//
//
this
.
停止
TToolStripMenuItem
.
Name
=
"停止TToolStripMenuItem"
;
this
.
停止
TToolStripMenuItem
.
Name
=
"停止TToolStripMenuItem"
;
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
停止
TToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
TToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
TToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止所有料仓
TToolStripMenuItem_Click
);
this
.
停止
TToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止所有料仓
TToolStripMenuItem_Click
);
//
//
// toolStripSeparator5
// toolStripSeparator5
//
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
//
// toolStripSeparator2
// toolStripSeparator2
//
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
this
.
toolStripSeparator2
.
Visible
=
false
;
this
.
toolStripSeparator2
.
Visible
=
false
;
//
//
// 退出ToolStripMenuItem
// 退出ToolStripMenuItem
//
//
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
退出
ToolStripMenuItem
.
Text
=
"退出"
;
this
.
退出
ToolStripMenuItem
.
Text
=
"退出"
;
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click_1
);
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click_1
);
//
//
...
...
source/XLRStoreClient/FrmXLRStore.cs
查看文件 @
07355dd
...
@@ -177,10 +177,11 @@ namespace OnlineStore.XLRStore
...
@@ -177,10 +177,11 @@ namespace OnlineStore.XLRStore
{
{
return
;
return
;
}
}
DialogResult
result
=
MessageBox
.
Show
(
"确定清除A下暂存区物料:"
+
BufferDataManager
.
AOutStoreInfo
.
ToStr
(),
""
,
MessageBoxButtons
.
OKCancel
);
DialogResult
result
=
MessageBox
.
Show
(
"确定清除A下暂存区物料
(同时会屏蔽该物料所在库位)
:"
+
BufferDataManager
.
AOutStoreInfo
.
ToStr
(),
""
,
MessageBoxButtons
.
OKCancel
);
if
(
result
.
Equals
(
DialogResult
.
OK
))
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
{
LogUtil
.
info
(
Name
+
"手动清除A下暂存区物料:"
+
BufferDataManager
.
AOutStoreInfo
.
ToStr
());
DisablePos
(
BufferDataManager
.
AOutStoreInfo
.
PosId
,
BufferDataManager
.
AOutStoreInfo
.
barcode
);
LogUtil
.
info
(
Name
+
"手动清除A下暂存区物料,并屏蔽该物料所在库位:"
+
BufferDataManager
.
AOutStoreInfo
.
ToStr
());
BufferDataManager
.
AOutStoreInfo
=
null
;
BufferDataManager
.
AOutStoreInfo
=
null
;
}
}
}
}
...
@@ -203,14 +204,22 @@ namespace OnlineStore.XLRStore
...
@@ -203,14 +204,22 @@ namespace OnlineStore.XLRStore
{
{
return
;
return
;
}
}
DialogResult
result
=
MessageBox
.
Show
(
"确定清除B下暂存区物料:"
+
BufferDataManager
.
BOutStoreInfo
.
ToStr
(),
""
,
MessageBoxButtons
.
OKCancel
);
DialogResult
result
=
MessageBox
.
Show
(
"确定清除B下暂存区物料
(同时会屏蔽该物料所在库位)
:"
+
BufferDataManager
.
BOutStoreInfo
.
ToStr
(),
""
,
MessageBoxButtons
.
OKCancel
);
if
(
result
.
Equals
(
DialogResult
.
OK
))
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
{
LogUtil
.
info
(
Name
+
"手动清除B下暂存区物料:"
+
BufferDataManager
.
BOutStoreInfo
.
ToStr
());
LogUtil
.
info
(
Name
+
"手动清除B下暂存区物料
,并屏蔽该物料所在库位
:"
+
BufferDataManager
.
BOutStoreInfo
.
ToStr
());
BufferDataManager
.
BOutStoreInfo
=
null
;
BufferDataManager
.
BOutStoreInfo
=
null
;
}
}
}
}
/// <summary>
/// 屏蔽下暂存区里物料的库位
/// </summary>
/// <param name="posId"></param>
/// <param name="barcode"></param>
private
void
DisablePos
(
string
posId
,
string
barcode
)
{
SServerManager
.
DisablePos
(
StoreManager
.
XLRStore
.
Name
,
barcode
,
posId
);
}
private
void
AddForm
(
string
text
,
Form
form
)
private
void
AddForm
(
string
text
,
Form
form
)
{
{
//text = text.PadRight(10, ' ');
//text = text.PadRight(10, ' ');
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论