Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9f680fa2
由
LN
编写于
2024-01-22 09:06:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修改:1.同一个库位入两盘问题。2.元器件同料号不同供应商可以保存。
1 个父辈
3ed7fbf9
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
47 行增加
和
10 行删除
src/main/java/com/neotel/smfcore/common/utils/ReelLockPosUtil.java
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
src/main/java/com/neotel/smfcore/core/barcode/service/manager/impl/ComponentManagerImpl.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/common/utils/ReelLockPosUtil.java
查看文件 @
9f680fa
package
com
.
neotel
.
smfcore
.
common
.
utils
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.common.bean.ReelLockPosInfo
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -25,15 +26,15 @@ public class ReelLockPosUtil {
/**
* 料盘锁定库位信息,用于包装料分配到其他料仓
*/
private
static
Map
<
String
,
ReelLockPosInfo
>
reelLocKPosMap
;
private
static
Map
<
String
,
ReelLockPosInfo
>
reelLocKPosMap
=
Maps
.
newConcurrentMap
()
;
@PostConstruct
public
void
init
()
{
dataCache
=
autodataCache
;
reelLocKPosMap
=
dataCache
.
getCache
(
REEL_LOCK_POS_MAP_KEY
);
if
(
reelLocKPosMap
==
null
)
{
reelLocKPosMap
=
new
HashMap
<
String
,
ReelLockPosInfo
>(){}
;
Map
<
String
,
ReelLockPosInfo
>
cacheReelLocKPosMap
=
dataCache
.
getCache
(
REEL_LOCK_POS_MAP_KEY
);
if
(
cacheReelLocKPosMap
!=
null
)
{
reelLocKPosMap
.
putAll
(
cacheReelLocKPosMap
)
;
}
}
...
...
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
查看文件 @
9f680fa
...
...
@@ -843,6 +843,8 @@ public class BarcodeRule {
rule
=
"SP*PN*BATCH*QTY*xxx[RI]"
;
codeStr
=
"998168*340093000002*3506*3000*200188890"
;
rule
=
"SP*PN*BATCH*QTY*xxx[RI]"
;
codeStr
=
"100301*340093060042*20231228*2853*0002"
;
// codeStr="woerweoruweorwer*wrwerwerwe";
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
...
...
src/main/java/com/neotel/smfcore/core/barcode/service/manager/impl/ComponentManagerImpl.java
查看文件 @
9f680fa
...
...
@@ -164,6 +164,7 @@ public class ComponentManagerImpl implements IComponentManager {
if
(
resources
.
getId
()
!=
null
)
{
logName
=
"修改元器件"
;
c
.
and
(
"id"
).
ne
(
resources
.
getId
());
c
.
and
(
"provider"
).
is
(
resources
.
getProvider
());
}
Component
com
=
componentDao
.
findOne
(
new
Query
(
c
));
if
(
com
!=
null
)
{
...
...
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
9f680fa
...
...
@@ -267,15 +267,47 @@ public class DeviceController {
resultMap
.
put
(
"result"
,
"0"
);
resultMap
.
put
(
"msg"
,
"ok"
);
DataLog
newTask
=
taskService
.
addPutInTaskToExecute
(
storage
,
barcode
,
pos
);
okMsg
=
"["
+
barcode
.
getBarcode
()
+
"]锁定库位["
+
pos
.
getPosName
()
+
"]优先级["
+
pos
.
getPriority
()
+
"] 上个库位号["
+
lastPosId
+
"]"
;
ReelLockPosInfo
oldLockInfo
=
ReelLockPosUtil
.
getLockPosInfoByCode
(
barcode
.
getBarcode
());
if
(
oldLockInfo
!=
null
)
{
if
(!
oldLockInfo
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
String
result
=
"-1"
;
okMsg
=
rfid
+
"["
+
rfidLoc
+
"]["
+
barcode
.
getBarcode
()
+
"]锁定库位["
+
pos
.
getPosName
()
+
"],清理旧有锁定信息"
;
resultMap
.
put
(
"result"
,
result
);
resultMap
.
put
(
"msg"
,
okMsg
);
//已经锁定过库位,但不是同一个条码,需要把对应位置的锁定信息清理掉
ReelLockPosUtil
.
removeReelLockPosInfo
(
oldLockInfo
.
getBarcode
());
log
.
info
(
"清理锁定库位:库位号["
+
oldLockInfo
.
getLockPosName
()
+
"]上物料["
+
oldLockInfo
.
getBarcode
()
+
"]锁定的库位"
);
}
}
log
.
info
(
okMsg
+
oldLockInfo
);
ReelLockPosInfo
reelLocInfo
=
new
ReelLockPosInfo
();
reelLocInfo
.
setBarcode
(
barcode
.
getBarcode
());
reelLocInfo
.
setCid
(
storage
.
getCid
());
reelLocInfo
.
setLockPosName
(
pos
.
getPosName
());
reelLocInfo
.
setLockPosId
(
pos
.
getId
());
ReelLockPosInfo
nLocInfo
=
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
cidList
);
if
(
nLocInfo
==
null
)
{
errorMsg
=
"["
+
barcode
.
getBarcode
()
+
"]库位["
+
reelLocInfo
.
getLockPosName
()+
"]已被锁定,暂停入库"
;
lineMsg
=
errorMsg
;
DeviceMessageUtil
.
updateLineMsg
(
lineMsg
,
code
,
cids
,
reelLocInfo
.
getLockPosName
(),
"smfcore.linemsg.posLock"
,
new
String
[]{
barcode
.
getBarcode
(),
reelLocInfo
.
getLockPosName
()});
resultMap
.
put
(
"result"
,
"99"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
else
{
DataLog
newTask
=
taskService
.
addPutInTaskToExecute
(
storage
,
barcode
,
pos
);
resultMap
.
put
(
"pos"
,
pos
.
getPosName
());
resultMap
.
put
(
"barcode"
,
barcode
.
getBarcode
());
resultMap
.
put
(
"cid"
,
storage
.
getCid
());
resultMap
.
put
(
"taskId"
,
newTask
.
getId
());
}
log
.
info
(
okMsg
);
resultMap
.
put
(
"pos"
,
pos
.
getPosName
());
resultMap
.
put
(
"barcode"
,
barcode
.
getBarcode
());
resultMap
.
put
(
"cid"
,
storage
.
getCid
());
resultMap
.
put
(
"taskId"
,
newTask
.
getId
());
}
else
{
resultMap
.
put
(
"result"
,
"104"
);
errorMsg
=
"["
+
barcode
.
getBarcode
()
+
"]未找到可用的["
+
barcode
.
getPlateSize
()
+
"x"
+
barcode
.
getHeight
()
+
"]仓位"
;
...
...
@@ -313,6 +345,7 @@ public class DeviceController {
lineMsg
=
errorMsg
;
DeviceMessageUtil
.
updateLineMsg
(
lineMsg
,
code
,
cids
,
""
,
""
,
null
);
log
.
error
(
errorMsg
);
}
else
{
lineMsg
=
okMsg
;
DeviceMessageUtil
.
lastLineMsg
=
null
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论