Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1131-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1356d079
由
张东亮
编写于
2022-11-28 22:23:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
20221128
1 个父辈
6563da7e
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
203 行增加
和
91 行删除
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/deviceLibrary/label/Label_LZ.cs
source/DeviceLibrary/deviceLibrary/label/PrinterBean.cs
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_TurnoverBox.cs
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
source/DeviceLibrary/storeBean/inputBean/TurnoverBox.cs.cs
source/XLRStoreClient/inputForm/FrmTurnoverBox.Designer.cs
source/XLRStoreClient/inputForm/FrmTurnoverBox.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
1356d07
...
@@ -149,30 +149,30 @@ namespace OnlineStore.DeviceLibrary
...
@@ -149,30 +149,30 @@ namespace OnlineStore.DeviceLibrary
string
r
=
""
;
string
r
=
""
;
bool
eyemNoCode
=
false
;
bool
eyemNoCode
=
false
;
Task
eyemtask
=
Task
.
Factory
.
StartNew
(
delegate
{
//
Task eyemtask = Task.Factory.StartNew(delegate {
List
<
CodeInfo
>
tlci
=
EyemDecode
.
ModelDecoder
(
ref
bmp
);
//
List<CodeInfo> tlci = EyemDecode.ModelDecoder(ref bmp);
foreach
(
CodeInfo
code
in
tlci
)
//
foreach (CodeInfo code in tlci)
{
//
{
//LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr);
//
//LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
//
string str = CodeManager.ReplaceCode(code.CodeStr);
if
(!
codeList
.
Contains
(
str
))
//
if (!codeList.Contains(str))
{
//
{
codeList
.
Add
(
str
);
//
codeList.Add(str);
r
=
r
+
"##eyem|"
+
code
.
CodeType
+
"|"
+
str
;
//
r = r + "##eyem|" + code.CodeType + "|" + str;
if
(!
findRightCode
)
//
if (!findRightCode)
{
//
{
findRightCode
=
HasRightCode
(
str
);
//
findRightCode = HasRightCode(str);
}
//
}
}
//
}
}
//
}
});
//
});
//最多等待60秒
//
//
最多等待60秒
bool
taskResult
=
eyemtask
.
Wait
(
60000
);
//
bool taskResult = eyemtask.Wait(60000);
if
(!
taskResult
)
//
if (!taskResult)
{
//
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
//
LogUtil.error(deviceName + " 【" + cameraName + "】eyem扫码超时");
eyemNoCode
=
true
;
//
eyemNoCode = true;
}
//
}
if
(!
isPreScan
)
if
(!
isPreScan
)
{
{
...
@@ -255,10 +255,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -255,10 +255,10 @@ namespace OnlineStore.DeviceLibrary
nameStr
=
"eyem"
;
nameStr
=
"eyem"
;
}
}
if
(!
taskResult
)
//
if (!taskResult)
{
//
{
nameStr
=
"eyemTimeOut"
;
//
nameStr = "eyemTimeOut";
}
//
}
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
}
}
...
...
source/DeviceLibrary/deviceLibrary/label/Label_LZ.cs
查看文件 @
1356d07
...
@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
class
Label_LZ
public
class
Label_LZ
{
{
public
Label_LZ
(
string
liaohao
,
string
mianbie
,
string
jitai
,
string
line
)
public
Label_LZ
(
string
liaohao
,
string
mianbie
,
string
jitai
,
string
line
,
string
slot
=
"slot"
,
string
subslot
=
"subslot"
)
{
{
this
.
pn
=
$
"料 号:{liaohao}"
;
this
.
pn
=
$
"料 号:{liaohao}"
;
this
.
side
=
$
"{mianbie}"
;
this
.
side
=
$
"{mianbie}"
;
this
.
line
=
$
"线 别:{line} /{this.side}"
;
this
.
line
=
$
"线 别:{line} /{this.side}"
;
this
.
station
=
$
"机 台:{jitai}"
;
this
.
station
=
$
"机 台:{jitai}"
;
this
.
slot
=
$
"站 别:{slot}{subslot}"
;
this
.
shijian
=
$
"时 间:{DateTime.Now.ToString()}"
;
this
.
shijian
=
$
"时 间:{DateTime.Now.ToString()}"
;
}
}
public
Label_LZ
()
{
}
public
Label_LZ
()
{
}
...
@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary
public
string
pn
{
get
;
set
;
}
=
""
;
public
string
pn
{
get
;
set
;
}
=
""
;
public
string
line
{
get
;
set
;
}
=
""
;
public
string
line
{
get
;
set
;
}
=
""
;
/// <summary>
/// <summary>
/// 站位
/// </summary>
public
string
slot
{
get
;
set
;
}
/// <summary>
/// 点位
/// </summary>
public
string
subslot
{
get
;
set
;
}
/// <summary>
/// 线别
/// 线别
/// </summary>
/// </summary>
public
string
side
{
get
;
set
;
}
=
""
;
public
string
side
{
get
;
set
;
}
=
""
;
...
@@ -42,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -42,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
public
string
ToStr
()
public
string
ToStr
()
{
{
return
$
"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line}"
;
return
$
"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line}
,站位:{slot},点位:{subslot}
"
;
}
}
}
}
}
}
source/DeviceLibrary/deviceLibrary/label/PrinterBean.cs
查看文件 @
1356d07
...
@@ -73,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -73,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
text
.
Add
(
"jt"
,
content
.
station
);
text
.
Add
(
"jt"
,
content
.
station
);
text
.
Add
(
"sj"
,
content
.
shijian
);
text
.
Add
(
"sj"
,
content
.
shijian
);
text
.
Add
(
"xb"
,
content
.
line
);
text
.
Add
(
"xb"
,
content
.
line
);
text
.
Add
(
"zb"
,
content
.
slot
);
return
print
.
PrintPreview
(
text
);
return
print
.
PrintPreview
(
text
);
}
}
public
bool
IsReadyPrint
(
out
string
msg
)
public
bool
IsReadyPrint
(
out
string
msg
)
...
...
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
1356d07
...
@@ -16,6 +16,51 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,6 +16,51 @@ namespace OnlineStore.DeviceLibrary
public
class
SServerManager
public
class
SServerManager
{
{
#
region
立臻料仓接口
#
region
立臻料仓接口
static
string
Addr_getOutStateInfo
=
"/service/store/innerBox/getOutStateInfo"
;
/// <summary>
/// 根据料仓编号获取料仓两个出料口料箱信息
/// </summary>
/// <param name="cid">料仓cid</param>
/// <returns></returns>
public
static
List
<
BoxInfo
>
GetOutStateInfo
()
{
try
{
string
msg
=
""
;
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
map
.
Add
(
"cid"
,
StoreManager
.
XLRStore
.
Config
.
CID
);
string
server
=
GetAddr
(
Addr_getOutStateInfo
,
map
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
ServerData4
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ServerData4
>(
resultStr
);
if
(
serverResult
==
null
)
{
msg
=
$
"GetOutStateInfo"
+
"没有收到服务器反馈"
;
}
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg
=
$
" GetOutStateInfo【{JsonHelper.SerializeObject(serverResult)}】"
;
if
(!
msg
.
Equals
(
""
))
{
LogUtil
.
error
(
msg
);
return
null
;
}
}
else
{
msg
=
$
" GetOutStateInfo【{JsonHelper.SerializeObject(serverResult)}】"
;
LogUtil
.
debug
(
msg
);
return
serverResult
.
data
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"GetOutStateInfo"
,
ex
);
}
return
null
;
}
static
string
Addr_UploadLocInfo
=
"/service/store/innerBox/updateLocInfo"
;
static
string
Addr_UploadLocInfo
=
"/service/store/innerBox/updateLocInfo"
;
/// <summary>
/// <summary>
/// A 出库更新任务状态 -OK
/// A 出库更新任务状态 -OK
...
@@ -23,15 +68,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,15 +68,19 @@ namespace OnlineStore.DeviceLibrary
/// <param name="barcode">料盘条码</param>
/// <param name="barcode">料盘条码</param>
/// <param name="status"></param>
/// <param name="status"></param>
/// <returns></returns>
/// <returns></returns>
public
static
BoxTaskInfo
UploadLocInfo
(
string
barcode
,
string
status
,
string
loc
=
""
)
public
static
BoxTaskInfo
UploadLocInfo
(
string
barcode
,
string
status
,
string
loc
=
""
,
string
hSerial
=
""
,
string
outle
=
""
,
string
boxSide
=
""
)
{
{
try
try
{
{
string
msg
=
""
;
string
msg
=
""
;
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
map
.
Add
(
"cid"
,
StoreManager
.
XLRStore
.
Config
.
CID
);
map
.
Add
(
"barcode"
,
barcode
);
map
.
Add
(
"barcode"
,
barcode
);
map
.
Add
(
"status"
,
status
);
map
.
Add
(
"status"
,
status
);
map
.
Add
(
"loc"
,
loc
);
map
.
Add
(
"loc"
,
loc
);
map
.
Add
(
"hSerial"
,
hSerial
);
map
.
Add
(
"outle"
,
outle
);
map
.
Add
(
"boxSide"
,
boxSide
);
string
server
=
GetAddr
(
Addr_UploadLocInfo
,
map
);
string
server
=
GetAddr
(
Addr_UploadLocInfo
,
map
);
DateTime
startTime
=
DateTime
.
Now
;
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
string
resultStr
=
HttpHelper
.
Get
(
server
);
...
@@ -1091,26 +1140,66 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1091,26 +1140,66 @@ namespace OnlineStore.DeviceLibrary
/// 目的地
/// 目的地
/// </summary>
/// </summary>
public
string
line
{
get
;
set
;
}
=
""
;
public
string
line
{
get
;
set
;
}
=
""
;
public
string
cid
{
get
;
set
;
}
/// <summary>
/// <summary>
///
当前料箱隔口内侧已放入
///
出口位置,A或者B
/// </summary>
/// </summary>
public
int
inCount
{
get
;
set
;
}
=
-
1
;
public
string
outlet
{
get
;
set
;
}
public
int
outCount
{
get
;
set
;
}
=
-
1
;
/// <summary>
//public bool IsValid()
/// 当前料箱隔口内侧T
//{
/// </summary>
// if (bigEmpty != -1 && smallEmpty != -1)
public
int
boxTCount
{
get
;
set
;
}
=
-
1
;
// {
/// <summary>
// return true;
/// 当前料箱隔口外侧B
// }
/// </summary>
// return false;
public
int
boxBCount
{
get
;
set
;
}
=
-
1
;
//}
public
string
ToStr
()
public
string
ToStr
()
{
{
return
$
"内侧
格口已有数量:{inCount},外侧格口已有数量;{out
Count}; 需求单:{hSerial},剩余任务数={remainTaskCount},"
+
return
$
"内侧
T已有数量:{boxTCount},外侧B已有数量;{boxB
Count}; 需求单:{hSerial},剩余任务数={remainTaskCount},"
+
$
"剩余料架数:{rackTaskCount},目的地:{line}"
;
$
"剩余料架数:{rackTaskCount},目的地:{line}"
;
}
}
}
}
/// <summary>
/// 出口料箱信息
/// </summary>
public
class
BoxInfo
{
/// <summary>
/// 出口位置,A或者B
/// </summary>
public
string
outlet
{
get
;
set
;
}
/// <summary>
/// 料仓cid
/// </summary>
public
string
cid
{
get
;
set
;
}
/// <summary>
/// 料箱rfid
/// </summary>
public
string
rfid
{
get
;
set
;
}
/// <summary>
/// 需求单号
/// </summary>
public
string
hSerial
{
get
;
set
;
}
=
""
;
/// <summary>
/// 目的线体
/// </summary>
public
string
line
{
get
;
set
;
}
=
""
;
/// <summary>
/// 当前料箱隔口内侧T
/// </summary>
public
int
boxTCount
{
get
;
set
;
}
=
-
1
;
/// <summary>
/// 当前料箱隔口外侧B
/// </summary>
public
int
boxBCount
{
get
;
set
;
}
=
-
1
;
public
string
ToStr
()
{
return
$
"出口位置:{outlet},箱号:{rfid},需求单:{hSerial},内侧T已有数量:{boxTCount},外侧B已有数量;{boxBCount},"
+
$
"目的地:{line}"
;
}
}
public
class
AlarmMsg
public
class
AlarmMsg
{
{
...
@@ -1207,6 +1296,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1207,6 +1296,14 @@ namespace OnlineStore.DeviceLibrary
public
List
<
Label_LZ
>
data
{
get
;
set
;
}
public
List
<
Label_LZ
>
data
{
get
;
set
;
}
}
}
public
class
ServerData4
{
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
List
<
BoxInfo
>
data
{
get
;
set
;
}
}
public
class
AfterPutData
public
class
AfterPutData
{
{
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
1356d07
...
@@ -66,6 +66,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -66,6 +66,9 @@ namespace OnlineStore.DeviceLibrary
//加载周转箱
//加载周转箱
BoxA
=
new
TurnoverBox
(
"周转箱A"
,
RFIDIP
[
0
],
config
);
BoxA
=
new
TurnoverBox
(
"周转箱A"
,
RFIDIP
[
0
],
config
);
BoxB
=
new
TurnoverBox
(
"周转箱B"
,
RFIDIP
[
1
],
config
);
BoxB
=
new
TurnoverBox
(
"周转箱B"
,
RFIDIP
[
1
],
config
);
turnoverBoxes
=
new
List
<
TurnoverBox
>();
turnoverBoxes
.
Add
(
BoxA
);
turnoverBoxes
.
Add
(
BoxB
);
initRobot
();
initRobot
();
MoveInfo
=
new
DeviceMoveInfo
(
Name
);
MoveInfo
=
new
DeviceMoveInfo
(
Name
);
BatchMove
=
new
BatchMoveBean
(
Config
,
BatchAxis
,
1
);
BatchMove
=
new
BatchMoveBean
(
Config
,
BatchAxis
,
1
);
...
@@ -274,7 +277,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -274,7 +277,6 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS:"
+
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"MoveS:"
+
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"StepMsg:"
+
StepMsg
+
"\n"
;
msg
+=
"StepMsg:"
+
StepMsg
+
"\n"
;
msg
+=
"BoxInfo:"
+
boxTaskInfo
?.
ToStr
()
+
"\n"
;
msg
+=
"ReelInfo:"
+
PrintLabel
?.
LabelInfo
?.
ToStr
()
+
"\n"
;
msg
+=
"ReelInfo:"
+
PrintLabel
?.
LabelInfo
?.
ToStr
()
+
"\n"
;
return
msg
;
return
msg
;
}
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
查看文件 @
1356d07
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/storeBean/inputBean/InputEquip_TurnoverBox.cs
查看文件 @
1356d07
...
@@ -14,6 +14,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -14,6 +14,7 @@ namespace OnlineStore.DeviceLibrary
{
{
public
TurnoverBox
BoxA
;
public
TurnoverBox
BoxA
;
public
TurnoverBox
BoxB
;
public
TurnoverBox
BoxB
;
public
List
<
TurnoverBox
>
turnoverBoxes
;
/// <summary>
/// <summary>
/// 周转箱A的编号
/// 周转箱A的编号
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
查看文件 @
1356d07
...
@@ -232,7 +232,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -232,7 +232,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label03_HasLabelAtDoor
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
Label03_HasLabelAtDoor
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label04_PrintLabel
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
Label04_PrintLabel
);
Printer
.
Print
(
new
Label_LZ
(
LabelInfo
?.
pn
,
LabelInfo
?.
side
,
LabelInfo
?.
station
,
LabelInfo
?.
line
),
out
string
msg
);
Printer
.
Print
(
new
Label_LZ
(
LabelInfo
?.
pn
,
LabelInfo
?.
side
,
LabelInfo
?.
station
,
LabelInfo
?.
line
,
LabelInfo
?.
slot
,
LabelInfo
?.
subslot
),
out
string
msg
);
MoveLog
(
$
"打标:开始打印标签【{msg}】:{LabelInfo.ToStr()}"
);
MoveLog
(
$
"打标:开始打印标签【{msg}】:{LabelInfo.ToStr()}"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
}
...
...
source/DeviceLibrary/storeBean/inputBean/TurnoverBox.cs.cs
查看文件 @
1356d07
...
@@ -48,11 +48,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -48,11 +48,13 @@ namespace OnlineStore.DeviceLibrary
/// 周转箱线体反转
/// 周转箱线体反转
/// </summary>
/// </summary>
string
DO_LineBackRun
=
"TurnoverBoxA_LineBackRun"
;
string
DO_LineBackRun
=
"TurnoverBoxA_LineBackRun"
;
public
string
outLet
=
"A"
;
public
TurnoverBox
(
string
name
,
string
rfidIp
,
InputEquip_Config
inputEquip_Config
)
public
TurnoverBox
(
string
name
,
string
rfidIp
,
InputEquip_Config
inputEquip_Config
)
{
{
Name
=
name
;
Name
=
name
;
if
(
name
.
Contains
(
"B"
))
if
(
name
.
Contains
(
"B"
))
{
{
outLet
=
"B"
;
DI_SafetyRasterSignal
=
"TurnoverBoxB_SafetyRasterSignal"
;
DI_SafetyRasterSignal
=
"TurnoverBoxB_SafetyRasterSignal"
;
DI_FrontCheck
=
"TurnoverBoxB_FrontCheck"
;
DI_FrontCheck
=
"TurnoverBoxB_FrontCheck"
;
DI_InPlaceCheck
=
"TurnoverBoxB_InPlaceCheck"
;
DI_InPlaceCheck
=
"TurnoverBoxB_InPlaceCheck"
;
...
@@ -66,21 +68,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -66,21 +68,18 @@ namespace OnlineStore.DeviceLibrary
}
}
public
string
GetMoveStr
()
public
string
GetMoveStr
()
{
{
return
$
"料箱:{BoxId} "
+
$
"【格口最大数量:{MaxCntOnSide}】
"
+
BoxTaskInfo
?.
ToStr
()
??
"
"
;
return
$
"料箱:{BoxId} "
+
$
"【格口最大数量:{MaxCntOnSide}】
【"
+(
BoxInfo
?.
ToStr
()??
""
)+
"】【"
+
(
BoxTaskInfo
?.
ToStr
()
??
""
)+
"】
"
;
}
}
public
void
StartReset
()
public
void
StartReset
()
{
{
WarnMsg
=
""
;
WarnMsg
=
""
;
bool
needLeave
=
false
;
//bool needLeave = false;
if
(
ReadBoxId
())
ReadBoxId
();
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
resetCnt
();
resetCnt
();
if
(
BoxTaskInfo
!=
null
)
//if (BoxTaskInfo != null)
{
//{
CntInSideA
=
BoxTaskInfo
.
inCount
>
0
?
BoxTaskInfo
.
inCount
:
0
;
// needLeave = CntInSideT >= MaxCntOnSide || CntInSideB >= MaxCntOnSide || (!string.IsNullOrEmpty(BoxTaskInfo.hSerial) && BoxTaskInfo.remainTaskCount == 0);
CntInSideB
=
BoxTaskInfo
.
outCount
>
0
?
BoxTaskInfo
.
outCount
:
0
;
//}
needLeave
=
CntInSideA
>=
MaxCntOnSide
||
CntInSideB
>=
MaxCntOnSide
||
(!
string
.
IsNullOrEmpty
(
BoxTaskInfo
.
hSerial
)
&&
BoxTaskInfo
.
remainTaskCount
==
0
);
}
ProcessShelfOut
=
false
;
ProcessShelfOut
=
false
;
ProcessShelfEnter
=
false
;
ProcessShelfEnter
=
false
;
recvAGVSig
=
false
;
recvAGVSig
=
false
;
...
@@ -91,17 +90,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -91,17 +90,17 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
10000
);
Thread
.
Sleep
(
10000
);
LineStopRun
();
LineStopRun
();
if
(
needLeave
)
//
if (needLeave)
{
//
{
NeedLeave
();
//
NeedLeave();
}
//
}
});
});
}
}
void
resetCnt
()
void
resetCnt
()
{
{
CntInSide
A
=
0
;
CntInSide
T
=
0
;
CntInSideB
=
0
;
CntInSideB
=
0
;
}
}
public
void
LineRun
(
DeviceMoveInfo
moveInfo
=
null
)
public
void
LineRun
(
DeviceMoveInfo
moveInfo
=
null
)
...
@@ -321,13 +320,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -321,13 +320,21 @@ namespace OnlineStore.DeviceLibrary
}
}
public
Node
AgvNode
{
get
;
set
;
}
public
Node
AgvNode
{
get
;
set
;
}
/// <summary>
/// <summary>
///
A
侧数量
///
T
侧数量
/// </summary>
/// </summary>
public
int
CntInSide
A
{
get
;
set
;
}
public
int
CntInSide
T
{
get
;
set
;
}
/// <summary>
/// <summary>
/// B侧数量
/// B侧数量
/// </summary>
/// </summary>
public
int
CntInSideB
{
get
;
set
;
}
public
int
CntInSideB
{
get
;
set
;
}
/// <summary>
/// 是否有空位置
/// </summary>
/// <returns></returns>
public
bool
HasEmptyPos
(
int
boxT
,
int
boxB
)
{
return
boxT
<
MaxCntOnSide
&&
boxB
<
MaxCntOnSide
;
}
public
bool
CanPutIn
(
out
string
msg
)
public
bool
CanPutIn
(
out
string
msg
)
{
{
msg
=
""
;
msg
=
""
;
...
@@ -341,10 +348,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -341,10 +348,10 @@ namespace OnlineStore.DeviceLibrary
msg
=
Name
+
" 未读到rfid,不允许放料"
;
msg
=
Name
+
" 未读到rfid,不允许放料"
;
return
false
;
return
false
;
}
}
bool
rtn
=
CntInSide
A
<
MaxCntOnSide
&&
CntInSideB
<
MaxCntOnSide
;
bool
rtn
=
CntInSide
T
<
MaxCntOnSide
&&
CntInSideB
<
MaxCntOnSide
;
if
(!
rtn
)
if
(!
rtn
)
{
{
msg
=
Name
+
$
" 格口数量已满,不允许放料。当前数量:【内侧={CntInSide
A
}】【外侧={CntInSideB}】"
;
msg
=
Name
+
$
" 格口数量已满,不允许放料。当前数量:【内侧={CntInSide
T
}】【外侧={CntInSideB}】"
;
NeedLeave
();
NeedLeave
();
}
}
return
rtn
;
return
rtn
;
...
@@ -487,14 +494,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -487,14 +494,14 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
""
;
WarnMsg
=
""
;
if
(
side
%
2
!=
0
)
if
(
side
%
2
!=
0
)
{
{
CntInSide
A
++;
CntInSide
T
++;
}
}
else
else
{
{
CntInSideB
++;
CntInSideB
++;
}
}
bool
rtn
=
CntInSide
A
>=
MaxCntOnSide
||
CntInSideB
>=
MaxCntOnSide
;
bool
rtn
=
CntInSide
T
>=
MaxCntOnSide
||
CntInSideB
>=
MaxCntOnSide
;
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
//
BoxTaskInfo = SServerManager.GetBoxStatusInfo(config.CID, BoxId);
bool
hasRemain
=
true
;
bool
hasRemain
=
true
;
if
(
BoxTaskInfo
!=
null
)
if
(
BoxTaskInfo
!=
null
)
{
{
...
@@ -518,12 +525,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -518,12 +525,24 @@ namespace OnlineStore.DeviceLibrary
public
void
GetBoxTaskInfo
()
public
void
GetBoxTaskInfo
()
{
{
if
(
ReadBoxId
())
if
(
ReadBoxId
())
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
{
List
<
BoxInfo
>
boxInfos
=
SServerManager
.
GetOutStateInfo
();
UpdateBoxInfo
(
boxInfos
);
}
}
public
void
UpdateBoxInfo
(
List
<
BoxInfo
>
boxInfos
)
{
if
(
boxInfos
==
null
)
return
;
BoxInfo
=
boxInfos
.
Find
(
s
=>
outLet
.
Equals
(
s
.
outlet
));
}
}
/// <summary>
/// <summary>
///
箱子
任务信息
/// 任务信息
/// </summary>
/// </summary>
public
BoxTaskInfo
BoxTaskInfo
{
get
;
set
;
}
public
BoxTaskInfo
BoxTaskInfo
{
get
;
set
;
}
/// <summary>
/// 箱子信息
/// </summary>
public
BoxInfo
BoxInfo
{
get
;
set
;
}
public
void
ClearBoxInfo
(
bool
manual
=
false
)
public
void
ClearBoxInfo
(
bool
manual
=
false
)
{
{
...
...
source/XLRStoreClient/inputForm/FrmTurnoverBox.Designer.cs
查看文件 @
1356d07
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
this
.
panBase
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panBase
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnResetShelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblAgvInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblAgvInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnShelfOut
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnShelfOut
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -238,7 +237,6 @@
...
@@ -238,7 +237,6 @@
this
.
panBase
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
panBase
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
panBase
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panBase
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblWarnMsg
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblWarnMsg
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnResetShelf
);
this
.
panBase
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
panBase
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblAgvInfo
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblAgvInfo
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnShelfOut
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnShelfOut
);
...
@@ -277,20 +275,6 @@
...
@@ -277,20 +275,6 @@
this
.
lblWarnMsg
.
Text
=
"等待启动"
;
this
.
lblWarnMsg
.
Text
=
"等待启动"
;
this
.
lblWarnMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
this
.
lblWarnMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
//
// btnResetShelf
//
this
.
btnResetShelf
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnResetShelf
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnResetShelf
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnResetShelf
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnResetShelf
.
Location
=
new
System
.
Drawing
.
Point
(
680
,
251
);
this
.
btnResetShelf
.
Name
=
"btnResetShelf"
;
this
.
btnResetShelf
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
40
);
this
.
btnResetShelf
.
TabIndex
=
326
;
this
.
btnResetShelf
.
Text
=
"重置料箱信息"
;
this
.
btnResetShelf
.
UseVisualStyleBackColor
=
false
;
this
.
btnResetShelf
.
Click
+=
new
System
.
EventHandler
(
this
.
btnResetShelf_Click
);
//
// chbDebug
// chbDebug
//
//
this
.
chbDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
...
@@ -395,7 +379,6 @@
...
@@ -395,7 +379,6 @@
private
System
.
Windows
.
Forms
.
Button
LineBack_A
;
private
System
.
Windows
.
Forms
.
Button
LineBack_A
;
private
System
.
Windows
.
Forms
.
Button
LineStart_A
;
private
System
.
Windows
.
Forms
.
Button
LineStart_A
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbDebug
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbDebug
;
protected
System
.
Windows
.
Forms
.
Button
btnResetShelf
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
...
...
source/XLRStoreClient/inputForm/FrmTurnoverBox.cs
查看文件 @
1356d07
...
@@ -143,11 +143,11 @@ namespace OnlineStore.XLRStore
...
@@ -143,11 +143,11 @@ namespace OnlineStore.XLRStore
}
}
private
void
btnResetShelf_Click
(
object
sender
,
EventArgs
e
)
//
private void btnResetShelf_Click(object sender, EventArgs e)
{
//
{
moveBean
.
ClearBoxInfo
(
true
);
//
moveBean.ClearBoxInfo(true);
LogUtil
.
info
(
moveBean
.
Name
+
"点击:"
+
btnResetShelf
.
Text
+
";【"
+
moveBean
.
BoxId
+
"】"
);
//
LogUtil.info(moveBean.Name + "点击:" + btnResetShelf.Text + ";【" + moveBean.BoxId + "】");
}
//
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论