Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2abff201
由
LN
编写于
2026-04-09 20:18:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
x800从菜单进入
1 个父辈
2ef4cf7e
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
61 行增加
和
42 行删除
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5DeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5ODeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
查看文件 @
2abff20
package
com
.
neotel
.
smfcore
.
core
.
equipment
.
rest
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.equipment.enums.EquipmentType
;
...
...
@@ -281,8 +282,16 @@ public class EquipViewController {
@GetMapping
(
"xCounterView"
)
@PreAuthorize
(
"@el.check('equipmentView:info')"
)
public
XCounterViewDto
xCounterView
(
String
cid
,
HttpServletRequest
servletRequest
){
Equipment
equip
=
equipmentCache
.
getEquipment
(
cid
);
if
(
equip
==
null
||(!
equip
.
isNEOCOUNTER
()))
{
Equipment
equip
=
null
;
if
(
ObjectUtil
.
isEmpty
(
cid
))
{
equip
=
equipmentCache
.
findEquipByType
(
EquipmentType
.
NEOCOUNTER
.
name
());
if
(
equip
!=
null
)
{
cid
=
equip
.
getCid
();
}
}
else
{
equip
=
equipmentCache
.
getEquipment
(
cid
);
}
if
(
equip
==
null
||(!
equip
.
isNEOCOUNTER
()))
{
throw
new
ValidateException
(
"smfcore.equip.notExist"
,
"设备不存在"
);
}
XCounterViewDto
dto
=
new
XCounterViewDto
();
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5DeviceController.java
查看文件 @
2abff20
...
...
@@ -97,14 +97,14 @@ public class ML5DeviceController {
}
String
lastPosId
=
""
;
String
lineMsg
=
""
;
log
.
info
(
"ml5s["
+
cids
+
"]获取["
+
code
+
"],rfid=["
+
rfid
+
"]的入库库位"
);
log
.
info
(
"ml5s
EmptyPosForPutin
["
+
cids
+
"]获取["
+
code
+
"],rfid=["
+
rfid
+
"]的入库库位"
);
EnLog
.
info
(
"Line ["
+
cids
+
"] get put-in position for ["
+
code
+
"], rfid=["
+
rfid
+
"]"
);
return
ml5sPosForPutin
(
code
,
cids
,
""
,
rfid
,
request
.
getLocale
());
}
public
Map
<
String
,
Object
>
ml5sPosForPutin
(
String
code
,
String
cids
,
String
preCid
,
String
rfid
,
Locale
locale
){
log
.
info
(
"
p
osForPutin,code=["
+
code
+
"],cids=["
+
cids
+
"],preCid=["
+
preCid
+
"]"
);
log
.
info
(
"
ml5sP
osForPutin,code=["
+
code
+
"],cids=["
+
cids
+
"],preCid=["
+
preCid
+
"]"
);
EnLog
.
info
(
"posForPutin, code=["
+
code
+
"], cids=["
+
cids
+
"], preCid=["
+
preCid
+
"]"
);
String
lastPosId
=
""
;
String
lineMsg
=
""
;
...
...
@@ -132,11 +132,15 @@ public class ML5DeviceController {
List
<
Storage
>
storageList
=
Lists
.
newArrayList
();
//急停,报警,调试状态的料仓不可用
List
<
String
>
cidList
=
dataCache
.
getAvailableStorageIds
(
DeviceType
.
SMD_DUO
);
List
<
String
>
thirdList
=
dataCache
.
getAvailableStorageIds
(
DeviceType
.
SMDBOX_THIRD
);
cidList
.
addAll
(
thirdList
);
// for (String cid : cidList) {
for
(
String
cid:
cidArray
)
{
if
(
cidList
.
contains
(
cid
))
{
if
(
cidArray
.
length
==
0
){
cidArray
=
cidList
.
toArray
(
new
String
[
0
]);
}
// List<String> thirdList=dataCache.getAvailableStorageIds(DeviceType.SMDBOX_THIRD);
// cidList.addAll(thirdList);
for
(
String
cid
:
cidArray
)
{
// for(String cid:cidList) {
// if (cidList.contains(cid)) {
String
notIntoCids
=
dataCache
.
getSettings
().
getNotIntoCids
();
if
(
notIntoCids
!=
null
)
{
if
(
notIntoCids
.
contains
(
cid
))
{
...
...
@@ -157,7 +161,7 @@ public class ML5DeviceController {
if
(
storage
!=
null
)
{
storageList
.
add
(
storage
);
}
}
//
}
}
if
(
storageList
.
isEmpty
())
{
//无可用的料仓
...
...
@@ -366,38 +370,38 @@ public class ML5DeviceController {
}
}
// 13*44,13*56,13*72这三个料入到我们的料仓,其他的13寸,15寸都入迈康尼的料仓
int
inStorageType
=
0
;
//0=所有料仓都可以,1=只能入我们料仓。2=只能入麦康尼料仓
if
(
barcode
.
getPlateSize
()==
13
){
if
(
barcode
.
getHeight
()==
44
||
barcode
.
getHeight
()==
56
||
barcode
.
getHeight
()==
72
){
//只能入robot
inStorageType
=
1
;
}
else
{
inStorageType
=
2
;
}
}
else
if
(
barcode
.
getPlateSize
()==
15
){
inStorageType
=
2
;
}
List
<
Storage
>
storages
=
new
ArrayList
<>();
for
(
Storage
storage
:
storageList
)
{
if
(
inStorageType
==
1
){
if
(
storage
.
isRobotBox
())
{
storages
.
add
(
storage
);
}
}
else
if
(
inStorageType
==
2
){
if
(
storage
.
isTHIRDBox
())
{
//麦康尼料仓需要判断 当前剩余空库位是否可以放下料盘
if
(
dataCache
.
thirdBoxCanPutIn
(
storage
,
barcode
.
getPlateSize
(),
barcode
.
getHeight
(),
taskService
.
getQueueTasks
(
storage
.
getCid
())))
{
storages
.
add
(
storage
);
}
}
}
else
{
storages
.
add
(
storage
);
}
}
//
//
13*44,13*56,13*72这三个料入到我们的料仓,其他的13寸,15寸都入迈康尼的料仓
//
int inStorageType=0;//0=所有料仓都可以,1=只能入我们料仓。2=只能入麦康尼料仓
//
if(barcode.getPlateSize()==13){
//
if(barcode.getHeight()==44||barcode.getHeight()==56||barcode.getHeight()==72){
//
//只能入robot
//
inStorageType=1;
//
}else {
//
inStorageType=2;
//
}
//
}else if(barcode.getPlateSize()==15){
//
inStorageType=2;
//
}
//
List<Storage> storages=new ArrayList<>();
//
for (Storage storage :storageList) {
//
if(inStorageType==1){
//
if( storage.isRobotBox()) {
//
storages.add(storage);
//
}
//
}else if(inStorageType==2){
//
if(storage.isTHIRDBox()) {
//
//麦康尼料仓需要判断 当前剩余空库位是否可以放下料盘
//
if (dataCache.thirdBoxCanPutIn(storage, barcode.getPlateSize(), barcode.getHeight(),taskService.getQueueTasks(storage.getCid()))) {
//
storages.add(storage);
//
}
//
}
//
}else {
//
storages.add(storage);
//
}
//
}
//先验证下是否有空位,如果无空位直接返回,不需要调用API
StoragePos
testFindPos
=
taskService
.
findEmptyPosForPutIn
(
storage
s
,
barcode
,
""
,
lastPosId
);
StoragePos
testFindPos
=
taskService
.
findEmptyPosForPutIn
(
storage
List
,
barcode
,
""
,
lastPosId
);
if
(
testFindPos
==
null
)
{
resultMap
.
put
(
"result"
,
"104"
);
String
size
=
getBarcodeSize
(
barcode
);
...
...
@@ -427,7 +431,7 @@ public class ML5DeviceController {
else
{
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storage
s
,
barcode
,
""
,
lastPosId
);
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storage
List
,
barcode
,
""
,
lastPosId
);
if
(
pos
!=
null
)
{
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5ODeviceController.java
查看文件 @
2abff20
...
...
@@ -35,11 +35,14 @@ public class ML5ODeviceController {
Equipment
equip
=
null
;
if
(
ObjectUtil
.
isEmpty
(
cid
)){
equip
=
equipmentCache
.
findEquipByType
(
EquipmentType
.
ML5O
.
name
());
if
(
equip
!=
null
){
cid
=
equip
.
getCid
();
}
}
else
{
equip
=
equipmentCache
.
getEquipment
(
cid
);
}
if
(
equip
==
null
||(!
equip
.
isML5
S
()))
{
if
(
equip
==
null
||(!
equip
.
isML5
O
()))
{
throw
new
ValidateException
(
"smfcore.equip.notExist"
,
"设备不存在"
);
}
ML5OViewDto
dto
=
new
ML5OViewDto
();
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
查看文件 @
2abff20
...
...
@@ -45,6 +45,9 @@ public class ML5SDeviceController {
Equipment
equip
=
null
;
if
(
ObjectUtil
.
isEmpty
(
cid
)){
equip
=
equipmentCache
.
findEquipByType
(
EquipmentType
.
ML5S
.
name
());
if
(
equip
!=
null
){
cid
=
equip
.
getCid
();
}
}
else
{
equip
=
equipmentCache
.
getEquipment
(
cid
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论