Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 09419fa5
由
zshaohui
编写于
2024-03-14 12:59:25 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加点料数量接口
1 个父辈
3694c3d7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
40 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
查看文件 @
09419fa
...
...
@@ -95,6 +95,16 @@ public class Barcode extends BasePo implements Serializable {
*/
private
String
batch
=
""
;
/**
* 原始数量
*/
private
int
oriAmount
;
/**
* 点料次数
*/
private
int
xrayCount
=
0
;
public
String
getMbatch
()
{
try
{
...
...
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
09419fa
package
com
.
neotel
.
smfcore
.
core
.
device
.
rest
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
...
...
@@ -14,7 +15,9 @@ import com.neotel.smfcore.common.utils.SecurityUtils;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.api.SmfApi
;
import
com.neotel.smfcore.core.api.bean.CodeValidateParam
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
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.bean.PosInfo
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
...
...
@@ -64,6 +67,9 @@ public class DeviceController {
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
IBarcodeManager
barcodeManager
;
/**
* 权限验证API列表
*/
...
...
@@ -687,4 +693,28 @@ public class DeviceController {
}
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.cancelOutTask.fail"
,
"客户端取消入库任务[{0}]失败:{1}"
,
new
String
[]{
posName
,
""
});
}
@ApiOperation
(
"点料机传点料数量到服务器"
)
@RequestMapping
(
value
=
"/service/store/xrayUpdateAmount"
)
@ResponseBody
@AnonymousAccess
public
ResultBean
xrayUpdateAmount
(
HttpServletRequest
request
)
{
String
amountStr
=
request
.
getParameter
(
"amount"
);
String
barcodeStr
=
request
.
getParameter
(
"barcode"
);
log
.
info
(
"点料信息:barcode:"
+
barcodeStr
+
",amount为:"
+
amountStr
);
if
(
StringUtils
.
isNotBlank
(
barcodeStr
))
{
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
barcodeStr
);
if
(
barcode
!=
null
)
{
int
amount
=
barcode
.
getAmount
();
barcode
.
setAmount
(
NumberUtil
.
parseInt
(
amountStr
));
barcode
.
setOriAmount
(
amount
);
barcode
.
setXrayCount
(
barcode
.
getXrayCount
()
+
1
);
barcodeManager
.
save
(
barcode
);
return
ResultBean
.
newOkResult
(
barcode
.
getOriAmount
());
}
}
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"barcode"
,
barcodeStr
});
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论