Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a7812229
由
sunke
编写于
2020-03-08 17:43:45 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
包装料出库锁定架位,双层线获取位置时增加realRfid
1 个父辈
78ae0bd5
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
190 行增加
和
57 行删除
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
myproject/src/main/java/com/myproject/bean/qisda/ShelfInfo.java
myproject/src/main/java/com/myproject/bean/qisda/ShelfLoc.java
myproject/src/main/java/com/myproject/bean/update/qisda/OutItem.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/boxView.jsp
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
查看文件 @
a781222
...
@@ -291,7 +291,7 @@ public class AppendInfo {
...
@@ -291,7 +291,7 @@ public class AppendInfo {
if
(
action
==
null
){
if
(
action
==
null
){
return
false
;
return
false
;
}
}
return
action
.
equals
(
"补料
盘
"
);
return
action
.
equals
(
"补料"
);
}
}
public
String
getDnOrFacility
(){
public
String
getDnOrFacility
(){
...
@@ -337,6 +337,14 @@ public class AppendInfo {
...
@@ -337,6 +337,14 @@ public class AppendInfo {
this
.
cisIn
=
cisIn
;
this
.
cisIn
=
cisIn
;
}
}
public
boolean
isCShelfTask
(){
return
StorageConstants
.
SHEFL_TYPE
.
isCShelf
(
getShelfType
());
}
public
boolean
isDShelfTask
(){
return
StorageConstants
.
SHEFL_TYPE
.
isDShelf
(
getShelfType
());
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"AppendInfo{"
+
return
"AppendInfo{"
+
...
...
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
查看文件 @
a781222
...
@@ -145,14 +145,16 @@ public class InquiryShelfBean {
...
@@ -145,14 +145,16 @@ public class InquiryShelfBean {
if
(
emptyShelfInfo
!=
null
){
if
(
emptyShelfInfo
!=
null
){
if
(
task
!=
null
){
if
(
task
!=
null
){
int
loc
=
-
1
;
int
loc
=
-
1
;
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
if
(
task
.
isPackageReel
()){
if
(
task
.
isPackageReel
()){
//包装料,固定库位
//包装料,固定库位
loc
=
emptyShelfInfo
.
addLimitLoc
(
task
.
getBarcode
(),
task
.
getReelType
());
loc
=
emptyShelfInfo
.
addLimitLoc
(
task
.
getBarcode
(),
task
.
getReelType
());
appendInfo
.
setRfidLoc
(
loc
);
}
else
{
}
else
{
loc
=
emptyShelfInfo
.
addLimitLoc
(
barcode
,
task
.
getReelType
());
loc
=
emptyShelfInfo
.
addLimitLoc
(
barcode
,
task
.
getReelType
());
}
}
log
.
info
(
"工单"
+
outItem
.
getSo
()+
"["
+
outItem
.
getSlotlocation
()+
"]"
+
outItem
.
getPn
()+
"添加架位["
+
emptyShelfInfo
.
tempRfid
()
+
"]["
+
loc
+
"]="
+
barcode
);
log
.
info
(
"工单"
+
outItem
.
getSo
()+
"["
+
outItem
.
getSlotlocation
()+
"]"
+
outItem
.
getPn
()+
"
为["
+
task
.
getBarcode
()+
"]
添加架位["
+
emptyShelfInfo
.
tempRfid
()
+
"]["
+
loc
+
"]="
+
barcode
);
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
appendInfo
.
setRfidIndex
(
emptyShelfInfo
.
getRfidIndex
());
appendInfo
.
setRfidIndex
(
emptyShelfInfo
.
getRfidIndex
());
appendInfo
.
setShelfType
(
shelfType
);
appendInfo
.
setShelfType
(
shelfType
);
appendInfo
.
sethSerial
(
hSerial
);
appendInfo
.
sethSerial
(
hSerial
);
...
@@ -185,7 +187,7 @@ public class InquiryShelfBean {
...
@@ -185,7 +187,7 @@ public class InquiryShelfBean {
Map
<
String
,
ShelfInfo
>
shelfMap
=
hSerialShelfMap
.
get
(
hSerial
);
Map
<
String
,
ShelfInfo
>
shelfMap
=
hSerialShelfMap
.
get
(
hSerial
);
if
(
shelfMap
!=
null
){
if
(
shelfMap
!=
null
){
for
(
ShelfInfo
shelf
:
shelfMap
.
values
())
{
for
(
ShelfInfo
shelf
:
shelfMap
.
values
())
{
String
shelfRFID
=
shelf
.
getRfid
();
String
shelfRFID
=
shelf
.
getR
ealR
fid
();
log
.
info
(
shelf
.
tempRfid
()
+
"判断料架["
+
shelfRFID
+
"] = "
+
rfid
);
log
.
info
(
shelf
.
tempRfid
()
+
"判断料架["
+
shelfRFID
+
"] = "
+
rfid
);
if
(
shelfRFID
!=
null
&&
rfid
!=
null
){
if
(
shelfRFID
!=
null
&&
rfid
!=
null
){
if
(
shelfRFID
.
equals
(
rfid
)){
if
(
shelfRFID
.
equals
(
rfid
)){
...
@@ -213,7 +215,7 @@ public class InquiryShelfBean {
...
@@ -213,7 +215,7 @@ public class InquiryShelfBean {
ShelfInfo
maxLocShelf
=
null
;
ShelfInfo
maxLocShelf
=
null
;
for
(
Map
<
String
,
ShelfInfo
>
shelfInfoMap
:
hSerialShelfMap
.
values
())
{
for
(
Map
<
String
,
ShelfInfo
>
shelfInfoMap
:
hSerialShelfMap
.
values
())
{
for
(
ShelfInfo
shelf
:
shelfInfoMap
.
values
())
{
for
(
ShelfInfo
shelf
:
shelfInfoMap
.
values
())
{
String
shelfRFID
=
shelf
.
getRfid
();
String
shelfRFID
=
shelf
.
getR
ealR
fid
();
if
(
StorageConstants
.
SHEFL_TYPE
.
judgeType
(
bigRfid
,
shelf
.
getShelfType
())){
if
(
StorageConstants
.
SHEFL_TYPE
.
judgeType
(
bigRfid
,
shelf
.
getShelfType
())){
if
(
shelfRFID
!=
null
){
if
(
shelfRFID
!=
null
){
if
(
shelfRFID
.
equals
(
bigRfid
)){
if
(
shelfRFID
.
equals
(
bigRfid
)){
...
@@ -245,7 +247,7 @@ public class InquiryShelfBean {
...
@@ -245,7 +247,7 @@ public class InquiryShelfBean {
}
}
for
(
Map
<
String
,
ShelfInfo
>
shelfInfoMap
:
hSerialShelfMap
.
values
())
{
for
(
Map
<
String
,
ShelfInfo
>
shelfInfoMap
:
hSerialShelfMap
.
values
())
{
for
(
ShelfInfo
shelf
:
shelfInfoMap
.
values
())
{
for
(
ShelfInfo
shelf
:
shelfInfoMap
.
values
())
{
String
shelfRFID
=
shelf
.
getRfid
();
String
shelfRFID
=
shelf
.
getR
ealR
fid
();
if
(
shelfRFID
!=
null
){
if
(
shelfRFID
!=
null
){
if
(
shelfRFID
.
equals
(
packageRfid
)){
if
(
shelfRFID
.
equals
(
packageRfid
)){
//已经绑定过该Temp料架
//已经绑定过该Temp料架
...
@@ -272,8 +274,9 @@ public class InquiryShelfBean {
...
@@ -272,8 +274,9 @@ public class InquiryShelfBean {
if
(
loc
!=
-
1
){
if
(
loc
!=
-
1
){
ShelfLoc
shelfLoc
=
new
ShelfLoc
();
ShelfLoc
shelfLoc
=
new
ShelfLoc
();
shelfLoc
.
setLoc
(
loc
);
shelfLoc
.
setLoc
(
loc
);
shelfLoc
.
setRfid
(
shelfInfo
.
tempRfid
());
shelfLoc
.
setTempRfid
(
shelfInfo
.
tempRfid
());
log
.
info
(
"查找到["
+
barcode
+
"]分配的库位"
+
shelfInfo
.
tempRfid
()+
"["
+
loc
+
"]"
);
shelfLoc
.
setRealRfid
(
shelfInfo
.
getRealRfid
());
log
.
info
(
"查找到["
+
barcode
+
"]分配的库位"
+
shelfInfo
.
tempRfid
()+
"["
+
loc
+
"] Task库位"
+
appendInfo
.
getRfid
()+
"["
+
appendInfo
.
getRfidLoc
()+
"]"
);
return
shelfLoc
;
return
shelfLoc
;
}
}
}
}
...
@@ -302,7 +305,7 @@ public class InquiryShelfBean {
...
@@ -302,7 +305,7 @@ public class InquiryShelfBean {
if
(
shelfInfo
!=
null
){
if
(
shelfInfo
!=
null
){
//找到与实际料架相同的料架,但料架上已经满了,查找其他同类型料架
//找到与实际料架相同的料架,但料架上已经满了,查找其他同类型料架
if
(
shelfInfo
.
isFull
()){
if
(
shelfInfo
.
isFull
()){
log
.
info
(
"料架["
+
shelfInfo
.
getR
fid
()+
"]
已满,查找新的料架"
);
log
.
info
(
"料架["
+
shelfInfo
.
getR
ealRfid
()+
"]="
+
shelfInfo
.
tempRfid
()+
"
已满,查找新的料架"
);
shelfInfo
=
null
;
shelfInfo
=
null
;
}
}
}
}
...
@@ -324,7 +327,7 @@ public class InquiryShelfBean {
...
@@ -324,7 +327,7 @@ public class InquiryShelfBean {
}
}
shelfInfo
=
maxLocShelf
;
shelfInfo
=
maxLocShelf
;
if
(
shelfInfo
!=
null
){
if
(
shelfInfo
!=
null
){
log
.
info
(
task
.
getBarcode
()
+
"未找到rfid=["
+
rfid
+
"]的空料架,使用库位最多的同种料架["
+
shelfInfo
.
tempRfid
()+
"]"
);
log
.
info
(
task
.
getBarcode
()
+
"
["
+
appendInfo
.
getTempRfid
()+
"]
未找到rfid=["
+
rfid
+
"]的空料架,使用库位最多的同种料架["
+
shelfInfo
.
tempRfid
()+
"]"
);
}
else
{
}
else
{
log
.
info
(
"已没有与["
+
rfid
+
"]类型相同的料架"
);;
log
.
info
(
"已没有与["
+
rfid
+
"]类型相同的料架"
);;
}
}
...
@@ -340,16 +343,19 @@ public class InquiryShelfBean {
...
@@ -340,16 +343,19 @@ public class InquiryShelfBean {
ShelfLoc
lockLoc
=
shelfInfo
.
lockOneEmptyLoc
(
task
.
getBarcode
(),
task
.
getReelType
(),
robotIndex
);
ShelfLoc
lockLoc
=
shelfInfo
.
lockOneEmptyLoc
(
task
.
getBarcode
(),
task
.
getReelType
(),
robotIndex
);
if
(
lockLoc
!=
null
){
if
(
lockLoc
!=
null
){
log
.
info
(
"为["
+
task
.
getBarcode
()+
"]锁定架位:"
+
shelfInfo
.
tempRfid
()
+
"["
+
shelfInfo
.
getRfid
()+
"]["
+
lockLoc
.
getLoc
()+
"]原来分配架位:"
+
appendInfo
.
getTempRfid
()
+
"["
+
appendInfo
.
getRfidLoc
()
+
"]"
);
log
.
info
(
"为["
+
task
.
getBarcode
()+
"]锁定架位:"
+
shelfInfo
.
tempRfid
()
+
"["
+
shelfInfo
.
getR
ealR
fid
()+
"]["
+
lockLoc
.
getLoc
()+
"]原来分配架位:"
+
appendInfo
.
getTempRfid
()
+
"["
+
appendInfo
.
getRfidLoc
()
+
"]"
);
// ShelfLoc shelfLoc = new ShelfLoc();
// ShelfLoc shelfLoc = new ShelfLoc();
// shelfLoc.setLoc(lockLoc);
// shelfLoc.setLoc(lockLoc);
// shelfLoc.setRfid(rfid);
// shelfLoc.setRfid(rfid);
if
(
shelfInfo
.
getR
fid
()
==
null
||
shelfInfo
.
get
Rfid
().
isEmpty
()){
if
(
shelfInfo
.
getR
ealRfid
()
==
null
||
shelfInfo
.
getReal
Rfid
().
isEmpty
()){
//未绑定过的,使用TempRFID
//未绑定过的,使用TempRFID
lockLoc
.
setRfid
(
shelfInfo
.
tempRfid
());
lockLoc
.
setTempRfid
(
shelfInfo
.
tempRfid
());
lockLoc
.
setRealRfid
(
""
);
}
else
{
}
else
{
lockLoc
.
setRfid
(
shelfInfo
.
getRfid
());
//绑定过的使用RealRfid
lockLoc
.
setRealRfid
(
shelfInfo
.
getRealRfid
());
lockLoc
.
setTempRfid
(
""
);
}
}
updateShelfInfo
(
shelfInfo
);
updateShelfInfo
(
shelfInfo
);
return
lockLoc
;
return
lockLoc
;
...
@@ -388,7 +394,7 @@ public class InquiryShelfBean {
...
@@ -388,7 +394,7 @@ public class InquiryShelfBean {
}
else
{
}
else
{
log
.
info
(
"未找到["
+
hSerial
+
"]相关料架"
);
log
.
info
(
"未找到["
+
hSerial
+
"]相关料架"
);
}
}
log
.
error
(
"物料["
+
task
.
getBarcode
()+
"]更新料架"
+
rfid
+
"["
+
loc
+
"]缓存失败"
);
log
.
error
(
"物料["
+
task
.
getBarcode
()+
"]
("
+
task
.
getAppendInfo
().
getTempRfid
()+
"["
+
task
.
getAppendInfo
().
getRfidLoc
()+
"])
更新料架"
+
rfid
+
"["
+
loc
+
"]缓存失败"
);
return
false
;
return
false
;
}
}
...
...
myproject/src/main/java/com/myproject/bean/qisda/ShelfInfo.java
查看文件 @
a781222
...
@@ -49,7 +49,7 @@ public class ShelfInfo {
...
@@ -49,7 +49,7 @@ public class ShelfInfo {
/**
/**
* 实际编号
* 实际编号
*/
*/
private
String
rfid
;
private
String
r
ealR
fid
;
/**
/**
* 料架类型
* 料架类型
...
@@ -86,12 +86,15 @@ public class ShelfInfo {
...
@@ -86,12 +86,15 @@ public class ShelfInfo {
this
.
locMap
=
locMap
;
this
.
locMap
=
locMap
;
}
}
public
String
getRfid
()
{
public
String
getRealRfid
()
{
return
rfid
;
if
(
realRfid
==
null
){
return
""
;
}
return
realRfid
;
}
}
public
void
setR
fid
(
String
r
fid
)
{
public
void
setR
ealRfid
(
String
realR
fid
)
{
this
.
r
fid
=
r
fid
;
this
.
r
ealRfid
=
realR
fid
;
}
}
public
int
getRfidIndex
()
{
public
int
getRfidIndex
()
{
...
@@ -127,9 +130,9 @@ public class ShelfInfo {
...
@@ -127,9 +130,9 @@ public class ShelfInfo {
* @param barcode
* @param barcode
*/
*/
public
boolean
putInLoc
(
String
rfid
,
int
loc
,
String
barcode
){
public
boolean
putInLoc
(
String
rfid
,
int
loc
,
String
barcode
){
if
(
this
.
r
fid
!=
null
&&
!
this
.
r
fid
.
isEmpty
()){
if
(
this
.
r
ealRfid
!=
null
&&
!
this
.
realR
fid
.
isEmpty
()){
//已绑定过真实料架,必须一致才能放入
//已绑定过真实料架,必须一致才能放入
if
(!
this
.
rfid
.
equals
(
rfid
)){
if
(!
this
.
r
ealR
fid
.
equals
(
rfid
)){
return
false
;
return
false
;
}
}
}
}
...
@@ -157,7 +160,7 @@ public class ShelfInfo {
...
@@ -157,7 +160,7 @@ public class ShelfInfo {
log
.
error
(
barcode
+
"放置位置["
+
loc
+
"]与锁定位置["
+
lockLocation
+
"]不一致"
);
log
.
error
(
barcode
+
"放置位置["
+
loc
+
"]与锁定位置["
+
lockLocation
+
"]不一致"
);
return
false
;
return
false
;
}
}
this
.
setRfid
(
rfid
);
this
.
setR
ealR
fid
(
rfid
);
ShelfLoc
shelfLoc
=
locMap
.
get
(
loc
);
ShelfLoc
shelfLoc
=
locMap
.
get
(
loc
);
if
(
shelfLoc
==
null
){
if
(
shelfLoc
==
null
){
log
.
error
(
"未找到["
+
loc
+
"]的位置信息,当前料架位置信息:"
+
locMap
);
log
.
error
(
"未找到["
+
loc
+
"]的位置信息,当前料架位置信息:"
+
locMap
);
...
@@ -175,7 +178,7 @@ public class ShelfInfo {
...
@@ -175,7 +178,7 @@ public class ShelfInfo {
if
(
shelfLoc
.
isInThisLoc
(
barcode
)){
if
(
shelfLoc
.
isInThisLoc
(
barcode
)){
shelfLoc
.
putIn
(
barcode
);
shelfLoc
.
putIn
(
barcode
);
locMap
.
put
(
rfidLoc
,
shelfLoc
);
locMap
.
put
(
rfidLoc
,
shelfLoc
);
this
.
setRfid
(
rfid
);
this
.
setR
ealR
fid
(
rfid
);
return
true
;
return
true
;
}
}
...
...
myproject/src/main/java/com/myproject/bean/qisda/ShelfLoc.java
查看文件 @
a781222
...
@@ -7,11 +7,15 @@ import com.myproject.util.StorageConstants;
...
@@ -7,11 +7,15 @@ import com.myproject.util.StorageConstants;
*/
*/
public
class
ShelfLoc
{
public
class
ShelfLoc
{
/**
* 真实料架
*/
private
String
realRfid
;
/**
/**
* 料架号
*
虚拟
料架号
*/
*/
private
String
r
fid
;
private
String
tempR
fid
;
/**
/**
* 架位号
* 架位号
...
@@ -111,12 +115,12 @@ public class ShelfLoc {
...
@@ -111,12 +115,12 @@ public class ShelfLoc {
return
this
.
barcode
!=
null
&&
!
this
.
barcode
.
isEmpty
();
return
this
.
barcode
!=
null
&&
!
this
.
barcode
.
isEmpty
();
}
}
public
String
getRfid
()
{
public
String
get
Temp
Rfid
()
{
return
r
fid
;
return
tempR
fid
;
}
}
public
void
set
Rfid
(
String
r
fid
)
{
public
void
set
TempRfid
(
String
tempR
fid
)
{
this
.
rfid
=
r
fid
;
this
.
tempRfid
=
tempR
fid
;
}
}
/**
/**
...
@@ -130,4 +134,12 @@ public class ShelfLoc {
...
@@ -130,4 +134,12 @@ public class ShelfLoc {
}
}
return
false
;
return
false
;
}
}
public
String
getRealRfid
()
{
return
realRfid
;
}
public
void
setRealRfid
(
String
realRfid
)
{
this
.
realRfid
=
realRfid
;
}
}
}
myproject/src/main/java/com/myproject/bean/update/qisda/OutItem.java
查看文件 @
a781222
...
@@ -308,6 +308,34 @@ public class OutItem extends BaseMongoBean {
...
@@ -308,6 +308,34 @@ public class OutItem extends BaseMongoBean {
}
}
/**
/**
* 是否满足
* @return
*/
public
boolean
isOutOk
(){
//首盘料,只要有出料就算完成
if
(
isFirstReelAction
()){
//发料完成才算
return
getOutQty
()
>
0
;
}
else
if
(
isReelCutAction
()){
//分盘需求,分盘料出库数量+真实绑定数量大于需求数量才算出库完成
if
(
isCutMaterial
()){
return
getOutQty
()
+
getRealLockQty
()
>=
getQty
();
}
else
{
//非分盘料
return
true
;
}
}
else
if
(
isUrgentAction
()){
//紧急料,出库数量大于需求数量
return
outLessQty
()
<=
0
;
}
else
if
(
isTailAction
()){
//发料完成
return
sendLessQty
()
<=
0
;
}
return
false
;
}
/**
* 首盘需求单
* 首盘需求单
*/
*/
public
boolean
isFirstReelAction
(){
public
boolean
isFirstReelAction
(){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
a781222
...
@@ -672,7 +672,7 @@ public class QisdaApiController extends BaseController {
...
@@ -672,7 +672,7 @@ public class QisdaApiController extends BaseController {
}
else
{
}
else
{
log
.
info
(
barcode
.
getBarcode
()
+
" ["
+
dnOrFacility
+
"]收料判定: NG"
+
resultStr
);
log
.
info
(
barcode
.
getBarcode
()
+
" ["
+
dnOrFacility
+
"]收料判定: NG"
+
resultStr
);
if
(
resultStr
.
startsWith
(
"0"
)){
if
(
resultStr
.
startsWith
(
"0"
)){
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG:"
+
resultStr
.
substring
(
1
)
);
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG:"
+
resultStr
);
}
else
{
}
else
{
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG: 内部异常"
);
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG: 内部异常"
);
}
}
...
@@ -840,6 +840,12 @@ public class QisdaApiController extends BaseController {
...
@@ -840,6 +840,12 @@ public class QisdaApiController extends BaseController {
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
*/
*/
public
static
void
OutFinished
(
DataLog
task
,
Barcode
barcode
,
String
latest
){
public
static
void
OutFinished
(
DataLog
task
,
Barcode
barcode
,
String
latest
){
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
if
(
appendInfo
.
isFirstReelAction
()
||
appendInfo
.
isTailAction
()){
log
.
info
(
"工单料任务,出库时发送空的FML状态"
);
latest
=
""
;
}
Map
<
String
,
Object
>
materialInfoMap
=
getOutMaterialInfoMap
(
task
,
latest
);
Map
<
String
,
Object
>
materialInfoMap
=
getOutMaterialInfoMap
(
task
,
latest
);
List
<
Map
<
String
,
Object
>>
cutItems
=
barcode
.
getCutItems
();
List
<
Map
<
String
,
Object
>>
cutItems
=
barcode
.
getCutItems
();
if
(
cutItems
!=
null
){
if
(
cutItems
!=
null
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
a781222
...
@@ -2,11 +2,13 @@ package com.myproject.webapp.controller.webService;
...
@@ -2,11 +2,13 @@ package com.myproject.webapp.controller.webService;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.qisda.*
;
import
com.myproject.bean.qisda.*
;
import
com.myproject.bean.update.AlarmInfo
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.DataLog
;
import
com.myproject.bean.update.DataLog
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.qisda.OutInfo
;
import
com.myproject.bean.update.qisda.OutInfo
;
import
com.myproject.bean.update.qisda.OutItem
;
import
com.myproject.bean.update.qisda.OutItem
;
import
com.myproject.dao.mongo.IAlarmInfoDao
;
import
com.myproject.dao.mongo.IDataLogDao
;
import
com.myproject.dao.mongo.IDataLogDao
;
import
com.myproject.dao.mongo.IStoragePosDao
;
import
com.myproject.dao.mongo.IStoragePosDao
;
import
com.myproject.dao.mongo.qisda.IOutInfoDao
;
import
com.myproject.dao.mongo.qisda.IOutInfoDao
;
...
@@ -60,6 +62,9 @@ public class QisdaDeviceController extends BaseController {
...
@@ -60,6 +62,9 @@ public class QisdaDeviceController extends BaseController {
@Autowired
@Autowired
private
OutInfoCache
outInfoCache
;
private
OutInfoCache
outInfoCache
;
@Autowired
private
IAlarmInfoDao
alarmInfoDao
;
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
QisdaDeviceController
.
class
);
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
QisdaDeviceController
.
class
);
/**
/**
...
@@ -196,6 +201,7 @@ public class QisdaDeviceController extends BaseController {
...
@@ -196,6 +201,7 @@ public class QisdaDeviceController extends BaseController {
String
packageRfid
=
request
.
getParameter
(
"packageRfid"
);
String
packageRfid
=
request
.
getParameter
(
"packageRfid"
);
log
.
info
(
"收到包装料摆放位置信息请求:[packageRfid="
+
packageRfid
+
"]bigRfid="
+
bigRfid
);
log
.
info
(
"收到包装料摆放位置信息请求:[packageRfid="
+
packageRfid
+
"]bigRfid="
+
bigRfid
);
ShelfInfo
packageShelf
=
inquiryShelfBean
.
findPackageShelf
(
packageRfid
);
ShelfInfo
packageShelf
=
inquiryShelfBean
.
findPackageShelf
(
packageRfid
);
ShelfInfo
bigShelf
=
inquiryShelfBean
.
findBigShelf
(
bigRfid
);
ShelfInfo
bigShelf
=
inquiryShelfBean
.
findBigShelf
(
bigRfid
);
if
(
bigShelf
!=
null
){
if
(
bigShelf
!=
null
){
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
...
@@ -357,7 +363,13 @@ public class QisdaDeviceController extends BaseController {
...
@@ -357,7 +363,13 @@ public class QisdaDeviceController extends BaseController {
return
ResultBean
.
newErrorResult
(
202
,
msg
);
return
ResultBean
.
newErrorResult
(
202
,
msg
);
}
}
appendInfo
.
setRfid
(
shelfLoc
.
getRfid
());
String
rfidToSave
=
shelfLoc
.
getRealRfid
();
if
(
rfidToSave
==
null
||
rfidToSave
.
isEmpty
()){
//料架上放的第一盘料,没绑定,使用tempRfid
rfidToSave
=
shelfLoc
.
getTempRfid
();
}
appendInfo
.
setRfid
(
rfidToSave
);
appendInfo
.
setRfidLoc
(
shelfLoc
.
getLoc
());
appendInfo
.
setRfidLoc
(
shelfLoc
.
getLoc
());
task
.
setAppendInfo
(
appendInfo
);
task
.
setAppendInfo
(
appendInfo
);
...
@@ -371,10 +383,11 @@ public class QisdaDeviceController extends BaseController {
...
@@ -371,10 +383,11 @@ public class QisdaDeviceController extends BaseController {
resultMap
.
put
(
"barcode"
,
task
.
getBarcode
());
resultMap
.
put
(
"barcode"
,
task
.
getBarcode
());
resultMap
.
put
(
"w"
,
task
.
getW
()+
""
);
resultMap
.
put
(
"w"
,
task
.
getW
()+
""
);
resultMap
.
put
(
"h"
,
task
.
getH
()
+
""
);
resultMap
.
put
(
"h"
,
task
.
getH
()
+
""
);
resultMap
.
put
(
"rfid"
,
shelfLoc
.
getRfid
());
resultMap
.
put
(
"realRfid"
,
shelfLoc
.
getRealRfid
());
resultMap
.
put
(
"rfid"
,
shelfLoc
.
getTempRfid
());
resultMap
.
put
(
"rfidLoc"
,
shelfLoc
.
getLoc
()
+
""
);
resultMap
.
put
(
"rfidLoc"
,
shelfLoc
.
getLoc
()
+
""
);
log
.
info
(
"机器人["
+
robotIndex
+
"]位置信息返回:[r
fid="
+
shelfLoc
.
get
Rfid
()
+
"["
+
shelfLoc
.
getLoc
()+
"] barcode=["
+
task
.
getBarcode
()+
"]尺寸"
+
task
.
getW
()+
"x"
+
task
.
getH
());
log
.
info
(
"机器人["
+
robotIndex
+
"]位置信息返回:[r
ealRfid="
+
shelfLoc
.
getRealRfid
()+
",rfid="
+
shelfLoc
.
getTemp
Rfid
()
+
"["
+
shelfLoc
.
getLoc
()+
"] barcode=["
+
task
.
getBarcode
()+
"]尺寸"
+
task
.
getW
()+
"x"
+
task
.
getH
());
return
ResultBean
.
newOkResult
(
resultMap
);
return
ResultBean
.
newOkResult
(
resultMap
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -416,7 +429,6 @@ public class QisdaDeviceController extends BaseController {
...
@@ -416,7 +429,6 @@ public class QisdaDeviceController extends BaseController {
String
[]
infos
=
locInfo
.
split
(
"@"
);
String
[]
infos
=
locInfo
.
split
(
"@"
);
String
rfid
=
infos
[
0
];
String
rfid
=
infos
[
0
];
String
rfidLoc
=
infos
[
1
];
String
rfidLoc
=
infos
[
1
];
inquiryShelfBean
.
lockShelfLoc
(
task
,
rfid
,
"0"
);
inquiryShelfBean
.
putInShelf
(
task
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
inquiryShelfBean
.
putInShelf
(
task
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
//剩余任务数
//剩余任务数
...
@@ -447,14 +459,30 @@ public class QisdaDeviceController extends BaseController {
...
@@ -447,14 +459,30 @@ public class QisdaDeviceController extends BaseController {
*/
*/
private
void
reelPutInFinished
(
DataLog
cacheTask
,
String
rfid
,
String
rfidLoc
){
private
void
reelPutInFinished
(
DataLog
cacheTask
,
String
rfid
,
String
rfidLoc
){
if
(
cacheTask
!=
null
){
if
(
cacheTask
!=
null
){
cacheTask
.
setStatus
(
StorageConstants
.
OP_STATUS
.
FINISHED
.
name
());
AppendInfo
appendInfo
=
cacheTask
.
getAppendInfo
();
AppendInfo
appendInfo
=
cacheTask
.
getAppendInfo
();
boolean
putResult
=
inquiryShelfBean
.
putInShelf
(
cacheTask
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
if
(!
putResult
){
//记录日志
String
errorMsg
=
"料盘["
+
cacheTask
.
getBarcode
()+
"]放入位置"
+
rfid
+
"["
+
rfidLoc
+
"],原分配位置"
+
appendInfo
.
getTempRfid
()+
"["
+
appendInfo
.
getRfidLoc
()+
"],不更改状态,不进行发料"
;
log
.
error
(
errorMsg
);
AlarmInfo
alarmInfo
=
new
AlarmInfo
();
alarmInfo
.
setBoxId
(
"0"
);
alarmInfo
.
setStorageName
(
cacheTask
.
getStorageName
());
alarmInfo
.
setInOutStatus
(
"1"
);
alarmInfo
.
setAlarmType
(
"放料失败"
);
Date
date
=
new
Date
();
alarmInfo
.
setStartTime
(
date
);
alarmInfo
.
setEndTime
(
date
);
alarmInfo
.
setAlarmMsg
(
errorMsg
);
alarmInfoDao
.
save
(
alarmInfo
);
return
;
}
cacheTask
.
setStatus
(
StorageConstants
.
OP_STATUS
.
FINISHED
.
name
());
appendInfo
.
setRfid
(
rfid
);
appendInfo
.
setRfid
(
rfid
);
appendInfo
.
setRfidLoc
(
Integer
.
valueOf
(
rfidLoc
));
appendInfo
.
setRfidLoc
(
Integer
.
valueOf
(
rfidLoc
));
cacheTask
.
setAppendInfo
(
appendInfo
);
cacheTask
.
setAppendInfo
(
appendInfo
);
cacheTask
=
dataLogDao
.
save
(
cacheTask
);
cacheTask
=
dataLogDao
.
save
(
cacheTask
);
taskService
.
updateFinishedTask
(
cacheTask
);
taskService
.
updateFinishedTask
(
cacheTask
);
inquiryShelfBean
.
putInShelf
(
cacheTask
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
...
@@ -564,7 +592,7 @@ public class QisdaDeviceController extends BaseController {
...
@@ -564,7 +592,7 @@ public class QisdaDeviceController extends BaseController {
//1号位机器人
//1号位机器人
firstRobotTask
=
null
;
firstRobotTask
=
null
;
}
else
{
}
else
{
log
.
info
(
"机器人["
+
robotIndex
+
"]将料盘["
+
barcode
+
"]放入料架["
+
rfid
+
"]["
+
rfidLoc
+
"]完成,与当前任务["
+
first
Scan
Task
.
getBarcode
()+
"]不一致,不清空"
);
log
.
info
(
"机器人["
+
robotIndex
+
"]将料盘["
+
barcode
+
"]放入料架["
+
rfid
+
"]["
+
rfidLoc
+
"]完成,与当前任务["
+
first
Robot
Task
.
getBarcode
()+
"]不一致,不清空"
);
}
}
}
else
if
(
robotIndex
.
equals
(
"2"
)
&&
secondRobotTask
!=
null
){
}
else
if
(
robotIndex
.
equals
(
"2"
)
&&
secondRobotTask
!=
null
){
if
(
secondRobotTask
.
getBarcode
().
equals
(
barcode
)){
if
(
secondRobotTask
.
getBarcode
().
equals
(
barcode
)){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
查看文件 @
a781222
...
@@ -624,7 +624,7 @@ public class StorageDataController extends BaseController {
...
@@ -624,7 +624,7 @@ public class StorageDataController extends BaseController {
Date
date
=
new
Date
();
Date
date
=
new
Date
();
alarmInfo
.
setStartTime
(
date
);
alarmInfo
.
setStartTime
(
date
);
alarmInfo
.
setEndTime
(
date
);
alarmInfo
.
setEndTime
(
date
);
String
msg
=
"["
+
code
+
"]"
+
line
Msg
;
String
msg
=
"["
+
code
+
"]"
+
error
Msg
;
alarmInfo
.
setAlarmMsg
(
msg
);
alarmInfo
.
setAlarmMsg
(
msg
);
alarmInfoDao
.
save
(
alarmInfo
);
alarmInfoDao
.
save
(
alarmInfo
);
lineMsg
=
errorMsg
;
lineMsg
=
errorMsg
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
a781222
...
@@ -206,7 +206,7 @@ public class TaskService implements ITaskService {
...
@@ -206,7 +206,7 @@ public class TaskService implements ITaskService {
*/
*/
@Override
@Override
public
void
updateFinishedTask
(
DataLog
task
){
public
void
updateFinishedTask
(
DataLog
task
){
DataLog
cacheTask
=
finishedTaskMap
.
get
(
task
.
getBarcode
());
//
DataLog cacheTask = finishedTaskMap.get(task.getBarcode());
if
(
task
==
null
){
if
(
task
==
null
){
log
.
error
(
"更新["
+
task
.
getBarcode
()+
"]任务时,任务不存在"
);
log
.
error
(
"更新["
+
task
.
getBarcode
()+
"]任务时,任务不存在"
);
}
else
{
}
else
{
...
@@ -1005,6 +1005,34 @@ public class TaskService implements ITaskService {
...
@@ -1005,6 +1005,34 @@ public class TaskService implements ITaskService {
log
.
info
(
"出库首盘料任务"
+
storageTask
.
getBarcode
()+
"["
+
storageTask
.
getPosName
()+
"]"
+
storageTask
.
getAppendInfo
());
log
.
info
(
"出库首盘料任务"
+
storageTask
.
getBarcode
()+
"["
+
storageTask
.
getPosName
()+
"]"
+
storageTask
.
getAppendInfo
());
}
}
//如果当前任务(执行中或已完成出库但未放到料架上的任务)的C或D料架数量大于2个,不允许出库
List
<
String
>
shelfNameList
=
new
ArrayList
<>();
for
(
DataLog
waitTask
:
waitTasks
)
{
AppendInfo
appendInfo
=
waitTask
.
getAppendInfo
();
if
(
waitTask
.
isExecuting
()
&&
waitTask
.
isCheckOutTask
()){
//待执行队列中正在执行的出库任务
if
(
appendInfo
.
isDShelfTask
()
||
appendInfo
.
isCShelfTask
()){
shelfNameList
.
add
(
appendInfo
.
getTempRfid
());
}
}
}
for
(
DataLog
finishedTask
:
finishedTaskMap
.
values
())
{
AppendInfo
appendInfo
=
finishedTask
.
getAppendInfo
();
if
(!
finishedTask
.
isCancel
()
&&
!
finishedTask
.
isFinished
()
&&
finishedTask
.
isCheckOutTask
()){
//未完成的出库工单任务
if
(
appendInfo
.
isDShelfTask
()
||
appendInfo
.
isCShelfTask
()){
shelfNameList
.
add
(
appendInfo
.
getTempRfid
());
}
}
}
if
(!
shelfNameList
.
contains
(
storageTask
.
getAppendInfo
().
getTempRfid
())){
//未完成的工单任务料架数量>2,且未包含此任务,任务先不出,等到只有一个料架时再说
if
(
shelfNameList
.
size
()
>=
2
){
log
.
info
(
"未完成的工单任务料架为:["
+
String
.
join
(
","
,
shelfNameList
)+
"]任务"
+
storageTask
.
getBarcode
()+
"暂停出库"
);
return
null
;
}
}
return
storageTask
;
return
storageTask
;
...
@@ -1013,6 +1041,7 @@ public class TaskService implements ITaskService {
...
@@ -1013,6 +1041,7 @@ public class TaskService implements ITaskService {
if
(
storage
.
isPackage
()){
if
(
storage
.
isPackage
()){
for
(
DataLog
task
:
waitTasks
)
{
for
(
DataLog
task
:
waitTasks
)
{
if
(
cid
.
equals
(
task
.
getCid
())
&&
task
.
isCheckOutTask
()
&&
task
.
isWait
())
{
if
(
cid
.
equals
(
task
.
getCid
())
&&
task
.
isCheckOutTask
()
&&
task
.
isWait
())
{
log
.
info
(
"出库包装料任务"
+
task
.
getBarcode
()+
"["
+
task
.
getPosName
()+
"]"
+
task
.
getAppendInfo
());
log
.
info
(
"出库包装料任务"
+
task
.
getBarcode
()+
"["
+
task
.
getPosName
()+
"]"
+
task
.
getAppendInfo
());
return
task
;
return
task
;
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
查看文件 @
a781222
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<display:column titleKey="来源" property="sourceName" sortable="true" sortProperty="sourceName"/>
<display:column titleKey="来源" property="sourceName" sortable="true" sortProperty="sourceName"/>
<display:column titleKey="料架" sortable="true" sortProperty="appendInfo.
tempRfid
">
<display:column titleKey="料架" sortable="true" sortProperty="appendInfo.
rfidIndex
">
<c:if test="${dataLog.type == 2}">
<c:if test="${dataLog.type == 2}">
${dataLog.appendInfo.tempRfid}(${dataLog.appendInfo.rfid})
${dataLog.appendInfo.tempRfid}(${dataLog.appendInfo.rfid})
</c:if>
</c:if>
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
a781222
...
@@ -125,13 +125,13 @@
...
@@ -125,13 +125,13 @@
<fmt:message key="数量"/>
<fmt:message key="数量"/>
</th>
</th>
<th>
<th>
<fmt:message key="已
出库
"/>
<fmt:message key="已
绑定
"/>
</th>
</th>
<th>
<th>
<fmt:message key="已
绑定
"/>
<fmt:message key="已
出库
"/>
</th>
</th>
<th>
<th>
<fmt:message key="
预绑定
"/>
<fmt:message key="
已发料
"/>
</th>
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -160,13 +160,27 @@
...
@@ -160,13 +160,27 @@
for(var i in data){
for(var i in data){
//var index = parseInt(i) + 1;
//var index = parseInt(i) + 1;
var color = "bg-red";
var isFirstReelAction = data[i].firstReelAction;
var outColor = "bg-red";
if(data[i].outQty >= data[i].qty){
if(data[i].outQty >= data[i].qty){
c
olor = "bg-green";
outC
olor = "bg-green";
}
}
var outQty = "<span class='"+color+" td-item'>"+data[i].outQty+"</span>";
var outQty = "<span class='"+outColor+" td-item'>"+data[i].outQty+"</span>";
var sendColor = "bg-red";
if(data[i].itemEnd){
sendColor = "bg-green";
}
var sendQty = "<span class='"+sendColor+" td-item'>"+data[i].sendQty+"</span>";
var realLockColor = "bg-red";
if(data[i].bindOk){
realLockColor = "bg-green";
}
var realLockQty = "<span class='"+realLockColor+" td-item'>"+data[i].realLockQty+"</span>";
table.row.add( [ /*index,*/ data[i].slotlocation, data[i].slotStr, data[i].pn, data[i].facility,data[i].reelID,data[i].reelcut,data[i].qty,
outQty,data[i].realLockQty,data[i].lock
Qty] );
table.row.add( [ /*index,*/ data[i].slotlocation, data[i].slotStr, data[i].pn, data[i].facility,data[i].reelID,data[i].reelcut,data[i].qty,
realLockQty,outQty,send
Qty] );
}
}
table.order( [ 0, 'asc' ] ).draw();
table.order( [ 0, 'asc' ] ).draw();
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
查看文件 @
a781222
...
@@ -64,15 +64,13 @@
...
@@ -64,15 +64,13 @@
font-size: 18px;
font-size: 18px;
}
}
.statusMsg{
.statusMsg{
background-color: #FFFFFF;
/*
background-color: #FFFFFF;
margin: 0px 10px;
margin: 0px 10px;
*/
padding: 10px;
padding: 10px;
/*height: 200px;*/
/*height: 200px;*/
}
}
.clientMsg{
.clientMsg{
/*margin-left: 30px;*/
font-size: 16px;
/*font-size: 30px;*/
font-size: 20px;
color: #ff5500;
color: #ff5500;
}
}
.smdstatus{
.smdstatus{
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/boxView.jsp
查看文件 @
a781222
...
@@ -58,15 +58,16 @@
...
@@ -58,15 +58,16 @@
background-color: #FFFFFF;
background-color: #FFFFFF;
margin: 0px 10px;
margin: 0px 10px;
padding: 10px;
padding: 10px;
height: 200px
;
text-align: center
;
}
}
#clientMsg{
#clientMsg{
margin-left: 30px;
margin-left: 30px;
font-size:
30
px;
font-size:
18
px;
color: #ff5500;
color: #ff5500;
text-align: center;
}
}
#smdstatus{
#smdstatus{
line-height:
20
0px;
line-height:
8
0px;
font-size: 30px;
font-size: 30px;
}
}
.barheight{
.barheight{
...
@@ -122,7 +123,7 @@
...
@@ -122,7 +123,7 @@
</div>
</div>
<div class="statusMsg">
<div class="statusMsg">
<
span id="smdstatus"></span><span id="clientMsg"></span
>
<
div id="smdstatus"></div><div id="clientMsg"></div
>
</div>
</div>
</div>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论