Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 733890f5
由
zshaohui
编写于
2025-04-15 16:20:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.按入库时间进行先进先出
1 个父辈
6c4790d3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
37 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/custom/Jkem21481/controller/JkemController.java
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
查看文件 @
733890f
...
...
@@ -266,12 +266,29 @@ public class MaterialBoxController {
}
}
//设置barcode的入库时间
long
putInTime
=
barcode
.
getPutInTime
();
if
(
putInTime
==
-
1
){
putInTime
=
System
.
currentTimeMillis
();
}
barcode
.
setPutInTime
(
putInTime
);
barcodeManager
.
save
(
barcode
);
//设置料盒的数量
int
amount
=
barcode
.
getAmount
();
String
partNumber
=
barcode
.
getPartNumber
();
boxBarcode
.
setPartNumber
(
partNumber
);
boxBarcode
.
setAmount
(
amount
+
boxBarcode
.
getAmount
());
//设置治具盒的入库时间
long
boxPutInTime
=
boxBarcode
.
getPutInTime
();
if
(
boxPutInTime
==
-
1
){
boxPutInTime
=
System
.
currentTimeMillis
();
}
if
(
boxPutInTime
>
putInTime
){
boxPutInTime
=
putInTime
;
}
boxBarcode
.
setPutInTime
(
boxPutInTime
);
barcodeManager
.
save
(
boxBarcode
);
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
733890f
...
...
@@ -365,19 +365,19 @@ public class StoragePosManagerImpl implements IStoragePosManager {
public
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
){
Sort
sort
=
null
;
if
(
CHECKOUT_TYPE
.
EXPIRE_FIRST
.
equals
(
checkoutType
)){
//先过期先出
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
,
"barcode.expireDate"
,
"barcode.putIn
Dat
e"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
,
"barcode.expireDate"
,
"barcode.putIn
Tim
e"
);
}
else
if
(
CHECKOUT_TYPE
.
FIFO
.
equals
(
checkoutType
)){
//严格的先进先出
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.putIn
Dat
e"
,
"barcode.usedCount"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.putIn
Tim
e"
,
"barcode.usedCount"
);
}
else
if
(
CHECKOUT_TYPE
.
USED_FIRST
.
equals
(
checkoutType
)){
//尾料优先
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
,
"barcode.putIn
Dat
e"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
,
"barcode.putIn
Tim
e"
);
}
else
if
(
CHECKOUT_TYPE
.
PRODUCE_DATE
.
equals
(
checkoutType
)){
//先生产先出
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.produceDate"
,
"barcode.amount"
,
"barcode.putIn
Dat
e"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.produceDate"
,
"barcode.amount"
,
"barcode.putIn
Tim
e"
);
}
else
if
(
CHECKOUT_TYPE
.
BATCH_FIRST
.
equals
(
checkoutType
)){
//批次优先
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.batch"
,
"barcode.produceDate"
,
"barcode.amount"
,
"barcode.putIn
Dat
e"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.batch"
,
"barcode.produceDate"
,
"barcode.amount"
,
"barcode.putIn
Tim
e"
);
}
else
{
//效率优先
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.putIn
Dat
e"
,
"createDate"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.putIn
Tim
e"
,
"createDate"
);
}
return
sort
;
}
...
...
src/main/java/com/neotel/smfcore/custom/Jkem21481/controller/JkemController.java
查看文件 @
733890f
...
...
@@ -503,12 +503,26 @@ public class JkemController {
if
(
barcode
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.noValidCode"
,
"无效的条码"
);
}
long
putInTime
=
barcode
.
getPutInTime
();
if
(
putInTime
==
-
1
){
putInTime
=
System
.
currentTimeMillis
();
}
Barcode
newBarcode
=
new
Barcode
();
newBarcode
.
setPutInTime
(
putInTime
);
newBarcode
.
setAmount
(
barcode
.
getCheckingAmount
());
newBarcode
.
setBarcode
(
"RI"
+
System
.
currentTimeMillis
());
newBarcode
.
setPartNumber
(
barcode
.
getPartNumber
());
barcodeManager
.
save
(
newBarcode
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"barcode"
,
barcode
.
getBarcode
());
resultMap
.
put
(
"partNumber"
,
barcode
.
getPartNumber
());
resultMap
.
put
(
"amount"
,
barcode
.
getAmount
());
resultMap
.
put
(
"checkingAmount"
,
barcode
.
getCheckingAmount
());
resultMap
.
put
(
"orderNo"
,
barcode
.
getOrderNo
());
resultMap
.
put
(
"checkingRi"
,
newBarcode
.
getBarcode
());
log
.
info
(
"获取点料数量,barcode为:"
+
barcodeStr
+
",返回结果为:"
+
JSON
.
toJSONString
(
resultMap
));
return
ResultBean
.
newOkResult
(
resultMap
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论