Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b0174c0e
由
张东亮
编写于
2024-03-01 16:47:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
临时出库不影响料串口
1 个父辈
e747d3a2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
58 行增加
和
25 行删除
source/Common/bean/Bean.cs
source/Common/util/AcSerialBean.cs
source/DeviceLibrary/manager/model/InOutParam.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/Common/bean/Bean.cs
查看文件 @
b0174c0
...
...
@@ -281,5 +281,6 @@ namespace OnlineStore.Common
/// 温湿度列表
/// </summary>
public
static
string
humiAndtempList
=
"humiAndtempList"
;
public
static
string
singleOut
=
"singleOut"
;
}
}
source/Common/util/AcSerialBean.cs
查看文件 @
b0174c0
...
...
@@ -306,7 +306,7 @@ namespace OnlineStore.Common
}
if
(
num
>=
Overtime
)
{
LogUtil
.
error
(
PortName
+
" 发送数据"
+
ByteToString
(
SendData
)
+
"等待接受数据超时"
);
//
LogUtil.error(PortName + " 发送数据" + ByteToString(SendData) + "等待接受数据超时");
}
if
(
_serialPort
.
BytesToRead
>=
ReceiveData
.
Length
)
{
...
...
@@ -390,7 +390,7 @@ namespace OnlineStore.Common
}
if
(
num
>=
Overtime
)
{
LogUtil
.
error
(
PortName
+
" 发送数据"
+
ByteToString
(
SendData
)
+
"等待接受数据超时"
);
//
LogUtil.error(PortName + " 发送数据" + ByteToString(SendData) + "等待接受数据超时");
}
if
(
_serialPort
.
BytesToRead
>=
ReceiveData
.
Length
)
{
...
...
source/DeviceLibrary/manager/model/InOutParam.cs
查看文件 @
b0174c0
...
...
@@ -133,10 +133,13 @@ namespace OnlineStore.DeviceLibrary
public
bool
singleOut
=
false
;
public
string
ToStr
()
{
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"]"
+
$
",hSerial[{hSerial}]"
+
$
",isNg[{IsNG}],NgMsg[{NgMsg}]"
+
",urgentReel ["
+
urgentReel
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"]"
+
$
",hSerial[{hSerial}]"
+
$
",isNg[{IsNG}],NgMsg[{NgMsg}]"
+
",singleOut["
+
singleOut
+
"]"
;
}
public
string
ToStr1
()
{
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"]"
+
$
",hSerial[{hSerial}]"
+
$
",isNg[{IsNG}],NgMsg[{NgMsg}]"
+
",urgentReel ["
+
urgentReel
+
"],cutReel ["
+
cutReel
+
"],smallReel ["
+
smallReel
+
"],rfid ["
+
rfid
+
"],rfidLoc ["
+
rfidLoc
+
"],singleOut["
+
singleOut
+
"]"
;
}
public
bool
IsNG
{
get
;
set
;
}
=
false
;
public
string
NgMsg
{
get
;
set
;
}
=
""
;
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
b0174c0
...
...
@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary
isInProcess
=
false
;
}
}
public
bool
SendStoreState
(
string
posid
,
string
barcode
,
DeviceStatus
storeStatus
)
public
bool
SendStoreState
(
string
posid
,
string
barcode
,
DeviceStatus
storeStatus
)
{
if
(
Monitor
.
TryEnter
(
serverLoc
))
{
...
...
@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
Operation
resultOperation
=
HttpHelper
.
Post
(
SServerManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
!=
null
)
if
(
resultOperation
!=
null
)
{
if
(
operation
.
seq
==
resultOperation
.
seq
)
{
...
...
@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
if
(
WarnMsg
!=
""
)
{
lineOperation
.
status
=
(
int
)
DeviceStatus
.
Warning
;
lineOperation
.
msg
=
$
"W={WarnMsg}"
;
lineOperation
.
msg
=
$
"W={WarnMsg}"
;
}
lineOperation
.
status
=
(
int
)
DeviceStatus
.
StoreOnline
;
...
...
@@ -362,9 +362,11 @@ namespace OnlineStore.DeviceLibrary
//int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0);
string
hSerials
=
""
;
bool
singleOut
=
false
;
if
(
data
.
ContainsKey
(
ParamDefine
.
hSerial
))
hSerials
=
data
[
ParamDefine
.
hSerial
];
if
(
data
.
ContainsKey
(
ParamDefine
.
singleOut
))
bool
.
TryParse
(
data
[
ParamDefine
.
singleOut
],
out
singleOut
);
//urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//smallReel: true 小料(7x8),放置到小料架上
...
...
@@ -383,6 +385,7 @@ namespace OnlineStore.DeviceLibrary
InOutParam
inoutParam
=
new
InOutParam
(
new
InOutPosInfo
(
barcode
,
posId
,
plateW
,
plateH
,
urgentReel
));
inoutParam
.
PosInfo
.
hSerial
=
hSerials
;
inoutParam
.
PosInfo
.
singleOut
=
singleOut
;
//根据发送的posId获取位置列表
BoxPosition
position
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
...
...
@@ -405,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
//判断排队列表中是否已存在
List
<
InOutParam
>
reviceList
=
new
List
<
InOutParam
>();
reviceList
.
AddRange
(
waitAOutStoreList
);
// reviceList.AddRange(waitBOutStoreList);
// reviceList.AddRange(waitBOutStoreList);
reviceList
=
(
from
m
in
reviceList
where
m
.
PosInfo
.
PosId
.
Equals
(
posId
)
select
m
).
ToList
<
InOutParam
>();
if
(
reviceList
.
Count
>
0
)
{
...
...
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
查看文件 @
b0174c0
...
...
@@ -218,7 +218,7 @@ namespace OnlineStore.DeviceLibrary
sendData
[
7
]
=
0x00
;
sendData
=
buildCheckData
(
sendData
,
sendData
.
Length
-
2
);
string
str
=
AcSerialBean
.
byteToHexStr
(
sendData
);
LogUtil
.
debug
(
"温湿度控制器发送数据:"
+
str
);
//
LogUtil.debug("温湿度控制器发送数据:" + str);
byte
[]
reviceData
=
new
byte
[
9
];
bool
isOk
=
false
;
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
...
...
@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
sendData
[
7
]
=
0x00
;
sendData
=
buildCheckData
(
sendData
,
sendData
.
Length
-
2
);
string
str
=
AcSerialBean
.
byteToHexStr
(
sendData
);
LogUtil
.
debug
(
"温湿度控制器发送数据:"
+
str
);
//
LogUtil.debug("温湿度控制器发送数据:" + str);
byte
[]
reviceData
=
new
byte
[
9
];
bool
isOk
=
false
;
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
...
...
@@ -279,7 +279,7 @@ namespace OnlineStore.DeviceLibrary
sendData
[
7
]
=
0x00
;
sendData
=
buildCheckData
(
sendData
,
sendData
.
Length
-
2
);
string
str
=
AcSerialBean
.
byteToHexStr
(
sendData
);
LogUtil
.
debug
(
"温湿度控制器发送数据:"
+
str
);
//
LogUtil.debug("温湿度控制器发送数据:" + str);
byte
[]
reviceData
=
new
byte
[
9
];
bool
isOk
=
false
;
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
...
...
@@ -304,7 +304,7 @@ namespace OnlineStore.DeviceLibrary
sendData
[
7
]
=
0x00
;
sendData
=
buildCheckData
(
sendData
,
sendData
.
Length
-
2
);
string
str
=
AcSerialBean
.
byteToHexStr
(
sendData
);
LogUtil
.
debug
(
"温湿度控制器发送数据:"
+
str
);
//
LogUtil.debug("温湿度控制器发送数据:" + str);
byte
[]
reviceData
=
new
byte
[
15
];
bool
isOk
=
false
;
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
b0174c0
using
Asa
;
using
HuichuanLibrary
;
using
log4net.Util
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Concurrent
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Runtime.CompilerServices
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
@@ -582,23 +584,32 @@ namespace OnlineStore.DeviceLibrary
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
LogInfo
(
$
"{posType} 紧急物料{param.PosInfo.ToStr()},准备出库到紧急箱"
);
StartOutstore
(
param
);
return
true
;
return
StartOutstore
(
param
);
}
else
if
(
posInfo
.
IsNG
)
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到NG箱"
);
StartOutstore
(
param
);
return
true
;
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到NG箱"
);
return
StartOutstore
(
param
);
}
}
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
{
return
false
;
}
else
if
(
posInfo
.
IsNG
)
{
return
false
;
}
else
if
(
posInfo
.
singleOut
)
{
return
false
;
}
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
)
||
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
continue
;
LogUtil
.
debug
(
$
"{moveBean.Name} CheckStartOutPos 处理"
);
//
LogUtil.debug($"{moveBean.Name} CheckStartOutPos 处理");
var
curhSerial
=
moveBean
.
MoveInfo
.
MoveParam
?.
PosInfo
?.
hSerial
??
""
;
if
(!
string
.
IsNullOrEmpty
(
curhSerial
)
&&
curhSerial
!=
posInfo
.
hSerial
)
{
...
...
@@ -615,8 +626,10 @@ namespace OnlineStore.DeviceLibrary
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
param
.
ShelfType
=
moveBean
.
ShelfType
;
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}"
);
StartOutstore
(
param
);
if
(
StartOutstore
(
param
))
{
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}"
);
}
return
true
;
}
if
(
moveBean
.
MoveInfo
.
MoveType
==
MoveType
.
None
)
...
...
@@ -659,7 +672,18 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
}
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
{
return
false
;
}
else
if
(
posInfo
.
IsNG
)
{
return
false
;
}
else
if
(
posInfo
.
singleOut
)
{
return
false
;
}
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
// LogUtil.debug($"{moveBean.Name} CheckStartOutPos {moveBean.MoveInfo.MoveType}");
...
...
@@ -682,8 +706,10 @@ namespace OnlineStore.DeviceLibrary
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
param
.
ShelfType
=
moveBean
.
ShelfType
;
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}"
);
StartOutstore
(
param
);
if
(
StartOutstore
(
param
))
{
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}"
);
}
return
true
;
}
if
(
moveBean
.
MoveInfo
.
MoveType
==
MoveType
.
None
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论