Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 69b353c0
由
zshaohui
编写于
2025-04-23 13:13:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.盘点物料顺序修改
2.手动移转按最新的入库时间去计算
1 个父辈
42e47a46
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
74 行增加
和
17 行删除
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/InventoryController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualStorTransferController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BoxHandleUtil.java
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/InventoryController.java
查看文件 @
69b353c
...
@@ -792,6 +792,13 @@ public class InventoryController {
...
@@ -792,6 +792,13 @@ public class InventoryController {
if
(
boxBarcode
==
null
||
BoxUtil
.
isInventoryFinished
(
boxStr
))
{
if
(
boxBarcode
==
null
||
BoxUtil
.
isInventoryFinished
(
boxStr
))
{
return
boxStr
+
"不是要盘点的料箱"
;
return
boxStr
+
"不是要盘点的料箱"
;
}
}
//从库位中去查找
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
boxBarcode
.
getBarcode
());
if
(
pos
!=
null
)
{
boxBarcode
=
pos
.
getBarcode
();
}
Barcode
barcode
=
codeBean
.
getBarcode
();
Barcode
barcode
=
codeBean
.
getBarcode
();
//判断是否在料箱中
//判断是否在料箱中
String
posName
=
barcode
.
getPosName
();
String
posName
=
barcode
.
getPosName
();
...
@@ -834,23 +841,7 @@ public class InventoryController {
...
@@ -834,23 +841,7 @@ public class InventoryController {
List
<
Map
<
String
,
String
>>
reelInfoList
=
getReelInfoList
(
boxBarcode
,
posName
,
inventoryBatch
,
data
);
List
<
Map
<
String
,
String
>>
reelInfoList
=
getReelInfoList
(
boxBarcode
,
posName
,
inventoryBatch
,
data
);
if
(
reelInfoList
!=
null
&&
!
reelInfoList
.
isEmpty
())
{
if
(
reelInfoList
!=
null
&&
!
reelInfoList
.
isEmpty
())
{
int
index
=
-
1
;
int
index
=
0
;
for
(
int
i
=
0
;
i
<
reelInfoList
.
size
();
i
++)
{
Map
<
String
,
String
>
map
=
reelInfoList
.
get
(
i
);
String
code
=
map
.
get
(
"code"
);
String
reel
=
map
.
get
(
"reel"
);
if
(
code
.
equals
(
reel
))
{
index
=
i
;
break
;
}
}
if
(
index
<
0
){
index
=
reelInfoList
.
size
()
-
1
;
}
else
if
(
index
>
0
){
index
=
index
-
1
;
}
else
if
(
index
==
0
){
index
=
-
1
;
}
if
(
index
!=
-
1
){
if
(
index
!=
-
1
){
Map
<
String
,
String
>
map
=
reelInfoList
.
get
(
index
);
Map
<
String
,
String
>
map
=
reelInfoList
.
get
(
index
);
String
code
=
map
.
get
(
"code"
);
String
code
=
map
.
get
(
"code"
);
...
@@ -901,6 +892,19 @@ public class InventoryController {
...
@@ -901,6 +892,19 @@ public class InventoryController {
inventoryDataManager
.
save
(
inventoryData
);
inventoryDataManager
.
save
(
inventoryData
);
}
}
}
}
//同时设置barcode的seq
barcode
.
setSeq
(
0
-
barcode
.
getSeq
());
barcodeManager
.
save
(
barcode
);
boxBarcode
.
updateSubCodes
(
barcode
);
barcodeManager
.
save
(
boxBarcode
);
if
(
pos
!=
null
){
pos
.
setBarcode
(
boxBarcode
);
storagePosManager
.
save
(
pos
);
}
return
errorMsg
;
return
errorMsg
;
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualStorTransferController.java
查看文件 @
69b353c
...
@@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.swing.*
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Locale
;
import
java.util.Locale
;
...
@@ -174,6 +175,16 @@ public class ManualStorTransferController {
...
@@ -174,6 +175,16 @@ public class ManualStorTransferController {
log
.
info
(
barcode
.
getBarcode
()
+
"不可以放到料格:"
+
newPartition
+
",原因为:"
+
canPutIn
);
log
.
info
(
barcode
.
getBarcode
()
+
"不可以放到料格:"
+
newPartition
+
",原因为:"
+
canPutIn
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
barcode
.
getBarcode
()
+
"不可以放到料格:"
+
newPartition
+
",原因为:"
+
canPutIn
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
barcode
.
getBarcode
()
+
"不可以放到料格:"
+
newPartition
+
",原因为:"
+
canPutIn
);
}
}
//获取最早的创建时间(转库的时候,每次转移的料盘,取当前隔口的最早创建时间)
Date
createDate
=
BoxHandleUtil
.
getCreateDate
(
boxBarcode
,
newPartition
);
if
(
barcode
.
getCreateDate
()
==
null
){
barcode
.
setCreateDate
(
createDate
);
}
if
(
barcode
.
getCreateDate
().
getTime
()
>
createDate
.
getTime
()){
barcode
.
setCreateDate
(
createDate
);
}
barcode
.
setPosName
(
newPartition
);
barcode
.
setPosName
(
newPartition
);
barcode
.
setWarehouseCode
(
warehouseCode
);
barcode
.
setWarehouseCode
(
warehouseCode
);
barcode
.
setBarSource
(
"隔口移转"
);
barcode
.
setBarSource
(
"隔口移转"
);
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BoxHandleUtil.java
查看文件 @
69b353c
...
@@ -354,6 +354,29 @@ public class BoxHandleUtil {
...
@@ -354,6 +354,29 @@ public class BoxHandleUtil {
return
seq
;
return
seq
;
}
}
/**
* 获取序列号
*
* @param boxBarcode
* @param binCode
* @return
*/
public
static
int
getSmallestSeq
(
Barcode
boxBarcode
,
String
binCode
)
{
int
seq
=
0
;
List
<
Barcode
>
subCodeList
=
boxBarcode
.
getSubCodeList
();
if
(
subCodeList
!=
null
&&
!
subCodeList
.
isEmpty
())
{
for
(
Barcode
barcode
:
subCodeList
)
{
if
(
binCode
.
equals
(
barcode
.
getPosName
()))
{
if
(
seq
>
barcode
.
getSeq
())
{
seq
=
barcode
.
getSeq
();
}
}
}
}
return
seq
;
}
public
static
StoragePos
locOnePos
(
Barcode
boxBarcode
)
{
public
static
StoragePos
locOnePos
(
Barcode
boxBarcode
)
{
//判断信息是否在已经在库位中(出入库只改变料箱位置状态,不从StoragePos表中清除)
//判断信息是否在已经在库位中(出入库只改变料箱位置状态,不从StoragePos表中清除)
...
@@ -608,4 +631,23 @@ public class BoxHandleUtil {
...
@@ -608,4 +631,23 @@ public class BoxHandleUtil {
}
}
return
task
;
return
task
;
}
}
public
static
Date
getCreateDate
(
Barcode
boxBarcode
,
String
binCode
)
{
Date
createDate
=
new
Date
();
int
seq
=
0
;
List
<
Barcode
>
subCodeList
=
boxBarcode
.
getSubCodeList
();
if
(
subCodeList
!=
null
&&
!
subCodeList
.
isEmpty
())
{
for
(
Barcode
barcode
:
subCodeList
)
{
if
(
binCode
.
equals
(
barcode
.
getPosName
()))
{
if
(
createDate
.
getTime
()
>
barcode
.
getCreateDate
().
getTime
()){
createDate
=
barcode
.
getCreateDate
();
}
}
}
}
return
createDate
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论