Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0f12aa05
由
张少辉
编写于
2026-03-31 13:38:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.点料结果上传对接
1 个父辈
20017caf
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/custom/neotel/NeotelController.java
src/main/java/com/neotel/smfcore/custom/neotel/bean/XrayUploadResult.java
src/main/java/com/neotel/smfcore/custom/neotel/NeotelController.java
查看文件 @
0f12aa0
package
com
.
neotel
.
smfcore
.
custom
.
neotel
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.JsonUtil
;
import
com.neotel.smfcore.common.utils.StorageConstants
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.bean.BoxStatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
...
...
@@ -18,6 +22,7 @@ import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
com.neotel.smfcore.custom.neotel.bean.XrayUploadResult
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousPostMapping
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -47,6 +52,11 @@ public class NeotelController {
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
CodeResolve
codeResolve
;
@Autowired
private
IBarcodeManager
barcodeManager
;
@ApiOperation
(
"6.1创建需求单"
)
@RequestMapping
(
"/outInfo"
)
...
...
@@ -258,4 +268,30 @@ public class NeotelController {
return
ResultBean
.
newOkResult
(
results
);
}
@ApiOperation
(
"6.5 点料结果上传"
)
@RequestMapping
(
"/xrayUploadResult"
)
@AnonymousAccess
public
ResultBean
xrayUploadResult
(
@RequestBody
XrayUploadResult
xrayUploadResult
)
{
log
.
info
(
"收到点料信息上传:"
+
JSON
.
toJSONString
(
xrayUploadResult
));
String
reelId
=
xrayUploadResult
.
getReelId
();
int
qty
=
xrayUploadResult
.
getQty
();
//解析条码是否存在
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
reelId
);
if
(
barcode
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.invalid"
,
"{0}不是有效的条码"
,
new
String
[]{
reelId
});
}
//判断数量是否为0
if
(
qty
<=
0
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.wrongQty"
,
"条码[{0}]对应的数量<=0为: {1}"
,
new
String
[]{
reelId
,
qty
+
""
});
}
//判断是否在库存中
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
reelId
);
if
(
pos
!=
null
)
{
//smfcore.materialBox.inPos=物料已在库位{0}中
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.materialBox.inPos"
,
"物料已在库位{0}中"
,
new
String
[]{
pos
.
getPosName
()});
}
barcode
.
setAmount
(
qty
);
barcodeManager
.
save
(
barcode
);
return
ResultBean
.
newOkResult
(
""
);
}
}
src/main/java/com/neotel/smfcore/custom/neotel/bean/XrayUploadResult.java
0 → 100644
查看文件 @
0f12aa0
package
com
.
neotel
.
smfcore
.
custom
.
neotel
.
bean
;
import
lombok.Data
;
@Data
public
class
XrayUploadResult
{
private
String
reelId
;
private
int
qty
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论