Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a64f9515
由
zshaohui
编写于
2024-07-05 10:52:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
获取可用料格 增加忽略当前工位的料箱
1 个父辈
73ec6ee2
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CDeviceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BinCacheUtil.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/RestoreReplaceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CDeviceController.java
查看文件 @
a64f951
...
...
@@ -40,6 +40,7 @@ import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.MaterialUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.third.util.MaterialLocUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -454,7 +455,8 @@ public class CDeviceController {
@RequestMapping
(
"/reelCheckOut"
)
@AnonymousAccess
public
synchronized
ResultBean
reelCheckOut
(
@RequestParam
(
"boxStr"
)
String
boxStr
,
@RequestParam
(
"isNormal"
)
boolean
isNormal
)
{
@RequestParam
(
"isNormal"
)
boolean
isNormal
,
@RequestParam
(
"materialStr"
)
String
materialStr
)
{
//1.解析条码内容
//Barcode binCode = codeResolve.resolveOneValideBarcode(boxStr);
...
...
@@ -628,6 +630,9 @@ public class CDeviceController {
barcode
.
setBarSource
(
""
);
barcodeManager
.
saveBarcode
(
barcode
);
//更新料串缓存信息
MaterialLocUtil
.
updateMaterialLoc
(
materialStr
,
""
,
barcode
);
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"binCode"
,
boxStr
);
resultMap
.
put
(
"seq"
,
seq
+
""
);
...
...
@@ -667,8 +672,13 @@ public class CDeviceController {
String
source
=
paramMap
.
get
(
"source"
);
String
needBinCodeStr
=
paramMap
.
get
(
"needBinCodeStr"
);
String
ignoreWorkStr
=
paramMap
.
get
(
"ignoreWorkBox"
);
boolean
ignoreWorkBox
=
Boolean
.
valueOf
(
ignoreWorkStr
);
List
<
String
>
validBinList
=
new
ArrayList
<
String
>();
log
.
info
(
"入料机构获取料串["
+
stackerId
+
"]的可用料格["
+
binListStr
+
"],入料机构为["
+
source
+
"],需要的料格信息为:"
+
needBinCodeStr
);
log
.
info
(
"入料机构获取料串["
+
stackerId
+
"]的可用料格["
+
binListStr
+
"],入料机构为["
+
source
+
"],需要的料格信息为:"
+
needBinCodeStr
+
",是否忽略当前工作的料箱:"
+
ignoreWorkStr
);
if
(!
MaterialUtil
.
bindInfo
(
stackerId
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"error.nobind"
,
"料串["
+
stackerId
+
"]未绑定任何信息"
);
...
...
@@ -731,7 +741,7 @@ public class CDeviceController {
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("validBinList",validBinList);*/
ValidBin
validBin
=
BinCacheUtil
.
validBin
(
stackerBarcode
,
source
,
binListStr
,
needBinCodeStr
);
ValidBin
validBin
=
BinCacheUtil
.
validBin
(
stackerBarcode
,
source
,
binListStr
,
needBinCodeStr
,
ignoreWorkBox
);
if
(
validBin
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
stackerId
+
"未找到可用料箱"
);
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BinCacheUtil.java
查看文件 @
a64f951
...
...
@@ -94,7 +94,7 @@ public class BinCacheUtil {
}
public
synchronized
static
ValidBin
validBin
(
Barcode
stackerBarcode
,
String
source
,
String
binListStr
,
String
needBinCodeStr
)
{
public
synchronized
static
ValidBin
validBin
(
Barcode
stackerBarcode
,
String
source
,
String
binListStr
,
String
needBinCodeStr
,
boolean
ignoreWorkBox
)
{
String
boxCode
=
""
;
String
boxLoc
=
""
;
...
...
@@ -165,15 +165,18 @@ public class BinCacheUtil {
log
.
info
(
"未找到当前工作的料格,开始寻找正在当前工位上的料箱"
);
List
<
String
>
emptyBoxList
=
new
ArrayList
<>();
if
(
ignoreWorkBox
)
{
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
dataLog
:
allTasks
)
{
if
(
dataLog
.
isCheckOutTask
()
&&
!
dataLog
.
isCancel
()
&&
!
dataLog
.
isFinished
())
{
if
(
source
.
equals
(
dataLog
.
getCurrentLoc
()))
{
log
.
info
(
barcode
+
"找到当前工位上的料箱为:"
+
dataLog
.
getBarcode
()
+
",位置为:"
+
dataLog
.
getCurrentLoc
());
log
.
info
(
barcode
+
"找到当前工位上的料箱为:"
+
dataLog
.
getBarcode
()
+
",位置为:"
+
dataLog
.
getCurrentLoc
());
emptyBoxList
.
add
(
dataLog
.
getBarcode
());
}
}
}
}
if
(
emptyBoxList
!=
null
&&
!
emptyBoxList
.
isEmpty
())
{
for
(
String
boxStr
:
emptyBoxList
)
{
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/RestoreReplaceController.java
查看文件 @
a64f951
...
...
@@ -64,7 +64,7 @@ public class RestoreReplaceController {
.
and
(
"id"
).
nin
(
liteOrderCache
.
excludeOutPosIds
())
.
and
(
"enabled"
).
is
(
true
)
.
and
(
"barcode.lockId"
).
is
(
null
)
.
and
(
"barcode.amount"
).
gte
(
amount
);
.
and
(
"barcode.amount"
).
is
(
amount
);
Sort
s
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
,
"barcode.putInDate"
);
StoragePos
pos
=
storagePosDao
.
findOne
(
new
Query
(
c
).
with
(
s
));
if
(
pos
==
null
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论