Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSquareStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e9591eda
由
LN
编写于
2024-07-17 16:47:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
极创接口对接
1 个父辈
9f488557
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
472 行增加
和
33 行删除
source/Common/bean/Bean.cs
source/Common/util/HttpHelper.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
source/DeviceLibrary/manager/HttpServer.cs
source/DeviceLibrary/manager/ServerCommunication.cs
source/DeviceLibrary/store/StoreStep.cs
source/Common/bean/Bean.cs
查看文件 @
e9591ed
...
...
@@ -233,5 +233,7 @@ namespace OnlineStore.Common
public
static
string
door2
=
"door2"
;
public
static
string
openDoor
=
"openDoor"
;
public
static
string
closeDoor
=
"closeDoor"
;
public
static
string
boxCanPutIn
=
"boxCanPutIn"
;
}
}
source/Common/util/HttpHelper.cs
查看文件 @
e9591ed
...
...
@@ -12,17 +12,15 @@ using System.Security.Cryptography;
using
System.Security.Cryptography.X509Certificates
;
using
System.Reflection
;
using
log4net
;
using
System.Collections.Specialized
;
using
System.Net.NetworkInformation
;
namespace
OnlineStore.Common
{
public
class
HttpHelper
{
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
string
Post
(
string
url
,
string
paramData
)
{
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
);
}
private
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
/// <summary>
///
/// </summary>
...
...
@@ -65,18 +63,25 @@ namespace OnlineStore.Common
{
try
{
return
JsonHelper
.
DeserializeJsonToObject
<
Operation
>(
result
);
Operation
operation1
=
JsonHelper
.
DeserializeJsonToObject
<
Operation
>(
result
);
if
(
isLog
==
1
)
{
LOGGER
.
Info
(
"Post【"
+
url
+
"】【"
+
json
+
"】收到【"
+
result
+
"】"
);
}
catch
(
Exception
ex
)
else
if
(
operation1
!=
null
&&
operation1
.
op
>
0
)
{
LOGGER
.
Error
(
"JsonHelper.DeserializeJsonToObject 出错【result="
+
result
+
"】"
+
ex
);
LOGGER
.
Info
(
"Post【"
+
url
+
"】【"
+
json
+
"】收到【"
+
result
+
"】"
);
}
return
operation1
;
}
if
(
isLog
==
1
)
catch
(
Exception
ex
)
{
LOGGER
.
Info
(
"Post【"
+
url
+
"】【"
+
json
+
"】收到【"
+
result
+
"】"
);
LOGGER
.
Error
(
"JsonHelper.DeserializeJsonToObject 出错【result="
+
result
+
"】"
+
ex
);
}
}
}
}
catch
(
Exception
ex
)
{
...
...
@@ -84,17 +89,64 @@ namespace OnlineStore.Common
}
return
null
;
}
private
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
public
static
bool
PingURLIP
(
string
url
,
int
ms
=
100
)
{
string
[]
urlArray
=
url
.
Split
(
'/'
);
if
(
urlArray
.
Length
>
3
)
{
string
ip
=
urlArray
[
2
];
Ping
pingSender
=
new
Ping
();
PingReply
reply
=
pingSender
.
Send
(
ip
,
ms
);
//第一个参数为ip地址,第二个参数为ping的时间
if
(
reply
.
Status
==
IPStatus
.
Success
)
{
//通
return
true
;
}
else
{
LogUtil
.
error
(
LOGGER
,
"Ping IP "
+
ip
+
" : false"
);
//不通
return
false
;
}
}
return
true
;
}
public
static
string
Post
(
string
url
,
NameValueCollection
paramData
,
int
timeOut
=
10000
)
{
string
result
=
""
;
if
(
url
.
ToLower
().
IndexOf
(
"https"
,
System
.
StringComparison
.
Ordinal
)
>
-
1
)
{
ServicePointManager
.
ServerCertificateValidationCallback
=
new
RemoteCertificateValidationCallback
((
sender
,
certificate
,
chain
,
errors
)
=>
{
return
true
;
});
}
try
{
//if (isLog == 1)
//{
// LOGGER.Info("给服务器发送数据【" + paramData + "】 ");
//}
if
(
paramData
!=
"null"
&&
paramData
!=
null
)
using
(
var
wc
=
new
MyWebClient
(
timeOut
))
{
// LogUtil.debug(LOGGER, "HTTP POST to " + url + " \n\t >> " + paramData);
byte
[]
buf
=
wc
.
UploadValues
(
url
,
"POST"
,
paramData
);
result
=
Encoding
.
UTF8
.
GetString
(
buf
);
}
//LogUtil.info(result);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
LOGGER
,
"POST ERROR:"
+
e
.
ToString
()
+
"\r\n"
+
url
,
101
);
}
return
result
;
}
public
static
string
Post
(
string
url
,
string
paramData
,
int
timeOut
=
10000
)
{
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
,
timeOut
);
}
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
,
int
timeOut
=
10000
)
{
string
result
=
""
;
if
(
url
.
ToLower
().
IndexOf
(
"https"
,
System
.
StringComparison
.
Ordinal
)
>
-
1
)
...
...
@@ -105,53 +157,108 @@ namespace OnlineStore.Common
try
{
var
wc
=
new
MyWebClient
(
5000
);
using
(
var
wc
=
new
MyWebClient
(
timeOut
))
{
if
(
string
.
IsNullOrEmpty
(
wc
.
Headers
[
"Content-Type"
]))
{
wc
.
Headers
.
Add
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
}
wc
.
Headers
.
Add
(
"User-Agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
wc
.
Encoding
=
encoding
;
result
=
wc
.
UploadString
(
url
,
"POST"
,
paramData
);
}
//LogUtil.info(result);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
LOGGER
,
"POST ERROR:"
+
e
.
StackTrace
,
1
);
LogUtil
.
error
(
LOGGER
,
"POST ERROR:"
+
e
.
ToString
()
+
"\r\n"
+
url
,
101
);
}
return
result
;
}
if
(!
result
.
Contains
(
"null"
)
&&
result
.
Length
!=
0
)
static
object
lockpost
=
new
object
();
public
static
Operation
Post
(
string
url
,
Operation
operation
,
int
timeout
=
5000
,
bool
printlog
=
false
)
{
//LogUtil.debug(LOGGER,"receive << " + result);
try
{
string
json
=
JsonHelper
.
SerializeObject
(
operation
);
string
result
=
Post
(
url
,
json
,
timeout
);
Operation
op
=
JsonHelper
.
DeserializeJsonToObject
<
Operation
>(
result
);
if
(
printlog
)
{
LogUtil
.
info
(
"Send ["
+
json
+
"] Revice ["
+
result
+
"]"
);
}
if
(
isLog
==
1
)
return
op
;
}
catch
(
Exception
ex
)
{
L
OGGER
.
Info
(
"Post【"
+
url
+
"】【"
+
paramData
+
"】收到【"
+
result
+
"】"
);
L
ogUtil
.
error
(
LOGGER
,
"Post 出错【operation.op="
+
operation
.
op
+
"】:"
+
ex
);
}
return
result
;
return
null
;
}
public
static
string
Get
(
string
url
)
{
return
Get
(
url
,
Encoding
.
UTF8
);
}
public
static
string
Get
(
string
url
,
Encoding
encoding
)
public
static
string
Get
(
string
url
,
Encoding
encoding
,
int
timeOut
=
10000
)
{
try
{
LogUtil
.
info
(
LOGGER
,
"HTTP GET FROM: "
+
url
);
var
wc
=
new
WebClient
{
Encoding
=
encoding
};
LogUtil
.
debug
(
"HTTP GET FROM: "
+
url
);
using
(
var
wc
=
new
MyWebClient
{
Encoding
=
encoding
})
{
var
readStream
=
wc
.
OpenRead
(
url
);
using
(
var
sr
=
new
StreamReader
(
readStream
,
encoding
))
{
var
result
=
sr
.
ReadToEnd
();
LogUtil
.
info
(
LOGGER
,
"receive << "
+
result
);
LogUtil
.
debug
(
"receive << "
+
result
);
return
result
;
}
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
LOGGER
,
"HTTP GET ERROR:"
+
e
.
Message
,
2
);
LogUtil
.
error
(
LOGGER
,
"HTTP GET ERROR:"
+
e
.
Message
,
10
2
);
}
return
""
;
}
public
static
string
PostJson
(
string
url
,
Dictionary
<
string
,
string
>
paramDataMap
,
Encoding
encoding
,
int
timeOut
=
10000
)
{
string
result
=
""
;
if
(
url
.
ToLower
().
IndexOf
(
"https"
,
System
.
StringComparison
.
Ordinal
)
>
-
1
)
{
ServicePointManager
.
ServerCertificateValidationCallback
=
new
RemoteCertificateValidationCallback
((
sender
,
certificate
,
chain
,
errors
)
=>
{
return
true
;
});
}
try
{
string
paramData
=
JsonHelper
.
SerializeObject
(
paramDataMap
);
using
(
var
wc
=
new
MyWebClient
(
timeOut
))
{
if
(
string
.
IsNullOrEmpty
(
wc
.
Headers
[
"Content-Type"
]))
{
wc
.
Headers
.
Add
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
}
wc
.
Headers
.
Add
(
"User-Agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
wc
.
Encoding
=
encoding
;
result
=
wc
.
UploadString
(
url
,
"POST"
,
paramData
);
}
//LogUtil.info(result);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
LOGGER
,
"POST ERROR:"
+
e
.
ToString
()
+
"\r\n"
+
url
,
101
);
}
return
result
;
}
}
}
\ No newline at end of file
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
e9591ed
...
...
@@ -51,6 +51,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
...
...
@@ -69,6 +70,7 @@
<Compile Include="IO\IOManager.cs" />
<Compile Include="IO\KangNaiDe\KNDManager.cs" />
<Compile Include="IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="manager\HttpServer.cs" />
<Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
...
...
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
查看文件 @
e9591ed
...
...
@@ -1616,13 +1616,40 @@ namespace OnlineStore.DeviceLibrary
}
lineOperation
.
boxStatus
.
Add
(
1
,
boxStatus
);
//1 定时通信data里面添加boxCanPutIn字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
if
(!
alarmType
.
Equals
(
StoreAlarmType
.
None
))
{
lineOperation
.
alarmList
.
Add
(
alarmInfo
);
}
//1 定时通信data里面添加 boxCanPutIn 字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
string
canput
=
BoxCanPutIn
()
?
"TRUE"
:
"FALSE"
;
lineOperation
.
data
.
Add
(
"boxCanPutIn"
,
canput
);
return
lineOperation
;
}
private
bool
BoxCanPutIn
()
{
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
)
{
return
false
;
}
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
RightShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
return
true
;
}
public
void
SendLineStatus
()
{
DateTime
time
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
查看文件 @
e9591ed
using
OnlineStore.Common
;
using
DeviceLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Concurrent
;
...
...
@@ -434,6 +435,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_09_MiddleToP3
);
InStoreLog
(
"入库: 移动到安全点,前后轴至安全点, ["
+
moveP
.
MiddleAxis_Safe_Position
+
"]"
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
MiddleAxis_Safe_Position
,
Config
.
MiddleAxis_P1_Speed
);
InStoreLog
(
"堆垛机取货完成, 通知极创"
);
HttpServer
.
ddjPickUpGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_09_MiddleToP3
)
...
...
@@ -495,6 +499,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
MiddleAxis_Safe_Position
,
Config
.
MiddleAxis_P1_Speed
);
ShelfForward
(
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
InStoreLog
(
"料箱放入库位完成, 通知极创"
);
HttpServer
.
inStorageFeedback
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_15_UpdownBack
)
...
...
@@ -753,10 +761,43 @@ namespace OnlineStore.DeviceLibrary
}
if
(
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
>
0
)
{
//StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2);
//OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
if
(
msg
==
""
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_12_InoutToP2
);
OutStoreLog
(
"出库: 叉子进出料口,进出轴至P2(进料口取料点) ["
+
moveP
.
InOut_P2
+
"] "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
}
else
{
WarnMsg
=
"查询接驳线体放料结果:"
+
msg
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_12_WaitCanPut
);
OutStoreLog
(
$
"出库: 出库时查询接驳线体是否可以放料箱 失败{msg}:等待2秒重新查询 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_12_WaitCanPut
)
{
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
if
(
msg
==
""
)
{
if
(
WarnMsg
.
Contains
(
"查询接驳线体放料结果"
))
{
WarnMsg
=
""
;
}
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_12_InoutToP2
);
OutStoreLog
(
"出库: 叉子进出料口,进出轴至P2(进料口取料点) ["
+
moveP
.
InOut_P2
+
"] "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_12_WaitCanPut
);
OutStoreLog
(
$
"出库: 出库时查询接驳线体是否可以放料箱 失败{msg}:等待2秒重新查询 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_12_InoutToP2
)
{
...
...
@@ -794,6 +835,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
OpenDoor
(
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
ShelfForward
(
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
,
StoreMove
);
InStoreLog
(
"堆垛机放货完成反馈, 通知极创"
);
HttpServer
.
ddjReleaseTheGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_16_GoBack
)
{
...
...
source/DeviceLibrary/manager/HttpServer.cs
0 → 100644
查看文件 @
e9591ed
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Security.Cryptography
;
using
System.Text
;
namespace
DeviceLibrary
{
public
class
HttpServer
{
public
HttpServer
()
{
}
private
static
string
Addr_ddjPickUpGoodsNotice
=
"/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice"
;
//堆垛机取货完成, 通知极创
private
static
string
Addr_inStorageFeedback
=
"/rest/api/v2/803/service/store/xl/inStorageFeedback"
;
//料箱放入库位完成, 通知极创
private
static
string
Addr_outIsReady
=
"/rest/api/v2/803/service/store/xl/outIsReady"
;
//出库时查询接驳线体是否可以放料箱
private
static
string
Addr_ddjReleaseTheGoodsNotice
=
"/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice"
;
//堆垛机放货完成反馈
// ## 入库:
//1 定时通信data里面添加boxCanPutIn字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
//请求参数:
//{
//"cid": "001",
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//5 堆垛机放货完成反馈
//http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
//请求参数:
//{
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
private
static
string
GetAddr
(
string
addr
,
Dictionary
<
string
,
string
>
paramsMap
=
null
)
{
if
(
paramsMap
==
null
)
{
paramsMap
=
new
Dictionary
<
string
,
string
>();
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
//server = "http://192.168.1.37:8800/";
if
(
server
.
EndsWith
(
"/"
))
{
server
=
server
.
Substring
(
0
,
server
.
Length
-
1
);
}
string
path
=
server
+
addr
.
Trim
()
+
"?"
;
foreach
(
string
paramName
in
paramsMap
.
Keys
)
{
string
par
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
paramsMap
[
paramName
],
System
.
Text
.
Encoding
.
UTF8
);
path
+=
paramName
+
"="
+
par
+
"&"
;
}
path
=
path
.
Substring
(
0
,
path
.
Length
-
1
);
return
path
;
}
private
static
string
getData
(
Dictionary
<
string
,
Object
>
data
,
string
key
)
{
if
(
data
.
ContainsKey
(
key
))
{
return
data
[
key
].
ToString
().
Trim
();
}
return
""
;
}
private
static
int
getIntData
(
Dictionary
<
string
,
Object
>
data
,
string
key
,
int
defValue
=
-
1
)
{
try
{
return
Int32
.
Parse
(
getData
(
data
,
key
));
}
catch
(
Exception
ex
)
{
}
return
-
1
;
}
private
static
string
PostJson
(
Dictionary
<
string
,
string
>
paramMap
,
string
addr
,
string
logName
,
bool
needLog
=
true
)
{
DateTime
startTime
=
DateTime
.
Now
;
try
{
string
url
=
GetAddr
(
addr
);
string
json
=
HttpHelper
.
PostJson
(
url
,
paramMap
,
Encoding
.
UTF8
,
2000
);
if
(
needLog
)
{
LogUtil
.
info
(
"http :URL:"
+
url
+
" :Response:"
+
json
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
}
else
{
LogUtil
.
debug
(
"http :URL:"
+
url
+
" :Response:"
+
json
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
}
ResultData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ResultData
>(
json
);
if
(
data
==
null
)
{
return
"未收到服务器反馈"
;
}
else
if
(
data
.
code
==
0
)
{
return
""
;
}
else
{
LogUtil
.
error
(
logName
+
": 结果:code="
+
data
.
code
+
",msg="
+
data
.
msg
);
return
data
.
msg
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
logName
+
" error : "
+
ex
.
ToString
());
return
ex
.
ToString
();
}
}
/// <summary>
/// 堆垛机取货完成, 通知极创
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public
static
string
ddjPickUpGoodsNotice
(
string
posName
)
{
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"posName"
,
posName
);
return
PostJson
(
paramMap
,
Addr_ddjPickUpGoodsNotice
,
"ddjPickUpGoodsNotice"
,
true
);
}
/// <summary>
/// 料箱放入库位完成, 通知极创
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public
static
string
inStorageFeedback
(
string
posName
)
{
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"posName"
,
posName
);
return
PostJson
(
paramMap
,
Addr_inStorageFeedback
,
"inStorageFeedback"
,
true
);
}
/// <summary>
/// 出库时查询接驳线体是否可以放料箱
/// </summary>
/// <param name="cid"></param>
/// <param name="boxCode"></param>
/// <returns></returns>
public
static
string
outIsReady
(
string
cid
,
string
boxCode
)
{
//4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
//请求参数:
//{
//"cid": "001",
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cid"
,
cid
);
paramMap
.
Add
(
"boxCode"
,
boxCode
);
return
PostJson
(
paramMap
,
Addr_outIsReady
,
"outIsReady"
,
true
);
}
/// <summary>
/// 堆垛机放货完成反馈
/// </summary>
/// <param name="boxCode"></param>
/// <returns></returns>
public
static
string
ddjReleaseTheGoodsNotice
(
string
boxCode
)
{
//5 堆垛机放货完成反馈
//http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
//请求参数:
//{
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"boxCode"
,
boxCode
);
return
PostJson
(
paramMap
,
Addr_ddjReleaseTheGoodsNotice
,
"ddjReleaseTheGoodsNotice"
,
true
);
}
}
public
class
ResultData
{
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
object
data
{
get
;
set
;
}
}
}
source/DeviceLibrary/manager/ServerCommunication.cs
0 → 100644
查看文件 @
e9591ed
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
e9591ed
...
...
@@ -225,6 +225,12 @@ namespace OnlineStore.DeviceLibrary
SO_12_WaitNoTray
=
112
,
/// <summary>
/// 等待可以放到出料口
/// </summary>
SO_12_WaitCanPut
=
113
,
/// <summary>
/// 出库:叉子进出料口,,轴3( 叉子) 至P2( 进料口取料点)
/// /// </summary>
SO_12_InoutToP2
,
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论