Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 95065b61
由
sunke
编写于
2021-04-19 09:12:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
Pn类型需求单修改
1 个父辈
aa23f2d3
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
122 行增加
和
42 行删除
myproject/src/main/java/com/myproject/util/BarcodeRule.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/GreeDeviceController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
myproject/src/main/webapp/WEB-INF/pages/homeMenu.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/common/metroTopMenu.jsp
myproject/storageManager.iml
myproject/src/main/java/com/myproject/util/BarcodeRule.java
查看文件 @
95065b6
...
...
@@ -278,10 +278,16 @@ public class BarcodeRule {
codeValue
=
codeValue
.
trim
();
//如果有前缀和后缀
if
(
prefix
>
0
){
if
(
prefix
>=
codeValue
.
length
()){
return
null
;
}
codeValue
=
codeValue
.
substring
(
prefix
);
}
if
(
suffix
>
0
){
if
(
suffix
>=
codeValue
.
length
()){
return
null
;
}
codeValue
=
codeValue
.
substring
(
0
,
codeValue
.
length
()
-
suffix
);
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
95065b6
...
...
@@ -451,10 +451,34 @@ public class OutInfoCache {
return
ResultBean
.
newErrorResult
(
2201
,
"无需求单号参数hSerial,无法关闭"
);
}
log
.
info
(
"开始关闭需求单hSerial=["
+
hSerial
+
"]"
);
OutInfo
outInfoFromCache
=
getOutInfoFromCache
(
hSerial
);
String
unbindMsg
=
""
;
if
(
outInfoFromCache
!=
null
){
if
(
outInfoFromCache
.
isPnAction
()
||
outInfoFromCache
.
isUrgentAction
()){
int
count
=
0
;
List
<
StoragePos
>
bindPosList
=
storagePosDao
.
findBindList
(
hSerial
);
for
(
StoragePos
storagePos
:
bindPosList
)
{
Barcode
barcode
=
storagePos
.
getBarcode
();
count
=
count
+
1
;
log
.
info
(
"解除["
+
barcode
.
getBarcode
()+
"]的需求单so=["
+
hSerial
+
"]绑定,累计解除"
+
count
);
storagePos
=
storagePosDao
.
unbindReel
(
storagePos
);
barcode
=
storagePos
.
getBarcode
();
barcode
=
qisdaBindService
.
bindPutInReel
(
barcode
);
String
bindSoseq
=
barcode
.
getAppendInfo
().
getSoseq
();
if
(!
Strings
.
isEmpty
(
bindSoseq
)){
log
.
info
(
"料盘["
+
barcode
.
getBarcode
()+
"]绑定到新工单soseq="
+
bindSoseq
);
storagePos
.
setBarcode
(
barcode
);
storagePosDao
.
save
(
storagePos
);
}
}
unbindMsg
=
",共解绑"
+
count
+
"盘物料"
;
}
}
int
sendStatus
=
StorageConstants
.
SEND_STATUS
.
CLOSED
;
outInfoDao
.
updateStatus
(
hSerial
,
-
1
,
sendStatus
);
removeFromCache
(
hSerial
);
return
ResultBean
.
newOkResult
(
"需求单hSerial=["
+
hSerial
+
"]关闭成功"
,
""
);
return
ResultBean
.
newOkResult
(
"需求单hSerial=["
+
hSerial
+
"]关闭成功"
+
unbindMsg
,
""
);
}
public
ResultBean
closeSoSeq
(
String
soseq
){
...
...
@@ -773,7 +797,7 @@ public class OutInfoCache {
}
}
InquiryShelfBean
.
clearShelf
(
outInfo
.
gethSerial
());
//
InquiryShelfBean.clearShelf(outInfo.gethSerial());
outInfo
.
setTaskEndTime
(
System
.
currentTimeMillis
());
outInfoDao
.
updateTaskEndTime
(
outInfo
.
gethSerial
(),
outInfo
.
getTaskEndTime
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/GreeDeviceController.java
查看文件 @
95065b6
...
...
@@ -8,6 +8,7 @@ import com.myproject.bean.qisda.ShelfLoc;
import
com.myproject.bean.update.DataLog
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.qisda.OutInfo
;
import
com.myproject.dao.mongo.qisda.IOutInfoDao
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.qisda.util.OutInfoCache
;
import
org.apache.cxf.jaxws.handler.types.CString
;
...
...
@@ -33,6 +34,9 @@ public class GreeDeviceController {
protected
ITaskService
taskService
;
@Autowired
private
IOutInfoDao
outInfoDao
;
@Autowired
private
OutInfoCache
outInfoCache
;
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
QisdaDeviceController
.
class
);
...
...
@@ -104,35 +108,20 @@ public class GreeDeviceController {
* msg:提示信息 ok为成功,其他表示异常
* data:表示目标位置
*/
@RequestMapping
(
value
=
"/
getRfidTargetP
"
)
@RequestMapping
(
value
=
"/
shelfDestination
"
)
@ResponseBody
public
Object
getRfidTargetP
(
HttpServletRequest
request
)
{
String
rfid
=
request
.
getParameter
(
"rfid"
);
try
{
if
(!
Strings
.
isBlank
(
rfid
))
{
ShelfInfo
shelf
=
InquiryShelfBean
.
findShelfByRealRfid
(
rfid
);
if
(
shelf
!=
null
)
{
String
hSerial
=
shelf
.
gethSerial
();
String
realRfid
=
request
.
getParameter
(
"rfid"
);
String
hSerial
=
QisdaCache
.
getShelfHSerial
(
realRfid
);
String
destination
=
"NONE"
;
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
!=
null
)
{
String
line
=
outInfo
.
getLine
();
log
.
error
(
"获取rfid目的地成功:rfid="
+
rfid
+
",line="
+
line
+
""
);
return
ResultBean
.
newOkResult
(
line
);
}
else
{
log
.
error
(
"获取rfid目的地失败:rfid="
+
rfid
+
",hSerial="
+
hSerial
+
",未找到工单信息"
);
return
ResultBean
.
newErrorResult
(
3001
,
"未找到工单信息"
);
}
}
else
{
log
.
error
(
"获取rfid目的地失败:rfid="
+
rfid
+
",未找到料架信息"
);
return
ResultBean
.
newErrorResult
(
3002
,
"未找到料架信息"
);
}
if
(
hSerial
!=
null
){
OutInfo
outInfo
=
outInfoDao
.
findByHSerial
(
hSerial
);
if
(
outInfo
!=
null
){
destination
=
outInfo
.
getLine
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"获取rfid目的地出错:rfid="
+
rfid
,
e
);
return
ResultBean
.
newErrorResult
(
500
,
e
.
getMessage
());
}
return
ResultBean
.
new
ErrorResult
(
3003
,
"位置获取失败"
);
return
ResultBean
.
new
OkResult
(
destination
);
}
/**
...
...
@@ -151,6 +140,7 @@ public class GreeDeviceController {
log
.
info
(
"料架放上AGV时,清理["
+
realRfid
+
"]的缓存信息"
);
if
(
Strings
.
isNotBlank
(
realRfid
)){
InquiryShelfBean
.
agvRemoveRfid
(
realRfid
);
QisdaCache
.
removeShelfHSerial
(
realRfid
);
}
return
ResultBean
.
newOkResult
(
"料架放上AGV时,清理["
+
realRfid
+
"]的缓存信息成功"
);
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
95065b6
...
...
@@ -454,6 +454,7 @@ public class QisdaApiController extends BaseController {
outInfo
=
new
OutInfo
(
outItem
);
}
}
outItem
=
outItemDao
.
save
(
outItem
);
if
(
outItem
.
isPnAction
()){
int
needNum
=
outItem
.
getQty
()
-
outItem
.
getSendQty
()
-
outItem
.
getRealLockQty
();
...
...
@@ -471,6 +472,7 @@ public class QisdaApiController extends BaseController {
appendInfo
.
setSo
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSoseq
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSlotStr
(
outItem
.
getSlotStr
());
appendInfo
.
setOutItemId
(
outItem
.
getId
());
appendInfo
.
setBindSlot
(
"1"
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
查看文件 @
95065b6
...
...
@@ -336,7 +336,7 @@ public class QisdaBindService {
bindItem
=
soseqCache
.
getCutOutItem
(
bindSoseq
,
Integer
.
valueOf
(
bindSlot
));
}
if
(
bindItem
!=
null
){
log
.
info
(
"找到未绑定需求单["
+
bindItem
.
gethSerial
()+
"],准备进行绑定"
);
if
(
bindItem
.
isPnAction
()){
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
bindItem
.
gethSerial
());
if
(
outInfo
!=
null
&&
outInfo
.
isClosed
()){
...
...
@@ -360,6 +360,7 @@ public class QisdaBindService {
bindItem
.
setRealLockQty
(
totalLockQty
);
outItemDao
.
updateLockQty
(
bindItem
.
getId
(),
totalLockQty
,
totalLockQty
);
outInfoCache
.
updateOutItem
(
bindItem
.
getId
());
log
.
info
(
"绑定料盘["
+
barcode
.
getBarcode
()+
"]到需求单["
+
bindItem
.
gethSerial
()+
"]完成"
);
}
}
else
if
(
bindItem
.
isReelCutAction
()){
OutInfo
cutOutInfo
=
soseqCache
.
getCutActionInfoFromCache
(
bindItem
.
getSoseq
());
...
...
@@ -465,7 +466,7 @@ public class QisdaBindService {
List
<
OutInfo
>
cacheOutInfoList
=
outInfoCache
.
getCachedOutInfos
();
List
<
String
>
lessHSerialList
=
new
ArrayList
<>();
for
(
OutInfo
unEndOutInfo
:
cacheOutInfoList
)
{
if
(!
unEndOutInfo
.
isClosed
()
&&
unEndOutInfo
.
isRealBindLess
()){
if
(!
unEndOutInfo
.
isClosed
()
&&
!
unEndOutInfo
.
isRealBindOk
()){
if
(
unEndOutInfo
.
isPnAction
()){
lessHSerialList
.
add
(
unEndOutInfo
.
gethSerial
());
}
else
if
(
unEndOutInfo
.
isReelCutAction
()){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaCache.java
查看文件 @
95065b6
...
...
@@ -56,6 +56,11 @@ public class QisdaCache {
private
static
String
REEL_LOCK_POS_MAP_KEY
=
"reelLocKPosMap"
;
/**
* 料串/料架目的地Map
*/
private
static
String
SHELF_HSERIAL_MAP
=
"shelfHSerialMap"
;
/**
* 当前正在执行的工单需求单(首盘,补料),未完成时,其他工单需求单不可执行
*/
private
static
String
currentOrderHSerial
;
...
...
@@ -80,6 +85,12 @@ public class QisdaCache {
*/
private
static
Map
<
String
,
ReelLockPosInfo
>
reelLocKPosMap
;
/**
* 料串/料架目的地Map
*/
private
static
Map
<
String
,
String
>
shelfHSerialMap
;
private
static
boolean
isProcessTimer
=
false
;
/**
* 定时器,每10秒执行一次
...
...
@@ -103,6 +114,52 @@ public class QisdaCache {
public
static
void
initFromDb
(){
initApiRequestMap
();
initReelLockPosMap
();
initShelfDestinationMap
();
}
private
static
void
initShelfDestinationMap
(){
if
(
shelfHSerialMap
==
null
){
shelfHSerialMap
=
new
ConcurrentHashMap
<>();
CacheInfo
cacheInfo
=
cacheInfoDao
.
getCacheInfo
(
SHELF_HSERIAL_MAP
);
if
(
cacheInfo
!=
null
){
Map
<
String
,
String
>
shelfMap
=
(
Map
<
String
,
String
>)
cacheInfo
.
getCacheValue
();
shelfHSerialMap
.
putAll
(
shelfMap
);
log
.
info
(
"当前料架目的地信息:"
+
shelfMap
);
}
}
}
/**
* 添加料架对应的需求单号
*/
public
static
void
addShelfHSerial
(
String
rfid
,
String
hSerial
){
String
oldHSerial
=
shelfHSerialMap
.
get
(
rfid
);
log
.
info
(
"添加料架["
+
rfid
+
"]的需求单号:"
+
hSerial
);
shelfHSerialMap
.
put
(
rfid
,
hSerial
);
cacheInfoDao
.
updateCacheItem
(
SHELF_HSERIAL_MAP
,
shelfHSerialMap
);
if
(
oldHSerial
!=
null
){
if
(!
oldHSerial
.
equals
(
hSerial
)){
log
.
error
(
"添加料架["
+
rfid
+
"]需求单号["
+
hSerial
+
"]失败,料架已有需求单号:"
+
oldHSerial
);
}
}
}
/**
* 清除料架的目的地信息
*/
public
static
void
removeShelfHSerial
(
String
rfid
){
String
oldHSerial
=
shelfHSerialMap
.
get
(
rfid
);
log
.
info
(
"清除料架["
+
rfid
+
"]的需求单号["
+
oldHSerial
+
"]信息"
);
shelfHSerialMap
.
remove
(
rfid
);
cacheInfoDao
.
updateCacheItem
(
SHELF_HSERIAL_MAP
,
shelfHSerialMap
);
}
/**
* 获取料架的目的地
*/
public
static
String
getShelfHSerial
(
String
rfid
){
String
hSerial
=
shelfHSerialMap
.
get
(
rfid
);
return
hSerial
;
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
95065b6
...
...
@@ -580,6 +580,7 @@ public class QisdaDeviceController extends BaseController {
private
synchronized
boolean
reelPutInFinished
(
DataLog
cacheTask
,
String
rfid
,
String
rfidLoc
){
if
(
cacheTask
!=
null
){
AppendInfo
appendInfo
=
cacheTask
.
getAppendInfo
();
QisdaCache
.
addShelfHSerial
(
rfid
,
appendInfo
.
gethSerial
());
boolean
putResult
=
InquiryShelfBean
.
putInShelf
(
cacheTask
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
//紧急料和分盘料放入失败不影响
boolean
isCutTask
=
cacheTask
.
isUrgentReel
()
||
cacheTask
.
isCutReel
()
||
cacheTask
.
isLessSendReel
();
...
...
myproject/src/main/webapp/WEB-INF/pages/homeMenu.jsp
查看文件 @
95065b6
...
...
@@ -32,7 +32,7 @@
<%--<security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT">--%>
<div class="col-md-2 col-xs-2 menuItem">
<a href="${ctx}/qisda/
dn
InfoSearch.html">
<a href="${ctx}/qisda/
out
InfoSearch.html">
<img src="${ctx}/images/menu/11.png" class="menuImg"/>
<div><fmt:message key="出入库"/></div>
</a>
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
95065b6
...
...
@@ -260,7 +260,7 @@
executeOut = function (hSerial){
$("#btn"+hSerial).attr("disabled","true");
$.post("${ctx}/rest/api/
qisda
/executeOut", {hSerial: hSerial}, function (data) {
$.post("${ctx}/rest/api/
dcs
/executeOut", {hSerial: hSerial}, function (data) {
alert(data);
});
}
...
...
myproject/src/main/webapp/common/metroTopMenu.jsp
查看文件 @
95065b6
...
...
@@ -54,16 +54,16 @@
<fmt:message key="出库"/><span class="selected"></span>
</a>
</li>
<
li class="classic-menu-dropdown"
>
<
a href="${ctx}/qisda/stockCheck.html" name="qisda"
>
<
fmt:message key="盘点"/><span class="selected"></span
>
<
/a
>
<
/li
>
<
li class="classic-menu-dropdown"
>
<
a href="${ctx}/qisda/diffInventory.html" name="qisda"
>
<
fmt:message key="库存比对"/><span class="selected"></span
>
<
/a
>
<
/li
>
<
%--<li class="classic-menu-dropdown">--%
>
<
%--<a href="${ctx}/qisda/stockCheck.html" name="qisda">--%
>
<
%--<fmt:message key="盘点"/><span class="selected"></span>--%
>
<
%--</a>--%
>
<
%--</li>--%
>
<
%--<li class="classic-menu-dropdown">--%
>
<
%--<a href="${ctx}/qisda/diffInventory.html" name="qisda">--%
>
<
%--<fmt:message key="库存比对"/><span class="selected"></span>--%
>
<
%--</a>--%
>
<
%--</li>--%
>
</ul>
</security:authorize>
<%--Work Order--%>
...
...
myproject/storageManager.iml
查看文件 @
95065b6
...
...
@@ -24,7 +24,6 @@
<datasource-mapping>
<factory-entry
name=
"ApplicationEntityManager"
/>
</datasource-mapping>
<naming-strategy-map
/>
<deploymentDescriptor
name=
"persistence.xml"
url=
"file://$MODULE_DIR$/src/main/resources/META-INF/persistence.xml"
/>
</configuration>
</facet>
...
...
@@ -32,7 +31,7 @@
<configuration
/>
</facet>
</component>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_7"
>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_7"
inherit-compiler-output=
"false"
>
<output
url=
"file://$MODULE_DIR$/target/classes"
/>
<output-test
url=
"file://$MODULE_DIR$/target/test-classes"
/>
<content
url=
"file://$MODULE_DIR$"
>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论