Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 79670208
由
sunke
编写于
2020-04-03 11:40:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
机器人放入料架完成接口增加usedRfidList字段,工单任务总数为0时,清空当前正在执行的需求单缓存
1 个父辈
11b40cce
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
60 行增加
和
24 行删除
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/webapp/WEB-INF/pages/qisda/diffInventory.jsp
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
查看文件 @
7967020
...
...
@@ -379,6 +379,23 @@ public class InquiryShelfBean {
return
null
;
}
/**
* 获取某个需求单已经绑定的RFID
* @param hSerial 需求单号
*/
public
List
<
String
>
getUsedRfidList
(
String
hSerial
){
List
<
String
>
usedRfidList
=
new
ArrayList
<>();
Map
<
String
,
ShelfInfo
>
shelfMap
=
hSerialShelfMap
.
get
(
hSerial
);
if
(
shelfMap
!=
null
){
for
(
ShelfInfo
shelfInfo
:
shelfMap
.
values
())
{
String
realRfid
=
shelfInfo
.
getRealRfid
();
if
(!
realRfid
.
isEmpty
()){
usedRfidList
.
add
(
realRfid
);
}
}
}
return
usedRfidList
;
}
/**
* 首套料,获取分配好的库位
...
...
@@ -506,7 +523,7 @@ public class InquiryShelfBean {
}
else
{
//绑定过的使用RealRfid
lockLoc
.
setRealRfid
(
shelfInfo
.
getRealRfid
());
lockLoc
.
setTempRfid
(
""
);
lockLoc
.
setTempRfid
(
shelfInfo
.
tempRfid
()
);
}
updateShelfInfo
(
shelfInfo
);
return
lockLoc
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
查看文件 @
7967020
...
...
@@ -80,4 +80,6 @@ public interface ITaskService {
void
addTaskToExecute
(
DataLog
task
);
DataLog
addPutInTaskToExecute
(
Storage
storage
,
Barcode
barcode
,
StoragePos
storagePos
)
throws
ValidateException
;
void
checkoutFinished
(
DataLog
task
)
throws
ValidateException
;
}
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
7967020
...
...
@@ -13,6 +13,7 @@ import com.myproject.dao.mongo.IDataLogDao;
import
com.myproject.dao.mongo.IStoragePosDao
;
import
com.myproject.dao.mongo.qisda.IOutInfoDao
;
import
com.myproject.dao.mongo.qisda.IOutItemDao
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IComponentManager
;
import
com.myproject.util.StorageConstants
;
...
...
@@ -425,19 +426,25 @@ public class QisdaDeviceController extends BaseController {
task
=
dataLogDao
.
save
(
task
);
taskService
.
updateFinishedTask
(
task
);
String
hSerial
=
outInfoCache
.
getCurrentOrderHSerial
();
List
<
String
>
usedRfidList
=
inquiryShelfBean
.
getUsedRfidList
(
hSerial
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"barcode"
,
task
.
getBarcode
());
resultMap
.
put
(
"w"
,
task
.
getW
()+
""
);
resultMap
.
put
(
"h"
,
task
.
getH
()
+
""
);
resultMap
.
put
(
"realRfid"
,
shelfLoc
.
getRealRfid
());
resultMap
.
put
(
"rfid"
,
shelfLoc
.
getTempRfid
());
//已经使用过的RFID列表
resultMap
.
put
(
"usedRfidList"
,
String
.
join
(
","
,
usedRfidList
));
resultMap
.
put
(
"rfidLoc"
,
shelfLoc
.
getLoc
()
+
""
);
log
.
info
(
"机器人["
+
robotIndex
+
"]位置信息返回:[realRfid="
+
shelfLoc
.
getRealRfid
()+
",rfid=["
+
shelfLoc
.
getTempRfid
()
+
"]["
+
shelfLoc
.
getLoc
()+
"] barcode=["
+
task
.
getBarcode
()+
"]尺寸"
+
task
.
getW
()+
"x"
+
task
.
getH
());
return
ResultBean
.
newOkResult
(
resultMap
);
}
catch
(
Exception
e
){
log
.
error
(
"
获取摆放位置信息出错
"
,
e
);
log
.
error
(
"
{ \"code\":0,\"msg\":\"ok\",\"data\":{ \"bigLoc\":-1,\"packageLoc\":-1,\"packageTask\":3,\"packageRfid\":\"\",\"realBigRfid\":\"C24\",\"emptyInBig\":3,\"barcode\":\"\",\"bigRfid\":\"2106-1C\",\"reelInPackage\":0}
"
,
e
);
return
ResultBean
.
newErrorResult
(-
1
,
"获取摆放位置信息出错:"
+
e
.
getMessage
());
}
...
...
@@ -462,6 +469,15 @@ public class QisdaDeviceController extends BaseController {
log
.
error
(
"料盘["
+
barcode
+
"]的任务不存在"
);
return
ResultBean
.
newErrorResult
(
301
,
"任务不存在"
);
}
if
(
task
.
isExecuting
()
||
task
.
isCancel
()){
log
.
error
(
"料盘["
+
barcode
+
"]的任务未完成,补发出库通知到Qisda"
);
try
{
taskService
.
checkoutFinished
(
task
);
task
=
taskService
.
getFinishedTask
(
barcode
);
}
catch
(
ValidateException
e
)
{
log
.
error
(
"补发通知出错"
,
e
);
}
}
if
(
task
.
isFinished
()){
log
.
error
(
"料盘["
+
barcode
+
"]的任务已完成"
);
return
ResultBean
.
newErrorResult
(
302
,
"料盘["
+
barcode
+
"]的任务已完成"
);
...
...
@@ -675,10 +691,8 @@ public class QisdaDeviceController extends BaseController {
if
(!
queueTasks
.
isEmpty
()){
allTasks
.
addAll
(
queueTasks
);
}
int
totalTaskCount
=
0
;
for
(
DataLog
task
:
allTasks
)
{
if
(!
task
.
isFinished
()
&&
!
task
.
isCancel
()
&&
task
.
isCheckOutTask
()){
totalTaskCount
=
totalTaskCount
+
1
;
if
(
task
.
isPackageReel
()){
if
(
task
.
isCutReel
()
||
task
.
isUrgentReel
()){
cutPackageTask
=
cutPackageTask
+
1
;
...
...
@@ -728,6 +742,8 @@ public class QisdaDeviceController extends BaseController {
packageEmpty
=
100
;
}
List
<
String
>
usedRfidList
=
inquiryShelfBean
.
getUsedRfidList
(
hSerial
);
//剩余的任务数
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
cacheTask
==
null
){
...
...
@@ -736,6 +752,8 @@ public class QisdaDeviceController extends BaseController {
resultMap
.
put
(
"barcode"
,
cacheTask
.
getBarcode
());
}
resultMap
.
put
(
"rfid"
,
rfid
);
//已经使用过的RFID列表
resultMap
.
put
(
"usedRfidList"
,
String
.
join
(
","
,
usedRfidList
));
resultMap
.
put
(
"smallEmpty"
,
smallEmpty
+
""
);
resultMap
.
put
(
"bigEmpty"
,
bigEmpty
+
""
);
resultMap
.
put
(
"packageEmpty"
,
packageEmpty
+
""
);
...
...
@@ -745,8 +763,15 @@ public class QisdaDeviceController extends BaseController {
resultMap
.
put
(
"smallTask"
,
smallTask
+
""
);
resultMap
.
put
(
"bigTask"
,
bigTask
+
""
);
log
.
info
(
"当前任务数:"
+
resultMap
);
int
totalOrderTaskCount
=
packageTask
+
smallTask
+
bigTask
;
if
(
totalOrderTaskCount
>
0
){
log
.
info
(
"当前任务数:"
+
resultMap
);
}
else
{
if
(!
hSerial
.
isEmpty
()){
log
.
info
(
"工单总任务数为0,清空当前的工单序号["
+
hSerial
+
"]"
);
outInfoCache
.
setCurrentOrderHSerial
(
null
);
}
}
return
ResultBean
.
newOkResult
(
resultMap
);
}
catch
(
Exception
e
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
7967020
...
...
@@ -1903,6 +1903,7 @@ public class TaskService implements ITaskService {
/**
* 出库完成
*/
@Override
public
void
checkoutFinished
(
DataLog
task
)
throws
ValidateException
{
//从队列里面移除操作
...
...
@@ -2005,22 +2006,13 @@ public class TaskService implements ITaskService {
outInfo
=
outInfoDao
.
save
(
outInfo
);
String
latest
=
outInfo
.
getOutLatest
();
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
QISDA
))
{
if
(
barcode
.
needToQisda
()){
QisdaApiController
.
OutFinished
(
task
,
barcode
,
latest
);
if
(
latest
.
equals
(
"L"
))
{
log
.
info
(
"工单["
+
outItem
.
getSo
()
+
"]的最后一盘出库完成,发送缺料通知"
);
List
<
OutItem
>
outItemList
=
outItemDao
.
findByHSerial
(
outItem
.
gethSerial
());
boolean
lessBind
=
false
;
QisdaApiController
.
VMILocationOutFeedback
(
outItemList
,
lessBind
);
}
}
else
{
log
.
info
(
"出库完成,条码["
+
barcode
.
getBarcode
()+
"]不需要通知Qisda"
);
}
QisdaApiController
.
OutFinished
(
task
,
barcode
,
latest
);
}
else
{
log
.
info
(
"出库完成通知Qisda接口关闭"
);
if
(
latest
.
equals
(
"L"
))
{
log
.
info
(
"工单["
+
outItem
.
getSo
()
+
"]的最后一盘出库完成,发送缺料通知"
);
List
<
OutItem
>
outItemList
=
outItemDao
.
findByHSerial
(
outItem
.
gethSerial
());
boolean
lessBind
=
false
;
QisdaApiController
.
VMILocationOutFeedback
(
outItemList
,
lessBind
);
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/diffInventory.jsp
查看文件 @
7967020
...
...
@@ -58,7 +58,7 @@
<tr>
<td>${i}</td>
<td></td>
<td><a href="${ctx}/
component/storagePosFind
.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId} (${diffInfo.diffDetails})</a></td>
<td><a href="${ctx}/
dataLog/search
.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId} (${diffInfo.diffDetails})</a></td>
<td></td>
</tr>
...
...
@@ -68,7 +68,7 @@
<c:set var="i" value="${i+1}"/>
<tr>
<td>${i}</td>
<td><a href="${ctx}/
component/storagePosFind
.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId}</a></td>
<td><a href="${ctx}/
dataLog/search
.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId}</a></td>
<td></td>
<td></td>
</tr>
...
...
@@ -79,7 +79,7 @@
<td>${i}</td>
<td></td>
<td></td>
<td>
${diffInfo.reelId}
</td>
<td>
<a href="${ctx}/dataLog/search.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId}</a>
</td>
</tr>
</c:forEach>
</tbody>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论