Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c9cde554
由
sunke
编写于
2020-05-16 08:50:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
分盘料会多绑定一盘的问题
1 个父辈
6a3dc070
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
177 行增加
和
86 行删除
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
myproject/src/main/java/com/myproject/bean/update/Barcode.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutItemDao.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutItemDaoImpl.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.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/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/qisda/orderOut.jsp
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
查看文件 @
c9cde55
...
@@ -61,7 +61,7 @@ public class AppendInfo {
...
@@ -61,7 +61,7 @@ public class AppendInfo {
private
String
preBindSlot
;
private
String
preBindSlot
;
/**
/**
* 站位信息(预绑定时,不放入slot信息,只有当实际绑定准备出库时再放入slot值)
*
真实绑定
站位信息(预绑定时,不放入slot信息,只有当实际绑定准备出库时再放入slot值)
*/
*/
private
String
bindSlot
;
private
String
bindSlot
;
...
...
myproject/src/main/java/com/myproject/bean/update/Barcode.java
查看文件 @
c9cde55
...
@@ -3,6 +3,7 @@ package com.myproject.bean.update;
...
@@ -3,6 +3,7 @@ package com.myproject.bean.update;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.myproject.bean.BaseMongoBean
;
import
com.myproject.bean.BaseMongoBean
;
import
com.myproject.bean.qisda.AppendInfo
;
import
com.myproject.bean.qisda.AppendInfo
;
import
com.myproject.bean.update.qisda.OutItem
;
import
com.myproject.util.DateUtil
;
import
com.myproject.util.DateUtil
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.util.StorageConstants
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.data.annotation.Transient
;
...
@@ -550,10 +551,43 @@ public class Barcode extends BaseMongoBean {
...
@@ -550,10 +551,43 @@ public class Barcode extends BaseMongoBean {
}
}
public
void
preBindItem
(
OutItem
outItem
){
boolean
realBind
=
false
;
addBindInfoToBarcode
(
outItem
,
realBind
);
}
public
void
realBindItem
(
OutItem
outItem
){
boolean
realBind
=
true
;
addBindInfoToBarcode
(
outItem
,
realBind
);
}
private
void
addBindInfoToBarcode
(
OutItem
outItem
,
boolean
realBind
){
AppendInfo
appendInfo
=
getAppendInfo
();
appendInfo
.
sethSerial
(
outItem
.
gethSerial
());
appendInfo
.
setRefno
(
outItem
.
getRefno
());
appendInfo
.
setSo
(
outItem
.
getSo
());
appendInfo
.
setSoseq
(
outItem
.
getSoseq
());
appendInfo
.
setSlotStr
(
outItem
.
getSlotStr
());
appendInfo
.
setPreBindSlot
(
outItem
.
getSlotlocation
()+
""
);
if
(
realBind
){
appendInfo
.
setBindSlot
(
outItem
.
getSlotlocation
()+
""
);
}
else
{
appendInfo
.
setBindSlot
(
""
);
}
appendInfo
.
setSlotIndex
(
outItem
.
getSlotlocation
());
setAppendInfo
(
appendInfo
);
}
/**
/**
* 分盘,返回母盘上的剩余数量,返回值小于0时,需要分另一盘
* 分盘,返回母盘上的剩余数量,返回值小于0时,需要分另一盘
*/
*/
public
int
cutCount
(
String
soseq
,
String
so
,
int
slotlocation
,
String
slot
,
String
hSerial
,
int
cutCount
){
public
int
cutCount
(
OutItem
cutItem
){
String
soseq
=
cutItem
.
getSoseq
();
String
so
=
cutItem
.
getSo
();
int
slotlocation
=
cutItem
.
getSlotlocation
();
String
slot
=
cutItem
.
getSlotStr
();
String
hSerial
=
cutItem
.
gethSerial
();
if
(
appendInfo
==
null
){
if
(
appendInfo
==
null
){
appendInfo
=
new
AppendInfo
();
appendInfo
=
new
AppendInfo
();
}
}
...
@@ -562,6 +596,10 @@ public class Barcode extends BaseMongoBean {
...
@@ -562,6 +596,10 @@ public class Barcode extends BaseMongoBean {
cutMap
=
new
HashMap
<>();
cutMap
=
new
HashMap
<>();
}
}
int
lockQty
=
cutItem
.
getLockQty
();
int
cutCount
=
cutItem
.
getQty
()
-
lockQty
;
//flag:子盘或母盘(L:子盘,M:母盘,其他‘’)
//flag:子盘或母盘(L:子盘,M:母盘,其他‘’)
//母盘剩余数量
//母盘剩余数量
int
remainQty
=
amount
-
cutCount
;
int
remainQty
=
amount
-
cutCount
;
...
...
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutItemDao.java
查看文件 @
c9cde55
...
@@ -9,7 +9,7 @@ public interface IOutItemDao extends IMongoDao {
...
@@ -9,7 +9,7 @@ public interface IOutItemDao extends IMongoDao {
List
<
OutItem
>
findByHSerial
(
String
hSerial
);
List
<
OutItem
>
findByHSerial
(
String
hSerial
);
List
<
OutItem
>
findCutItemList
(
List
<
String
>
soseq
List
,
String
pn
,
String
facility
);
List
<
OutItem
>
findCutItemList
(
List
<
String
>
cutHserial
List
,
String
pn
,
String
facility
);
OutItem
findItem
(
String
hSerial
,
int
slotSeq
);
OutItem
findItem
(
String
hSerial
,
int
slotSeq
);
...
...
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutItemDaoImpl.java
查看文件 @
c9cde55
...
@@ -24,10 +24,10 @@ public class OutItemDaoImpl extends AbstractMongoDao implements IOutItemDao {
...
@@ -24,10 +24,10 @@ public class OutItemDaoImpl extends AbstractMongoDao implements IOutItemDao {
}
}
@Override
@Override
public
List
<
OutItem
>
findCutItemList
(
List
<
String
>
soseq
List
,
String
pn
,
String
facility
){
public
List
<
OutItem
>
findCutItemList
(
List
<
String
>
cutHserial
List
,
String
pn
,
String
facility
){
Criteria
c
=
new
Criteria
();
Criteria
c
=
new
Criteria
();
c
.
and
(
"hSerial"
).
in
(
cutHserialList
);
c
.
and
(
"action"
).
is
(
"分盘"
);
c
.
and
(
"action"
).
is
(
"分盘"
);
c
.
and
(
"soseq"
).
in
(
soseqList
);
c
.
and
(
"pn"
).
is
(
pn
);
c
.
and
(
"pn"
).
is
(
pn
);
c
.
and
(
"facility"
).
is
(
facility
);
c
.
and
(
"facility"
).
is
(
facility
);
Query
query
=
new
Query
(
c
);
Query
query
=
new
Query
(
c
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
c9cde55
...
@@ -82,11 +82,66 @@ public class OutInfoCache {
...
@@ -82,11 +82,66 @@ public class OutInfoCache {
* 绑定入库料盘
* 绑定入库料盘
*/
*/
public
Barcode
bindPutInReel
(
Barcode
barcode
){
public
Barcode
bindPutInReel
(
Barcode
barcode
){
OutItem
bindItem
=
findNeedBindItem
(
barcode
);
boolean
isCutReelIn
=
false
;
if
(
bindItem
!=
null
){
String
bindSoseq
=
barcode
.
getAppendInfo
().
getSoseq
();
log
.
info
(
"绑定入库料盘["
+
barcode
.
getBarcode
()+
"]到 "
+
bindItem
.
getSourceName
());
String
bindSlot
=
barcode
.
getAppendInfo
().
getBindSlot
();
barcode
=
qisdaBindService
.
addBindInfoToBarcode
(
barcode
,
bindItem
);
OutItem
cutItem
=
soseqCache
.
getCutOutItem
(
bindSoseq
,
Integer
.
valueOf
(
bindSlot
));
if
(
Strings
.
isBlank
(
bindSoseq
)){
//未绑定
cutItem
=
findNeedBindItem
(
barcode
);
}
else
{
//料盘分盘过后入库(已经预绑定过)
isCutReelIn
=
true
;
}
if
(
cutItem
!=
null
){
//分盘料
if
(
cutItem
.
isCutMaterial
()){
int
preBindQty
=
cutItem
.
getLockQty
();
if
(!
isCutReelIn
){
preBindQty
=
cutItem
.
getLockQty
()
+
barcode
.
getAmount
();
}
if
(
preBindQty
>=
cutItem
.
getQty
()){
int
reelRemainNum
=
barcode
.
cutCount
(
cutItem
);
if
(
reelRemainNum
>
0
){
//母盘还有剩余,说明该需求slot已经满足
preBindQty
=
cutItem
.
getQty
();
}
else
{
//母盘正好用完或全部用完也达不到需求量,此母盘绑定slot后,需要继续寻找其他盘进行绑定
preBindQty
=
preBindQty
+
barcode
.
getAmount
();
}
}
cutItem
.
setLockQty
(
preBindQty
);
soseqCache
.
udpateTotalPreLockQty
(
cutItem
,
preBindQty
);
log
.
info
(
"\t分盘料["
+
barcode
.
getBarcode
()+
"]绑定到Soseq=["
+
cutItem
.
getSoseq
()+
"]So=["
+
cutItem
.
getSo
()+
"]的["
+
cutItem
.
getSlotlocation
()+
"] 数量:"
+
preBindQty
+
"/"
+
cutItem
.
getQty
());
if
(!
barcode
.
hasCutInfo
()){
//没有分盘信息,可以直接绑定
barcode
.
realBindItem
(
cutItem
);
int
realBindQty
=
cutItem
.
getRealLockQty
()
+
barcode
.
getAmount
();
cutItem
.
setRealLockQty
(
realBindQty
);
soseqCache
.
updateTotalRealLockQty
(
cutItem
,
realBindQty
);
}
else
{
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
appendInfo
.
setSlotIndex
(
cutItem
.
getSlotlocation
());
appendInfo
.
setSo
(
cutItem
.
getSo
());
appendInfo
.
setSoseq
(
cutItem
.
getSoseq
());
barcode
.
setAppendInfo
(
appendInfo
);
log
.
info
(
"分盘料["
+
barcode
.
getBarcode
()+
"]分盘信息:"
+
barcode
.
getAppendInfo
().
getCutMap
());
}
}
else
{
//绑定
barcode
.
realBindItem
(
cutItem
);
int
realBindQty
=
cutItem
.
getRealLockQty
()
+
barcode
.
getAmount
();
cutItem
.
setRealLockQty
(
realBindQty
);
soseqCache
.
updateTotalRealLockQty
(
cutItem
,
realBindQty
);
log
.
info
(
barcode
.
getBarcode
()
+
"入库完成,工单so=["
+
cutItem
.
getSo
()+
"] soseq=["
+
cutItem
.
getSoseq
()+
"]slotSeq=["
+
cutItem
.
getSlotlocation
()+
"]绑定数量增加"
+
barcode
.
getAmount
()+
"="
+
realBindQty
);
}
qisdaBindService
.
unbindSurplusReel
(
cutItem
);
}
}
return
barcode
;
return
barcode
;
}
}
...
@@ -138,19 +193,19 @@ public class OutInfoCache {
...
@@ -138,19 +193,19 @@ public class OutInfoCache {
* 入库完成时,查找需要绑定的需求单
* 入库完成时,查找需要绑定的需求单
*/
*/
private
OutItem
findNeedBindItem
(
Barcode
barcode
){
private
OutItem
findNeedBindItem
(
Barcode
barcode
){
List
<
String
>
soseq
List
=
new
ArrayList
<>();
List
<
String
>
cutHserial
List
=
new
ArrayList
<>();
for
(
OutInfo
unEndOutInfo
:
outInfoMap
.
values
())
{
for
(
OutInfo
unEndOutInfo
:
outInfoMap
.
values
())
{
//查找执行过缺料和即将执行的,进行绑定
//查找执行过缺料和即将执行的,进行绑定
if
(
unEndOutInfo
.
isReelCutAction
()
&&
!
unEndOutInfo
.
isClosed
()){
if
(
unEndOutInfo
.
isReelCutAction
()
&&
!
unEndOutInfo
.
isClosed
()){
if
(
unEndOutInfo
.
isSendLess
()
||
unEndOutInfo
.
isPriority
()
){
if
(
unEndOutInfo
.
isSendLess
()){
soseqList
.
add
(
unEndOutInfo
.
getSoseq
());
cutHserialList
.
add
(
unEndOutInfo
.
gethSerial
());
}
}
}
}
}
}
String
pn
=
barcode
.
getPartNumber
();
String
pn
=
barcode
.
getPartNumber
();
String
facility
=
barcode
.
getAppendInfo
().
getFacility
();
String
facility
=
barcode
.
getAppendInfo
().
getFacility
();
List
<
OutItem
>
cutItemList
=
outItemDao
.
findCutItemList
(
soseq
List
,
pn
,
facility
);
List
<
OutItem
>
cutItemList
=
outItemDao
.
findCutItemList
(
cutHserial
List
,
pn
,
facility
);
//优先绑定执行过的工单,如果没有,则绑定优先执行的工单
//优先绑定执行过的工单,如果没有,则绑定优先执行的工单
OutItem
executedItem
=
null
;
OutItem
executedItem
=
null
;
...
@@ -159,38 +214,39 @@ public class OutInfoCache {
...
@@ -159,38 +214,39 @@ public class OutInfoCache {
OutItem
priorityItem
=
null
;
OutItem
priorityItem
=
null
;
OutInfo
priorityOutInfo
=
null
;
OutInfo
priorityOutInfo
=
null
;
for
(
OutItem
outItem
:
cutItemList
)
{
for
(
OutItem
outItem
:
cutItemList
)
{
OutInfo
outInfo
=
getOutInfoFromCache
(
outItem
.
gethSerial
());
if
(!
outItem
.
isBindOk
()){
if
(
outInfo
!=
null
){
OutInfo
outInfo
=
getOutInfoFromCache
(
outItem
.
gethSerial
());
//真实绑定缺料
if
(
outInfo
!=
null
){
if
(
outItem
.
realBindLessQty
()
>
0
){
//真实绑定缺料
long
firstExecutTime
=
outInfo
.
getFirstExecuteTime
();
if
(
outItem
.
realBindLessQty
()
>
0
){
if
(
firstExecutTime
>
0
){
long
firstExecutTime
=
outInfo
.
getFirstExecuteTime
();
//已经执行过的需求单
if
(
firstExecutTime
>
0
){
if
(
executedItem
==
null
){
//已经执行过的需求单
executedItem
=
outItem
;
if
(
executedItem
==
null
){
executedOutInfo
=
outInfo
;
}
else
{
if
(
firstExecutTime
<
executedOutInfo
.
getFirstExecuteTime
()){
executedItem
=
outItem
;
executedItem
=
outItem
;
executedOutInfo
=
outInfo
;
executedOutInfo
=
outInfo
;
}
else
{
if
(
firstExecutTime
<
executedOutInfo
.
getFirstExecuteTime
()){
executedItem
=
outItem
;
executedOutInfo
=
outInfo
;
}
}
}
}
}
else
if
(
firstExecutTime
<
0
){
}
else
if
(
firstExecutTime
<
0
){
//优先执行的需求单
//优先执行的需求单
if
(
priorityItem
==
null
){
if
(
priorityItem
==
null
){
priorityItem
=
outItem
;
priorityOutInfo
=
outInfo
;
}
else
{
if
(
firstExecutTime
>
priorityOutInfo
.
getFirstExecuteTime
()){
priorityItem
=
outItem
;
priorityItem
=
outItem
;
priorityOutInfo
=
outInfo
;
priorityOutInfo
=
outInfo
;
}
else
{
if
(
firstExecutTime
>
priorityOutInfo
.
getFirstExecuteTime
()){
priorityItem
=
outItem
;
priorityOutInfo
=
outInfo
;
}
}
}
}
}
}
}
}
}
}
}
}
}
if
(
executedItem
!=
null
){
if
(
executedItem
!=
null
){
return
executedItem
;
return
executedItem
;
...
@@ -310,11 +366,30 @@ public class OutInfoCache {
...
@@ -310,11 +366,30 @@ public class OutInfoCache {
/**
/**
* 手动调整优先级
* @param hSerialList
*/
public
void
changePriority
(
List
<
String
>
hSerialList
)
{
long
sortOrder
=
-
System
.
currentTimeMillis
();
for
(
String
hSerial
:
hSerialList
)
{
if
(
Strings
.
isBlank
(
hSerial
)){
continue
;
}
OutInfo
outInfo
=
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
!=
null
){
updateExecuteTime
(
outInfo
,
sortOrder
);
sortOrder
=
sortOrder
-
1
;
}
}
}
/**
* 获取缓存的需求单信息
* 获取缓存的需求单信息
*/
*/
public
List
<
OutInfo
>
getCachedOutInfos
(){
public
List
<
OutInfo
>
getCachedOutInfos
(){
List
<
OutInfo
>
outInfoList
=
Lists
.
newArrayList
(
outInfoMap
.
values
());
List
<
OutInfo
>
outInfoList
=
Lists
.
newArrayList
(
outInfoMap
.
values
());
//
未执行过的,并且达到了必须出库时间,取出来放到优先执行中
//
执行过按执行时间先后排序, 未执行过的放在最后
outInfoList
.
sort
(
new
Comparator
<
OutInfo
>()
{
outInfoList
.
sort
(
new
Comparator
<
OutInfo
>()
{
@Override
@Override
public
int
compare
(
OutInfo
o1
,
OutInfo
o2
)
{
public
int
compare
(
OutInfo
o1
,
OutInfo
o2
)
{
...
@@ -323,9 +398,14 @@ public class OutInfoCache {
...
@@ -323,9 +398,14 @@ public class OutInfoCache {
long
executeTime2
=
o2
.
getFirstExecuteTime
();
long
executeTime2
=
o2
.
getFirstExecuteTime
();
if
(
executeTime1
!=
executeTime2
){
if
(
executeTime1
!=
executeTime2
){
//手动更改优先级的,排在最前面
if
(
executeTime1
==
0
){
long
result
=
executeTime1
-
executeTime2
;
return
1
;
return
result
>
0
?
1
:
-
1
;
}
if
(
executeTime2
==
0
){
return
-
1
;
}
Long
abs
=
Math
.
abs
(
executeTime1
)
-
Math
.
abs
(
executeTime2
);
return
abs
.
intValue
();
}
}
//都为0即未执行过的,到这里的,理论上都是未达到必须出库时间(达到必须出库时间的,已经修改过优先级)
//都为0即未执行过的,到这里的,理论上都是未达到必须出库时间(达到必须出库时间的,已经修改过优先级)
Date
sdate1
=
o1
.
getSdate
();
Date
sdate1
=
o1
.
getSdate
();
...
@@ -501,19 +581,6 @@ public class OutInfoCache {
...
@@ -501,19 +581,6 @@ public class OutInfoCache {
public
void
changePriority
(
List
<
String
>
hSerialList
)
{
long
sortOrder
=
-
System
.
currentTimeMillis
();
for
(
String
hSerial
:
hSerialList
)
{
if
(
Strings
.
isBlank
(
hSerial
)){
continue
;
}
OutInfo
outInfo
=
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
!=
null
){
updateExecuteTime
(
outInfo
,
sortOrder
);
sortOrder
=
sortOrder
-
1
;
}
}
}
private
OutInfo
updateExecuteTime
(
OutInfo
outInfo
,
long
executeTime
){
private
OutInfo
updateExecuteTime
(
OutInfo
outInfo
,
long
executeTime
){
boolean
updateResult
=
outInfo
.
updateExecuteTime
(
executeTime
);
boolean
updateResult
=
outInfo
.
updateExecuteTime
(
executeTime
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
c9cde55
...
@@ -111,8 +111,8 @@ public class QisdaApiController extends BaseController {
...
@@ -111,8 +111,8 @@ public class QisdaApiController extends BaseController {
@ResponseBody
@ResponseBody
public
String
executeOut
(
HttpServletRequest
request
){
public
String
executeOut
(
HttpServletRequest
request
){
String
hSerial
=
request
.
getParameter
(
"hSerial"
);
String
hSerial
=
request
.
getParameter
(
"hSerial"
);
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
hSerial
);
//
OutInfo outInfo = outInfoCache.getOutInfoFromCache(hSerial);
qisdaBindService
.
realBindOutInfo
(
outInfo
);
//
qisdaBindService.realBindOutInfo(outInfo);
ResultBean
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
ResultBean
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
return
resultBean
.
getMsg
();
return
resultBean
.
getMsg
();
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
查看文件 @
c9cde55
此文件的差异被折叠,
点击展开。
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaCache.java
查看文件 @
c9cde55
...
@@ -84,6 +84,7 @@ public class QisdaCache {
...
@@ -84,6 +84,7 @@ public class QisdaCache {
rfidDnMap
=
new
ConcurrentHashMap
<>();
rfidDnMap
=
new
ConcurrentHashMap
<>();
}
else
{
}
else
{
rfidDnMap
=
(
Map
<
String
,
DNInfo
>)
cacheInfo
.
getCacheValue
();
rfidDnMap
=
(
Map
<
String
,
DNInfo
>)
cacheInfo
.
getCacheValue
();
log
.
info
(
"当前收料绑定:"
+
rfidDnMap
);
}
}
}
}
}
}
...
@@ -127,7 +128,6 @@ public class QisdaCache {
...
@@ -127,7 +128,6 @@ public class QisdaCache {
}
}
public
static
void
bindRfidDnInfo
(
String
rfid
,
DNInfo
dnInfo
){
public
static
void
bindRfidDnInfo
(
String
rfid
,
DNInfo
dnInfo
){
rfidDnMap
.
put
(
rfid
,
dnInfo
);
rfidDnMap
.
put
(
rfid
,
dnInfo
);
saveRfidDnMap
();
saveRfidDnMap
();
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
c9cde55
...
@@ -560,20 +560,19 @@ public class QisdaDeviceController extends BaseController {
...
@@ -560,20 +560,19 @@ public class QisdaDeviceController extends BaseController {
public
ResultBean
cancelPutInTask
(
HttpServletRequest
request
)
{
public
ResultBean
cancelPutInTask
(
HttpServletRequest
request
)
{
String
codeStr
=
request
.
getParameter
(
"barcode"
);
String
codeStr
=
request
.
getParameter
(
"barcode"
);
try
{
try
{
Barcode
barcode
=
dataCache
.
resolveOneValideBarcode
(
codeStr
);
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
isPutInTask
()
&&
queueTask
.
getBarcode
().
equals
(
barcode
)){
if
(
queueTask
.
isPutInTask
()
&&
codeStr
.
contains
(
queueTask
.
getBarcode
()
)){
//只能取消入库任务
//只能取消入库任务
boolean
cancelResult
=
taskService
.
cancelTask
(
queueTask
.
getId
());
boolean
cancelResult
=
taskService
.
cancelTask
(
queueTask
.
getId
());
log
.
info
(
"客户端取消["
+
barcode
+
"]的入库任务结果:"
+
cancelResult
);
log
.
info
(
"客户端取消["
+
codeStr
+
"]的入库任务结果:"
+
cancelResult
);
return
ResultBean
.
newOkResult
(
cancelResult
);
return
ResultBean
.
newOkResult
(
cancelResult
);
}
}
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
return
ResultBean
.
newErrorResult
(
2002
,
"
任务["
+
codeStr
+
"]取消
失败:"
+
e
.
getMessage
());
return
ResultBean
.
newErrorResult
(
2002
,
"
客户端取消任务["
+
codeStr
+
"]
失败:"
+
e
.
getMessage
());
}
}
return
ResultBean
.
newErrorResult
(
2003
,
"
任务["
+
codeStr
+
"]取消
失败"
);
return
ResultBean
.
newErrorResult
(
2003
,
"
客户端取消任务["
+
codeStr
+
"]
失败"
);
}
}
/**
/**
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
查看文件 @
c9cde55
...
@@ -554,7 +554,7 @@ public class StorageDataController extends BaseController {
...
@@ -554,7 +554,7 @@ public class StorageDataController extends BaseController {
if
(
dataCache
.
getSettings
().
isStopOut
()){
if
(
dataCache
.
getSettings
().
isStopOut
()){
lineMsg
=
"系统更新中,暂停出入库"
;
lineMsg
=
"系统更新中,暂停出入库"
;
resultMap
.
put
(
"result"
,
"
100
"
);
resultMap
.
put
(
"result"
,
"
"
);
resultMap
.
put
(
"msg"
,
lineMsg
);
resultMap
.
put
(
"msg"
,
lineMsg
);
return
resultMap
;
return
resultMap
;
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
c9cde55
...
@@ -444,11 +444,6 @@ public class TaskService implements ITaskService {
...
@@ -444,11 +444,6 @@ public class TaskService implements ITaskService {
if
(
result
!=
null
){
if
(
result
!=
null
){
barcodeSave
=
result
;
barcodeSave
=
result
;
}
}
String
bindSoseq
=
barcodeSave
.
getAppendInfo
().
getSoseq
();
if
(
Strings
.
isNullOrEmpty
(
bindSoseq
)){
//未绑定(不是分盘入库)
barcodeSave
=
outInfoCache
.
bindPutInReel
(
barcodeSave
);
}
barcodeSave
=
barcodeManager
.
save
(
barcodeSave
);
barcodeSave
=
barcodeManager
.
save
(
barcodeSave
);
return
barcodeSave
;
return
barcodeSave
;
...
@@ -1653,26 +1648,26 @@ public class TaskService implements ITaskService {
...
@@ -1653,26 +1648,26 @@ public class TaskService implements ITaskService {
}
}
}
}
log
.
info
(
"二维码:["
+
barcode
.
getBarcode
()
+
"]任务["
+
storagePos
.
getPosName
()+
"]开始加入队列"
);
DataLog
dataLog
=
new
DataLog
();
DataLog
dataLog
=
new
DataLog
();
dataLog
.
setStorageId
(
storage
.
getId
());
dataLog
.
setStorageId
(
storage
.
getId
());
dataLog
.
setStorageName
(
storage
.
getName
());
dataLog
.
setStorageName
(
storage
.
getName
());
dataLog
.
setBarcode
(
barcode
.
getBarcode
());
dataLog
.
setBarcode
(
barcode
.
getBarcode
());
dataLog
.
setAppendInfo
(
barcode
.
getAppendInfo
());
dataLog
.
setAppendInfo
(
barcode
.
getAppendInfo
());
dataLog
.
setRelationCodes
(
barcode
.
getRelationCodes
());
//
dataLog.setRelationCodes(barcode.getRelationCodes());
dataLog
.
setType
(
StorageConstants
.
OP
.
PUT_IN
);
dataLog
.
setType
(
StorageConstants
.
OP
.
PUT_IN
);
dataLog
.
setNum
(
barcode
.
getAmount
());
dataLog
.
setNum
(
barcode
.
getAmount
());
dataLog
.
setCid
(
storage
.
getCid
());
dataLog
.
setCid
(
storage
.
getCid
());
String
loginUser
=
StorageDataController
.
getLoginUsername
();
//
String loginUser = StorageDataController.getLoginUsername();
dataLog
.
setOperator
(
loginUser
);
//
dataLog.setOperator(loginUser);
dataLog
.
setPartNumber
(
barcode
.
getPartNumber
());
dataLog
.
setPartNumber
(
barcode
.
getPartNumber
());
dataLog
.
setPosId
(
storagePos
.
getId
());
dataLog
.
setPosId
(
storagePos
.
getId
());
dataLog
.
setPosName
(
storagePos
.
getPosName
());
dataLog
.
setPosName
(
storagePos
.
getPosName
());
dataLog
.
setStatus
(
StorageConstants
.
OP_STATUS
.
EXECUTING
.
name
());
dataLog
.
setStatus
(
StorageConstants
.
OP_STATUS
.
EXECUTING
.
name
());
dataLog
.
setSourceName
(
barcode
.
getAppendInfo
().
getDnNo
());
dataLog
.
setSourceName
(
barcode
.
getAppendInfo
().
getDnNo
());
dataLogDao
.
save
(
dataLog
);
dataLogDao
.
save
(
dataLog
);
...
@@ -1696,8 +1691,8 @@ public class TaskService implements ITaskService {
...
@@ -1696,8 +1691,8 @@ public class TaskService implements ITaskService {
barcode
.
setPosName
(
task
.
getPosName
());
barcode
.
setPosName
(
task
.
getPosName
());
barcode
.
setInitialAmount
(
barcode
.
getAmount
());
barcode
.
setInitialAmount
(
barcode
.
getAmount
());
//
TODO: 进行绑定或者预绑定
//
入库更新绑定数量
barcode
=
outInfoCache
.
bindPutInReel
(
barcode
);
barcodeManager
.
save
(
barcode
);
barcodeManager
.
save
(
barcode
);
...
@@ -1764,20 +1759,6 @@ public class TaskService implements ITaskService {
...
@@ -1764,20 +1759,6 @@ public class TaskService implements ITaskService {
dNItemDao
.
save
(
dnItem
);
dNItemDao
.
save
(
dnItem
);
}
}
//入库更新绑定数量
String
soseq
=
appendInfo
.
getSoseq
();
if
(
soseq
!=
null
&&
!
soseq
.
isEmpty
()){
int
slotIndex
=
appendInfo
.
getSlotIndex
();
OutItem
cutItem
=
outItemDao
.
findCutItem
(
soseq
,
slotIndex
);
if
(
cutItem
!=
null
){
int
realBindQty
=
cutItem
.
getRealLockQty
()
+
barcode
.
getAmount
();
log
.
info
(
barcode
.
getBarcode
()
+
"纯入库完成,分盘需求单soseq=["
+
soseq
+
"]slotSeq=["
+
slotIndex
+
"]绑定数量增加"
+
barcode
.
getAmount
()+
"="
+
realBindQty
);
cutItem
.
setRealLockQty
(
realBindQty
);
soseqCache
.
updateTotalRealLockQty
(
cutItem
,
realBindQty
);
}
}
//通知VMI入库完成
//通知VMI入库完成
QisdaApiController
.
PutInFinished
(
barcode
,
task
);
QisdaApiController
.
PutInFinished
(
barcode
,
task
);
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/orderOut.jsp
查看文件 @
c9cde55
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
.icon-cursor-move{
.icon-cursor-move{
margin-right:10px;
margin-right:10px;
}
}
.portlet-body {
min-height:60px;
}
.panel-body {
.panel-body {
position: relative;
position: relative;
...
@@ -24,6 +27,7 @@
...
@@ -24,6 +27,7 @@
margin-bottom: 10px;
margin-bottom: 10px;
}
}
</style>
</style>
<link href="${ctx}/scripts/lobibox/css/lobibox.min.css?id=2" rel="stylesheet" type="text/css"/>
<link href="${ctx}/scripts/lobibox/css/lobibox.min.css?id=2" rel="stylesheet" type="text/css"/>
...
@@ -173,6 +177,8 @@
...
@@ -173,6 +177,8 @@
});
});
}
}
flushOutInfos();
var moving = false;
var moving = false;
setInterval(function(){
setInterval(function(){
if(!moving){
if(!moving){
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论