Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5dca14bb
由
LN
编写于
2023-06-29 16:10:46 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'SO1070-smf-core' of
http://106.15.194.121:8083/sunke/smf-core
into SO1070-smf-core
2 个父辈
d035a6f3
bc5b7568
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
48 行增加
和
19 行删除
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/core/hik/rest/SingleInController.java
src/main/java/com/neotel/smfcore/hikvision/HikApi.java
src/main/resources/banner.txt
src/main/resources/config/application-prod.yml
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
5dca14b
...
...
@@ -45,10 +45,10 @@ public class DataInitManager {
MainTimer
mainTimer
;
//@Value("${menu.show}")
private
String
[]
menuShowList
=
new
String
[]{
/*"commonIn","returnIn","cutIn"*/
};
private
String
[]
menuShowList
=
new
String
[]{
"commonIn"
,
"returnIn"
,
"cutIn"
};
//@Value("${menu.hide}")
private
String
[]
menuHideList
=
new
String
[]{};
private
String
[]
menuHideList
=
new
String
[]{
"singleDiskWarehousing"
};
@Autowired
PermissionInitUtil
annotationUtil
;
...
...
src/main/java/com/neotel/smfcore/core/hik/rest/SingleInController.java
查看文件 @
5dca14b
...
...
@@ -220,6 +220,21 @@ public class SingleInController {
}
}
//所有入库都先验证唯一码校验接口
ResponseParam
param
=
HikApi
.
riCheckApi
(
SecurityUtils
.
getCurrentUsername
(),
barcode
.
getBarcode
(),
""
,
""
,
inType
);
if
(
ObjectUtil
.
isNotEmpty
(
param
))
{
if
(
param
.
getCode
().
equals
(
HikApi
.
CODE_OK
))
{
//唯一码验证成功
log
.
info
(
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证成功"
);
}
else
{
log
.
info
(
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证失败:"
+
param
.
getCode
()
+
"="
+
param
.
getMessage
());
throw
new
ValidateException
(
"smfcore.riCheckApi.error"
,
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证失败:"
+
param
.
getCode
()
+
"="
+
param
.
getMessage
()
+
""
,
new
String
[]{
param
.
getCode
().
toString
(),
param
.
getMessage
()});
}
}
//线边间转储入库和退料入库需要获取数量
boolean
needGetQty
=
false
;
//01 退料 02 线边仓间入库
...
...
@@ -251,7 +266,7 @@ public class SingleInController {
int
num
=
HikApi
.
returnMaterialApi
(
SecurityUtils
.
getCurrentUsername
(),
barcode
.
getBarcode
(),
businessType
,
businessNo
);
if
(
num
>
0
)
{
barcode
.
setAmount
(
num
);
barcodeManager
.
saveBarcode
(
barcode
);
//
barcodeManager.saveBarcode(barcode);
log
.
info
(
"入库二维码 "
+
barcode
.
getBarcode
()
+
" 从接口获得新数量:"
+
num
+
",并更新"
);
}
else
{
throw
new
ValidateException
(
"smfcore.returnMaterialApi.error"
,
"入库:["
+
barcode
.
getBarcode
()
+
"]获取数量失败"
);
...
...
@@ -265,20 +280,20 @@ public class SingleInController {
}
}
else
{
//唯一码校验接口
ResponseParam
param
=
HikApi
.
riCheckApi
(
SecurityUtils
.
getCurrentUsername
(),
barcode
.
getBarcode
(),
""
,
""
,
inType
);
if
(
ObjectUtil
.
isNotEmpty
(
param
))
{
if
(
param
.
getCode
().
equals
(
HikApi
.
CODE_OK
))
{
//唯一码验证成功
log
.
info
(
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证成功"
);
}
else
{
log
.
info
(
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证失败:"
+
param
.
getCode
()
+
"="
+
param
.
getMessage
());
throw
new
ValidateException
(
"smfcore.riCheckApi.error"
,
"唯一码["
+
barcode
.
getBarcode
()
+
"]验证失败:"
+
param
.
getCode
()
+
"="
+
param
.
getMessage
()
+
""
,
new
String
[]{
param
.
getCode
().
toString
(),
param
.
getMessage
()});
}
}
//
//唯一码校验接口
//
ResponseParam param = HikApi.riCheckApi(SecurityUtils.getCurrentUsername(), barcode.getBarcode(), "", "", inType);
//
//
if (ObjectUtil.isNotEmpty(param)) {
//
if (param.getCode().equals(HikApi.CODE_OK)) {
//
//唯一码验证成功
//
log.info("唯一码[" + barcode.getBarcode() + "]验证成功");
//
//
} else {
//
log.info("唯一码[" + barcode.getBarcode() + "]验证失败:" + param.getCode() + "=" + param.getMessage());
//
throw new ValidateException("smfcore.riCheckApi.error", "唯一码[" + barcode.getBarcode() + "]验证失败:" + param.getCode() + "=" + param.getMessage() + ""
//
, new String[]{param.getCode().toString(), param.getMessage()});
//
}
//
}
}
String
pn
=
barcode
.
getPartNumber
();
...
...
@@ -305,6 +320,7 @@ public class SingleInController {
barcode
.
setPutInTime
(
System
.
currentTimeMillis
());
barcode
.
updateSluggishDate
(
dataCache
.
getPNsluggishDay
(
barcode
.
getPartNumber
()));
barcodeManager
.
saveBarcode
(
barcode
);
log
.
info
(
"入库二维码 "
+
barcode
.
getBarcode
()
+
" 保存入库相关信息"
);
dataLog
.
setNum
(
barcode
.
getAmount
());
dataLog
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
...
...
src/main/java/com/neotel/smfcore/hikvision/HikApi.java
查看文件 @
5dca14b
...
...
@@ -497,11 +497,23 @@ public class HikApi {
dataMap
.
put
(
"baseCode"
,
baseCode
);
//基地
dataMap
.
put
(
"lgort"
,
lgort
);
//库位
String
businessType
=
""
;
//inType 1=普通入库,2=并盘入库,3=截料入库,4=退料入库,5=转储入库
//businessType 0普通入库1退料入库2并盘入库3截料入库 4 线边仓间转储入库
if
(
inType
==
1
){
//0普通入库
3截料入库
//0普通入库
businessType
=
"0"
;
}
else
if
(
inType
==
2
){
//并盘入库
businessType
=
"2"
;
}
else
if
(
inType
==
3
){
//截料入库
businessType
=
"3"
;
}
else
if
(
inType
==
4
){
//退料入库
businessType
=
"1"
;
}
else
if
(
inType
==
5
){
//转储入库
businessType
=
"4"
;
}
dataMap
.
put
(
"businessType"
,
businessType
);
//库位
...
...
src/main/resources/banner.txt
查看文件 @
5dca14b
...
...
@@ -5,4 +5,3 @@
| \____) | _| |_\/_| |_ _| |_
\______.'|_____||_____||_____|
:: SMF Version :: (v1.7.819)
src/main/resources/config/application-prod.yml
查看文件 @
5dca14b
...
...
@@ -5,6 +5,8 @@ spring:
host
:
10.1.129.59
# 主机地址
port
:
27017
# 端口
database
:
hikvision
# 数据库
minConSize
:
1000
maxConSize
:
2000
# 登录相关配置
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论