Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a23d8cc8
由
张少辉
编写于
2026-02-05 10:51:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.提供清空库位接口给客户端
1 个父辈
f8dd1436
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
32 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
a23d8cc
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.ReelLockPosUtil
;
import
com.neotel.smfcore.common.utils.ReelLockPosUtil
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.api.SmfApi
;
import
com.neotel.smfcore.core.api.SmfApi
;
import
com.neotel.smfcore.core.api.listener.ISmfApiListener
;
import
com.neotel.smfcore.core.api.listener.ISmfApiListener
;
...
@@ -52,6 +53,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -52,6 +53,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -773,6 +775,36 @@ public class DeviceController {
...
@@ -773,6 +775,36 @@ public class DeviceController {
return
ResultBean
.
newOkResult
(
resultMap
);
return
ResultBean
.
newOkResult
(
resultMap
);
}
}
@ApiOperation
(
"清空指定库位"
)
@RequestMapping
(
"/service/store/clearPos"
)
@AnonymousAccess
public
ResultBean
clearPos
(
@RequestBody
HashMap
<
String
,
String
>
map
)
{
if
(
map
.
containsKey
(
"posName"
))
{
String
posName
=
map
.
get
(
"posName"
);
StoragePos
storagePos
=
storagePosManager
.
getByPosName
(
posName
);
if
(
storagePos
!=
null
)
{
try
{
log
.
info
(
"客户端请求清空库位["
+
storagePos
.
getPosName
()
+
"]"
);
Barcode
barcode
=
storagePos
.
getBarcode
();
if
(
barcode
!=
null
)
{
barcode
=
barcodeManager
.
findByBarcode
(
barcode
.
getBarcode
());
if
(
barcode
==
null
)
{
barcode
=
storagePos
.
getBarcode
();
}
log
.
info
(
"清理库位["
+
storagePos
.
getPosName
()
+
"]中的库存"
+
barcode
.
getBarcode
());
log
.
info
(
"客户端清理库位["
+
storagePos
.
getPosName
()
+
"]中的库存"
+
barcode
.
getBarcode
());
taskService
.
addTaskToFinished
(
storagePos
,
null
,
"客户端-clear"
);
}
return
ResultBean
.
newOkResult
(
""
);
}
catch
(
Exception
e
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error"
,
"出错{0}"
,
new
String
[]{
e
.
toString
()});
}
}
}
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.posNotExist"
,
"仓位不存在"
);
}
private
StoragePos
findFormList
(
List
<
StoragePos
>
list
,
String
posName
)
private
StoragePos
findFormList
(
List
<
StoragePos
>
list
,
String
posName
)
{
{
for
(
StoragePos
pos
:
for
(
StoragePos
pos
:
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论