Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit dc411eff
由
sunke
编写于
2021-05-24 09:07:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
设置线体后再进行绑定
Fix:有手动出库任务时工单执行出错 出入库日志条码查询转义特殊字符 自动任务开启时不允许手动出库 需求单查询增加线体
1 个父辈
600b3464
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
206 行增加
和
95 行删除
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
myproject/src/main/java/com/myproject/bean/update/qisda/OutInfo.java
myproject/src/main/java/com/myproject/dao/mongo/IStoragePosDao.java
myproject/src/main/java/com/myproject/dao/mongo/impl/StoragePosDaoImpl.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutInfoDao.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutInfoDaoImpl.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/OutInfoSearchController.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/user/DataLogSearchController.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/StorageDataController.java
myproject/src/main/resources/mongo.xml
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/decorators/metro.jsp
myproject/src/main/java/com/myproject/bean/qisda/AppendInfo.java
查看文件 @
dc411ef
...
@@ -310,6 +310,9 @@ public class AppendInfo {
...
@@ -310,6 +310,9 @@ public class AppendInfo {
}
}
public
boolean
isPnAction
(){
public
boolean
isPnAction
(){
if
(
action
==
null
){
return
false
;
}
return
getAction
().
contains
(
"PN"
);
return
getAction
().
contains
(
"PN"
);
}
}
...
...
myproject/src/main/java/com/myproject/bean/update/qisda/OutInfo.java
查看文件 @
dc411ef
...
@@ -32,9 +32,6 @@ public class OutInfo extends BaseMongoBean {
...
@@ -32,9 +32,6 @@ public class OutInfo extends BaseMongoBean {
this
.
taskNeedOutDate
=
needOutDate
;
this
.
taskNeedOutDate
=
needOutDate
;
this
.
mdate
=
outItem
.
getMdate
();
this
.
mdate
=
outItem
.
getMdate
();
this
.
endOutInfo
=
outItem
.
isTheEndOutInfo
();
this
.
endOutInfo
=
outItem
.
isTheEndOutInfo
();
if
(
outItem
.
isPnAction
()){
this
.
endOutInfo
=
true
;
}
}
}
/**
/**
...
...
myproject/src/main/java/com/myproject/dao/mongo/IStoragePosDao.java
查看文件 @
dc411ef
...
@@ -72,6 +72,8 @@ public interface IStoragePosDao extends IMongoDao {
...
@@ -72,6 +72,8 @@ public interface IStoragePosDao extends IMongoDao {
List
<
StoragePos
>
findBindList
(
String
hSerial
);
List
<
StoragePos
>
findBindList
(
String
hSerial
);
int
countBind
(
String
hSerial
);
List
<
StoragePos
>
findBindList
(
String
hSerial
,
String
outItemId
);
List
<
StoragePos
>
findBindList
(
String
hSerial
,
String
outItemId
);
/**
/**
...
...
myproject/src/main/java/com/myproject/dao/mongo/impl/StoragePosDaoImpl.java
查看文件 @
dc411ef
...
@@ -395,6 +395,13 @@ public class StoragePosDaoImpl extends AbstractMongoDao implements IStoragePosDa
...
@@ -395,6 +395,13 @@ public class StoragePosDaoImpl extends AbstractMongoDao implements IStoragePosDa
return
findByQuery
(
q
);
return
findByQuery
(
q
);
}
}
@Override
public
int
countBind
(
String
hSerial
){
Criteria
c
=
Criteria
.
where
(
"barcode.appendInfo.hSerial"
).
is
(
hSerial
);
Query
q
=
new
Query
(
c
);
return
countByQuery
(
q
);
}
/**
/**
* 获取工单的所有绑定料盘
* 获取工单的所有绑定料盘
*/
*/
...
...
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutInfoDao.java
查看文件 @
dc411ef
...
@@ -26,6 +26,8 @@ public interface IOutInfoDao extends IMongoDao {
...
@@ -26,6 +26,8 @@ public interface IOutInfoDao extends IMongoDao {
void
updateTaskFinishNum
(
String
hSerail
,
int
taskFinishNum
);
void
updateTaskFinishNum
(
String
hSerail
,
int
taskFinishNum
);
void
updateBindNum
(
String
hSerail
,
int
taskFinishNum
);
void
updateOutReelNum
(
String
hSerial
,
int
outReelNum
);
void
updateOutReelNum
(
String
hSerial
,
int
outReelNum
);
void
updateExecuteTime
(
String
hSerial
,
long
firstExecuteTime
);
void
updateExecuteTime
(
String
hSerial
,
long
firstExecuteTime
);
...
...
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutInfoDaoImpl.java
查看文件 @
dc411ef
...
@@ -112,6 +112,11 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao {
...
@@ -112,6 +112,11 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao {
}
}
@Override
@Override
public
void
updateBindNum
(
String
hSerail
,
int
taskFinishNum
)
{
update
(
hSerail
,
"totalBindNum"
,
taskFinishNum
);
}
@Override
public
void
updateOutReelNum
(
String
hSerial
,
int
outReelNum
){
public
void
updateOutReelNum
(
String
hSerial
,
int
outReelNum
){
update
(
hSerial
,
"outReelNum"
,
outReelNum
);
update
(
hSerial
,
"outReelNum"
,
outReelNum
);
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/OutInfoSearchController.java
查看文件 @
dc411ef
...
@@ -43,26 +43,38 @@ public class OutInfoSearchController extends BaseSearchController {
...
@@ -43,26 +43,38 @@ public class OutInfoSearchController extends BaseSearchController {
@RequestMapping
(
"/outInfoSearch*"
)
@RequestMapping
(
"/outInfoSearch*"
)
public
String
onSubmit
(
@ModelAttribute
(
"searchCriteria"
)
BaseSearchCriteria
searchCriteria
,
HttpServletRequest
request
)
{
public
String
onSubmit
(
@ModelAttribute
(
"searchCriteria"
)
BaseSearchCriteria
searchCriteria
,
HttpServletRequest
request
)
{
boolean
stop
Out
=
dataCache
.
getSettings
().
isStopOut
();
boolean
stop
Job
=
dataCache
.
getSettings
().
isStopJob
();
request
.
setAttribute
(
"stop
Out"
,
stopOut
);
request
.
setAttribute
(
"stop
Job"
,
stopJob
);
Query
query
=
new
Query
();
Query
query
=
new
Query
();
Criteria
criteria
=
new
Criteria
();
Criteria
criteria
=
new
Criteria
();
addLikeParam
(
request
,
criteria
,
"so"
);
addLikeParam
(
request
,
criteria
,
"so"
);
String
reelId
=
request
.
getParameter
(
"reelId"
);
String
lineStr
=
request
.
getParameter
(
"line"
);
if
(
Strings
.
isNotBlank
(
reelId
)){
if
(
lineStr
==
null
){
Pattern
pattern
=
Pattern
.
compile
(
reelId
,
Pattern
.
CASE_INSENSITIVE
);
lineStr
=
"NONE"
;
Criteria
c
=
Criteria
.
where
(
"reelID"
).
regex
(
pattern
);
}
request
.
setAttribute
(
"line"
,
lineStr
);
if
(
Strings
.
isNotBlank
(
lineStr
)){
String
line
=
lineStr
;
if
(
lineStr
.
equals
(
"NONE"
)){
line
=
null
;
}
criteria
.
and
(
"line"
).
is
(
line
);
}
String
pn
=
request
.
getParameter
(
"pn"
);
if
(
Strings
.
isNotBlank
(
pn
)){
Pattern
pattern
=
Pattern
.
compile
(
pn
,
Pattern
.
CASE_INSENSITIVE
);
Criteria
c
=
Criteria
.
where
(
"pn"
).
regex
(
pattern
);
List
<
OutItem
>
itemList
=
outItemDao
.
findByQuery
(
new
Query
(
c
));
List
<
OutItem
>
itemList
=
outItemDao
.
findByQuery
(
new
Query
(
c
));
List
<
String
>
hSerialList
=
new
ArrayList
<>();
List
<
String
>
hSerialList
=
new
ArrayList
<>();
for
(
OutItem
outItem
:
itemList
)
{
for
(
OutItem
outItem
:
itemList
)
{
hSerialList
.
add
(
outItem
.
gethSerial
());
hSerialList
.
add
(
outItem
.
gethSerial
());
}
}
criteria
.
and
(
"hSerial"
).
in
(
hSerialList
);
criteria
.
and
(
"hSerial"
).
in
(
hSerialList
);
request
.
setAttribute
(
"
reelId"
,
reelId
);
request
.
setAttribute
(
"
pn"
,
pn
);
}
else
{
}
else
{
addLikeParam
(
request
,
criteria
,
"hSerial"
);
addLikeParam
(
request
,
criteria
,
"hSerial"
);
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
dc411ef
...
@@ -77,6 +77,7 @@ public class OutInfoCache {
...
@@ -77,6 +77,7 @@ public class OutInfoCache {
if
(!
isProcessTimer
){
if
(!
isProcessTimer
){
isProcessTimer
=
true
;
isProcessTimer
=
true
;
try
{
try
{
closeOutInfos
();
if
(!
dataCache
.
getSettings
().
isStopJob
()){
if
(!
dataCache
.
getSettings
().
isStopJob
()){
updateMustExeOutInfo
();
updateMustExeOutInfo
();
executeBindTask
();
executeBindTask
();
...
@@ -90,15 +91,16 @@ public class OutInfoCache {
...
@@ -90,15 +91,16 @@ public class OutInfoCache {
}
}
}
}
public
void
executeOutTask
(){
/**
* 关闭已完成的需求单
*/
public
void
closeOutInfos
(){
Date
now
=
new
Date
();
Date
now
=
new
Date
();
List
<
OutInfo
>
cachedOutInfos
=
getCachedOutInfos
();
List
<
OutInfo
>
cachedOutInfos
=
getCachedOutInfos
();
for
(
OutInfo
unEndOutInfo
:
cachedOutInfos
)
{
for
(
OutInfo
unEndOutInfo
:
cachedOutInfos
)
{
if
(!
unEndOutInfo
.
isClosed
()
&&
unEndOutInfo
.
isTaskEnd
()
&&
!
unEndOutInfo
.
isReelCutAction
()){
if
(!
unEndOutInfo
.
isClosed
()
&&
unEndOutInfo
.
isTaskEnd
()
&&
!
unEndOutInfo
.
isReelCutAction
()){
long
last
EndTime
=
unEndOutInfo
.
getTaskEndTime
();
long
task
EndTime
=
unEndOutInfo
.
getTaskEndTime
();
if
(
now
.
getTime
()
-
last
EndTime
>=
5
*
60
*
1000
){
if
(
taskEndTime
>
0
&&
now
.
getTime
()
-
task
EndTime
>=
5
*
60
*
1000
){
//任务已结束5分钟
//任务已结束5分钟
if
(
unEndOutInfo
.
isEndOutInfo
()){
if
(
unEndOutInfo
.
isEndOutInfo
()){
log
.
info
(
"需求单["
+
unEndOutInfo
.
gethSerial
()+
"]已执行过,且是工单的最后一个需求单,关闭工单"
+
unEndOutInfo
.
getSo
()+
"["
+
unEndOutInfo
.
getSoseq
()+
"]"
);
log
.
info
(
"需求单["
+
unEndOutInfo
.
gethSerial
()+
"]已执行过,且是工单的最后一个需求单,关闭工单"
+
unEndOutInfo
.
getSo
()+
"["
+
unEndOutInfo
.
getSoseq
()+
"]"
);
...
@@ -110,6 +112,19 @@ public class OutInfoCache {
...
@@ -110,6 +112,19 @@ public class OutInfoCache {
}
}
}
}
if
(
unEndOutInfo
.
getFirstExecuteTime
()<=
0
&&
unEndOutInfo
.
getTotalBindNum
()
<=
0
){
//未执行过,且未绑定的,更新绑定数量
int
bindCount
=
storagePosDao
.
countBind
(
unEndOutInfo
.
gethSerial
());
updateBindNum
(
unEndOutInfo
.
gethSerial
(),
bindCount
);
}
}
}
public
void
executeOutTask
(){
Date
now
=
new
Date
();
List
<
OutInfo
>
cachedOutInfos
=
getCachedOutInfos
();
for
(
OutInfo
unEndOutInfo
:
cachedOutInfos
)
{
if
(
unEndOutInfo
.
isReelCutAction
()
||
unEndOutInfo
.
isUrgentAction
()
||
unEndOutInfo
.
isCheckAction
()){
if
(
unEndOutInfo
.
isReelCutAction
()
||
unEndOutInfo
.
isUrgentAction
()
||
unEndOutInfo
.
isCheckAction
()){
//单独出库,分盘料或盘点料,不按时间可直接执行,距离上次任务完成5分钟后才可再次执行
//单独出库,分盘料或盘点料,不按时间可直接执行,距离上次任务完成5分钟后才可再次执行
if
(
unEndOutInfo
.
isTaskEnd
()
||
unEndOutInfo
.
isNew
()){
if
(
unEndOutInfo
.
isTaskEnd
()
||
unEndOutInfo
.
isNew
()){
...
@@ -630,6 +645,16 @@ public class OutInfoCache {
...
@@ -630,6 +645,16 @@ public class OutInfoCache {
return
outInfoList
;
return
outInfoList
;
}
}
public
void
updateBindNum
(
String
hSerial
,
int
bindNum
){
OutInfo
outInfo
=
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
!=
null
&&
outInfo
.
getFirstExecuteTime
()
<=
0
)
{
//未执行过,更新
outInfo
.
setTotalBindNum
(
bindNum
);
outInfoDao
.
updateBindNum
(
hSerial
,
bindNum
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
}
}
/**
/**
* 任务开始时,初始化出库任务数
* 任务开始时,初始化出库任务数
* @param hSerial
* @param hSerial
...
@@ -821,8 +846,17 @@ public class OutInfoCache {
...
@@ -821,8 +846,17 @@ public class OutInfoCache {
public
void
updateOutInfo
(
OutInfo
outInfo
){
public
void
updateOutInfo
(
OutInfo
outInfo
){
//已经执行过的不能更新
//已经执行过的不能更新
outInfoDao
.
updateOutInfo
(
outInfo
);
outInfoDao
.
updateOutInfo
(
outInfo
);
if
(
outInfo
.
isPnAction
()
&&
Strings
.
isNotBlank
(
outInfo
.
getLine
())){
qisdaBindService
.
bindPnOutInfo
(
outInfo
);
List
<
StoragePos
>
bindPosList
=
storagePosDao
.
findBindList
(
outInfo
.
gethSerial
());
int
bindReelNum
=
bindPosList
.
size
();
outInfo
.
setTotalBindNum
(
bindReelNum
);
log
.
info
(
"PN需求单["
+
outInfo
.
gethSerial
()+
"]绑定料盘数量为:"
+
bindReelNum
);
outInfoDao
.
save
(
outInfo
);
}
outInfoMap
.
put
(
outInfo
.
gethSerial
(),
outInfo
);
outInfoMap
.
put
(
outInfo
.
gethSerial
(),
outInfo
);
log
.
info
(
"更新需求单["
+
outInfo
.
gethSerial
()+
"]的建议时间为:"
+
outInfo
.
getSdate
()
+
" 必须时间为:"
+
outInfo
.
getMdate
());
log
.
info
(
"更新需求单["
+
outInfo
.
gethSerial
()+
"]的建议时间为:"
+
outInfo
.
getSdate
()
+
" 必须时间为:"
+
outInfo
.
getMdate
()
+
" 目的地为:"
+
outInfo
.
getLine
()
);
}
}
...
@@ -881,9 +915,6 @@ public class OutInfoCache {
...
@@ -881,9 +915,6 @@ public class OutInfoCache {
* @return
* @return
*/
*/
private
ResultBean
checkOutInfoCanOut
(
OutInfo
outInfo
){
private
ResultBean
checkOutInfoCanOut
(
OutInfo
outInfo
){
if
(
dataCache
.
getSettings
().
isStopOut
()){
return
ResultBean
.
newErrorResult
(
100
,
"系统更新中,暂停出库,请稍后再试"
,
false
);
}
if
(
outInfo
==
null
){
if
(
outInfo
==
null
){
return
ResultBean
.
newErrorResult
(
1001
,
"未找到需求单"
,
false
);
return
ResultBean
.
newErrorResult
(
1001
,
"未找到需求单"
,
false
);
...
@@ -974,6 +1005,11 @@ public class OutInfoCache {
...
@@ -974,6 +1005,11 @@ public class OutInfoCache {
private
static
AtomicBoolean
outProcessing
=
new
AtomicBoolean
(
false
);
private
static
AtomicBoolean
outProcessing
=
new
AtomicBoolean
(
false
);
public
synchronized
ResultBean
checkOutOutItems
(
String
hSerial
){
public
synchronized
ResultBean
checkOutOutItems
(
String
hSerial
){
if
(
dataCache
.
getSettings
().
isStopOut
()){
return
ResultBean
.
newErrorResult
(
1001
,
"系统更新中,暂停出入库,请稍后再试"
,
false
);
}
boolean
canProcess
=
outProcessing
.
compareAndSet
(
false
,
true
);
boolean
canProcess
=
outProcessing
.
compareAndSet
(
false
,
true
);
try
{
try
{
if
(
canProcess
){
if
(
canProcess
){
...
@@ -990,7 +1026,7 @@ public class OutInfoCache {
...
@@ -990,7 +1026,7 @@ public class OutInfoCache {
}
}
}
}
p
ublic
synchronized
ResultBean
executeOutItems
(
String
hSerial
){
p
rivate
synchronized
ResultBean
executeOutItems
(
String
hSerial
){
//OutInfo outInfo = outInfoDao.findByHSerial(hSerial);
//OutInfo outInfo = outInfoDao.findByHSerial(hSerial);
OutInfo
outInfoToExecute
=
getOutInfoFromCache
(
hSerial
);
OutInfo
outInfoToExecute
=
getOutInfoFromCache
(
hSerial
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/user/DataLogSearchController.java
查看文件 @
dc411ef
...
@@ -82,13 +82,13 @@ public class DataLogSearchController extends BaseSearchController {
...
@@ -82,13 +82,13 @@ public class DataLogSearchController extends BaseSearchController {
String
barcode
=
searchCriteria
.
getBarcode
();
String
barcode
=
searchCriteria
.
getBarcode
();
if
(!
Strings
.
isNullOrEmpty
(
barcode
)){
if
(!
Strings
.
isNullOrEmpty
(
barcode
)){
Pattern
pattern
=
Pattern
.
compile
(
barcode
,
Pattern
.
CASE_INSENSITIVE
);
Pattern
pattern
=
Pattern
.
compile
(
escapeExprSpecialWord
(
barcode
)
,
Pattern
.
CASE_INSENSITIVE
);
criteria
.
and
(
"barcode"
).
regex
(
pattern
);
criteria
.
and
(
"barcode"
).
regex
(
pattern
);
}
}
String
partNumber
=
searchCriteria
.
getPartNumber
();
String
partNumber
=
searchCriteria
.
getPartNumber
();
if
(!
Strings
.
isNullOrEmpty
(
partNumber
))
{
if
(!
Strings
.
isNullOrEmpty
(
partNumber
))
{
Pattern
pattern
=
Pattern
.
compile
(
partNumber
,
Pattern
.
CASE_INSENSITIVE
);
Pattern
pattern
=
Pattern
.
compile
(
escapeExprSpecialWord
(
partNumber
)
,
Pattern
.
CASE_INSENSITIVE
);
criteria
.
and
(
"partNumber"
).
regex
(
pattern
);
criteria
.
and
(
"partNumber"
).
regex
(
pattern
);
}
}
...
@@ -129,6 +129,18 @@ public class DataLogSearchController extends BaseSearchController {
...
@@ -129,6 +129,18 @@ public class DataLogSearchController extends BaseSearchController {
return
SUCCESS_VIEW
;
return
SUCCESS_VIEW
;
}
}
private
String
escapeExprSpecialWord
(
String
keyword
)
{
if
(!
Strings
.
isNullOrEmpty
(
keyword
))
{
String
[]
fbsArr
=
{
"\\"
,
"$"
,
"("
,
")"
,
"*"
,
"+"
,
"."
,
"["
,
"]"
,
"?"
,
"^"
,
"{"
,
"}"
,
"|"
};
for
(
String
key
:
fbsArr
)
{
if
(
keyword
.
contains
(
key
))
{
keyword
=
keyword
.
replace
(
key
,
"\\"
+
key
);
}
}
}
return
keyword
;
}
@Override
@Override
protected
BaseSearchCriteria
getNewSearchCriteria
()
{
protected
BaseSearchCriteria
getNewSearchCriteria
()
{
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
dc411ef
...
@@ -144,8 +144,14 @@ public class QisdaApiController extends BaseController {
...
@@ -144,8 +144,14 @@ public class QisdaApiController extends BaseController {
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);
log
.
info
(
"手动执行需求单["
+
hSerial
+
"]出库"
);
ResultBean
resultBean
=
null
;
ResultBean
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
if
(!
dataCache
.
getSettings
().
isStopJob
()){
resultBean
=
ResultBean
.
newErrorResult
(
1001
,
"自动任务开启时,不允许手动出库"
,
false
);
}
else
{
log
.
info
(
"手动执行需求单["
+
hSerial
+
"]出库"
);
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
}
return
resultBean
.
getMsg
();
return
resultBean
.
getMsg
();
}
}
...
@@ -530,46 +536,6 @@ public class QisdaApiController extends BaseController {
...
@@ -530,46 +536,6 @@ public class QisdaApiController extends BaseController {
outItem
=
outItemDao
.
save
(
outItem
);
outItem
=
outItemDao
.
save
(
outItem
);
if
(
outItem
.
isPnAction
()){
if
(
outItem
.
isPnAction
()){
int
needNum
=
outItem
.
getQty
()
-
outItem
.
getSendQty
()
-
outItem
.
getRealLockQty
();
log
.
info
(
"将预绑定转为真实绑定结束,所需数量("
+
needNum
+
")=需求单数量("
+
outItem
.
getQty
()+
")-已发料数量("
+
outItem
.
getSendQty
()+
")-真实绑定数量"
+
outItem
.
getRealLockQty
()
+
")"
);
if
(
needNum
>=
0
){
log
.
info
(
"预绑定数量不足,查找未绑定料盘进行真实绑定结束,当前数量:"
+
outItem
.
getSendQty
()+
"+"
+
outItem
.
getRealLockQty
()
+
"/"
+
outItem
.
getQty
());
while
(
needNum
>=
0
){
StoragePos
pos
=
storagePosDao
.
findNoBindMinQty
(
outItem
.
getPn
(),
outItem
.
getFacility
());
if
(
pos
!=
null
){
Barcode
barcode
=
pos
.
getBarcode
();
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
//未真实绑定过,可以出库,绑定
appendInfo
.
sethSerial
(
outItem
.
gethSerial
());
appendInfo
.
setRefno
(
outItem
.
getRefno
());
appendInfo
.
setSo
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSoseq
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSlotStr
(
outItem
.
getSlotStr
());
appendInfo
.
setOutItemId
(
outItem
.
getId
());
appendInfo
.
setBindSlot
(
"1"
);
appendInfo
.
setSlotIndex
(
1
);
barcode
.
setAppendInfo
(
appendInfo
);
pos
.
setBarcode
(
barcode
);
storagePosDao
.
save
(
pos
);
int
totalLockQty
=
outItem
.
getLockQty
()
+
barcode
.
getAmount
();
outItem
.
setLockQty
(
totalLockQty
);
outItem
.
setRealLockQty
(
totalLockQty
);
}
else
{
break
;
}
if
(
outItem
.
getRealLockQty
()
>
outItem
.
getQty
()){
//已经满足需求了,直接跳出
break
;
}
}
}
outItem
=
outItemDao
.
save
(
outItem
);
outInfo
.
updateItem
(
outItem
);
outInfo
.
updateItem
(
outItem
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
}
else
if
(
outItem
.
isUrgentAction
()){
}
else
if
(
outItem
.
isUrgentAction
()){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
查看文件 @
dc411ef
...
@@ -90,6 +90,55 @@ public class QisdaBindService {
...
@@ -90,6 +90,55 @@ public class QisdaBindService {
}
}
}
}
/**
* 绑定PN需求单
*/
public
void
bindPnOutInfo
(
OutInfo
pnOutInfo
){
log
.
info
(
"Pn需求单["
+
pnOutInfo
.
gethSerial
()+
"]线别["
+
pnOutInfo
.
getLine
()+
"]开始进行绑定"
);
for
(
OutItem
outItem
:
pnOutInfo
.
getOutItems
())
{
int
needNum
=
outItem
.
getQty
()
-
outItem
.
getSendQty
()
-
outItem
.
getRealLockQty
();
//log.info("开始绑定,所需数量("+needNum+")=需求单数量("+outItem.getQty()+")-已发料数量("+ outItem.getSendQty()+")-真实绑定数量"+ outItem.getRealLockQty() +")");
if
(
needNum
>=
0
){
log
.
info
(
"查找未绑定料盘进行真实绑定结束,当前数量:"
+
outItem
.
getSendQty
()+
"+"
+
outItem
.
getRealLockQty
()
+
"/"
+
outItem
.
getQty
());
while
(
needNum
>=
0
){
StoragePos
pos
=
storagePosDao
.
findNoBindMinQty
(
outItem
.
getPn
(),
outItem
.
getFacility
());
if
(
pos
!=
null
){
Barcode
barcode
=
pos
.
getBarcode
();
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
//未真实绑定过,可以出库,绑定
appendInfo
.
sethSerial
(
outItem
.
gethSerial
());
appendInfo
.
setRefno
(
outItem
.
getRefno
());
appendInfo
.
setSo
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSoseq
(
"HSerial-"
+
outItem
.
gethSerial
());
appendInfo
.
setSlotStr
(
outItem
.
getSlotStr
());
appendInfo
.
setOutItemId
(
outItem
.
getId
());
appendInfo
.
setBindSlot
(
"1"
);
appendInfo
.
setSlotIndex
(
1
);
barcode
.
setAppendInfo
(
appendInfo
);
pos
.
setBarcode
(
barcode
);
storagePosDao
.
save
(
pos
);
int
totalLockQty
=
outItem
.
getLockQty
()
+
barcode
.
getAmount
();
outItem
.
setLockQty
(
totalLockQty
);
outItem
.
setRealLockQty
(
totalLockQty
);
log
.
info
(
"绑定料盘"
+
barcode
.
getBarcode
()+
"["
+
barcode
.
getPartNumber
()+
"]到PN需求单["
+
outItem
.
gethSerial
()+
"]"
);
}
else
{
break
;
}
if
(
outItem
.
getRealLockQty
()
>
outItem
.
getQty
()){
//已经满足需求了,直接跳出
break
;
}
}
}
outItem
=
outItemDao
.
save
(
outItem
);
pnOutInfo
.
updateItem
(
outItem
);
}
}
/******************************** 以下是 Private 方法*******************************************/
/******************************** 以下是 Private 方法*******************************************/
...
@@ -360,6 +409,9 @@ public class QisdaBindService {
...
@@ -360,6 +409,9 @@ public class QisdaBindService {
bindItem
.
setLockQty
(
totalLockQty
);
bindItem
.
setLockQty
(
totalLockQty
);
bindItem
.
setRealLockQty
(
totalLockQty
);
bindItem
.
setRealLockQty
(
totalLockQty
);
outItemDao
.
updateLockQty
(
bindItem
.
getId
(),
totalLockQty
,
totalLockQty
);
outItemDao
.
updateLockQty
(
bindItem
.
getId
(),
totalLockQty
,
totalLockQty
);
int
bindCount
=
storagePosDao
.
countBind
(
bindItem
.
gethSerial
());
outInfoCache
.
updateBindNum
(
bindItem
.
gethSerial
(),
bindCount
);
outInfoCache
.
updateOutItem
(
bindItem
.
getId
());
outInfoCache
.
updateOutItem
(
bindItem
.
getId
());
log
.
info
(
"绑定料盘["
+
barcode
.
getBarcode
()+
"]到需求单["
+
bindItem
.
gethSerial
()+
"]完成"
);
log
.
info
(
"绑定料盘["
+
barcode
.
getBarcode
()+
"]到需求单["
+
bindItem
.
gethSerial
()+
"]完成"
);
}
}
...
@@ -467,14 +519,15 @@ public class QisdaBindService {
...
@@ -467,14 +519,15 @@ public class QisdaBindService {
List
<
OutInfo
>
cacheOutInfoList
=
outInfoCache
.
getCachedOutInfos
();
List
<
OutInfo
>
cacheOutInfoList
=
outInfoCache
.
getCachedOutInfos
();
List
<
String
>
lessHSerialList
=
new
ArrayList
<>();
List
<
String
>
lessHSerialList
=
new
ArrayList
<>();
for
(
OutInfo
unEndOutInfo
:
cacheOutInfoList
)
{
for
(
OutInfo
unEndOutInfo
:
cacheOutInfoList
)
{
if
(!
unEndOutInfo
.
isClosed
()
&&
!
unEndOutInfo
.
isRealBindOk
()){
if
(
Strings
.
isNotBlank
(
unEndOutInfo
.
getLine
())){
if
(
unEndOutInfo
.
isPnAction
()){
if
(!
unEndOutInfo
.
isClosed
()
&&
!
unEndOutInfo
.
isRealBindOk
()){
lessHSerialList
.
add
(
unEndOutInfo
.
gethSerial
());
if
(
unEndOutInfo
.
isPnAction
()){
}
else
if
(
unEndOutInfo
.
isReelCutAction
()){
lessHSerialList
.
add
(
unEndOutInfo
.
gethSerial
());
lessHSerialList
.
add
(
unEndOutInfo
.
gethSerial
());
}
else
if
(
unEndOutInfo
.
isReelCutAction
()){
lessHSerialList
.
add
(
unEndOutInfo
.
gethSerial
());
}
}
}
}
}
}
}
String
pn
=
barcode
.
getPartNumber
();
String
pn
=
barcode
.
getPartNumber
();
...
@@ -494,6 +547,7 @@ public class QisdaBindService {
...
@@ -494,6 +547,7 @@ public class QisdaBindService {
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
outItem
.
gethSerial
());
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
outItem
.
gethSerial
());
if
(
outInfo
!=
null
){
if
(
outInfo
!=
null
){
//只对有目的地并且缺料的进行绑定
if
(
outInfo
.
isPnAction
()
||
outInfo
.
isReelCutAction
()){
if
(
outInfo
.
isPnAction
()
||
outInfo
.
isReelCutAction
()){
//真实绑定缺料
//真实绑定缺料
if
(
outItem
.
realBindLessQty
()
>
0
){
if
(
outItem
.
realBindLessQty
()
>
0
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
查看文件 @
dc411ef
...
@@ -8,6 +8,7 @@ import com.google.common.collect.Sets;
...
@@ -8,6 +8,7 @@ import com.google.common.collect.Sets;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.json.*
;
import
com.myproject.bean.json.*
;
import
com.myproject.bean.qisda.ReelLockPosInfo
;
import
com.myproject.bean.qisda.ReelLockPosInfo
;
import
com.myproject.bean.qisda.ResultBean
;
import
com.myproject.bean.search.PageList
;
import
com.myproject.bean.search.PageList
;
import
com.myproject.bean.update.*
;
import
com.myproject.bean.update.*
;
import
com.myproject.bean.utils.BoxStatusBean
;
import
com.myproject.bean.utils.BoxStatusBean
;
...
@@ -251,6 +252,10 @@ public class StorageDataController extends BaseController {
...
@@ -251,6 +252,10 @@ public class StorageDataController extends BaseController {
@ResponseBody
@ResponseBody
public
String
checkPos
(
HttpServletRequest
request
)
{
public
String
checkPos
(
HttpServletRequest
request
)
{
if
(
dataCache
.
getSettings
().
isStopOut
()){
return
"系统更新中,暂停出入库,请稍后再试"
;
}
String
cid
=
request
.
getParameter
(
"cid"
);
String
cid
=
request
.
getParameter
(
"cid"
);
String
partnumber
=
request
.
getParameter
(
"pn"
);
String
partnumber
=
request
.
getParameter
(
"pn"
);
if
(
partnumber
!=
null
){
if
(
partnumber
!=
null
){
...
...
myproject/src/main/resources/mongo.xml
查看文件 @
dc411ef
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
socket-timeout=
"${mongo.socketTimeout}"
slave-ok=
"${mongo.slaveOk}"
socket-timeout=
"${mongo.socketTimeout}"
slave-ok=
"${mongo.slaveOk}"
write-number=
"1"
write-timeout=
"0"
write-fsync=
"true"
/>
write-number=
"1"
write-timeout=
"0"
write-fsync=
"true"
/>
</mongo:mongo>
</mongo:mongo>
<mongo:db-factory
dbname=
"
qisda
"
username=
"${mongo.username}"
<mongo:db-factory
dbname=
"
gree
"
username=
"${mongo.username}"
password=
"${mongo.password}"
mongo-ref=
"mongo"
/>
password=
"${mongo.password}"
mongo-ref=
"mongo"
/>
<bean
id=
"mongoTemplate"
class=
"org.springframework.data.mongodb.core.MongoTemplate"
>
<bean
id=
"mongoTemplate"
class=
"org.springframework.data.mongodb.core.MongoTemplate"
>
<constructor-arg
name=
"mongoDbFactory"
ref=
"mongoDbFactory"
/>
<constructor-arg
name=
"mongoDbFactory"
ref=
"mongoDbFactory"
/>
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
dc411ef
...
@@ -209,15 +209,15 @@
...
@@ -209,15 +209,15 @@
<%--<display:column titleKey="barcode.expireDate" sortProperty="barcode.expireDate" sortable="true">--%>
<%--<display:column titleKey="barcode.expireDate" sortProperty="barcode.expireDate" sortable="true">--%>
<%--<fmt:formatDate value="${pos.barcode.expireDate}" pattern="yyyy-MM-dd"/>--%>
<%--<fmt:formatDate value="${pos.barcode.expireDate}" pattern="yyyy-MM-dd"/>--%>
<%--</display:column>--%>
<%--</display:column>--%>
<
%--<security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT, ROLE_MANAGE_FEEDER">--%
>
<
security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT, ROLE_MANAGE_FEEDER"
>
<
%--<display:column titleKey="checkOut.operate" media="html">--%
>
<
display:column titleKey="checkOut.operate" media="html"
>
<%--<c:if test="${!limitCheckOut}">--%>
<%--<c:if test="${!limitCheckOut}">--%>
<%--<button class="btn yellow limit${pos.barcode.inFixture}" id="btn${pos.id}"--%>
<button class="btn yellow limit${pos.barcode.inFixture}" id="btn${pos.id}"
<%--onclick="checkoutStorage('${pos.id}')">--%
>
onclick="checkoutStorage('${pos.id}')"
>
<
%--<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>--%
>
<
i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button
>
<%--</c:if>--%>
<%--</c:if>--%>
<
%--</display:column>--%
>
<
/display:column
>
<
%--</security:authorize>--%
>
<
/security:authorize
>
<c:if test="${limitCheckOut}">
<c:if test="${limitCheckOut}">
<c:set var="limitCodes" value="${pos.barcode.inFixture},${limitCodes}"/>
<c:set var="limitCodes" value="${pos.barcode.inFixture},${limitCodes}"/>
</c:if>
</c:if>
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
dc411ef
...
@@ -17,12 +17,6 @@
...
@@ -17,12 +17,6 @@
</style>
</style>
<c:if test="${stopOut}">
系统更新中,暂停出库,请稍后再试
</c:if>
<c:if test="${!stopOut}">
<!-- BEGIN PAGE HEADER-->
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
<h3 class="page-title">
<fmt:message key="需求单"/>
<fmt:message key="需求单"/>
...
@@ -59,15 +53,27 @@
...
@@ -59,15 +53,27 @@
</div>
</div>
</div>
</div>
<label class="control-label col-md-1"><fmt:message key="ReelId"/></label>
<label class="control-label col-md-1"><fmt:message key="线别"/></label>
<div class="col-md-1">
<select class="form-control" name="line">
<option value="">所有</option>
<option value="NONE" <c:if test='${line=="NONE"}'>selected</c:if>>未定义</option>
<c:forEach begin="1" end="20" var="lineStr">
<c:set var="lineValue" value="SMT${lineStr}"/>
<option value="${lineValue}" <c:if test='${line == lineValue}'>selected</c:if>>${lineValue}</option>
</c:forEach>
</select>
</div>
<label class="control-label col-md-1"><fmt:message key="PN"/></label>
<div class="col-md-2">
<div class="col-md-2">
<div style="text-align:left" class="input-group">
<div style="text-align:left" class="input-group">
<input type="text" name="reelId" class="form-control" value="${
reelId
}"/>
<input type="text" name="reelId" class="form-control" value="${
pn
}"/>
</div>
</div>
</div>
</div>
<div class="col-md-
2
">
<div class="col-md-
1
">
<button class="btn purple" type="submit"><i class="fa fa-search"></i>
<button class="btn purple" type="submit"><i class="fa fa-search"></i>
<fmt:message key="button.search"/>
<fmt:message key="button.search"/>
</button>
</button>
...
@@ -106,12 +112,12 @@
...
@@ -106,12 +112,12 @@
<fmt:formatDate value="${outInfo.mdate}" pattern="yyyy-MM-dd HH:mm"/>
<fmt:formatDate value="${outInfo.mdate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
</display:column>
<display:column titleKey="任务" sortable="true" sortProperty="
mdate
">
<display:column titleKey="任务" sortable="true" sortProperty="
taskNum
">
${outInfo.taskFinishNum}/${outInfo.taskNum}
${outInfo.taskFinishNum}/${outInfo.taskNum}
</display:column>
</display:column>
<display:column titleKey="
累计任务" sortable="true" sortProperty="totalTask
Num">
<display:column titleKey="
绑定数量" sortable="true" sortProperty="totalBind
Num">
${outInfo.total
TaskNum}/${outInfo.total
BindNum}
${outInfo.totalBindNum}
</display:column>
</display:column>
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate">
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate">
...
@@ -126,7 +132,7 @@
...
@@ -126,7 +132,7 @@
</display:column>
</display:column>
<display:column titleKey="checkOut.operate" media="html" sortProperty="sendStatus" sortable="true">
<display:column titleKey="checkOut.operate" media="html" sortProperty="sendStatus" sortable="true">
<c:if test="${!outInfo.executing}">
<c:if test="${!outInfo.executing
&& stopJob
}">
<c:if test="${(outInfo.urgentAction && outInfo.taskFinishNum != outInfo.taskNum) || (!outInfo.sendEnd && !outInfo.closed)}">
<c:if test="${(outInfo.urgentAction && outInfo.taskFinishNum != outInfo.taskNum) || (!outInfo.sendEnd && !outInfo.closed)}">
<button class="btn yellow" id="btn${outInfo.hSerial}" onclick="executeOut('${outInfo.hSerial}')">
<button class="btn yellow" id="btn${outInfo.hSerial}" onclick="executeOut('${outInfo.hSerial}')">
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/>
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/>
...
@@ -147,7 +153,6 @@
...
@@ -147,7 +153,6 @@
<!-- END EXAMPLE TABLE PORTLET-->
<!-- END EXAMPLE TABLE PORTLET-->
</div>
</div>
</div>
</div>
</c:if>
<div id="detail" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div id="detail" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="margin-top: 10%;width:80%;margin-left:10%;">
<div class="modal-dialog" style="margin-top: 10%;width:80%;margin-left:10%;">
...
@@ -221,7 +226,12 @@
...
@@ -221,7 +226,12 @@
<label class="control-label col-md-2"><fmt:message key="线别:"/></label>
<label class="control-label col-md-2"><fmt:message key="线别:"/></label>
<div class="input-group">
<div class="input-group">
<input type="hidden" id="hSerialToModify" value=""/>
<input type="hidden" id="hSerialToModify" value=""/>
<input type="text" class="form-control" id="lineToModify" />
<select class="form-control" id="lineToModify">
<option value="">--</option>
<c:forEach begin="1" end="20" var="line">
<option value="SMT${line}">SMT${line}</option>
</c:forEach>
</select>
</div>
</div>
<h4>
<h4>
<span id="lineErrorMsg" style="font-weight: 500;color:red;"></span>
<span id="lineErrorMsg" style="font-weight: 500;color:red;"></span>
...
...
myproject/src/main/webapp/decorators/metro.jsp
查看文件 @
dc411ef
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
<div
class=
"page-footer-inner"
>
<div
class=
"page-footer-inner"
>
2016
©
<a
href=
"${ctx}/updateHistory.html"
>
SMD BOX
</a>
2016
©
<a
href=
"${ctx}/updateHistory.html"
>
SMD BOX
</a>
</div>
</div>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
4.26
</span>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
5.2118
</span>
<div
class=
"scroll-to-top"
>
<div
class=
"scroll-to-top"
>
<i
class=
"icon-arrow-up"
></i>
<i
class=
"icon-arrow-up"
></i>
</div>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论