Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7390c53d
由
zshaohui
编写于
2024-07-06 09:45:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加流水线接口
1 个父辈
fb6559c8
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
76 行增加
和
9 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CDeviceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualGrPutInController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/AgvDeviceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CDeviceController.java
查看文件 @
7390c53
...
@@ -35,12 +35,14 @@ import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketReturn;
...
@@ -35,12 +35,14 @@ import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketReturn;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketTransfer
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketTransfer
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.ValidBin
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.ValidBin
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.MaterialUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.MaterialUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.third.util.MaterialLocUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.third.util.MaterialLocUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -748,6 +750,30 @@ public class CDeviceController {
...
@@ -748,6 +750,30 @@ public class CDeviceController {
if
(
validBin
==
null
){
if
(
validBin
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
stackerId
+
"未找到可用料箱"
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
stackerId
+
"未找到可用料箱"
);
}
}
//判断AGV是上的料箱有几个
int
count
=
0
;
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
dataLog
:
allTasks
)
{
if
(
dataLog
.
isCheckOutTask
()
&&
(
dataLog
.
getStatus
().
equals
(
OP_STATUS
.
WAIT
.
name
()))
||
dataLog
.
getStatus
().
equals
(
OP_STATUS
.
EXECUTING
.
name
())
||
dataLog
.
getStatus
().
equals
(
OP_STATUS
.
OUT_ON_AGV
.
name
()))
{
if
(
TaskCurrentLoc
.
In1_FeedingInlet
.
equals
(
dataLog
.
getLoc
())
||
TaskCurrentLoc
.
In2_FeedingInlet
.
equals
(
dataLog
.
getLoc
())
||
TaskCurrentLoc
.
In_FeedingInlet
.
equals
(
dataLog
.
getLoc
()))
{
count
=
count
+
1
;
}
}
}
if
(
count
<
4
)
{
try
{
log
.
info
(
"AGV上的料箱数量小于4,呼叫一个空料箱出来"
);
String
materialSize
=
MaterialUtil
.
getMaterialSize
(
stackerId
);
BoxHandleUtil
.
callEmptyBox
(
materialSize
,
TaskCurrentLoc
.
In_FeedingInlet
,
stackerBarcode
.
getWarehouseCode
(),
new
ArrayList
<>());
}
catch
(
Exception
e
)
{
log
.
info
(
"呼叫空箱报错:"
+
e
.
getMessage
());
}
}
return
ResultBean
.
newOkResult
(
validBin
);
return
ResultBean
.
newOkResult
(
validBin
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualGrPutInController.java
查看文件 @
7390c53
...
@@ -214,9 +214,9 @@ public class ManualGrPutInController {
...
@@ -214,9 +214,9 @@ public class ManualGrPutInController {
for
(
DataLog
dataLog
:
taskList
)
{
for
(
DataLog
dataLog
:
taskList
)
{
if
(
posName
.
equals
(
dataLog
.
getPosName
()))
{
if
(
posName
.
equals
(
dataLog
.
getPosName
()))
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
if
(
dataLog
.
isPutInTask
())
{
//
if (dataLog.isPutInTask()) {
return
ResultBean
.
new
OkResult
(
dataLog
);
return
ResultBean
.
new
ErrorResult
(-
1
,
""
,
posName
+
"有正在执行的任务,请确认"
);
}
//
}
}
}
}
}
}
}
...
@@ -226,7 +226,8 @@ public class ManualGrPutInController {
...
@@ -226,7 +226,8 @@ public class ManualGrPutInController {
if
(
boxStr
.
startsWith
(
dataLog
.
getBarcode
()))
{
if
(
boxStr
.
startsWith
(
dataLog
.
getBarcode
()))
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
if
(
dataLog
.
isPutInTask
())
{
if
(
dataLog
.
isPutInTask
())
{
return
ResultBean
.
newOkResult
(
dataLog
);
//return ResultBean.newOkResult(dataLog);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxStr
+
"有正在执行的入库任务,请确认"
);
}
else
{
}
else
{
log
.
info
(
boxStr
+
"有正在执行的出库任务,服务器更改状态为完成"
);
log
.
info
(
boxStr
+
"有正在执行的出库任务,服务器更改状态为完成"
);
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/AgvDeviceController.java
查看文件 @
7390c53
...
@@ -53,7 +53,7 @@ public class AgvDeviceController {
...
@@ -53,7 +53,7 @@ public class AgvDeviceController {
public
List
<
DataLog
>
getPutInTask
()
{
public
List
<
DataLog
>
getPutInTask
()
{
List
<
DataLog
>
dataLogList
=
new
ArrayList
<>();
List
<
DataLog
>
dataLogList
=
new
ArrayList
<>();
for
(
DataLog
dataLog
:
taskService
.
getAllTasks
())
{
for
(
DataLog
dataLog
:
taskService
.
getAllTasks
())
{
if
(
dataLog
.
isPutInTask
()
&&
dataLog
.
isWait
(
))
{
if
(
dataLog
.
isPutInTask
()
&&
(
dataLog
.
isWait
()
||
dataLog
.
isExecuting
()
))
{
dataLogList
.
add
(
dataLog
);
dataLogList
.
add
(
dataLog
);
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
查看文件 @
7390c53
...
@@ -41,6 +41,7 @@ import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil;
...
@@ -41,6 +41,7 @@ import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.logging.log4j.util.Strings
;
import
org.apache.logging.log4j.util.Strings
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
...
@@ -99,12 +100,12 @@ public class LineController {
...
@@ -99,12 +100,12 @@ public class LineController {
//1.解析条码
//1.解析条码
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
"=2x2="
+
boxId
);
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
"=2x2="
+
boxId
);
if
(
barcode
==
null
)
{
if
(
barcode
==
null
)
{
log
.
info
(
barcode
.
getBarcode
()+
"绑定人工作业或者砍单回库作业,不进行校验"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.invalid"
,
"条码无效"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.invalid"
,
"条码无效"
);
}
}
//如果是人工作业 直接返回ok
//如果是人工作业 直接返回ok
if
(
ManualWorkUtil
.
bindManualWork
(
barcode
.
getBarcode
())
||
ManualWorkUtil
.
bindShipCancelUpShelf
(
barcode
.
getBarcode
()))
{
if
(
ManualWorkUtil
.
bindManualWork
(
barcode
.
getBarcode
())
||
ManualWorkUtil
.
bindShipCancelUpShelf
(
barcode
.
getBarcode
()))
{
log
.
info
(
barcode
.
getBarcode
()+
"绑定人工作业或者砍单回库作业,不进行校验"
);
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
}
...
@@ -262,7 +263,7 @@ public class LineController {
...
@@ -262,7 +263,7 @@ public class LineController {
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
allTasks
)
{
for
(
DataLog
task
:
allTasks
)
{
if
(
task
.
isCheckOutTask
()
&&
barcode
.
getBarcode
().
equals
(
task
.
getBarcode
()))
{
if
(
task
.
isCheckOutTask
()
&&
barcode
.
getBarcode
().
equals
(
task
.
getBarcode
()))
{
log
.
info
(
boxId
+
"任务需要改成
FINISHED
"
);
log
.
info
(
boxId
+
"任务需要改成
OUT_ON_LINE
"
);
dataLog
=
task
;
dataLog
=
task
;
break
;
break
;
}
}
...
@@ -280,7 +281,7 @@ public class LineController {
...
@@ -280,7 +281,7 @@ public class LineController {
soureId
=
dataLog
.
getSourceId
();
soureId
=
dataLog
.
getSourceId
();
sourceName
=
dataLog
.
getSourceName
();
sourceName
=
dataLog
.
getSourceName
();
if
(!
dataLog
.
isFinished
()){
if
(!
dataLog
.
isFinished
()){
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
dataLog
.
setStatus
(
OP_STATUS
.
OUT_ON_LINE
.
name
());
taskService
.
moveTaskToFinished
(
dataLog
);
taskService
.
moveTaskToFinished
(
dataLog
);
taskService
.
updateFinishedTask
(
dataLog
);
taskService
.
updateFinishedTask
(
dataLog
);
}
}
...
@@ -289,7 +290,7 @@ public class LineController {
...
@@ -289,7 +290,7 @@ public class LineController {
List
<
DataLog
>
dataLogList
=
taskService
.
getAllTasks
();
List
<
DataLog
>
dataLogList
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
dataLogList
)
{
for
(
DataLog
task
:
dataLogList
)
{
if
(
task
.
isCheckOutTask
()
&&
!
task
.
isFinished
()
&&
!
task
.
isCancel
()
&&
!
task
.
isPause
()){
if
(
task
.
isCheckOutTask
()
&&
!
task
.
isFinished
()
&&
!
task
.
isCancel
()
&&
!
task
.
isPause
()
&&
!
OP_STATUS
.
OUT_ON_LINE
.
name
().
equals
(
task
.
getStatus
())
){
if
(
StringUtils
.
isEmpty
(
soureId
)){
if
(
StringUtils
.
isEmpty
(
soureId
)){
if
(
StringUtils
.
isEmpty
(
task
.
getSourceId
())){
if
(
StringUtils
.
isEmpty
(
task
.
getSourceId
())){
num
=
num
+
1
;
num
=
num
+
1
;
...
@@ -417,6 +418,45 @@ public class LineController {
...
@@ -417,6 +418,45 @@ public class LineController {
return
ResultBean
.
newErrorResult
(-
1
,
"error.noTask"
,
"未找到该料箱["
+
boxId
+
"]的出库任务"
);
return
ResultBean
.
newErrorResult
(-
1
,
"error.noTask"
,
"未找到该料箱["
+
boxId
+
"]的出库任务"
);
}
}
@ApiOperation
(
"完成料箱任务"
)
@RequestMapping
(
"/finishBoxTask"
)
@AnonymousAccess
public
ResultBean
finishBoxTask
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
boxId
=
paramMap
.
get
(
"cartonId"
);
log
.
info
(
"完成料箱任务,箱子号为:"
+
boxId
);
//1.解析条码
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
"=2x2="
+
boxId
);
if
(
barcode
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.invalid"
,
"条码无效"
);
}
DataLog
dataLog
=
null
;
for
(
DataLog
task
:
taskService
.
getAllTasks
())
{
if
(
task
.
isCheckOutTask
()
&&
barcode
.
getBarcode
().
equals
(
task
.
getBarcode
())){
dataLog
=
task
;
break
;
}
}
if
(
dataLog
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxId
+
"未找到对应的料箱任务"
);
}
if
(!
dataLog
.
isFinished
()){
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
taskService
.
moveTaskToFinished
(
dataLog
);
taskService
.
updateFinishedTask
(
dataLog
);
}
return
ResultBean
.
newOkResult
(
""
);
}
private
void
finishedOutTask
(
DataLog
queueTask
){
private
void
finishedOutTask
(
DataLog
queueTask
){
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
queueTask
.
getBarcode
());
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
queueTask
.
getBarcode
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论