Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a0d9ce8
由
zshaohui
编写于
2023-03-09 16:52:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
查询库位是否有料或物料是否在库位中
1 个父辈
a6d2d05d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
39 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
6a0d9ce
...
...
@@ -530,6 +530,45 @@ public class DeviceController {
return
ResultBean
.
newOkResult
(
cid
);
}
@ApiOperation
(
"查询库位是否有料或物料是否在库位中"
)
@RequestMapping
(
value
=
"/service/store/posQuery"
)
@ResponseBody
@AnonymousAccess
public
ResultBean
queryPos
(
HttpServletRequest
request
)
{
String
posName
=
request
.
getParameter
(
"posName"
);
String
barcode
=
request
.
getParameter
(
"barcode"
);
//参数:发送posName 或 barcode
//返回code=0,有料或在库位中,data中返回 posName,barcode,plateW,plateH
//返回code=101: 未找到库位号
//返回code=102:条码未找到库位
//返回code=100:库位中无料
StoragePos
pos
=
null
;
if
(
ObjectUtil
.
isNotEmpty
(
posName
))
{
//查询库位中是否有料
pos
=
storagePosManager
.
getByPosName
(
posName
);
if
(
pos
==
null
)
{
return
ResultBean
.
newErrorResult
(
101
,
"smfcore.queryPos.cannotFind"
,
"cannot find posName ["
+
posName
+
"]"
,
new
String
[]{
posName
});
}
else
if
(
pos
.
getBarcode
()
==
null
)
{
return
ResultBean
.
newErrorResult
(
100
,
"smfcore.queryPos.posIsEmpty"
,
"["
+
posName
+
"] is empty"
,
new
String
[]{
posName
});
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
barcode
))
{
pos
=
storagePosManager
.
getByBarcode
(
barcode
);
if
(
pos
==
null
)
{
return
ResultBean
.
newErrorResult
(
102
,
"smfcore.queryPos.cannotFindBarcode"
,
"cannot find barcode ["
+
barcode
+
"] In storage"
,
new
String
[]{
barcode
});
}
}
else
{
return
ResultBean
.
newErrorResult
(
101
,
"smfcore.queryPos.cannotFind"
,
"cannot find posName ["
+
posName
+
"]"
,
new
String
[]{
posName
});
}
Map
<
String
,
String
>
data
=
new
HashMap
<>();
data
.
put
(
"posName"
,
pos
.
getPosName
());
data
.
put
(
"barcode"
,
pos
.
getBarcode
().
getBarcode
());
data
.
put
(
"plateW"
,
pos
.
getBarcode
().
getPlateSize
()
+
""
);
data
.
put
(
"plateH"
,
pos
.
getBarcode
().
getHeight
()
+
""
);
return
ResultBean
.
newOkResult
(
data
);
}
private
StoragePos
findFormList
(
List
<
StoragePos
>
list
,
String
posName
)
{
for
(
StoragePos
pos
:
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论