Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4311ee91
由
zshaohui
编写于
2023-07-21 15:39:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
立臻功能优化提交
1 个父辈
c14f8ff7
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
81 行增加
和
17 行删除
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/OutLineController.java
src/main/java/com/neotel/smfcore/custom/lizhen/kanban/outer/OuterKanbanController.java
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
4311ee9
...
...
@@ -551,14 +551,37 @@ public class LiteOrderCache {
//PN
do
{
//首先按空闲料仓进行出库
pos
=
storagePosManager
.
findPartNumber
InStorages
(
freeStorageIds
,
partNumber
,
excludePosIds
,
checkoutType
,
orderItem
.
getBrand
());
List
<
StoragePos
>
storagePosList
=
storagePosManager
.
findPartNumberList
InStorages
(
freeStorageIds
,
partNumber
,
excludePosIds
,
checkoutType
,
orderItem
.
getBrand
());
//如果为空的话,则出全部的
if
(
pos
==
null
)
{
pos
=
storagePosManager
.
findPartNumberInStorages
(
availableStorageIds
,
partNumber
,
excludePosIds
,
checkoutType
,
orderItem
.
getBrand
());
if
(
storagePosList
==
null
||
storagePosList
.
isEmpty
())
{
storagePosList
=
storagePosManager
.
findPartNumberListInStorages
(
availableStorageIds
,
partNumber
,
excludePosIds
,
checkoutType
,
orderItem
.
getBrand
());
}
//排序找到最早的
if
(
storagePosList
!=
null
&&
!
storagePosList
.
isEmpty
())
{
List
<
Barcode
>
barcodeList
=
new
ArrayList
<>();
for
(
StoragePos
storagePos
:
storagePosList
)
{
barcodeList
.
add
(
storagePos
.
getBarcode
());
}
if
(
barcodeList
!=
null
&&
!
barcodeList
.
isEmpty
())
{
barcodeList
=
barcodeList
.
stream
().
sorted
(
Comparator
.
comparing
(
Barcode:
:
getAmount
)
.
thenComparing
(
Barcode:
:
getExpireDate
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
thenComparing
(
Barcode:
:
getCreateDate
)).
collect
(
Collectors
.
toList
());
Barcode
barcode
=
barcodeList
.
get
(
0
);
for
(
StoragePos
storagePos
:
storagePosList
)
{
if
(
storagePos
.
getBarcode
().
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
pos
=
storagePos
;
break
;
}
}
}
}
if
(
pos
==
null
)
{
break
;
}
try
{
smfApi
.
canPutInAfterResolve
(
pos
.
getBarcode
());
}
catch
(
ValidateException
e
)
{
...
...
@@ -1149,9 +1172,9 @@ public class LiteOrderCache {
for
(
StoragePos
pos
:
storagePosList
)
{
for
(
Barcode
barcode
:
pos
.
getBarcode
().
getSubCodeList
())
{
if
(
barcode
.
getPartNumber
().
equals
(
partNumber
))
{
if
(
barcode
.
getExpireDate
()
==
null
)
{
/*
if (barcode.getExpireDate() == null) {
barcode.setExpireDate(new Date());
}
}
*/
barcodeList
.
add
(
barcode
);
}
}
...
...
@@ -1159,7 +1182,7 @@ public class LiteOrderCache {
//按排序找到最先过期入库的partNumber
if
(
barcodeList
!=
null
&&
!
barcodeList
.
isEmpty
())
{
List
<
String
>
posNameList
=
barcodeList
.
stream
().
sorted
(
Comparator
.
comparing
(
Barcode:
:
getExpireDate
)).
map
(
item
->
item
.
getPosName
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
posNameList
=
barcodeList
.
stream
().
sorted
(
Comparator
.
comparing
(
Barcode:
:
getExpireDate
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
)).
reversed
(
)).
map
(
item
->
item
.
getPosName
()).
distinct
().
collect
(
Collectors
.
toList
());
for
(
String
posName
:
posNameList
)
{
for
(
StoragePos
pos
:
storagePosList
)
{
if
(
StringUtils
.
isNotBlank
(
posName
))
{
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
查看文件 @
4311ee9
...
...
@@ -88,4 +88,6 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
int
countByQuery
(
Query
query
);
List
<
StoragePos
>
findStoragePosByPartNumber
(
List
<
String
>
partNumberList
);
List
<
StoragePos
>
findPartNumberListInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
brand
);
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
4311ee9
...
...
@@ -348,7 +348,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
Query
q
=
new
Query
(
c
);
//Sort sort = getSortByCheckOutType(checkOutType);
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
,
"barcode.expireDate"
);
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
,
"barcode.expireDate"
,
"barcode.createDate"
);
q
.
with
(
sort
);
StoragePos
pos
=
storagePosDao
.
findOne
(
q
);
if
(
pos
==
null
)
{
...
...
@@ -820,4 +820,21 @@ public class StoragePosManagerImpl implements IStoragePosManager {
.
and
(
"enabled"
).
is
(
true
).
and
(
"barcode.subCodeList.partNumber"
).
in
(
partNumberList
);
//可用;
return
storagePosDao
.
findByQuery
(
new
Query
(
c
));
}
@Override
public
List
<
StoragePos
>
findPartNumberListInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
brand
)
{
Criteria
c
=
Criteria
.
where
(
"barcode.partNumber"
).
is
(
pn
)
.
and
(
"id"
).
nin
(
excludePosIds
)
.
and
(
"enabled"
).
is
(
true
)
//可用
.
and
(
"barcode.lockId"
).
is
(
null
);
//没有被锁定的仓位;
if
(
storageIdList
!=
null
)
{
c
=
c
.
and
(
"storageId"
).
in
(
storageIdList
);
}
if
(
StringUtils
.
isNotBlank
(
brand
))
{
c
.
and
(
"barcode.provider"
).
is
(
brand
);
}
Query
q
=
new
Query
(
c
);
return
storagePosDao
.
findByQuery
(
q
);
}
}
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/OutLineController.java
查看文件 @
4311ee9
...
...
@@ -566,7 +566,7 @@ public class OutLineController {
if
(
dataLogList
!=
null
&&
!
dataLogList
.
isEmpty
()){
taskService
.
outTaskStatusChange
(
dataLogList
);
}
resultBean
.
setData
(
getBoxInfo
(
boxStr
));
resultBean
.
setData
(
getBoxInfo
(
new
boxStr
));
if
(
hasBrand
)
{
resultBean
.
setCode
(
3
);
return
resultBean
;
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/kanban/outer/OuterKanbanController.java
查看文件 @
4311ee9
...
...
@@ -87,7 +87,6 @@ public class OuterKanbanController {
@RequestMapping
(
"/getStationInAndOutAmout"
)
@AnonymousAccess
public
ResultBean
getStationInAndOutAmout
()
throws
ParseException
{
List
<
StationInOutDto
>
resultList
=
new
ArrayList
<>();
if
(
stationInOutTime
==
null
||
System
.
currentTimeMillis
()
-
stationInOutTime
>=
1000
*
60
*
5
)
{
//先把缓存清空
dtoList
.
clear
();
...
...
@@ -96,11 +95,11 @@ public class OuterKanbanController {
Date
endDate
=
DateUtil
.
addDays
(
currentDate
,
1
);
for
(
int
i
=
1
;
i
<
6
;
i
++)
{
StationInOutDto
dto
=
new
StationInOutDto
();
String
stationName
=
"S"
+
i
;
dto
.
setName
(
stationName
.
toUpperCase
(
Locale
.
ROOT
));
String
stationName
=
"s"
+
i
;
int
inCount
=
dataLogManager
.
getInOutData
(
currentDate
,
endDate
,
OP
.
PUT_IN
,
stationName
);
dto
.
setInCount
(
inCount
);
int
outCount
=
dataLogManager
.
getInOutData
(
currentDate
,
endDate
,
OP
.
CHECKOUT
,
stationName
);
dto
.
setName
(
stationName
.
toUpperCase
(
Locale
.
ROOT
));
dto
.
setInCount
(
inCount
);
dto
.
setOutCount
(
outCount
);
dtoList
.
add
(
dto
);
}
...
...
src/main/resources/config/application.yml
查看文件 @
4311ee9
...
...
@@ -3,15 +3,17 @@ server:
api
:
name
:
Lizhen
inCheckUrl
:
#http://172.30.170.148:8001/Npm/WmsCheckReelfob #禁用料
inCheckUrl
:
#http://172.30.170.148:8001/Npm/WmsCheckReelfob #禁用料
batchCheckUrl
:
#http://172.30.60.117:8001/Npm/WmsCheckReelfob_Batch #批量禁用料
outNotifyUrl
:
#http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(外仓配置)
outNotifyUrlPK
:
#http://172.30.170.148:8001/Sct/SaveReelInfo #PK发料保存(外仓配置)
inNotifyUrl
:
#http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(内仓配置)
inNotifyUrl
:
#http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(内仓配置)
fetchOrderUrl
:
#http://172.30.170.148:8082/SmtAutoWH/GetWoPickingList #获取工单
barcodeInfoUrl
:
#http://172.30.170.148:8001/Sct/GetReelInfo #mes数量
fetchGRUrl
:
#http://10.42.25.18:8082/api/wcs/fetchGR #gr标签
brandQtyUrl
:
#http://10.42.25.18:8082/api/wcs/brandQty #gr标签满卷数
importUrl
:
#http://localhost:8080/smf-core/ext/getDatalogs #内仓导入外仓picking虚拟仓数据
fetchGRUrl
:
#http://10.42.25.199:8082/api/wcs/fetchGR #gr标签
brandQtyUrl
:
#http://172.30.170.199:8082/api/wcs/brandQty #gr标签满卷数
importUrl
:
#http://10.42.222.52:8001/smf-core/ext/forward/getDataLogs #内仓导入外仓picking虚拟仓数据
checkReelMeasure
:
#http://172.30.60.117:8001/Sct/CheckReelMeasure #外仓散料仓量测接口
plant
:
W337
werks
:
W337
outerFactory
:
B15
...
...
@@ -31,6 +33,27 @@ lizhen:
line
:
A05-5FSMT-13S,A05-5FSMT-03S,A05-5FSMT-02S,A05-5FSMT-12S
#,A05-5FARF-06,A05-5FSMT-01S,A05-5FSMT-11S
url
:
http://172.30.97.63:8001/smf-core/api/Mes/machineCallMaterial
#转发地址
forward
:
f2
:
name
:
2F
url
:
http://172.30.88.19:8001/smf-core
f3
:
name
:
3F
url
:
http://172.30.97.99:8001/smf-core
f5
:
name
:
5F
url
:
http://172.30.97.63:8001/smf-core
b15
:
name
:
B15
url
:
http://10.42.176.209:8001/smf-core
# 文件存储路径
file
:
mac
:
~/file/
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论