Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 23cc13c3
由
LN
编写于
2023-02-28 11:26:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.1053:ML5页面料架显示修改。
1 个父辈
8c3d6f1c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
99 行增加
和
33 行删除
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/ML5ShelfDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/ML5StatusDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronML5Controller.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronInventoryReportsController.java
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/ML5ShelfDto.java
0 → 100644
查看文件 @
23cc13c
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
bean
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
ML5ShelfDto
implements
Serializable
{
@ApiModelProperty
(
"物料名称"
)
private
String
materialType
;
@ApiModelProperty
(
"料架类型"
)
private
String
shelfType
;
@ApiModelProperty
(
"出料口"
)
private
String
outType
;
@ApiModelProperty
(
"工单物料数量"
)
private
int
num
;
@ApiModelProperty
(
"料架数量"
)
private
int
shelfNum
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/ML5StatusDto.java
查看文件 @
23cc13c
...
...
@@ -32,7 +32,7 @@ public class ML5StatusDto implements Serializable {
private
List
<
EquipMsg
>
msgList
=
null
;
@ApiModelProperty
(
"需要的料架列表
,key=料架类型,value=数量
"
)
private
Map
<
String
,
Integer
>
needShelfs
=
null
;
@ApiModelProperty
(
"需要的料架列表"
)
private
List
<
ML5ShelfDto
>
needShelfs
=
null
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronML5Controller.java
查看文件 @
23cc13c
...
...
@@ -4,6 +4,7 @@ import com.neotel.smfcore.core.system.service.po.DataLog;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.micron1053.bean.EquipMsg
;
import
com.neotel.smfcore.custom.micron1053.bean.MicronEquipStatus
;
import
com.neotel.smfcore.custom.micron1053.bean.dto.ML5ShelfDto
;
import
com.neotel.smfcore.custom.micron1053.bean.dto.ML5StatusDto
;
import
com.neotel.smfcore.custom.micron1053.enums.MicronEquipName
;
import
com.neotel.smfcore.custom.micron1053.util.MicronDataCache
;
...
...
@@ -30,18 +31,18 @@ public class MicronML5Controller {
@GetMapping
(
"/status"
)
@AnonymousAccess
public
ML5StatusDto
ml5Status
(
)
{
ML5StatusDto
d
to
=
new
ML5StatusDto
();
ML5StatusDto
resultD
to
=
new
ML5StatusDto
();
MicronEquipStatus
r1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R1
.
getName
());
MicronEquipStatus
r2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R2
.
getName
());
MicronEquipStatus
l1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L1
.
getName
());
MicronEquipStatus
l2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L2
.
getName
());
d
to
.
setL1Status
(
l1
.
getStatus
());
d
to
.
setL2Status
(
l2
.
getStatus
());
d
to
.
setR1Status
(
r1
.
getStatus
());
d
to
.
setR2Status
(
r2
.
getStatus
());
d
to
.
setNg1Count
(
l1
.
getNgCount
());
d
to
.
setNg2Count
(
r1
.
getNgCount
());
resultD
to
.
setL1Status
(
l1
.
getStatus
());
resultD
to
.
setL2Status
(
l2
.
getStatus
());
resultD
to
.
setR1Status
(
r1
.
getStatus
());
resultD
to
.
setR2Status
(
r2
.
getStatus
());
resultD
to
.
setNg1Count
(
l1
.
getNgCount
());
resultD
to
.
setNg2Count
(
r1
.
getNgCount
());
List
<
EquipMsg
>
msgs
=
new
ArrayList
<>();
if
(
r1
.
getMsgList
()
!=
null
&&
r1
.
getMsgList
().
size
()
>
0
)
{
...
...
@@ -57,35 +58,42 @@ public class MicronML5Controller {
msgs
.
addAll
(
l2
.
getMsgList
());
}
if
(
msgs
.
size
()
>
0
)
{
d
to
.
setMsgList
(
msgs
);
resultD
to
.
setMsgList
(
msgs
);
}
Map
<
String
,
Integer
>
needShelfs
=
new
HashMap
<>();
Map
<
String
,
ML5ShelfDto
>
needShelfs
=
new
HashMap
<>();
// 根据时间排序,获取所有任务,Wait和已完成的 任务不发
List
<
DataLog
>
dataLogs
=
taskService
.
getAllTasks
();
Collections
.
sort
(
dataLogs
);
for
(
DataLog
task
:
dataLogs
)
{
if
(
task
.
isPutInTask
()||
task
.
isEnd
()||
task
.
isFinished
()||
task
.
isCancel
())
{
if
(
task
.
isPutInTask
()
||
task
.
isEnd
()
||
task
.
isFinished
()
||
task
.
isCancel
())
{
continue
;
}
if
(
task
.
isCheckOutTask
()&&
task
.
isWait
())
{
continue
;
if
(
task
.
isCheckOutTask
()
&&
task
.
isWait
())
{
//
continue;
}
String
taskType
=
MicronDataCache
.
GetMaterialType
(
task
);
String
shelf
=
MicronDataCache
.
getShelfType
(
taskType
);
if
(
needShelfs
.
containsKey
(
shelf
))
{
int
newCount
=
needShelfs
.
get
(
shelf
)
+
1
;
needShelfs
.
put
(
shelf
,
newCount
);
}
else
{
needShelfs
.
put
(
shelf
,
1
);
String
materialType
=
MicronDataCache
.
GetMaterialType
(
task
);
String
shelf
=
MicronDataCache
.
getShelfType
(
materialType
);
String
outType
=
"L"
;
if
(
shelf
.
equals
(
"S007"
))
{
outType
=
"R"
;
}
ML5ShelfDto
shelfDto
=
needShelfs
.
getOrDefault
(
shelf
,
new
ML5ShelfDto
(
materialType
,
shelf
,
outType
,
0
,
0
));
shelfDto
.
setNum
(
shelfDto
.
getNum
()
+
1
);
needShelfs
.
put
(
shelfDto
.
getShelfType
(),
shelfDto
);
}
List
<
ML5ShelfDto
>
needList
=
new
ArrayList
<>();
for
(
ML5ShelfDto
obj
:
needShelfs
.
values
())
{
obj
.
setShelfNum
(
MicronDataCache
.
getShelfNum
(
obj
.
getShelfType
(),
obj
.
getNum
()));
needList
.
add
(
obj
);
}
if
(
needShelfs
.
size
()
>
0
)
{
dto
.
setNeedShelfs
(
needShelfs
);
resultDto
.
setNeedShelfs
(
needList
);
}
return
d
to
;
return
resultD
to
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
查看文件 @
23cc13c
...
...
@@ -66,7 +66,21 @@ public class MicronStatusController {
MicronEquipStatus
s
=
MicronDataCache
.
getStatus
(
name
);
if
(!
s
.
timeOut
()){
dto
.
getStatusMap
().
put
(
s
.
getEquipName
(),
s
.
getStatus
()
);
if
(
s
.
getMsgList
()!=
null
&&
s
.
getMsgList
().
size
()>
0
)
{
// if(s.getMsgList()!=null&&s.getMsgList().size()>0) {
// dto.getMsgList().addAll(s.getMsgList());
// }
}
}
//所有设备的报警都加上
List
<
MicronEquipStatus
>
statuses
=
new
ArrayList
<>();
statuses
.
addAll
(
MicronDataCache
.
equipStatusMap
.
values
());
for
(
MicronEquipStatus
s
:
statuses
)
{
if
(!
s
.
timeOut
())
{
if
(!
dto
.
getStatusMap
().
containsKey
(
s
.
getEquipName
())){
dto
.
getStatusMap
().
put
(
s
.
getEquipName
(),
s
.
getStatus
());
}
if
(
s
.
getMsgList
()
!=
null
&&
s
.
getMsgList
().
size
()
>
0
)
{
dto
.
getMsgList
().
addAll
(
s
.
getMsgList
());
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
查看文件 @
23cc13c
...
...
@@ -43,13 +43,14 @@ public class MicronDataCache {
public
static
String
REEL
=
"reel"
;
public
static
String
GetMaterialType
(
String
cid
,
String
storageId
,
int
w
,
int
h
){
String
[]
pizzaCids
=
new
String
[]{
"SBSH1"
,
"SBSH2"
,
"SBDH1-1"
,
"SBDH1-2"
,
"SBDH2-1"
,
"SBDH2-2"
};
for
(
String
pizzaCid
:
pizzaCids
)
{
if
(
pizzaCid
.
equals
(
c
id
))
{
if
(
cid
.
contains
(
pizzaC
id
))
{
return
PIZZABOX
;
}
}
if
(
cid
.
equal
s
(
"SBDH3-1"
))
{
if
(
cid
.
contain
s
(
"SBDH3-1"
))
{
if
(
w
==
310
&&
h
==
80
)
{
return
PCB
;
}
else
if
(
w
==
330
&&
h
==
120
)
{
...
...
@@ -58,7 +59,7 @@ public class MicronDataCache {
return
PCB
;
}
}
else
if
(
cid
.
equal
s
(
"SBDH3-2"
)){
else
if
(
cid
.
contain
s
(
"SBDH3-2"
)){
return
PCB
;
}
...
...
@@ -67,21 +68,21 @@ public class MicronDataCache {
// }
return
REEL
;
//SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2这些都是Pizza box,对应的料架是M01开头的,每个料架可以放5盘料
//SBDH3-1里面有pcb,对应的料架是M02开头,每个料架可以放5盘料。
//SBDH3-1里面有pcb,对应的料架是M02开头,每个料架可以放5盘料。 310*80是PCB, 330*120是tray
//SBDH3-2里面是pcb物料
// tray对应的料架是M03开头,每个料架可以放4盘料,
// 还有reel料盘尺寸是13*44,13*56,13*72
//SBDH3-2里面是pcb物料
//
310*80是PCB
//
330*120是tray
//
//
// 13*72的入13*44,13*56,13*72的料盘
//386*86的这个库位设计的时候错了,就不使用了
//pizzaBox (料架M01,每个料架5盘) SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2
//pcb (料架M02,每个料架5盘) SBDH3-2,SBDH3-1部分
//tray (料架M03,每个料架4盘) SBDH3-1 里
//reel (料架
M01,每个料架
5盘) SBDH3-1 13*44,13*56,13*72
//reel (料架
S007,每个料架3
5盘) SBDH3-1 13*44,13*56,13*72
}
public
static
String
GetMaterialType
(
DataLog
dataLog
){
return
GetMaterialType
(
dataLog
.
getCid
(),
dataLog
.
getStorageId
(),
dataLog
.
getW
(),
dataLog
.
getH
());
...
...
@@ -101,5 +102,23 @@ public class MicronDataCache {
return
"S007"
;
}
public
static
int
getShelfNum
(
String
shelfType
,
int
taskNum
){
if
(
taskNum
<=
0
){
return
0
;
}
int
shelfN
=
5
;
if
(
shelfType
.
equals
(
"M01"
)||
shelfType
.
equals
(
"M02"
)){
shelfN
=
5
;
}
else
if
(
shelfType
.
equals
(
"M03"
)){
shelfN
=
4
;
}
else
if
(
shelfType
.
equals
(
"S007"
)){
shelfN
=
35
;
}
if
(
taskNum
%
shelfN
==
0
){
return
taskNum
/
shelfN
;
}
else
{
return
(
taskNum
/
shelfN
)+
1
;
}
}
}
src/main/java/com/neotel/smfcore/custom/micron20031/MicronInventoryReportsController.java
查看文件 @
23cc13c
...
...
@@ -113,7 +113,7 @@ public class MicronInventoryReportsController {
@ApiOperation
(
"Inventory Detial Report- Detailed full inventory history I3:库存表格"
)
@GetMapping
(
"/detialReport"
)
@AnonymousAccess
public
PageData
<
StoragePosDto
>
storagePosFind
(
StoragePosFindCriteria
criteria
,
Pageable
pageable
,
HttpServletRequest
request
)
{
public
PageData
<
StoragePosDto
>
detialReport
(
StoragePosFindCriteria
criteria
,
Pageable
pageable
,
HttpServletRequest
request
)
{
Query
query
=
getPosFindCriteria
(
criteria
);
PageData
<
StoragePos
>
pages
=
storagePosManager
.
findByPage
(
query
,
pageable
);
List
<
StoragePosDto
>
StoragePosDtos
=
storagePosMapper
.
toDto
(
pages
.
getContent
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论