Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b5853c71
由
zshaohui
编写于
2024-09-21 13:57:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.根据箱子获取到库位信息
2.获取入库线体上的箱子数量
1 个父辈
71cb733c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CtuDeviceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/third/util/RawInLineUtil.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CtuDeviceController.java
查看文件 @
b5853c7
...
@@ -15,12 +15,15 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
...
@@ -15,12 +15,15 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.lizhen.agvBox.util.BoxUtil
;
import
com.neotel.smfcore.custom.luxsan.api.LuxsanApi
;
import
com.neotel.smfcore.custom.luxsan.api.LuxsanApi
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.CtuTask
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.CtuTask
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil
;
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.rawstor.util.RawOutUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.RawOutUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.third.util.RawInLineUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -595,4 +598,51 @@ public class CtuDeviceController {
...
@@ -595,4 +598,51 @@ public class CtuDeviceController {
return
ResultBean
.
newOkResult
(
resultList
);
return
ResultBean
.
newOkResult
(
resultList
);
}
}
@ApiOperation
(
"根据料箱获取对应的库位信息"
)
@RequestMapping
(
"/getBoxPosName"
)
@AnonymousAccess
public
ResultBean
getBoxPosName
(
@RequestBody
List
<
String
>
boxList
)
{
if
(
boxList
==
null
||
boxList
.
isEmpty
())
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"料箱信息不能为空"
);
}
List
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
Criteria
c
=
Criteria
.
where
(
"barcode.barcode"
).
in
(
boxList
);
Query
q
=
new
Query
();
q
.
addCriteria
(
c
);
List
<
StoragePos
>
storagePosList
=
storagePosManager
.
findByQuery
(
q
);
for
(
StoragePos
pos
:
storagePosList
)
{
Barcode
barcode
=
pos
.
getBarcode
();
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"posName"
,
pos
.
getPosName
());
resultMap
.
put
(
"box"
,
barcode
.
getBarcode
());
resultList
.
add
(
resultMap
);
}
return
ResultBean
.
newOkResult
(
resultList
);
}
@ApiOperation
(
"获取入库分拣机上的数量"
)
@RequestMapping
(
"/getRawInStackerNum"
)
@AnonymousAccess
public
ResultBean
getRawInStackerNum
(){
List
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
Set
<
String
>
stackerSet
=
RawInLineUtil
.
getAllRawInStacker
();
for
(
String
stacker
:
stackerSet
)
{
if
(!
MaterialUtil
.
bindInfo
(
stacker
)){
continue
;
}
else
{
String
size
=
MaterialUtil
.
getMaterialSize
(
stacker
);
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"stacker"
,
stacker
);
resultMap
.
put
(
"size"
,
size
);
resultList
.
add
(
resultMap
);
}
}
return
ResultBean
.
newOkResult
(
resultList
);
}
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/third/util/RawInLineUtil.java
查看文件 @
b5853c7
...
@@ -13,8 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -13,8 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
@Component
...
@@ -163,4 +165,12 @@ public class RawInLineUtil {
...
@@ -163,4 +165,12 @@ public class RawInLineUtil {
destinationMap
.
remove
(
materialStr
);
destinationMap
.
remove
(
materialStr
);
dataCache
.
updateCache
(
CacheNameUtil
.
CHCHE_RAWIN_LINE_MATERIAL_DESTINATION
,
destinationMap
);
dataCache
.
updateCache
(
CacheNameUtil
.
CHCHE_RAWIN_LINE_MATERIAL_DESTINATION
,
destinationMap
);
}
}
public
static
Set
<
String
>
getAllRawInStacker
()
{
Map
<
String
,
RawInLineMaterialLoc
>
destinationMap
=
dataCache
.
getCache
(
CacheNameUtil
.
CHCHE_RAWIN_LINE_MATERIAL_DESTINATION
);
if
(
destinationMap
==
null
)
{
destinationMap
=
new
ConcurrentHashMap
<>();
}
return
destinationMap
.
keySet
();
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论