Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d8b78794
由
sunke
编写于
2021-06-15 08:59:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
包装料直接送上产线
1 个父辈
41a2860a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
125 行增加
和
44 行删除
README.md
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
myproject/src/main/resources/mongo.xml
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
README.md
查看文件 @
d8b7879
...
...
@@ -454,35 +454,32 @@
24.
AGV根据料架RFID获取料架的目的地,用于AGV拉料架到线上
>地址:
>>/rest/api/qisda/device//shelfDestination
>
>参数:
>>rfid: 料架的RFID信息
>
> 返回:
>>` {"code":0,"msg":"ok","data":"D2"}`
>>
>> - code: 0为正常,其他为异常,(未传参数, 未找到有效条码,多个有效条码)
>> - msg:消息,
>> - data: 料架的目的地
25.
流水线料盘移动到皮带线时进行判断
## dataLog表字段含义
{ "_id" : "1000114", "_class" : "com.myproject.bean.update.DataLog", "singleOut" : false, "stopSendToQisda" : false, "storageName" : "line-ac-11", "cid" : "line-ac-11", "storageId" : "12", "posId" : "33342", "posName" : "4D1116CC0016", "barcode" : "R507682020080462257", "w" : 7, "h" : 8, "cutReel" : false, "urgentReel" : false, "lessSendReel" : false, "packageReel" : false, "appendInfo" : { "outItemId" : "513024", "dnNo" : "", "facility" : "ST", "company" : "BACHS", "action" : "补料", "hSerial" : "46228", "so" : "2527563", "soseq" : "21157830", "refno" : "F001_2527563N_1", "preBindSlot" : "71", "bindSlot" : "71", "slotStr" : "9-23", "slotIndex" : 71, "rfidIndex" : 4, "rfid" : "D89", "rfidLoc" : 28, "cisIn" : false, "shelfType" : "D" }, "partNumber" : "7H.10621.511", "num" : 2000, "type" : 2, "status" : "FINISHED", "locInfo" : "2", "sourceName" : "46228_2527563_71", "subSourceInfo" : "D", "outOrder" : 277, "createDate" : { "$date" : 1601174705738 }, "updateDate" : { "$date" : 1601175846540 } }
id: 任务ID
>> - createDate: 任务创建时间(毫秒)
>> - updateDate: 任务更新时间(毫秒)
>> - updateDateStr: 任务更新时间(字符串)
>> - storageName: 料仓/料架名称
>> - cid: 料仓或料架编号
>> - storageId: 料仓/料架ID
>> - posId: 库位ID
>> - posName: 库位名称
>> - posStr: 料仓名称+库位名称
>> - barcode: 物料条码
>> - partNumber: 物料编号
>> - num: 物料数量
>> - type: 任务类型 1=入库 2=出库
>> - status: 任务状态: 无状态=NONE,等待=WAIT,正在执行=EXECUTING,已暂停=PAUSE,已完成=FINISHED,已取消=CANCEL,已结束=END
>> - sourceId: 来源(工单)ID
>> - sourceName: 来源(工单)名称,入库时为groupName
>> - subSourceId: 站位/工单条目Id
>> - subSourceInfo: 站位/工单条目名称
>> - operator: 操作人
>> - lightColor: 任务颜色(亮灯的颜色),用于区分不同工单
>> - memo: 备注信息
>地址:
>>/rest/api/qisda/device/canReelToBelt
>
>参数:
>>barcode: 料盘条码
>
> 返回:
>>` {"code":0,"msg":"ok","data":true}`
>>
>> - code: 0为正常,其他为异常,(未传参数, 未找到有效条码,多个有效条码)
>> - msg:消息,
>> - data: true 可以放上皮带线 false 继续留在环形线
\ No newline at end of file
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
查看文件 @
d8b7879
...
...
@@ -365,12 +365,12 @@ public class InquiryShelfBean {
task
.
setAppendInfo
(
appendInfo
);
//非分盘和非紧急料和非缺料补发的包装料需要在C型料架上预留位置
if
(
task
.
isPackageReel
()
&&
!
task
.
isCutReel
()
&&
!
task
.
isUrgentReel
()
&&
!
task
.
isLessSendReel
()){
String
cShelf
=
StorageConstants
.
SHEFL_TYPE
.
C
;
ShelfInfo
packageCShelf
=
getOrAddShelfInfo
(
hSerial
,
cShelf
,
outItem
.
gethSerial
());
int
packageCLoc
=
packageCShelf
.
addLimitLoc
(
barcode
,
StorageConstants
.
REEL_TYPE
.
PACKAGE
);
log
.
info
(
"包装料["
+
barcode
+
"]预留C型料架:工单"
+
outItem
.
getSo
()+
"["
+
outItem
.
getSlotlocation
()+
"]"
+
outItem
.
getPn
()+
"添加架位["
+
packageCShelf
.
tempRfid
()
+
"]["
+
packageCLoc
+
"]=["
+
emptyShelfInfo
.
tempRfid
()
+
"]["
+
loc
+
"]="
+
barcode
);
}
//
if(task.isPackageReel() && !task.isCutReel() && !task.isUrgentReel() && !task.isLessSendReel()){
//
String cShelf = StorageConstants.SHEFL_TYPE.C;
//
ShelfInfo packageCShelf = getOrAddShelfInfo(hSerial, cShelf, outItem.gethSerial());
//
int packageCLoc = packageCShelf.addLimitLoc(barcode, StorageConstants.REEL_TYPE.PACKAGE);
//
log.info("包装料["+barcode+"]预留C型料架:工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"添加架位["+packageCShelf.tempRfid() + "]["+ packageCLoc +"]=["+emptyShelfInfo.tempRfid() + "]["+ loc +"]=" + barcode);
//
}
}
else
{
int
loc
=
emptyShelfInfo
.
addEmptyLoc
();
log
.
info
(
"工单"
+
outItem
.
getSo
()+
"["
+
outItem
.
getSlotlocation
()+
"]"
+
outItem
.
getPn
()+
"预留架位"
+
emptyShelfInfo
.
tempRfid
()+
"["
+
loc
+
"]"
);
...
...
@@ -683,16 +683,16 @@ public class InquiryShelfBean {
if
(
result
){
log
.
info
(
"补料盘["
+
task
.
getBarcode
()+
"]任务取消,解除料架"
+
shelfInfo
.
tempRfid
()
+
"的锁定架位绑定"
);
updateShelfInfo
(
shelfInfo
);
if
(!
task
.
isPackageReel
()){
//
if(!task.isPackageReel()){
//非包装料,只取消一个架位就可以了(理论上非包装料也进入不到这里)
return
;
}
//
}
}
}
else
{
if
(
task
.
isPackageReel
()){
//包装料还需要取消C料架
targetShelfType
=
StorageConstants
.
SHEFL_TYPE
.
C
;
}
//
if(task.isPackageReel()){
//
//包装料还需要取消C料架
//
targetShelfType = StorageConstants.SHEFL_TYPE.C;
//
}
if
(
shelfInfo
.
getShelfType
().
equals
(
targetShelfType
)
&&
!
shelfInfo
.
isFull
()){
if
(
maxShelf
==
null
||
shelfInfo
.
getRfidIndex
()
>
maxShelf
.
getRfidIndex
()){
maxShelf
=
shelfInfo
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
d8b7879
...
...
@@ -880,6 +880,34 @@ public class QisdaDeviceController extends BaseController {
String
rfidLoc
=
infos
[
1
];
InquiryShelfBean
.
putInShelf
(
task
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
log
.
info
(
"包装料盘["
+
task
.
getBarcode
()+
"]放入位置"
+
rfid
+
"["
+
rfidLoc
+
"]成功 outOrder="
+
task
.
getOutOrder
());
task
.
setStatus
(
StorageConstants
.
OP_STATUS
.
FINISHED
.
name
());
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
appendInfo
.
setRfid
(
rfid
);
int
loc
=
task
.
resolveRfidLoc
(
rfidLoc
);
appendInfo
.
setRfidLoc
(
loc
);
task
.
setAppendInfo
(
appendInfo
);
task
=
dataLogDao
.
save
(
task
);
taskService
.
updateFinishedTask
(
task
);
String
hSerial
=
appendInfo
.
gethSerial
();
if
(
Strings
.
isNotBlank
(
hSerial
)){
int
slotSeq
=
appendInfo
.
getSlotIndex
();
int
sendQty
=
task
.
getNum
();
//发料完成,更新发料数量
OutInfo
outInfo
=
outInfoCache
.
incTaskFinishNum
(
hSerial
,
slotSeq
,
sendQty
);
if
(
outInfo
!=
null
){
if
(!
task
.
isUrgentReel
()
&&
!
task
.
isCutReel
()
&&
!
task
.
isLessSendReel
()){
Barcode
barcodeObj
=
barcodeManager
.
findByBarcode
(
task
.
getBarcode
());
String
latest
=
outInfo
.
getShelfLatest
(
""
);
QisdaApi
.
VMIMateriaRecAss
(
task
,
barcodeObj
,
latest
);
}
}
}
//剩余任务数
String
taskCid
=
task
.
getCid
();
Date
taskDate
=
task
.
getCreateDate
();
...
...
@@ -1508,5 +1536,45 @@ public class QisdaDeviceController extends BaseController {
log
.
error
(
"点料机获取料盘尺寸出错"
,
e
);
return
ResultBean
.
newErrorResult
(
5103
,
"点料机获取料盘尺寸出错:"
+
e
.
getMessage
());
}
}
/**
* AGV根据料架RFID获取料架的目的地,用于AGV拉料架到线上
*/
@RequestMapping
(
value
=
"/shelfDestination"
)
@ResponseBody
public
ResultBean
shelfDestination
(
HttpServletRequest
request
){
String
realRfid
=
request
.
getParameter
(
"rfid"
);
ShelfInfo
shelfInfo
=
InquiryShelfBean
.
findShelf
(
realRfid
);
if
(
shelfInfo
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"未找到料架["
+
realRfid
+
"]信息"
);
}
else
{
String
hSerial
=
shelfInfo
.
gethSerial
();
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"未找到需求单["
+
hSerial
+
"]"
);
}
else
{
return
ResultBean
.
newOkResult
(
outInfo
.
getLine
());
}
}
}
/**
* 流水线料盘移动到皮带线时进行判断
*/
@RequestMapping
(
value
=
"/canReelToBelt"
)
@ResponseBody
public
ResultBean
canReelToBelt
(
HttpServletRequest
request
){
String
barcode
=
request
.
getParameter
(
"barcode"
);
DataLog
task
=
taskService
.
getFinishedTask
(
barcode
);
if
(
task
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"未找到料盘["
+
barcode
+
"]的任务信息"
);
}
else
{
String
hSerial
=
task
.
getAppendInfo
().
gethSerial
();
boolean
canReelToBelt
=
hSerial
.
equals
(
QisdaCache
.
getCurrentOrderHSerial
());
return
ResultBean
.
newOkResult
(
canReelToBelt
);
}
}
}
myproject/src/main/resources/mongo.xml
查看文件 @
d8b7879
...
...
@@ -22,8 +22,8 @@
socket-timeout=
"${mongo.socketTimeout}"
slave-ok=
"${mongo.slaveOk}"
write-number=
"1"
write-timeout=
"0"
write-fsync=
"true"
/>
</mongo:mongo>
<mongo:db-factory
dbname=
"qisda"
username=
"
${mongo.username}
"
password=
"
${mongo.password}
"
mongo-ref=
"mongo"
/>
<mongo:db-factory
dbname=
"qisda"
username=
"
admin
"
password=
"
123
"
mongo-ref=
"mongo"
/>
<bean
id=
"mongoTemplate"
class=
"org.springframework.data.mongodb.core.MongoTemplate"
>
<constructor-arg
name=
"mongoDbFactory"
ref=
"mongoDbFactory"
/>
</bean>
...
...
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
查看文件 @
d8b7879
...
...
@@ -12,7 +12,23 @@
<div class="row">
<div class="col-md-12">
<ul class="timeline">
<li class="timeline-blue">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">06-09 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021060911</h2>
<div class="timeline-content">
<ul>
<li>包装料直接送上产线</li>
</ul>
</div>
</div>
</li>
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2021 </span>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论