Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 44af67fc
由
LN
编写于
2022-01-25 17:13:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
webSocket 消息推送逻辑修改。
1 个父辈
cbecc745
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
94 行增加
和
35 行删除
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/core/device/api/CodeValidateParam.java
src/main/java/com/neotel/smfcore/core/device/api/IOpAuthApi.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/SensorShelfHandler.java
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketServer.java
src/main/java/com/neotel/smfcore/hella/handler/HellaApiHandler.java
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
src/main/java/com/neotel/smfcore/hella/tcp/command/HellaReqCommand.java
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
44af67f
...
...
@@ -200,6 +200,9 @@ public class DataInitManager {
Menu
materialBox
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"materialBox"
,
"料盒操作"
,
1
,
"materialBox"
,
"neolight/materialBox/index"
,
""
,
0
,
"mIbox"
);
Menu
outSet
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"outSetting"
,
"出库策略"
,
1
,
"outSetting"
,
"system/outSetting/index"
,
""
,
0
,
"outSet"
);
// Menu orderSet = new Menu(new ArrayList<Menu>(), 1, "orderSetting", "工单设置", 1, "orderSetting", "system/orderSetting/index", "", 0, "sysSet");
Menu
inOrderMenu
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"inList"
,
"入库单"
,
1
,
"inList"
,
"system/inList/index"
,
""
,
0
,
"headIcon"
);
celueOut
.
setHidden
(
true
);
groupOut
.
setHidden
(
true
);
...
...
@@ -207,7 +210,7 @@ public class DataInitManager {
outSet
.
setHidden
(
true
);
posOut
.
setHidden
(
true
);
// orderSet.setHidden(true);
menus
.
addAll
(
createMenus
(
poutOut
,
menuOrder
,
out
,
posOut
,
groupOut
,
materialBox
,
outSet
));
menus
.
addAll
(
createMenus
(
poutOut
,
menuOrder
,
out
,
posOut
,
groupOut
,
materialBox
,
outSet
,
inOrderMenu
));
//MSD管理:MSD库存.MSD追溯性.MSD设置
Menu
msd
=
Menu
.
CreatePMenu
(
"MSD管理"
,
20
,
"msd"
,
2
,
"MSD"
);
...
...
src/main/java/com/neotel/smfcore/core/device/api/CodeValidateParam.java
0 → 100644
查看文件 @
44af67f
package
com
.
neotel
.
smfcore
.
core
.
device
.
api
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
public
class
CodeValidateParam
implements
Serializable
{
private
String
loginUser
;
private
String
groupId
;
private
String
storageId
;
private
String
code
;
private
String
token
;
}
src/main/java/com/neotel/smfcore/core/device/api/IOpAuthApi.java
查看文件 @
44af67f
...
...
@@ -11,11 +11,11 @@ public interface IOpAuthApi {
/**
* 传入原始条码,API解析条码,注意条码中带有尺寸信息,此方法会在canPutIn方法之前调用,通常料架使用(其他设备会有尺寸信息且会有多个条码所以不适用此方法)
* @param
code
* @param
param
* @return
* @throws ValidateException
*/
Barcode
resolveBarcode
(
String
loginUser
,
String
groupId
,
String
storageId
,
String
code
)
throws
ValidateException
;
Barcode
resolveBarcode
(
CodeValidateParam
param
)
throws
ValidateException
;
/**
* 是否可入库验证
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/SensorShelfHandler.java
查看文件 @
44af67f
...
...
@@ -14,6 +14,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import
com.neotel.smfcore.core.barcode.service.manager.IComponentManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.device.api.CodeValidateParam
;
import
com.neotel.smfcore.core.device.api.IOpAuthApi
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.enums.OP
;
...
...
@@ -31,6 +32,7 @@ import com.neotel.smfcore.core.system.websocket.SocketMsg;
import
com.neotel.smfcore.core.system.websocket.WebSocketServer
;
import
com.neotel.smfcore.hella.tcp.command.HellaReqCommand
;
import
com.neotel.smfcore.hella.tcp.command.HellaRespCommand
;
import
com.neotel.smfcore.security.TokenProvider
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.service.po.Group
;
import
io.swagger.annotations.Api
;
...
...
@@ -56,7 +58,8 @@ import java.util.*;
@RestController
@Slf4j
public
class
SensorShelfHandler
extends
BaseDeviceHandler
{
@Autowired
private
TokenProvider
tokenProvider
;
public
SensorShelfHandler
(
List
<
IOpAuthApi
>
apiList
)
{
super
(
apiList
);
}
...
...
@@ -67,11 +70,12 @@ public class SensorShelfHandler extends BaseDeviceHandler {
@ApiOperation
(
"扫码入库"
)
@PostMapping
(
"/api/sensorShelf/codeIn"
)
@PreAuthorize
(
"@el.check('sensorShelf:putIn')"
)
public
ResultBean
codeIn
(
@RequestBody
Map
<
String
,
String
>
mapValues
)
{
public
ResultBean
codeIn
(
@RequestBody
Map
<
String
,
String
>
mapValues
,
HttpServletRequest
request
)
{
String
code
=
mapValues
.
get
(
"code"
);
String
groupId
=
mapValues
.
get
(
"group"
);
String
storageId
=
mapValues
.
get
(
"storageId"
);
String
sourceId
=
mapValues
.
get
(
"sourceId"
);
String
token
=
tokenProvider
.
getToken
(
request
);
if
(
ObjectUtils
.
isEmpty
(
code
)){
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"code"
});
}
...
...
@@ -87,6 +91,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
if
(
groupId
!=
null
&&
groupId
.
equals
(
"-1"
)){
groupId
=
""
;
}
// WebSocketServer.sendMsg(token, new SocketMsg("这是一个webSocket消息:"+code, MsgType.INFO));
String
loginUser
=
SecurityUtils
.
getLoginUsername
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
ResultBean
resultBean
=
null
;
...
...
@@ -103,7 +108,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
}
}
Barcode
barcodeSave
=
resolveBarcodeFromApiForShelf
(
loginUser
,
groupId
,
storageId
,
code
);
Barcode
barcodeSave
=
resolveBarcodeFromApiForShelf
(
new
CodeValidateParam
(
loginUser
,
groupId
,
storageId
,
code
,
token
)
);
if
(
barcodeSave
==
null
){
barcodeSave
=
codeResolve
.
resolveOneValideBarcode
(
"=1x1="
+
code
);
}
...
...
@@ -119,13 +124,13 @@ public class SensorShelfHandler extends BaseDeviceHandler {
Barcode
verResult
=
verifyPutInFromApi
(
barcodeSave
);
if
(
verResult
==
null
){
return
testPutIn
(
loginUser
,
groupId
,
storageId
,
barcodeSave
);
return
testPutIn
(
loginUser
,
groupId
,
storageId
,
barcodeSave
,
token
);
}
// resultBean = hellaServiceHandler.checkMaterial(loginUser, groupId, code);
return
ResultBean
.
newOkResult
(
""
);
}
private
ResultBean
testPutIn
(
String
loginUser
,
String
groupId
,
String
storageId
,
Barcode
barcode
)
{
private
ResultBean
testPutIn
(
String
loginUser
,
String
groupId
,
String
storageId
,
Barcode
barcode
,
String
token
)
{
// CodeBean codeBean = codeResolve.resolveSingleCode(codeStr);
if
(
barcode
==
null
||
barcode
.
getBarcode
()
==
null
)
{
...
...
@@ -165,7 +170,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
try
{
taskService
.
addTaskToExecute
(
dataLog
);
}
catch
(
Exception
e
)
{
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
e
.
getMessage
(),
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
token
,
new
SocketMsg
(
e
.
getMessage
(),
MsgType
.
INFO
));
}
...
...
@@ -179,9 +184,9 @@ public class SensorShelfHandler extends BaseDeviceHandler {
/**
* 从API接口解析条码,通常料架使用(其他设备会有尺寸信息且会有多个条码所以不适用此方法)
*/
protected
Barcode
resolveBarcodeFromApiForShelf
(
String
loginUser
,
String
groupId
,
String
storageId
,
String
code
)
throws
ValidateException
{
protected
Barcode
resolveBarcodeFromApiForShelf
(
CodeValidateParam
param
)
throws
ValidateException
{
for
(
IOpAuthApi
opAuthApi
:
opAuthApiList
)
{
Barcode
responseBarcode
=
opAuthApi
.
resolveBarcode
(
loginUser
,
groupId
,
storageId
,
code
);
Barcode
responseBarcode
=
opAuthApi
.
resolveBarcode
(
param
);
if
(
responseBarcode
!=
null
){
return
responseBarcode
;
}
...
...
@@ -321,7 +326,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
if
(
hasReelPosList
.
length
>
1
){
String
msg
=
"不可同时放入多盘物料:"
+
String
.
join
(
","
,
hasReelPosList
);
log
.
error
(
msg
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
WebSocketServer
.
send
Msg
(
""
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
for
(
String
posStr
:
hasReelPosList
)
{
inNgList
.
add
(
posStr
);
}
...
...
@@ -330,7 +335,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
if
(
pos
==
null
){
String
msg
=
"未找到库位:"
+
String
.
join
(
","
,
hasReelPosList
)
;
log
.
error
(
msg
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
WebSocketServer
.
send
Msg
(
""
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
}
else
{
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
...
...
@@ -355,7 +360,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
inOkList
.
add
(
hasReelPosList
[
0
]);
String
msg
=
queueTask
.
getBarcode
()
+
"入库到"
+
pos
.
getPosName
()
+
"成功"
;
log
.
error
(
msg
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
msg
,
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
""
,
new
SocketMsg
(
msg
,
MsgType
.
INFO
));
break
;
}
catch
(
Exception
e
)
{
log
.
error
(
"入库出错"
,
e
);
...
...
@@ -385,7 +390,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
super
.
finishedOutPos
(
cid
,
posName
);
String
msg
=
queueTask
.
getBarcode
()+
"从"
+
posName
+
"出库成功"
;
log
.
error
(
msg
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
msg
,
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
""
,
new
SocketMsg
(
msg
,
MsgType
.
INFO
));
break
;
}
catch
(
Exception
e
)
{
log
.
error
(
"出库出错"
,
e
);
...
...
@@ -397,7 +402,7 @@ public class SensorShelfHandler extends BaseDeviceHandler {
outNgList
.
add
(
posName
);
String
msg
=
"未找到["
+
posName
+
"]的出库任务"
;
log
.
error
(
msg
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
WebSocketServer
.
send
Msg
(
""
,
new
SocketMsg
(
msg
,
MsgType
.
ERROR
));
}
else
{
outOkList
.
add
(
outResult
);
}
...
...
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketServer.java
查看文件 @
44af67f
...
...
@@ -15,6 +15,7 @@
*/
package
com
.
neotel
.
smfcore
.
core
.
system
.
websocket
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
...
...
@@ -56,13 +57,14 @@ public class WebSocketServer {
* */
@OnOpen
public
void
onOpen
(
Session
session
,
@PathParam
(
"sid"
)
String
sid
)
{
log
.
info
(
sid
+
"的webSocket已连接:"
+
session
.
getId
());
String
psid
=
sid
.
substring
(
0
,
20
);
log
.
info
(
"["
+
psid
+
"]的webSocket已连接:"
+
session
.
getId
());
this
.
session
=
session
;
this
.
sid
=
sid
;
//如果存在就先删除一个,防止重复推送消息
for
(
WebSocketServer
webSocket:
webSocketSet
)
{
if
(
webSocket
.
sid
.
equals
(
sid
))
{
log
.
info
(
"清理旧的["
+
sid
+
"]的连接:"
+
session
.
getId
());
log
.
info
(
"清理旧的["
+
p
sid
+
"]的连接:"
+
session
.
getId
());
webSocketSet
.
remove
(
webSocket
);
}
}
...
...
@@ -85,7 +87,8 @@ public class WebSocketServer {
*/
@OnClose
public
void
onClose
()
{
log
.
info
(
"清理["
+
this
.
sid
+
"]连接:"
+
session
.
getId
());
String
psid
=
sid
.
substring
(
0
,
20
);
log
.
info
(
"清理["
+
psid
+
"]连接:"
+
session
.
getId
());
webSocketSet
.
remove
(
this
);
}
...
...
@@ -94,7 +97,7 @@ public class WebSocketServer {
* @param message 客户端发送过来的消息*/
@OnMessage
public
void
onMessage
(
String
message
,
Session
session
)
{
log
.
info
(
"收到来
"
+
sid
+
"
的信息:"
+
message
);
log
.
info
(
"收到来
["
+
sid
+
"]
的信息:"
+
message
);
//群发消息
for
(
WebSocketServer
item
:
webSocketSet
)
{
try
{
...
...
@@ -117,33 +120,44 @@ public class WebSocketServer {
this
.
session
.
getBasicRemote
().
sendText
(
message
);
}
// /**
// * 发送分组消息
// */
// public static void sendGroupMsg(String groupId, SocketMsg socketMsg) {
// String sid = "group-"+groupId;
// sendInfo(socketMsg,sid);
// }
/**
* 发送分组消息
*/
public
static
void
send
GroupMsg
(
String
groupId
,
SocketMsg
socketMsg
)
{
String
sid
=
"group-"
+
groupId
;
public
static
void
send
Msg
(
String
token
,
SocketMsg
socketMsg
)
{
String
sid
=
"Bearer "
+
token
;
sendInfo
(
socketMsg
,
sid
);
}
/**
* 群发自定义消息
* */
public
static
void
sendInfo
(
SocketMsg
socketMsg
,
@PathParam
(
"sid"
)
String
sid
){
String
message
=
JSONObject
.
toJSONString
(
socketMsg
);
log
.
info
(
"推送消息到"
+
sid
+
",推送内容:"
+
message
);
String
pSid
=
sid
.
substring
(
0
,
20
);
boolean
sendOk
=
false
;
for
(
WebSocketServer
item
:
webSocketSet
)
{
try
{
//这里可以设定只推送给这个sid的,为null则全部推送
if
(
sid
==
null
)
{
if
(
ObjectUtil
.
isEmpty
(
sid
)
)
{
item
.
sendMessage
(
message
);
sendOk
=
true
;
}
else
if
(
item
.
sid
.
equals
(
sid
)){
item
.
sendMessage
(
message
);
sendOk
=
true
;
}
}
catch
(
IOException
ignored
)
{
log
.
error
(
"发送消息到
"
+
sid
+
"
出错"
,
ignored
);
log
.
error
(
"发送消息到
["
+
pSid
+
"]
出错"
,
ignored
);
}
}
log
.
info
(
"推送消息到["
+
pSid
+
"],推送内容:"
+
message
+
",结果:"
+
sendOk
);
}
@Override
...
...
src/main/java/com/neotel/smfcore/hella/handler/HellaApiHandler.java
查看文件 @
44af67f
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.device.api.CodeValidateParam
;
import
com.neotel.smfcore.core.device.api.IOpAuthApi
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.hella.tcp.HellaTcpClient
;
...
...
@@ -20,14 +21,14 @@ public class HellaApiHandler implements IOpAuthApi {
@Autowired
private
HellaServiceHandler
hellaServiceHandler
;
@Override
public
Barcode
resolveBarcode
(
String
loginUser
,
String
groupId
,
String
storageId
,
String
code
)
throws
ValidateException
{
public
Barcode
resolveBarcode
(
CodeValidateParam
param
)
throws
ValidateException
{
if
(!
isEnable
())
{
return
null
;
}
hellaServiceHandler
.
checkMaterial
(
loginUser
,
groupId
,
storageId
,
code
);
hellaServiceHandler
.
checkMaterial
(
param
);
Barcode
barcode
=
new
Barcode
();
barcode
.
setFullCode
(
code
);
barcode
.
setFullCode
(
param
.
getCode
()
);
return
barcode
;
}
...
...
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
查看文件 @
44af67f
...
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.api.CodeValidateParam
;
import
com.neotel.smfcore.core.device.enums.OP
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.util.DataCache
;
...
...
@@ -93,9 +94,15 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
* <STX>checkMaterial;eventId;scannedCode<CR><LF>
* @return
*/
public
ResultBean
checkMaterial
(
String
loginUser
,
String
groupId
,
String
storageId
,
String
scannedCode
){
public
ResultBean
checkMaterial
(
CodeValidateParam
param
){
String
loginUser
=
param
.
getLoginUser
();
String
groupId
=
param
.
getGroupId
();
String
storageId
=
param
.
getStorageId
();
String
scannedCode
=
param
.
getCode
();
String
token
=
param
.
getToken
();
HellaReqCommand
command
=
HellaReqCommand
.
newCheckMaterialCmd
(
eventId
.
incrementAndGet
(),
scannedCode
);
command
.
setToken
(
token
);
command
.
setGroupId
(
groupId
);
boolean
storageCheckMaterial
=
false
;
if
(
ObjectUtil
.
isNotEmpty
(
storageId
)){
...
...
@@ -185,10 +192,10 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
if
(
respCommand
.
isOkResp
()){
ResultBean
okResult
=
ResultBean
.
newOkResult
(
"smfcore.loadMaterialFinished"
,
"loading material is finished: {0}"
,
new
String
[]{
messageText
},
""
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
okResult
.
getMsg
(),
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
requestCommand
.
getToken
()
,
new
SocketMsg
(
okResult
.
getMsg
(),
MsgType
.
INFO
));
}
else
{
ResultBean
ngResult
=
ResultBean
.
newErrorResult
(
Integer
.
valueOf
(
returnCode
),
"smfcore.loadMaterialFailed"
,
"loading material failed:{0}"
,
new
String
[]{
messageText
}
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
ngResult
.
getMsg
(),
MsgType
.
ERROR
));
WebSocketServer
.
send
Msg
(
requestCommand
.
getToken
()
,
new
SocketMsg
(
ngResult
.
getMsg
(),
MsgType
.
ERROR
));
}
commandMap
.
remove
(
respCommand
.
getEventId
());
}
else
if
(
respCommand
.
isUnloadMaterialCmd
()){
...
...
@@ -322,6 +329,7 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
String
storageId
=
requestCommand
.
getStorageId
();
String
loginUser
=
requestCommand
.
getLoginUser
();
String
fullCode
=
requestCommand
.
getData
().
toString
();
String
token
=
requestCommand
.
getToken
().
toString
();
if
(
respCommand
.
isOkResp
()){
//<STX>loadMaterialResp;eventId;returnCode;messageText;partNumber;containerNumber;remainQuantity;MSL;lightClass<CR><LF>
//可以入库,生成一个任务,通知到页面,并将其存下来
...
...
@@ -382,15 +390,15 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
try
{
taskService
.
addTaskToExecute
(
dataLog
);
ResultBean
okResult
=
ResultBean
.
newOkResult
(
"checking material is ok: "
+
messageText
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
okResult
.
getMsg
(),
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
token
,
new
SocketMsg
(
okResult
.
getMsg
(),
MsgType
.
INFO
));
}
catch
(
Exception
e
){
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
e
.
getMessage
(),
MsgType
.
INFO
));
WebSocketServer
.
send
Msg
(
token
,
new
SocketMsg
(
e
.
getMessage
(),
MsgType
.
INFO
));
}
}
else
{
//NG,需要在界面上进行提示
ResultBean
ngResult
=
ResultBean
.
newErrorResult
(
Integer
.
valueOf
(
returnCode
),
"smfcore.checkNg"
,
"checking material is ng:{0}"
,
new
String
[]{
messageText
}
);
WebSocketServer
.
send
GroupMsg
(
groupId
,
new
SocketMsg
(
ngResult
.
getMsg
(),
MsgType
.
ERROR
));
WebSocketServer
.
send
Msg
(
token
,
new
SocketMsg
(
ngResult
.
getMsg
(),
MsgType
.
ERROR
));
}
commandMap
.
remove
(
respCommand
.
getEventId
());
}
...
...
src/main/java/com/neotel/smfcore/hella/tcp/command/HellaReqCommand.java
查看文件 @
44af67f
...
...
@@ -18,6 +18,10 @@ public class HellaReqCommand extends HellaCommand {
* 料仓ID
*/
private
String
storageId
;
/**
* token
*/
private
String
token
=
""
;
/**
* 检查物料条码
...
...
@@ -77,4 +81,12 @@ public class HellaReqCommand extends HellaCommand {
public
void
setStorageId
(
String
storageId
)
{
this
.
storageId
=
storageId
;
}
public
String
getToken
()
{
return
token
;
}
public
void
setToken
(
String
token
)
{
this
.
token
=
token
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论