Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 619e715f
由
sunke
编写于
2020-03-07 11:07:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库状态加入缓存,只有一盘状态使用L
1 个父辈
b56c7772
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
511 行增加
和
271 行删除
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/update/qisda/OutInfo.java
myproject/src/main/java/com/myproject/bean/update/qisda/OutItem.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutInfoDao.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutIInfoDaoImpl.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/DifferentInventoryController.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/QisdaController.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/TaskService.java
myproject/src/main/java/com/myproject/webapp/listener/StartupListener.java
myproject/src/main/webapp/WEB-INF/pages/qisda/orderOut.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/decorators/metro.jsp
myproject/src/main/webapp/scripts/script.js
myproject/src/main/java/com/myproject/bean/qisda/InquiryShelfBean.java
查看文件 @
619e715
...
...
@@ -144,7 +144,13 @@ public class InquiryShelfBean {
ShelfInfo
emptyShelfInfo
=
getOrAddShelfInfo
(
hSerial
,
shelfType
);
if
(
emptyShelfInfo
!=
null
){
if
(
task
!=
null
){
int
loc
=
emptyShelfInfo
.
addLimitLoc
(
barcode
,
task
.
getReelType
());
int
loc
=
-
1
;
if
(
task
.
isPackageReel
()){
//包装料,固定库位
loc
=
emptyShelfInfo
.
addLimitLoc
(
task
.
getBarcode
(),
task
.
getReelType
());
}
else
{
loc
=
emptyShelfInfo
.
addLimitLoc
(
barcode
,
task
.
getReelType
());
}
log
.
info
(
"工单"
+
outItem
.
getSo
()+
"["
+
outItem
.
getSlotlocation
()+
"]"
+
outItem
.
getPn
()+
"添加架位["
+
emptyShelfInfo
.
tempRfid
()
+
"]["
+
loc
+
"]="
+
barcode
);
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
appendInfo
.
setRfidIndex
(
emptyShelfInfo
.
getRfidIndex
());
...
...
@@ -286,7 +292,7 @@ public class InquiryShelfBean {
Map
<
String
,
ShelfInfo
>
shelfMap
=
hSerialShelfMap
.
get
(
hSerial
);
if
(
shelfMap
!=
null
){
//先判断任务料架是否与双层线上的实际料架类型是否一致,如果不一致,直接使用新的料架
if
(
rfid
!=
null
&&
rfid
.
isEmpty
()){
if
(
rfid
!=
null
&&
!
rfid
.
isEmpty
()){
if
(
StorageConstants
.
SHEFL_TYPE
.
judgeType
(
rfid
,
task
.
getAppendInfo
().
getShelfType
())){
//任务与当前料架一致,使用已经绑定过的料架
shelfInfo
=
findSameShelf
(
hSerial
,
rfid
);
...
...
myproject/src/main/java/com/myproject/bean/qisda/ShelfInfo.java
查看文件 @
619e715
...
...
@@ -21,7 +21,7 @@ public class ShelfInfo {
}
public
static
ShelfInfo
newAShelf
(){
return
new
ShelfInfo
(
StorageConstants
.
SHEFL_TYPE
.
A
,
9
);
return
new
ShelfInfo
(
StorageConstants
.
SHEFL_TYPE
.
A
,
8
);
}
public
static
ShelfInfo
newBShelf
(){
...
...
@@ -257,10 +257,18 @@ public class ShelfInfo {
return
shelfLoc
;
}
}
}
else
if
(
robotIndex
.
equals
(
"3"
)){
//3号机器人
for
(
int
i
=
1
;
i
<=
maxLocCount
;
i
++){
}
else
{
//包装料
for
(
int
i
=
1
;
i
<=
usedCount
;
i
++){
ShelfLoc
shelfLoc
=
locMap
.
get
(
i
);
if
(
shelfLoc
!=
null
&&
shelfLoc
.
isEmpty
()
&&
!
shelfLoc
.
isLock
()){
log
.
info
(
"为["
+
barcode
+
"]锁定架位"
+
tempRfid
()
+
"["
+
i
+
"]"
);
//未放过料,且未锁定
shelfLoc
.
setBarcode
(
barcode
);
shelfLoc
.
setReelType
(
reelType
);
locMap
.
put
(
i
,
shelfLoc
);
return
shelfLoc
;
}
}
}
...
...
myproject/src/main/java/com/myproject/bean/update/qisda/OutInfo.java
查看文件 @
619e715
...
...
@@ -59,9 +59,14 @@ public class OutInfo extends BaseMongoBean {
private
int
taskNum
;
/**
*
状态为0表示未执行过, 1=未完成, 2=已完成
*
绑定状态:0=未绑定 1=绑定缺料 2=绑定OK
*/
private
int
status
=
0
;
private
int
bindStatus
=
0
;
/**
* 发料状态: 0=未发料 1=发料缺料 2=发料OK(需求单完成):首盘和补料,发料与需求单一致为发料OK, 分盘料出库后又入库即真实绑定与需求量一致为发料OK, 紧急料出库数量与需求数量一致为发料OK
*/
private
int
sendStatus
=
0
;
/**
* 出仓料盘数量
...
...
@@ -74,7 +79,7 @@ public class OutInfo extends BaseMongoBean {
private
int
taskFinishNum
;
@Transient
private
List
<
OutItem
>
outItems
=
new
ArrayList
<>();
private
Map
<
String
,
OutItem
>
outItemMap
=
new
HashMap
<>();
public
String
getAction
()
{
return
action
;
...
...
@@ -141,27 +146,13 @@ public class OutInfo extends BaseMongoBean {
}
public
List
<
OutItem
>
getOutItems
()
{
return
outItems
;
}
public
void
setOutItems
(
List
<
OutItem
>
outItems
)
{
this
.
outItems
=
outItems
;
}
public
void
addOutItem
(
OutItem
outItem
){
outItems
.
add
(
outItem
);
return
new
ArrayList
<>(
outItemMap
.
values
());
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
boolean
isNew
(){
return
this
.
status
<=
0
;
public
void
updateOutItems
(
List
<
OutItem
>
outItems
)
{
for
(
OutItem
outItem
:
outItems
)
{
updateItem
(
outItem
);
}
}
/**
...
...
@@ -208,6 +199,9 @@ public class OutInfo extends BaseMongoBean {
}
public
String
getShelfLatest
(){
if
(
taskNum
==
1
){
return
"L"
;
}
if
(
taskFinishNum
==
1
){
return
"F"
;
}
...
...
@@ -216,4 +210,49 @@ public class OutInfo extends BaseMongoBean {
}
return
"M"
;
}
public
int
getBindStatus
()
{
return
bindStatus
;
}
public
void
setBindStatus
(
int
bindStatus
)
{
this
.
bindStatus
=
bindStatus
;
}
public
int
getSendStatus
()
{
return
sendStatus
;
}
public
void
setSendStatus
(
int
sendStatus
)
{
this
.
sendStatus
=
sendStatus
;
}
public
void
updateItem
(
OutItem
item
){
outItemMap
.
put
(
item
.
getId
(),
item
);
}
public
Map
<
String
,
OutItem
>
getOutItemMap
()
{
return
outItemMap
;
}
public
void
setOutItemMap
(
Map
<
String
,
OutItem
>
outItemMap
)
{
this
.
outItemMap
=
outItemMap
;
}
@Override
public
String
toString
()
{
return
"OutInfo{"
+
"action='"
+
action
+
'\''
+
", hSerial='"
+
hSerial
+
'\''
+
", so='"
+
so
+
'\''
+
", refno='"
+
refno
+
'\''
+
", sdate="
+
sdate
+
", mdate="
+
mdate
+
", taskNum="
+
taskNum
+
", bindStatus="
+
bindStatus
+
", sendStatus="
+
sendStatus
+
", outReelNum="
+
outReelNum
+
", taskFinishNum="
+
taskFinishNum
+
'}'
;
}
}
myproject/src/main/java/com/myproject/bean/update/qisda/OutItem.java
查看文件 @
619e715
...
...
@@ -137,9 +137,9 @@ public class OutItem extends BaseMongoBean {
}
/**
* 预绑定缺料
* 预绑定缺料
数量
*/
public
int
b
indLessQty
(){
public
int
preB
indLessQty
(){
return
qty
-
lockQty
;
}
...
...
@@ -159,6 +159,9 @@ public class OutItem extends BaseMongoBean {
}
public
String
gethSerial
()
{
if
(
hSerial
==
null
){
hSerial
=
""
;
}
return
hSerial
;
}
...
...
@@ -261,6 +264,23 @@ public class OutItem extends BaseMongoBean {
}
/**
* 是否缺料(真实绑定OK)
*/
public
boolean
isBindOk
(){
if
(
isFirstReelAction
()){
//首盘料,真实绑定数量满足即为绑定OK
return
realBindLessQty
()
<=
0
;
}
else
if
(
isReelCutAction
()){
//分盘需求,预绑定数量满足需求数量,即为绑定OK
return
preBindLessQty
()
<=
0
;
}
else
if
(
isTailAction
()){
//尾料,检测真实绑定数量
return
realBindLessQty
()
<=
0
;
}
else
{
return
realBindLessQty
()
<=
0
;
}
}
/**
* 任务是否完成
*/
public
boolean
isItemEnd
(){
...
...
myproject/src/main/java/com/myproject/dao/mongo/qisda/IOutInfoDao.java
查看文件 @
619e715
...
...
@@ -9,4 +9,6 @@ import java.util.List;
public
interface
IOutInfoDao
extends
IMongoDao
{
OutInfo
findByHSerial
(
String
hSerial
);
List
<
OutInfo
>
findUnEndOutInfos
();
}
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutIInfoDaoImpl.java
查看文件 @
619e715
...
...
@@ -23,6 +23,17 @@ public class OutIInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao {
return
findOne
(
query
);
}
/**
* 查找所有发料状态不为2(未发料完成)的需求单
*/
@Override
public
List
<
OutInfo
>
findUnEndOutInfos
(){
Criteria
c
=
new
Criteria
();
c
.
and
(
"sendStatus"
).
ne
(
2
);
Query
query
=
new
Query
(
c
);
return
findByQuery
(
query
);
}
@Override
public
Class
getEntityClass
()
{
return
OutInfo
.
class
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/DifferentInventoryController.java
查看文件 @
619e715
...
...
@@ -122,7 +122,7 @@ public class DifferentInventoryController extends BaseController {
int
reelIDIndex
=
csvRead
.
getIndex
(
"ReelID"
);
int
facilityIndex
=
csvRead
.
getIndex
(
"Facility"
);
int
locationIndex
=
csvRead
.
getIndex
(
"Location"
);
int
qtyIndex
=
csvRead
.
getIndex
(
"
Location
"
);
int
qtyIndex
=
csvRead
.
getIndex
(
"
Qty
"
);
while
(
csvRead
.
readRecord
()){
String
[]
lineValues
=
csvRead
.
getValues
();
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/QisdaController.java
查看文件 @
619e715
...
...
@@ -29,6 +29,7 @@ import com.myproject.exception.ValidateException;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IStoragePosManager
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.qisda.util.OutInfoCache
;
import
com.myproject.webapp.controller.storage.BaseController
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.ITaskService
;
...
...
@@ -75,6 +76,9 @@ public class QisdaController extends BaseController {
@Autowired
private
IStoragePosDao
storagePosDao
;
@Autowired
private
OutInfoCache
outInfoCache
;
/**
* DN单收料
* @param request
...
...
@@ -302,6 +306,13 @@ public class QisdaController extends BaseController {
return
"qisda/orderOut"
;
}
@RequestMapping
(
value
=
"/service/store/qisda/outInfoList"
)
@ResponseBody
public
Collection
<
OutInfo
>
outInfoList
(
HttpServletRequest
request
){
return
outInfoCache
.
getCachedOutInfos
();
}
@RequestMapping
(
"/service/store/qisda/dnInfo"
)
@ResponseBody
public
DNInfo
getDnItems
(
HttpServletRequest
request
){
...
...
@@ -340,9 +351,11 @@ public class QisdaController extends BaseController {
if
(
outInfo
!=
null
){
List
<
OutItem
>
items
=
outItemDao
.
findByHSerial
(
hSerial
);
outInfo
.
set
OutItems
(
items
);
outInfo
.
update
OutItems
(
items
);
}
return
outInfo
;
}
}
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
619e715
...
...
@@ -17,6 +17,7 @@ import com.myproject.exception.ApiException;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IComponentManager
;
import
com.myproject.util.*
;
import
com.myproject.webapp.controller.qisda.util.OutInfoCache
;
import
com.myproject.webapp.controller.storage.BaseController
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -60,6 +61,9 @@ public class QisdaApiController extends BaseController {
@Autowired
private
IDataLogDao
dataLogDao
;
@Autowired
private
OutInfoCache
outInfoCache
;
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
QisdaApiController
.
class
);
private
static
String
USER_NAME
=
"SMD-BOX"
;
...
...
@@ -186,7 +190,7 @@ public class QisdaApiController extends BaseController {
}
}
outItem
=
outItemDao
.
save
(
outItem
);
outInfo
.
addOut
Item
(
outItem
);
outInfo
.
update
Item
(
outItem
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
}
...
...
@@ -233,6 +237,9 @@ public class QisdaApiController extends BaseController {
}
for
(
OutInfo
outInfo
:
outInfoList
)
{
//新的需求单,更新缓存
outInfoCache
.
addOutInfo
(
outInfo
);
if
(
outInfo
.
isReelCutAction
()
||
outInfo
.
isFirstReelAction
()){
//首盘和分盘进行缺料反馈
List
<
OutItem
>
outItemList
=
outItemDao
.
findByHSerial
(
outInfo
.
gethSerial
());
...
...
@@ -265,7 +272,7 @@ public class QisdaApiController extends BaseController {
int
lossqty
=
outItem
.
outLessQty
();
if
(
lessBind
){
//绑定缺料反馈
lossqty
=
outItem
.
b
indLessQty
();
lossqty
=
outItem
.
preB
indLessQty
();
}
materialInfoMap
.
put
(
"lossqty"
,
lossqty
+
""
);
//缺料数量
...
...
@@ -626,7 +633,6 @@ public class QisdaApiController extends BaseController {
}
/**
* 6. CIS收料判定接口(绑过料串的条码扫码入库时判断)
*/
...
...
@@ -738,6 +744,8 @@ public class QisdaApiController extends BaseController {
try
{
int
slotIndex
=
Integer
.
valueOf
(
location
);
appendInfo
.
setSlotIndex
(
slotIndex
);
//TODO:需要重新绑定
}
catch
(
Exception
e
){
}
...
...
@@ -766,7 +774,7 @@ public class QisdaApiController extends BaseController {
throw
new
ValidateException
(
"纯入库判定NG:["
+
state
+
"]"
+
ngMsg
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"纯入库判定接口出错"
,
e
);
log
.
error
(
"纯入库判定接口出错"
+
e
.
getMessage
()
);
throw
new
ValidateException
(
"纯入库判定接口处理异常:"
+
e
.
getMessage
());
}
return
barcode
;
...
...
@@ -926,6 +934,7 @@ public class QisdaApiController extends BaseController {
materialInfoMap
.
put
(
"partNum"
,
task
.
getPartNumber
());
materialInfoMap
.
put
(
"reelID"
,
task
.
getBarcode
());
materialInfoMap
.
put
(
"slot"
,
appendInfo
.
getSlotStr
());
materialInfoMap
.
put
(
"slotserial"
,
appendInfo
.
getSlotIndex
());
materialInfoMap
.
put
(
"qty"
,
task
.
getNum
()
+
""
);
materialInfoMap
.
put
(
"latest"
,
latest
);
//本次工单第几盘料(F 第一次,L 最后一次, M 中间, E是错误)
materialInfoMap
.
put
(
"cloudLocation"
,
task
.
getPosName
());
//云料仓的库位
...
...
@@ -1112,11 +1121,12 @@ public class QisdaApiController extends BaseController {
if
(
dataLog
.
isCheckOutTask
()){
//首盘和补料
if
(!
outInfo
.
isReelCutAction
()
&&
!
outInfo
.
isUrgentAction
()){
//InquiryShelfBean.hSerialShelfMap.clear();
return
"全部任务完成后才可执行"
;
}
else
{
//分盘和紧急料
String
hs
erial
=
dataLog
.
getAppendInfo
().
gethSerial
();
if
(
hserial
.
equals
(
hs
erial
)){
String
taskHS
erial
=
dataLog
.
getAppendInfo
().
gethSerial
();
if
(
taskHSerial
.
equals
(
hS
erial
)){
return
"当前需求单还有未完成的任务"
;
}
}
...
...
@@ -1133,18 +1143,14 @@ public class QisdaApiController extends BaseController {
// }
// }
InquiryShelfBean
.
hSerialShelfMap
.
clear
();
//TODO:可以出的时候把之前的料架信息清空
outInfo
.
setTaskNum
(
0
);
outInfo
.
setTaskFinishNum
(
0
);
outInfo
.
setOutReelNum
(
0
);
//检查工单执行状态
if
(
outInfo
.
isNew
()){
//新工单执行过之后设置为未完成
outInfo
.
setStatus
(
1
);
}
outInfo
=
outInfoDao
.
save
(
outInfo
);
List
<
DataLog
>
tasks
=
new
ArrayList
<>();
...
...
@@ -1168,6 +1174,7 @@ public class QisdaApiController extends BaseController {
if
(
itemTasks
!=
null
&&
!
itemTasks
.
isEmpty
()){
tasks
.
addAll
(
itemTasks
);
}
outInfoCache
.
updateOutItem
(
outItem
.
getId
());
}
...
...
@@ -1188,7 +1195,7 @@ public class QisdaApiController extends BaseController {
}
}
log
.
info
(
"需求单"
+
outInfo
.
toString
()+
" 出库料盘数量:"
+
outReelNum
);
log
.
info
(
"需求单"
+
outInfo
.
gethSerial
()+
" 出库料盘数量:"
+
outReelNum
);
if
(
outInfo
.
isReelCutAction
()
||
outInfo
.
isFirstReelAction
()){
if
(
outReelNum
==
0
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
619e715
...
...
@@ -14,6 +14,7 @@ import com.myproject.dao.mongo.qisda.IOutItemDao;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IComponentManager
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.qisda.util.OutInfoCache
;
import
com.myproject.webapp.controller.storage.BaseController
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -56,6 +57,9 @@ public class QisdaDeviceController extends BaseController {
@Autowired
private
IOutItemDao
outItemDao
;
@Autowired
private
OutInfoCache
outInfoCache
;
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
QisdaDeviceController
.
class
);
/**
...
...
@@ -169,8 +173,10 @@ public class QisdaDeviceController extends BaseController {
if
(
robotIndex
.
equals
(
"1"
)){
//1号位机器人
firstRobotTask
=
firstScanTask
;
log
.
info
(
"将扫码任务["
+
firstRobotTask
.
getBarcode
()+
"]设置到机器人["
+
robotIndex
+
"]取料任务"
);
}
else
if
(
robotIndex
.
equals
(
"2"
)){
secondRobotTask
=
secondScanTask
;
log
.
info
(
"将扫码任务["
+
secondRobotTask
.
getBarcode
()+
"]设置到机器人["
+
robotIndex
+
"]取料任务"
);
}
updateScanTask
(
robotIndex
,
null
);
}
...
...
@@ -403,6 +409,33 @@ public class QisdaDeviceController extends BaseController {
task
.
setLocInfo
(
locInfo
);
task
=
dataLogDao
.
save
(
task
);
taskService
.
updateFinishedTask
(
task
);
//包装料
if
(
task
.
isPackageReel
()){
String
[]
infos
=
locInfo
.
split
(
"@"
);
String
rfid
=
infos
[
0
];
String
rfidLoc
=
infos
[
1
];
inquiryShelfBean
.
lockShelfLoc
(
task
,
rfid
,
"0"
);
inquiryShelfBean
.
putInShelf
(
task
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
//剩余任务数
String
taskCid
=
task
.
getCid
();
Collection
<
DataLog
>
waitTasks
=
taskService
.
getQueueTasks
();
int
taskCount
=
0
;
//同一个料仓的出库任务(等待中和正在执行的)
for
(
DataLog
waitTask
:
waitTasks
)
{
String
waitCid
=
waitTask
.
getCid
();
if
(
waitTask
.
isCheckOutTask
()
&&
waitCid
!=
null
&&
waitCid
.
equals
(
taskCid
)){
taskCount
=
taskCount
+
1
;
}
}
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"taskCount"
,
taskCount
+
""
);
return
ResultBean
.
newOkResult
(
resultMap
);
}
return
ResultBean
.
newOkResult
(
""
);
}
...
...
@@ -423,6 +456,8 @@ public class QisdaDeviceController extends BaseController {
taskService
.
updateFinishedTask
(
cacheTask
);
inquiryShelfBean
.
putInShelf
(
cacheTask
,
rfid
,
Integer
.
valueOf
(
rfidLoc
));
String
hSerial
=
appendInfo
.
gethSerial
();
if
(
Strings
.
isNotBlank
(
hSerial
)){
OutInfo
outInfo
=
outInfoDao
.
findByHSerial
(
hSerial
);
...
...
@@ -446,6 +481,7 @@ public class QisdaDeviceController extends BaseController {
sendQty
=
sendQty
+
cacheTask
.
getNum
();
outItem
.
setSendQty
(
sendQty
);
outItemDao
.
save
(
outItem
);
outInfoCache
.
updateOutItem
(
outItem
.
getId
());
}
else
{
log
.
info
(
"放置小车完成,条码["
+
barcodeObj
.
getBarcode
()+
"]不需要通知Qisda"
);
}
...
...
@@ -505,11 +541,12 @@ public class QisdaDeviceController extends BaseController {
@RequestMapping
(
value
=
"/putShelfFinished"
)
@ResponseBody
public
Object
putShelfFinished
(
HttpServletRequest
request
)
{
String
robotIndex
=
request
.
getParameter
(
"robotIndex"
);
String
rfid
=
request
.
getParameter
(
"rfid"
);
String
rfidLoc
=
request
.
getParameter
(
"rfidLoc"
);
String
barcode
=
request
.
getParameter
(
"barcode"
);
try
{
String
robotIndex
=
request
.
getParameter
(
"robotIndex"
);
String
rfid
=
request
.
getParameter
(
"rfid"
);
String
rfidLoc
=
request
.
getParameter
(
"rfidLoc"
);
String
barcode
=
request
.
getParameter
(
"barcode"
);
...
...
@@ -535,7 +572,7 @@ public class QisdaDeviceController extends BaseController {
log
.
info
(
"机器人["
+
robotIndex
+
"]将料盘["
+
barcode
+
"]放入料架["
+
rfid
+
"]["
+
rfidLoc
+
"]完成,任务一致,清空机器人任务"
);
secondRobotTask
=
null
;
}
else
{
log
.
info
(
"机器人["
+
robotIndex
+
"]将料盘["
+
barcode
+
"]放入料架["
+
rfid
+
"]["
+
rfidLoc
+
"]完成,与当前任务["
+
firstScan
Task
.
getBarcode
()+
"]不一致,不清空"
);
log
.
info
(
"机器人["
+
robotIndex
+
"]将料盘["
+
barcode
+
"]放入料架["
+
rfid
+
"]["
+
rfidLoc
+
"]完成,与当前任务["
+
secondRobot
Task
.
getBarcode
()+
"]不一致,不清空"
);
}
}
}
...
...
@@ -591,13 +628,21 @@ public class QisdaDeviceController extends BaseController {
}
else
if
(
shelfLoc
.
isBigLoc
()){
bigEmpty
=
bigEmpty
+
1
;
}
else
if
(
shelfLoc
.
isPackageLoc
()){
//
首套料,需要按顺序
if
(
appendInfo
.
isFirstReelAction
(
)){
//
包装料架
if
(
StorageConstants
.
SHEFL_TYPE
.
isAShelf
(
shelfInfo
.
getShelfType
()
)){
packageEmpty
=
packageEmpty
+
1
;
}
else
{
//
补料盘不需要按顺序,具体还可以放多少,到包装料工位再确定
}
else
if
(!
appendInfo
.
isFirstReelAction
())
{
//
大料架,并且不是首套料
bigEmpty
=
bigEmpty
+
1
;
}
//首套料,需要按顺序
// if(appendInfo.isFirstReelAction()){
// //packageEmpty = packageEmpty + 1;
// }else{
// //补料盘不需要按顺序,具体还可以放多少,到包装料工位再确定
// bigEmpty = bigEmpty + 1;
// }
}
}
}
...
...
@@ -626,7 +671,7 @@ public class QisdaDeviceController extends BaseController {
return
ResultBean
.
newOkResult
(
resultMap
);
}
catch
(
Exception
e
){
log
.
error
(
"机器人放料完成信息出错
"
,
e
);
log
.
error
(
"机器人放料完成信息出错
robotIndex="
+
robotIndex
+
";rfid="
+
rfid
+
";rfidLoc="
+
rfidLoc
+
";barcode="
+
barcode
,
e
);
}
return
""
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
619e715
...
...
@@ -30,6 +30,7 @@ import com.myproject.service.UserManager;
import
com.myproject.util.HttpHelper
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.qisda.QisdaController
;
import
com.myproject.webapp.controller.qisda.util.OutInfoCache
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.math.RandomUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -87,6 +88,9 @@ public class TaskService implements ITaskService {
private
IOutItemDao
outItemDao
;
@Autowired
private
OutInfoCache
outInfoCache
;
@Autowired
private
IOutInfoDao
outInfoDao
;
/**
...
...
@@ -560,30 +564,34 @@ public class TaskService implements ITaskService {
}
//按任务数量从小到大排序
List
<
Map
.
Entry
<
String
,
Integer
>>
list
=
new
ArrayList
<>(
countMap
.
entrySet
());
Collections
.
sort
(
list
,
new
Comparator
<
Map
.
Entry
<
String
,
Integer
>>()
{
@Override
public
int
compare
(
Map
.
Entry
<
String
,
Integer
>
o1
,
Map
.
Entry
<
String
,
Integer
>
o2
)
{
//按照value值,用compareTo()方法默认是从小到大排序
return
o1
.
getValue
().
compareTo
(
o2
.
getValue
());
}
});
//
List<Map.Entry<String, Integer>> list = new ArrayList<>(countMap.entrySet());
//
Collections.sort(list, new Comparator<Map.Entry<String, Integer>>()
//
{
//
@Override
//
public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)
//
{
//
//按照value值,用compareTo()方法默认是从小到大排序
//
return o1.getValue().compareTo(o2.getValue());
//
}
//
});
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
list
)
{
String
storageId
=
entry
.
getKey
();
Storage
theStorage
=
dataCache
.
getStorageById
(
storageId
);
StatusBean
status
=
getStatus
(
theStorage
.
getCid
());
//
for
(
Storage
storage
:
storageList
)
{
String
storageId
=
storage
.
getId
();
Integer
taskCount
=
countMap
.
get
(
storageId
);
if
(
taskCount
>=
2
){
continue
;
}
StatusBean
status
=
getStatus
(
storage
.
getCid
());
if
(
status
.
timeOut
()){
continue
;
}
try
{
log
.
info
(
"尝试从"
+
theStorage
.
getName
()+
"["
+
theStorage
.
getCid
()+
"]查找空位,当前料仓任务数:"
+
entry
.
getValue
()
);
return
findLineEmptyPosForPutIn
(
theS
torage
,
barcode
);
log
.
info
(
"尝试从"
+
storage
.
getName
()+
"["
+
storage
.
getCid
()+
"]查找空位,当前料仓任务数:"
+
taskCount
);
return
findLineEmptyPosForPutIn
(
s
torage
,
barcode
);
}
catch
(
Exception
e
){
log
.
info
(
"从"
+
theStorage
.
getName
()+
"["
+
theS
torage
.
getCid
()+
"]查找空位失败:"
+
e
.
getMessage
());
log
.
info
(
"从"
+
storage
.
getName
()+
"["
+
s
torage
.
getCid
()+
"]查找空位失败:"
+
e
.
getMessage
());
}
}
...
...
@@ -661,15 +669,6 @@ public class TaskService implements ITaskService {
statusBean
.
addData
(
"rfidLoc"
,
appendInfo
.
getRfidLoc
()
+
""
);
statusBean
.
addData
(
"barcode"
,
task
.
getBarcode
());
Collection
<
DataLog
>
waitTasks
=
getQueueTasks
();
int
taskCount
=
0
;
for
(
DataLog
waitTask
:
waitTasks
)
{
String
waitCid
=
waitTask
.
getCid
();
if
(
waitTask
.
isCheckOutTask
()
&&
waitCid
!=
null
&&
waitCid
.
equals
(
cid
)
&&
task
.
isWait
()){
taskCount
=
taskCount
+
1
;
}
}
statusBean
.
addData
(
"taskCount"
,
taskCount
+
""
);
boolean
smallReel
=
task
.
isSmallReel
();
if
(
storage
.
isPackage
()){
...
...
@@ -889,6 +888,7 @@ public class TaskService implements ITaskService {
}
}
}
//按料架顺序,从小盘开始出库
boolean
hasFirstReelAction
=
false
;
//编号最小的料架
...
...
@@ -896,6 +896,7 @@ public class TaskService implements ITaskService {
int
minDRfidIndex
=
-
1
;
int
minARfidIndex
=
-
1
;
for
(
DataLog
task
:
allTasks
)
{
if
(
task
.
isCheckOutTask
())
{
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
...
...
@@ -979,6 +980,7 @@ public class TaskService implements ITaskService {
}
}
}
else
{
//没有小料架(D),那么可以出C料架了
boolean
isCShelf
=
StorageConstants
.
SHEFL_TYPE
.
isCShelf
(
appendInfo
.
getShelfType
());
if
(
isCShelf
&&
rfidIndex
<=
minCRfidIndex
){
...
...
@@ -1984,13 +1986,19 @@ public class TaskService implements ITaskService {
private
synchronized
void
updateOutInfo
(
String
outItemId
,
DataLog
task
,
Barcode
barcode
){
//更新出库数量
OutInfo
outInfo
;
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
if
(!
Strings
.
isNullOrEmpty
(
outItemId
)){
OutItem
outItem
=
outItemDao
.
findOneById
(
outItemId
);
if
(
outItem
!=
null
){
int
outQty
=
outItem
.
getOutQty
()
+
task
.
getNum
();
outItem
.
setOutQty
(
outQty
);
outItemDao
.
save
(
outItem
);
if
(
outItem
.
isUrgentAction
()){
log
.
info
(
"紧急料设置发料数量与出库数量一致"
);
//紧急料发料数量与出库数量一致
outItem
.
setSendQty
(
outQty
);
}
outItem
=
outItemDao
.
save
(
outItem
);
outInfoCache
.
updateOutItem
(
outItem
.
getId
());
outInfo
=
outInfoDao
.
findByHSerial
(
outItem
.
gethSerial
());
int
outReelNum
=
outInfo
.
getOutReelNum
();
...
...
@@ -1998,7 +2006,6 @@ public class TaskService implements ITaskService {
outInfo
=
outInfoDao
.
save
(
outInfo
);
String
latest
=
outInfo
.
getOutLatest
();
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
QISDA
))
{
if
(
barcode
.
needToQisda
()){
QisdaApiController
.
OutFinished
(
task
,
barcode
,
latest
);
...
...
myproject/src/main/java/com/myproject/webapp/listener/StartupListener.java
查看文件 @
619e715
...
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.listener;
import
com.myproject.api.OrderFileWatch
;
import
com.myproject.mina.TcpServer
;
import
com.myproject.webapp.controller.webService.ExpireMailUtil
;
import
com.myproject.webapp.controller.webService.MainTimer
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
com.myproject.Constants
;
...
...
@@ -141,8 +142,11 @@ public class StartupListener implements ServletContextListener {
//AgvUtil.start();
ExpireMailUtil
mailUtil
=
(
ExpireMailUtil
)
ctx
.
getBean
(
"expireMailUtil"
);
mailUtil
.
init
();
//ExpireMailUtil mailUtil = (ExpireMailUtil) ctx.getBean("expireMailUtil");
//mailUtil.init();
MainTimer
mainTimer
=
(
MainTimer
)
ctx
.
getBean
(
"mainTimer"
);
mainTimer
.
init
();
TcpServer
tcpServer
=
(
TcpServer
)
ctx
.
getBean
(
"tcpServer"
);
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/orderOut.jsp
查看文件 @
619e715
...
...
@@ -75,184 +75,172 @@
</div>
</div>
</div>
<div class="panel-group accordion" id="accordion3">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_1">
<i class="icon-cursor-move"></i>
[首盘] 需求单: 81 <span class="right">建议时间: 2019-11-18 08:59</span>
</a>
</h4>
</div>
<div id="collapse_3_1" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-inline">
<li>
<i class="fa fa-tasks"></i>工单: 879235
</li>
<li>
<i class="fa fa-briefcase"></i>备料单: F001_879235N_1
</li>
<li>
<i class="fa fa-calendar"></i>建议时间:2019-11-18 08:59
</li>
<li>
<i class="fa fa-star"></i>必须出仓日期:2019-11-18 08:59
</li>
</ul>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>料号</th>
<th>厂别</th>
<th>料站</th>
<th>分盘料</th>
<th>需求数量</th>
<th>绑定数量</th>
</tr>
</thead>
<tbody>
<tr>
<td>7H.47134.1F1</td>
<td>SU</td>
<td>1-11</td>
<td>否</td>
<td>2006</td>
<td>2006</td>
</tr>
<tr>
<td>7H.47134.1F1</td>
<td>SU</td>
<td>1-12</td>
<td>是</td>
<td>1000</td>
<td>800</td>
</tr>
<%--<div class="panel-group accordion" id="accordion3">--%>
<%--<div class="panel panel-default">--%>
<%--<div class="panel-heading">--%>
<%--<h4 class="panel-title">--%>
<%--<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_1">--%>
<%--<i class="icon-cursor-move"></i>--%>
<%--[首盘] 需求单: 81 工单: 879235<span class="right">建议时间: 2019-11-18 08:59</span>--%>
<%--</a>--%>
<%--</h4>--%>
<%--</div>--%>
<%--<div id="collapse_3_1" class="panel-collapse collapse">--%>
<%--<div class="panel-body">--%>
<%--<ul class="list-inline">--%>
<%--<li>--%>
<%--<i class="fa fa-tasks"></i>工单: 879235--%>
<%--</li>--%>
<%--<li>--%>
<%--<i class="fa fa-briefcase"></i>备料单: F001_879235N_1--%>
<%--</li>--%>
<%--<li>--%>
<%--<i class="fa fa-calendar"></i>建议时间:2019-11-18 08:59--%>
<%--</li>--%>
<%--<li>--%>
<%--<i class="fa fa-star"></i>必须出仓日期:2019-11-18 08:59--%>
<%--</li>--%>
<%--</ul>--%>
<%--<table class="table table-striped table-bordered table-hover">--%>
<%--<thead>--%>
<%--<tr><th>料号</th><th>厂别</th><th>料站</th><th>分盘料</th><th>需求数量</th><th>绑定数量</th></tr>--%>
<%--</thead>--%>
<%--<tbody>--%>
<%--<tr>--%>
<%--<td>7H.47134.1F1</td><td>SU</td><td>1-11</td><td>否</td><td>2006</td><td>2006</td>--%>
<%--</tr>--%>
<%--<tr>--%>
<%--<td>7H.47134.1F1</td>--%>
<%--<td>SU</td>--%>
<%--<td>1-12</td>--%>
<%--<td>是</td>--%>
<%--<td>1000</td>--%>
<%--<td>800</td>--%>
<%--</tr>--%>
<
/tbody
>
<
/table
>
<
/div
>
<
/div
>
<
/div
>
<
div class="panel panel-default"
>
<
div class="panel-heading"
>
<
h4 class="panel-title"
>
<
a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_2"
>
<
i class="icon-cursor-move"></i
>
[首盘] 需求单: 82 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span
>
<
/a
>
<
/h4
>
<
/div
>
<
div id="collapse_3_2" class="panel-collapse collapse"
>
<
div class="panel-body"
>
<
table class="table table-striped table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th>料号</th
>
<
th>厂别</th
>
<
th>料站</th
>
<
th>数量</th
>
<
/tr
>
<
/thead
>
<
tbody
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-11</td
>
<
td>2006</td
>
<
/tr
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-12</td
>
<
td>1000</td
>
<
/tr
>
<
%--</tbody>--%
>
<
%--</table>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--<div class="panel panel-default">--%
>
<
%--<div class="panel-heading">--%
>
<
%--<h4 class="panel-title">--%
>
<
%--<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_2">--%
>
<
%--<i class="icon-cursor-move"></i>--%
>
<%--[首盘] 需求单: 82 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span>--%
>
<
%--</a>--%
>
<
%--</h4>--%
>
<
%--</div>--%
>
<
%--<div id="collapse_3_2" class="panel-collapse collapse">--%
>
<
%--<div class="panel-body">--%
>
<
%--<table class="table table-striped table-bordered table-hover">--%
>
<
%--<thead>--%
>
<
%--<tr>--%
>
<
%--<th>料号</th>--%
>
<
%--<th>厂别</th>--%
>
<
%--<th>料站</th>--%
>
<
%--<th>数量</th>--%
>
<
%--</tr>--%
>
<
%--</thead>--%
>
<
%--<tbody>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-11</td>--%
>
<
%--<td>2006</td>--%
>
<
%--</tr>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-12</td>--%
>
<
%--<td>1000</td>--%
>
<
%--</tr>--%
>
<
/tbody
>
<
/table
>
<
/div
>
<
/div
>
<
/div
>
<
div class="panel panel-default"
>
<
div class="panel-heading"
>
<
h4 class="panel-title"
>
<
a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_3"
>
<
i class="icon-cursor-move"></i
>
[首盘] 需求单: 83 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span
>
<
/a
>
<
/h4
>
<
/div
>
<
div id="collapse_3_3" class="panel-collapse collapse"
>
<
div class="panel-body"
>
<
table class="table table-striped table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th>料号</th
>
<
th>厂别</th
>
<
th>料站</th
>
<
th>数量</th
>
<
/tr
>
<
/thead
>
<
tbody
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-11</td
>
<
td>2006</td
>
<
/tr
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-12</td
>
<
td>1000</td
>
<
/tr
>
<
%--</tbody>--%
>
<
%--</table>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--<div class="panel panel-default">--%
>
<
%--<div class="panel-heading">--%
>
<
%--<h4 class="panel-title">--%
>
<
%--<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_3">--%
>
<
%--<i class="icon-cursor-move"></i>--%
>
<%--[首盘] 需求单: 83 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span>--%
>
<
%--</a>--%
>
<
%--</h4>--%
>
<
%--</div>--%
>
<
%--<div id="collapse_3_3" class="panel-collapse collapse">--%
>
<
%--<div class="panel-body">--%
>
<
%--<table class="table table-striped table-bordered table-hover">--%
>
<
%--<thead>--%
>
<
%--<tr>--%
>
<
%--<th>料号</th>--%
>
<
%--<th>厂别</th>--%
>
<
%--<th>料站</th>--%
>
<
%--<th>数量</th>--%
>
<
%--</tr>--%
>
<
%--</thead>--%
>
<
%--<tbody>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-11</td>--%
>
<
%--<td>2006</td>--%
>
<
%--</tr>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-12</td>--%
>
<
%--<td>1000</td>--%
>
<
%--</tr>--%
>
<
/tbody
>
<
/table
>
<
/div
>
<
/div
>
<
/div
>
<
div class="panel panel-default"
>
<
div class="panel-heading"
>
<
h4 class="panel-title"
>
<
a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_4"
>
<
i class="icon-cursor-move"></i
>
[首盘] 需求单: 84 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span
>
<
/a
>
<
/h4
>
<
/div
>
<
div id="collapse_3_4" class="panel-collapse collapse"
>
<
div class="panel-body"
>
<
table class="table table-striped table-bordered table-hover"
>
<
thead
>
<
tr
>
<
th>料号</th
>
<
th>厂别</th
>
<
th>料站</th
>
<
th>数量</th
>
<
/tr
>
<
/thead
>
<
tbody
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-11</td
>
<
td>2006</td
>
<
/tr
>
<
tr
>
<
td>7H.47134.1F1</td
>
<
td>SU</td
>
<
td>1-12</td
>
<
td>1000</td
>
<
/tr
>
<
%--</tbody>--%
>
<
%--</table>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--<div class="panel panel-default">--%
>
<
%--<div class="panel-heading">--%
>
<
%--<h4 class="panel-title">--%
>
<
%--<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion3" href="#collapse_3_4">--%
>
<
%--<i class="icon-cursor-move"></i>--%
>
<%--[首盘] 需求单: 84 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span>--%
>
<
%--</a>--%
>
<
%--</h4>--%
>
<
%--</div>--%
>
<
%--<div id="collapse_3_4" class="panel-collapse collapse">--%
>
<
%--<div class="panel-body">--%
>
<
%--<table class="table table-striped table-bordered table-hover">--%
>
<
%--<thead>--%
>
<
%--<tr>--%
>
<
%--<th>料号</th>--%
>
<
%--<th>厂别</th>--%
>
<
%--<th>料站</th>--%
>
<
%--<th>数量</th>--%
>
<
%--</tr>--%
>
<
%--</thead>--%
>
<
%--<tbody>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-11</td>--%
>
<
%--<td>2006</td>--%
>
<
%--</tr>--%
>
<
%--<tr>--%
>
<
%--<td>7H.47134.1F1</td>--%
>
<
%--<td>SU</td>--%
>
<
%--<td>1-12</td>--%
>
<
%--<td>1000</td>--%
>
<
%--</tr>--%
>
<
/tbody
>
<
/table
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
%--</tbody>--%
>
<
%--</table>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
<
%--</div>--%
>
</div>
</div>
</div>
...
...
@@ -269,14 +257,75 @@
});
alert(targetSort);
}
var dragOptions = {
animation: 150,
handle: '.panel-heading',
ghostClass: 'panel-move',
onEnd:endFunc
};
var el = document.getElementById('accordion3');
var sortable = Sortable.create(el,dragOptions);
function flushOutInfos(){
$.post("${ctx}/service/store/qisda/outInfoList", {}, function (data) {
var html = '';
for(var i in data){
var outInfo = data[i];
var index = parseInt(i) + 1;
var outItems = data[i].outItems;
var tdHtml = '';
for(var j in outItems){
var outItem = outItems[j];
tdHtml = tdHtml +
'<tr>' +
'<td>'+outItem.slotlocation+'</td>' +
'<td>'+outItem.slotStr+'</td>' +
'<td>'+outItem.pn+'</td>' +
'<td>'+outItem.facility+'</td>' +
'<td>'+outItem.reelcut+'</td>' +
'<td>'+outItem.qty+'</td>' +
'<td>'+outItem.realLockQty+'</td>' +
'<td>'+outItem.outQty+'</td>' +
'<td>'+outItem.sendQty+'</td>' +
'</tr>';
}
var tableHtml = '<table class="table table-striped table-bordered table-hover">' +
'<thead><tr><th>料站序号</th><th>料站</th><th>料号</th><th>厂别</th><th>分盘料</th><th>需求数量</th><th>绑定数量</th><th>出库数量</th><th>发料数量</th></tr></thead>' +
'<tbody>' +
tdHtml +
'</tbody></table>';
var mdate = new Date(outInfo.mdate).Format("yyyy-MM-dd hh:mm:ss");
var sdate = new Date(outInfo.sdate).Format("yyyy-MM-dd hh:mm:ss");
var infoHtml = '<div class="panel panel-default">' +
'<div class="panel-heading">' +
'<h4 class="panel-title">' +
'<a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#'+data[i].hSerial+'">' +
'<i class="icon-cursor-move"></i>' +
' ['+data[i].action+'] 需求单:'+ data[i].hSerial+' 工单: ' + data[i].so +' 备料单: ' + data[i].refno +
'<span class="right">建议时间: '+sdate+'</span>' +
'</a></h4></div>' +
'<div id="'+data[i].hSerial+'" class="panel-collapse collapse">' +
'<div class="panel-body">' +
'<ul class="list-inline">' +
'<li><i class="fa fa-tasks"></i>工单: '+data[i].so+'</li>' +
'<li><i class="fa fa-briefcase"></i>备料单: '+data[i].refno+'</li>' +
'<li><i class="fa fa-calendar"></i>建议时间:'+sdate+'</li>' +
'<li><i class="fa fa-star"></i>必须出仓日期:'+mdate+'</li>' +
'</ul>' +
tableHtml +
'</div></div></div></div>';
html = html + infoHtml;
}
$("#executing").html(html);
});
}
//setInterval(function(){
flushOutInfos();
//}, 1000);
// var dragOptions = {
// animation: 150,
// handle: '.panel-heading',
// ghostClass: 'panel-move',
// onEnd:endFunc
// };
// var el = document.getElementById('accordion3');
// var sortable = Sortable.create(el,dragOptions);
</script>
</c:set>
\ No newline at end of file
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
619e715
...
...
@@ -70,7 +70,7 @@
</display:column>
<display:column titleKey="任务" sortable="true" sortProperty="mdate">
${outInfo.task
Num}/${outInfo.taskFinish
Num}
${outInfo.task
FinishNum}/${outInfo.task
Num}
</display:column>
<display:column titleKey="checkOut.operate" media="html">
...
...
@@ -160,7 +160,11 @@
for(var i in data){
//var index = parseInt(i) + 1;
var outQty = "<span class='bg-green td-item'>"+data[i].outQty+"</span>";
var color = "bg-red";
if(data[i].outQty >= data[i].qty){
color = "bg-green";
}
var outQty = "<span class='"+color+" td-item'>"+data[i].outQty+"</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].lockQty] );
}
...
...
myproject/src/main/webapp/decorators/metro.jsp
查看文件 @
619e715
...
...
@@ -330,6 +330,7 @@
<script
src=
"${ctx}/scripts/lobibox/js/lobibox.js?id=32"
></script>
<script
src=
"${ctx}/scripts/script.js"
></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery
(
document
).
ready
(
function
()
{
...
...
myproject/src/main/webapp/scripts/script.js
查看文件 @
619e715
...
...
@@ -49,3 +49,27 @@ function confirmMessage(obj) {
ans
=
confirm
(
msg
);
return
ans
;
}
// 对Date的扩展,将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// 例子:
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
Date
.
prototype
.
Format
=
function
(
fmt
)
{
//author: meizz
var
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"h+"
:
this
.
getHours
(),
//小时
"m+"
:
this
.
getMinutes
(),
//分
"s+"
:
this
.
getSeconds
(),
//秒
"q+"
:
Math
.
floor
((
this
.
getMonth
()
+
3
)
/
3
),
//季度
"S"
:
this
.
getMilliseconds
()
//毫秒
};
if
(
/
(
y+
)
/
.
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
return
fmt
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论