Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0e1f94f9
由
LN
编写于
2023-12-29 12:00:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
同条码入库功能修改
1 个父辈
7a944d7c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
64 行增加
和
17 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
查看文件 @
0e1f94f
...
...
@@ -207,6 +207,22 @@ public class BaseDeviceHandler implements IDeviceHandler {
for
(
DataLog
task
:
taskService
.
getQueueTasks
())
{
if
(
task
.
getBarcode
().
equals
(
barcodeSave
.
getBarcode
()))
{
//同条码,且同料仓的入库任务
if
(
task
.
isPutInTask
()){
//判断原任务是否需要NG
Integer
barcodeSet
=
dataCache
.
getCache
(
Constants
.
CACHE_SAME_BARCODE_SETTINGS
);
if
(
barcodeSet
==
null
||
barcodeSet
==
1
)
{
//原任务标记NG
task
.
setNgReel
(
true
);
log
.
info
(
"获取["
+
barcodeSave
.
getBarcode
()
+
"]的入库库位,条码已有入库任务posname["
+
task
.
getPosName
()
+
"],标记入库任务为NG,入库后自动出库"
);
taskService
.
updateQueueTask
(
task
);
}
else
{
log
.
info
(
"获取["
+
barcodeSave
.
getBarcode
()
+
"]的入库库位,条码已有入库任务posname["
+
task
.
getPosName
()
+
"],CACHE_SAME_BARCODE_SETTINGS="
+
barcodeSet
+
",当前物料NG,已入库的任务继续完成"
);
}
throw
new
ValidateException
(
"smfcore.error.barcode.hastask"
,
"Serial No.(S)[0] already have storage task"
,
new
String
[]{
barcodeSave
.
getBarcode
()});
// errorMsg = "Serial No.(S)[" + barcode.getBarcode() + "] already have storage task";
// return resultMap;
}
if
(
task
.
isPutInTask
()
&&
task
.
getCid
().
equals
(
statusBean
.
getCid
()))
{
putInTask
=
task
;
}
else
{
...
...
@@ -398,7 +414,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
public
Barcode
verifyBarcodePutIn
(
List
<
Storage
>
storageList
,
Barcode
barcodeSave
)
throws
ValidateException
{
if
(
barcodeSave
==
null
)
{
throw
new
ValidateException
(
"条码无效"
,
"无效的条码"
);
throw
new
ValidateException
(
"条码无效"
,
"无效的条码"
);
}
Date
expireDate
=
barcodeSave
.
getExpireDate
();
...
...
@@ -420,39 +436,65 @@ public class BaseDeviceHandler implements IDeviceHandler {
}
}
if
(!
canPutIn
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.wrongSize"
,
"尺寸[{0}]不符"
,
new
String
[]{
w
+
"x"
+
h
});
if
(!
canPutIn
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.wrongSize"
,
"尺寸[{0}]不符"
,
new
String
[]{
w
+
"x"
+
h
});
}
if
(
barcodeSave
.
getAmount
()
<=
0
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.wrongQty"
,
"条码[{0}]对应的数量<=0为: {1}"
,
new
String
[]{
barcodeSave
.
getBarcode
(),
barcodeSave
.
getAmount
()
+
""
});
throw
new
ValidateException
(
"smfcore.error.barcode.wrongQty"
,
"条码[{0}]对应的数量<=0为: {1}"
,
new
String
[]{
barcodeSave
.
getBarcode
(),
barcodeSave
.
getAmount
()
+
""
});
}
// if(barcodeSave.getPlateSize() <=0 || barcodeSave.getHeight() <= 0){
// throw new ValidateException("无法入库,请先设置料盘尺寸");
// }
//判斷配置
Integer
barcodeSet
=
dataCache
.
getCache
(
Constants
.
CACHE_SAME_BARCODE_SETTINGS
);
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcodeSave
.
getBarcode
());
if
(
pos
!=
null
)
{
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
throw
new
ValidateException
(
"smfcore.error.barcode.inStorage"
,
"[ "
+
barcodeSave
.
getBarcode
()
+
"]已在"
+
storage
.
getName
()
+
"["
+
pos
.
getPosName
()
+
"]中"
,
new
String
[]{
barcodeSave
.
getBarcode
(),
storage
.
getName
(),
pos
.
getPosName
()});
if
(
barcodeSet
==
null
||
barcodeSet
==
1
)
{
//如果已在库位中,那么自动将该库位的物料出库
log
.
info
(
"CACHE_SAME_BARCODE_SETTINGS=1,自动出库已在库位中的物料["
+
barcodeSave
.
getBarcode
()
+
"],设置ngReel=true"
);
taskService
.
checkout
(
storage
,
pos
,
true
,
true
,
""
,
""
);
}
else
{
log
.
info
(
"CACHE_SAME_BARCODE_SETTINGS=2,标记库位["
+
pos
.
getPosName
()
+
"]中的物料["
+
barcodeSave
.
getBarcode
()
+
"]为ngReel=NG"
);
pos
.
getBarcode
().
updateAppendData
(
"ngReel"
,
true
);
storagePosManager
.
save
(
pos
);
}
throw
new
ValidateException
(
"smfcore.error.barcode.exist"
,
"[{0}}]已在{1}}[{2}}]中"
,
new
String
[]{
barcodeSave
.
getBarcode
(),
storage
.
getName
(),
pos
.
getPosName
()});
}
// if (pos != null) {
// Storage storage = dataCache.getStorageById(pos.getStorageId());
// throw new ValidateException("smfcore.error.barcode.inStorage", "[ " + barcodeSave.getBarcode() + "]已在" + storage.getName() + "[" + pos.getPosName() + "]中", new String[]{barcodeSave.getBarcode(), storage.getName(), pos.getPosName()});
// }
for
(
DataLog
task
:
taskService
.
getQueueTasks
())
{
if
(
task
.
isFinished
()||
task
.
isCancel
())
{
if
(
task
.
isFinished
()
||
task
.
isCancel
())
{
continue
;
}
if
(
task
.
isPutInTask
())
{
if
(
task
.
getBarcode
().
equals
(
barcodeSave
.
getBarcode
()))
{
//同一个条码的入库任务
for
(
Storage
storage
:
storageList
)
{
if
(
task
.
getStorageId
().
equals
(
storage
.
getId
()))
{
return
barcodeSave
;
}
// //同一个条码的入库任务
// for (Storage storage : storageList) {
// if (task.getStorageId().equals(storage.getId())) {
// return barcodeSave;
// }
// }
// log.error("料盘["+barcodeSave.getBarcode()+"]的入库操作["+task.getPosName()+"]未完成,无法执行入库操作");
// throw new ValidateException("smfcore.error.barcode.taskNotEnd", "料盘[{0}]的操作未完成,无法执行入库操作", new String[]{barcodeSave.getBarcode()});
if
(
barcodeSet
==
null
||
barcodeSet
==
1
)
{
//原任务标记NG
task
.
setNgReel
(
true
);
log
.
info
(
"获取["
+
barcodeSave
.
getBarcode
()
+
"]的入库库位,条码已有入库任务posname["
+
task
.
getPosName
()
+
"],标记入库任务为NG,入库后自动出库"
);
taskService
.
updateQueueTask
(
task
);
}
else
{
log
.
info
(
"获取["
+
barcodeSave
.
getBarcode
()
+
"]的入库库位,条码已有入库任务posname["
+
task
.
getPosName
()
+
"],CACHE_SAME_BARCODE_SETTINGS="
+
barcodeSet
+
",当前物料NG,已入库的任务继续完成"
);
}
log
.
error
(
"料盘["
+
barcodeSave
.
getBarcode
()+
"]的入库操作["
+
task
.
getPosName
()+
"]未完成,无法执行入库操作"
);
throw
new
ValidateException
(
"smfcore.error.barcode.taskNotEnd"
,
"料盘[{0}]的操作未完成,无法执行入库操作"
,
new
String
[]{
barcodeSave
.
getBarcode
()});
throw
new
ValidateException
(
"smfcore.error.barcode.hastask"
,
"Serial No.(S)[0] already have storage task"
,
new
String
[]{
barcodeSave
.
getBarcode
()}
);
}
}
}
...
...
src/main/resources/messages.properties
查看文件 @
0e1f94f
...
...
@@ -358,6 +358,7 @@ smfcore.api.error=api.error: error={0},message={1},detial={2}
smfcore.api.toXray
=
{0}
\u9700\u8981\u
53BB
\u
70B9
\u6599
smfcore.paretoChart
=
\u
5E15
\u
7D2F
\u6258\u
56FE
smfcore.selfAudit.hasOutTask
=
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
smfcore.error.barcode.hastask
=
\u6761\u7801
[0]
\u
5DF2
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
...
...
src/main/resources/messages_en_US.properties
查看文件 @
0e1f94f
...
...
@@ -356,4 +356,5 @@ smfcore.api.fail={0} Failed to get data
smfcore.micron.apiClose
=
Not yet open
smfcore.api.toXray
=
{0}Need to Xray
smfcore.paretoChart
=
Pareto chart
smfcore.selfAudit.hasOutTask
=
The location [{0}] already has a release task
\ No newline at end of file
smfcore.selfAudit.hasOutTask
=
The location [{0}] already has a release task
smfcore.error.barcode.hastask
=
Serial No.(S)[0] already have storage task
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
0e1f94f
...
...
@@ -351,4 +351,5 @@ smfcore.micron.nodata=\u672A\u627E\u5230\u4FE1\u606F
smfcore.api.fail
=
{0} Failed to get data
smfcore.micron.apiClose
=
Not yet open
smfcore.paretoChart
=
\u
30D1
\u
30EC
\u
30FC
\u
30C8
\u
56F3
smfcore.selfAudit.hasOutTask
=
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\ No newline at end of file
smfcore.selfAudit.hasOutTask
=
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
smfcore.error.barcode.hastask
=
Serial No.(S)[0] already have storage task
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
0e1f94f
...
...
@@ -351,4 +351,5 @@ smfcore.micron.nodata=\u672A\u627E\u5230\u4FE1\u606F
smfcore.api.fail
=
{0}
\u
83B7
\u
53D6
\u6570\u
636E
\u5931\u
8D25
smfcore.micron.apiClose
=
API
\u
529F
\u
80FD
\u
672A
\u
5F00
\u
653E
smfcore.paretoChart
=
\u
5E15
\u
7D2F
\u6258\u
56FE
smfcore.selfAudit.hasOutTask
=
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\ No newline at end of file
smfcore.selfAudit.hasOutTask
=
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
smfcore.error.barcode.hastask
=
Serial No.(S)[0] already have storage task
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
0e1f94f
...
...
@@ -336,6 +336,7 @@ smfcore.selfAudit.notExist=\u672A\u627E\u5230\u6279\u6B21\u865F[{0}]\u7684\u76E4
smfcore.selfAudit.hasEnd
=
[{0}]
\u
76E4
\u
9EDE
\u
5DF2
\u
5B8C
\u6210
smfcore.selfAudit.notFind
=
\u
672A
\u
627E
\u5230\u
76E4
\u
9EDE
\u
4FE1
\u
606F
smfcore.selfAudit.pause
=
\u
76E4
\u
9EDE{0}
\u
5DF2
\u
66AB
\u
505C
smfcore.error.barcode.hastask
=
Serial No.(S)[0] already have storage task
smfcore.updatePass.hasNoAccess
=
\u
6C92
\u6709\u
64CD
\u
4F5C
\u
6B0A
\u9650
smfcore.selfAudit.noPos
=
\u
76E4
\u
9EDE{0}
\u
672A
\u
627E
\u5230\u
5EAB
\u
4F4D
\u
865F
smfcore.task.updatePutInFail
=
\u5165\u
5EAB
\u
4EFB
\u
52D9{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72C0
\u
614B
\u
70BA{2}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论