Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ae723b5b
由
张东亮
编写于
2023-01-09 15:31:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化
1 个父辈
66be7140
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
14 行删除
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
ae723b5
...
@@ -629,7 +629,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -629,7 +629,7 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cid
s
"
,
StoreManager
.
Config
.
CID
);
paramMap
.
Add
(
"cid"
,
StoreManager
.
Config
.
CID
);
paramMap
.
Add
(
"hSerial"
,
hSerial
);
paramMap
.
Add
(
"hSerial"
,
hSerial
);
string
server
=
GetAddr
(
"/service/store/outTaskCount"
,
paramMap
);
string
server
=
GetAddr
(
"/service/store/outTaskCount"
,
paramMap
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
ae723b5
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
SendLineStatus
();
SendLineStatus
();
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_A
.
doorInfo
);
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_A
.
doorInfo
);
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_B
.
doorInfo
);
HttpHelper
.
Post
<
DoorInfo
>(
HttpHelper
.
GetPostApi
(
"/api/xlc/updateDoorInfo"
),
StoreManager
.
XLRStore
.
inputEquip
.
BatchMove_B
.
doorInfo
);
}
}
}
}
}
}
...
@@ -76,8 +76,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -76,8 +76,12 @@ namespace OnlineStore.DeviceLibrary
public
void
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
public
void
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
{
{
Operation
operation
=
getLineBoxStatus
();
Operation
operation
=
getLineBoxStatus
();
if
(!
string
.
IsNullOrEmpty
(
posid
))
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
!
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
)
)
operation
.
boxStatus
[
1
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
operation
.
boxStatus
[
1
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
else
if
(!
string
.
IsNullOrEmpty
(
posid
)
&&
operation
.
boxStatus
[
1
].
data
.
ContainsKey
(
ParamDefine
.
posId
))
{
operation
.
boxStatus
[
1
].
data
[
ParamDefine
.
posId
]
=
posid
;
}
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
...
@@ -127,26 +131,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -127,26 +131,26 @@ namespace OnlineStore.DeviceLibrary
else
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
else
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
{
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
}
}
else
if
(!
lastPosId
.
Equals
(
""
))
else
if
(!
lastPosId
.
Equals
(
""
))
{
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
boxStatus
.
status
=
(
int
)
deviceStatus
;
boxStatus
.
status
=
(
int
)
deviceStatus
;
if
(
lastPosId
!=
""
)
if
(
lastPosId
!=
""
)
{
{
LogUtil
.
info
(
"给服务器发送出入库消息:"
+
Name
+
",status【"
+
deviceStatus
+
"】posId【"
+
lastPosId
+
"】barcode【"
+
lastBarcode
+
"】"
);
LogUtil
.
info
(
"给服务器发送出入库消息:"
+
Name
+
",status【"
+
deviceStatus
+
"】posId【"
+
lastPosId
+
"】barcode【"
+
lastBarcode
+
"】"
);
}
}
lastPosId
=
""
;
lastPosId
=
""
;
lastBarcode
=
""
;
lastBarcode
=
""
;
}
}
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
||
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
||
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
{
{
if
((
MoveInfo
.
MoveParam
!=
null
)
&&(
MoveInfo
.
MoveParam
.
PosInfo
!=
null
))
if
((
MoveInfo
.
MoveParam
!=
null
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
!=
null
))
{
{
if
(!
boxStatus
.
data
.
ContainsKey
(
ParamDefine
.
posId
))
if
(!
boxStatus
.
data
.
ContainsKey
(
ParamDefine
.
posId
))
{
{
...
@@ -186,14 +190,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -186,14 +190,14 @@ namespace OnlineStore.DeviceLibrary
vals
.
Add
(
"humidity"
,
humitureParams
[
i
].
Humidity
.
ToString
());
vals
.
Add
(
"humidity"
,
humitureParams
[
i
].
Humidity
.
ToString
());
vals
.
Add
(
"temperature"
,
humitureParams
[
i
].
Temperate
.
ToString
());
vals
.
Add
(
"temperature"
,
humitureParams
[
i
].
Temperate
.
ToString
());
valuePairs
.
Add
(
vals
);
valuePairs
.
Add
(
vals
);
}
}
boxStatus
.
data
.
Add
(
ParamDefine
.
humiAndtempList
,
JsonHelper
.
SerializeObject
(
valuePairs
));
boxStatus
.
data
.
Add
(
ParamDefine
.
humiAndtempList
,
JsonHelper
.
SerializeObject
(
valuePairs
));
//LogUtil.info($"上报温湿度数据【{JsonHelper.SerializeObject(valuePairs)}】【{JsonHelper.SerializeObject(boxStatus.data)}】");
//LogUtil.info($"上报温湿度数据【{JsonHelper.SerializeObject(valuePairs)}】【{JsonHelper.SerializeObject(boxStatus.data)}】");
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"上报温湿度数据异常"
,
ex
);
LogUtil
.
error
(
"上报温湿度数据异常"
,
ex
);
}
}
return
lineOperation
;
return
lineOperation
;
}
}
...
@@ -278,7 +282,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -278,7 +282,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
resultOperation
.
op
.
Equals
(
1
))
else
if
(
resultOperation
.
op
.
Equals
(
1
))
{
{
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
return
true
;
return
true
;
}
}
else
else
...
@@ -360,8 +364,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -360,8 +364,8 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
//判断是否接收过此库位的出库信息
//判断是否接收过此库位的出库信息
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
posId
)
||
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
posId
)
||
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfoBack
.
PosId
.
Equals
(
posId
))))
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfoBack
.
PosId
.
Equals
(
posId
))))
{
{
LogUtil
.
error
(
Name
+
" 出库命令【"
+
inoutParam
.
PosInfo
.
ToStr
()
+
"】重复,正在【"
+
posId
+
"】出库中"
);
LogUtil
.
error
(
Name
+
" 出库命令【"
+
inoutParam
.
PosInfo
.
ToStr
()
+
"】重复,正在【"
+
posId
+
"】出库中"
);
continue
;
continue
;
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
ae723b5
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论