Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 73004c2a
由
zshaohui
编写于
2022-12-13 15:21:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
外仓扫码入库校验
1 个父辈
97016b48
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
5 行删除
src/main/java/com/neotel/smfcore/core/system/service/dao/impl/DataLogDaoImpl.java
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/OutWarehouseController.java
src/main/java/com/neotel/smfcore/core/system/service/dao/impl/DataLogDaoImpl.java
查看文件 @
73004c2
...
...
@@ -36,9 +36,9 @@ public class DataLogDaoImpl extends AbstractBaseDao implements IDataLogDao {
}
private
List
<
ChartItem
>
chart
(
Date
fromTime
,
Date
toTime
,
int
type
,
String
partNumber
){
//
Date addOneDayToTime = DateUtil.addOneDayNoTime(toTime);
Date
addOneDayToTime
=
DateUtil
.
addOneDayNoTime
(
toTime
);
Criteria
c
=
new
Criteria
().
andOperator
(
Criteria
.
where
(
"updateDate"
).
gte
(
fromTime
),
Criteria
.
where
(
"updateDate"
).
lt
(
t
oTime
)).
and
(
"type"
).
is
(
type
);
Criteria
.
where
(
"updateDate"
).
lt
(
addOneDayT
oTime
)).
and
(
"type"
).
is
(
type
);
c
.
and
(
"status"
).
in
(
OP_STATUS
.
END
.
name
(),
OP_STATUS
.
FINISHED
.
name
());
if
(
Strings
.
isNotBlank
(
partNumber
)){
c
.
and
(
"partNumber"
).
is
(
partNumber
);
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/agvBox/rest/OutWarehouseController.java
查看文件 @
73004c2
...
...
@@ -363,7 +363,8 @@ public class OutWarehouseController {
}
//判断是否存在其他料箱中
if
(
StringUtils
.
isNotBlank
(
barcode
.
getPosName
()))
{
String
posName
=
getPosNameBySubcode
(
barcode
.
getBarcode
());
if
(
StringUtils
.
isNotBlank
(
posName
))
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"物料"
+
barcode
.
getBarcode
()
+
"已存在料箱:"
+
barcode
.
getPosName
());
}
...
...
@@ -894,6 +895,7 @@ public class OutWarehouseController {
subBarcode
=
barcodeManager
.
save
(
subBarcode
);
}
//更新barcode缓存
log
.
info
(
subBarcode
.
getBarcode
()+
"的数量为:"
+
subBarcode
.
getAmount
());
pidBarcode
.
UpdateSubCode
(
subBarcode
);
if
(
opType
==
OP
.
CHECKOUT
&&
OP_STATUS
.
FINISHED
.
name
().
equals
(
opStatus
))
{
pidBarcode
.
setAmount
(
pidBarcode
.
getAmount
()
-
opQty
);
...
...
@@ -908,7 +910,7 @@ public class OutWarehouseController {
pidBarcode
.
setAmount
(
pidBarcode
.
getAmount
()
+
opQty
);
pidBarcode
.
setReelAmount
(
pidBarcode
.
getReelAmount
()
+
subBarcode
.
getReelAmount
());
//入库卷数+1
}
pidBarcode
=
barcodeManager
.
save
Barcode
(
pidBarcode
);
pidBarcode
=
barcodeManager
.
save
(
pidBarcode
);
DataLog
task
=
null
;
//先查看是否有相同类型且库位相同的任务
if
(
currentTask
!=
null
)
{
...
...
@@ -1129,7 +1131,7 @@ public class OutWarehouseController {
barcodeByOut
.
setOrderItemId
(
null
);
barcodeByOut
=
barcodeManager
.
save
(
barcodeByOut
);
pidBarcode
.
UpdateSubCode
(
barcodeByOut
);
pidBarcode
=
barcodeManager
.
save
Barcode
(
pidBarcode
);
pidBarcode
=
barcodeManager
.
save
(
pidBarcode
);
//互换,要出的和隔口中的数据
int
amount
=
barcode
.
getAmount
();
...
...
@@ -1281,4 +1283,25 @@ public class OutWarehouseController {
Pattern
pattern
=
Pattern
.
compile
(
QueryHelp
.
escapeExprSpecialWord
(
boxStr
),
Pattern
.
CASE_INSENSITIVE
);
return
barcodeManager
.
findByQuery
(
new
Query
(
Criteria
.
where
(
"posName"
).
regex
(
pattern
)));
}
private
String
getPosNameBySubcode
(
String
barcodeStr
)
{
String
posName
=
""
;
Criteria
c
=
Criteria
.
where
(
"subCodeList.barcode"
).
is
(
barcodeStr
);
List
<
Barcode
>
barcodes
=
barcodeManager
.
findByQuery
(
new
Query
(
c
));
if
(
barcodes
!=
null
&&
!
barcodes
.
isEmpty
())
{
for
(
Barcode
barcode
:
barcodes
)
{
for
(
Barcode
subCode
:
barcode
.
getSubCodeList
())
{
if
(
barcodeStr
.
equals
(
subCode
.
getBarcode
()))
{
posName
=
subCode
.
getPosName
();
break
;
}
}
if
(
StringUtils
.
isNotBlank
(
posName
))
{
break
;
}
}
}
return
posName
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论