Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 411a7e2b
由
LN
编写于
2023-05-05 15:17:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加空出库处理接口
1 个父辈
bda962e0
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
53 行增加
和
57 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/TaskDto.java
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
src/main/java/com/neotel/smfcore/custom/micron1053/Micron1053Menu.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
查看文件 @
411a7e2
...
...
@@ -751,7 +751,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
/**
* 出仓位完成
*/
pr
ivate
void
updateCheckoutData
(
DataLog
task
,
OP_STATUS
outBoxStatus
)
throws
ValidateException
{
pr
otected
void
updateCheckoutData
(
DataLog
task
,
OP_STATUS
outBoxStatus
)
throws
ValidateException
{
//从队列里面移除操作
taskService
.
removeQueueTask
(
task
);
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
411a7e2
...
...
@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -745,62 +746,42 @@ public class RobotBoxHandler extends BaseDeviceHandler {
}
}
@ApiOperation
(
"任务空出处理"
)
@PostMapping
(
value
=
"/service/store/robotBox/emptyOut"
)
@ResponseBody
@AnonymousAccess
public
ResultBean
emptyOut
(
HttpServletRequest
request
)
{
String
barcode
=
request
.
getParameter
(
"barcode"
);
try
{
log
.
info
(
"emptyOut: 条码["
+
barcode
+
"] "
);
DataLog
opTask
=
null
;
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
allTasks
)
{
if
(
task
.
isFinished
()
||
task
.
isPutInTask
())
{
continue
;
}
if
(
ObjectUtil
.
isNotEmpty
(
barcode
)
&&
task
.
getBarcode
().
equals
(
barcode
))
{
opTask
=
task
;
break
;
}
}
if
(
opTask
==
null
){
//空出未找到任务
log
.
info
(
"emptyOut: 条码["
+
barcode
+
"] 空出处理失败:任务不存在"
);
return
ResultBean
.
newErrorResult
(
301
,
"smfcore.task.notExist"
,
"任务不存在"
);
}
updateCheckoutData
(
opTask
,
OP_STATUS
.
FINISHED
);
log
.
info
(
"emptyOut: 条码["
+
opTask
.
getBarcode
()
+
"],库位号["
+
opTask
.
getPosName
()+
"]空出完成,结束任务,标记任务为空出"
);
opTask
.
setEmptyOperate
(
true
);
taskService
.
updateFinishedTask
(
opTask
);
return
ResultBean
.
newOkResult
(
opTask
.
getPosName
());
}
catch
(
Exception
e
)
{
return
ResultBean
.
newErrorResult
(
202
,
"smfcore.emptyOut.fail"
,
"任务空出处理[{0}]失败:{1}"
,
new
String
[]{
barcode
,
e
.
getMessage
()});
}
// @ApiOperation("机器人定时获取任务")
// @PostMapping(value = "/service/store/robotBox/getRobotTask")
// @ResponseBody
// @AnonymousAccess
// public ResultBean getRobotTask(HttpServletRequest request) {
// Collection<DataLog> datalogs = taskService.getAllTasks();
// //先查找已在机器人的
//// for (DataLog task : datalogs) {
//// if (task.isInRobot()) {
//// //获取任务失败,还有未完成的任务
//// return ResultBean.newErrorResult(1, "smfcore.task.lastNotEnd", "上个任务未结束{0}{1}", new String[]{task.getPosName(), task.getBarcode()});
//// }
//// }
// //查找出库已经到门口的
// for (DataLog task : datalogs) {
// if (task.isCheckOutTask()) {
// if (task.isBoxdoor()) {
// return returnTaskResult(task);
// }
//
// }
// }
//
// return ResultBean.newErrorResult(-1, "", "");
// }
}
// @ApiOperation("获取指定任务信息")
// @PostMapping(value = "/service/store/robotBox/getBoxDoorStatus")
// @ResponseBody
// @AnonymousAccess
// public ResultBean getBoxDoorStatus(HttpServletRequest request) {
// String cid = request.getParameter("cid");
// //判断仓门口状态,0=空闲,返回其他表示仓门口有料或机器人正在取料
// Storage storage = dataCache.getStorage(cid);
// if (storage == null) {
// return ResultBean.newErrorResult(99, "smfcore.robotBox.notFound", "未找到机器人料仓[{0}]", new String[]{cid});
// }
// if (!storage.isRobotBox()) {
// return ResultBean.newErrorResult(99, "smfcore.robotBox.notFound", "未找到机器人料仓[{0}]", new String[]{cid});
// }
// Collection<DataLog> tasks = taskService.getQueueTasks();
// for (DataLog task : tasks) {
// if (task.getStorageId().equals(storage.getId())) {
// if (task.isBoxdoor()) {
// return ResultBean.newErrorResult(-1, "smfcore.robotBox.boxHasTask", "任务[{0}][{1}]类型{2}状态{3}", new String[]{task.getPosName(), task.getBarcode(), task.getType() + "", task.getStatus()});
// }
//// else if(task.isPutInTask()&&task.isInRobot()){
//// return ResultBean.newErrorResult(-1, "smfcore.robotBox.boxHasTask", "任务[{0}][{1}]类型{2}状态{3}", new String[]{task.getPosName(), task.getBarcode(),task.getType()+"", task.getStatus()});
//// }
// }
// }
// return ResultBean.newOkResult("");
// }
@ApiOperation
(
"点料后更新物料数量"
)
@PostMapping
(
value
=
"/service/store/robotBox/updateReelQty"
)
...
...
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/TaskDto.java
查看文件 @
411a7e2
...
...
@@ -150,4 +150,7 @@ public class TaskDto implements Serializable {
}
@ApiModelProperty
(
"位置信息,如料架编号,托盘编号,移栽编号,皮带线编号,机器人编号等"
)
private
String
locInfo
=
""
;
@ApiModelProperty
(
"是否空出操作"
)
private
Boolean
emptyOperate
;
}
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
查看文件 @
411a7e2
...
...
@@ -238,6 +238,11 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
*/
private
MSDAppendInfo
msdAppendInfo
;
/**
* 是否空出操作
*/
private
Boolean
emptyOperate
;
public
String
getBarcode
()
{
if
(
barcode
==
null
){
return
""
;
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/Micron1053Menu.java
查看文件 @
411a7e2
...
...
@@ -55,7 +55,7 @@ public class Micron1053Menu {
//MI1
MenuInit
.
addMenu
(
menuLabel
,
null
,
162
,
"MI1"
,
"ml"
,
"miOne/miOne/index"
,
"miOne"
);
//MI2
MenuInit
.
addMenu
(
menuLabel
,
null
,
163
,
"MI2"
,
"ml2"
,
"mi
Two/miTwo
/index"
,
"miOne"
);
MenuInit
.
addMenu
(
menuLabel
,
null
,
163
,
"MI2"
,
"ml2"
,
"mi
One/miOne
/index"
,
"miOne"
);
//Status
MenuInit
.
addMenu
(
menuLabel
,
null
,
128
,
"Status"
,
"status"
,
"state/state/index"
,
"state"
);
// //Report
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
查看文件 @
411a7e2
...
...
@@ -347,10 +347,12 @@ public class MicronStatusController {
String
[]
nameList
=
new
String
[]{};
String
robotName
=
"R1"
;
if
(
boxName
.
equals
(
"MI1"
))
{
nameList
=
new
String
[]{
"M3"
,
"M4"
,
"M7"
,
"M8"
};
// nameList = new String[]{"M3", "M4", "M7", "M8"};
nameList
=
new
String
[]{
"KTS-R002A"
,
"KTS-R002B"
,
"KTS-R002C"
,
"KTS-R002D"
};
robotName
=
"R1"
;
}
else
if
(
boxName
.
equals
(
"MI2"
))
{
nameList
=
new
String
[]{
"M1"
,
"M2"
,
"M5"
,
"M6"
};
// nameList = new String[]{"M1", "M2", "M5", "M6"};
nameList
=
new
String
[]{
"KTS-R001A"
,
"KTS-R001B"
,
"KTS-R001C"
,
"KTS-R001D"
};
robotName
=
"R2"
;
}
...
...
src/main/resources/messages.properties
查看文件 @
411a7e2
...
...
@@ -343,6 +343,7 @@ smfcore.selfAudit.noPos=\u76D8\u70B9{0}\u672A\u627E\u5230\u5E93\u4F4D\u53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
smfcore.emptyOut.fail
=
\u
4EFB
\u
52A1[{0}]
\u
7A7A
\u
51FA
\u5904\u7406\u5931\u
8D25:{1}
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
...
...
src/main/resources/messages_en_US.properties
查看文件 @
411a7e2
...
...
@@ -343,3 +343,4 @@ smfcore.selfAudit.noPos=Self Audit{0}No depot number found
smfcore.task.updatePutInFail
=
Cannot update the status of the inbound task {0}[{1}] to {2}
smfcore.saveOk
=
save successfully
smfcore.lockMaterials
=
Locking Materials
smfcore.emptyOut.fail
=
Task [{0}] empty processing failure:{1}
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
411a7e2
...
...
@@ -340,3 +340,4 @@ smfcore.selfAudit.noPos=\u76D8\u70B9{0}\u672A\u627E\u5230\u5E93\u4F4D\u53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
smfcore.emptyOut.fail
=
\u
4EFB
\u
52A1[{0}]
\u
7A7A
\u
51FA
\u5904\u7406\u5931\u
8D25:{1}
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
411a7e2
...
...
@@ -340,3 +340,4 @@ smfcore.selfAudit.noPos=\u76D8\u70B9{0}\u672A\u627E\u5230\u5E93\u4F4D\u53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
smfcore.emptyOut.fail
=
\u
4EFB
\u
52A1[{0}]
\u
7A7A
\u
51FA
\u5904\u7406\u5931\u
8D25:{1}
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
411a7e2
...
...
@@ -341,3 +341,4 @@ smfcore.selfAudit.noPos=\u76E4\u9EDE{0}\u672A\u627E\u5230\u5EAB\u4F4D\u865F
smfcore.task.updatePutInFail
=
\u5165\u
5EAB
\u
4EFB
\u
52D9{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72C0
\u
614B
\u
70BA{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9396\u
5B9A
\u7269\u6599
smfcore.emptyOut.fail
=
\u
4EFB
\u
52D9[{0}]
\u
7A7A
\u
51FA
\u8655\u7406\u5931\u6557
:{1}
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论