Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 84b80eae
由
sunke
编写于
2020-09-15 11:03:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加totalBindNum(绑定料盘数)和totalTaskNum(累计出库任务),用于统计需求单料盘数量
大料出库顺序Bug修改
1 个父辈
69eb8af4
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
205 行增加
和
38 行删除
myproject/src/main/java/com/myproject/bean/update/qisda/OutInfo.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/storage/ChartController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/resources/log4j2.xml
myproject/src/main/webapp/WEB-INF/pages/qisda/alarmMsg.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
myproject/src/main/java/com/myproject/bean/update/qisda/OutInfo.java
查看文件 @
84b80ea
...
...
@@ -24,6 +24,11 @@ public class OutInfo extends BaseMongoBean {
this
.
line
=
outItem
.
getLine
();
this
.
refno
=
outItem
.
getRefno
();
this
.
sdate
=
outItem
.
getSdate
();
Date
needOutDate
=
new
Date
();
if
(
this
.
sdate
.
after
(
needOutDate
)){
needOutDate
=
this
.
sdate
;
}
this
.
taskNeedOutDate
=
needOutDate
;
this
.
mdate
=
outItem
.
getMdate
();
}
...
...
@@ -67,6 +72,16 @@ public class OutInfo extends BaseMongoBean {
private
int
taskNum
;
/**
* 累计任务数量
*/
private
int
totalTaskNum
;
/**
* 预估出库料盘数量
*/
private
int
totalBindNum
;
/**
* 产线位置
*/
private
String
line
;
...
...
@@ -101,6 +116,11 @@ public class OutInfo extends BaseMongoBean {
*/
private
long
taskEndTime
;
/**
* 需求单应该出库时间,通常为建议时间,当收到时间在建议时间之后,使用收到时间
*/
private
Date
taskNeedOutDate
;
@Transient
private
Map
<
String
,
OutItem
>
outItemMap
=
new
HashMap
<>();
...
...
@@ -404,6 +424,14 @@ public class OutInfo extends BaseMongoBean {
return
null
;
}
public
int
getTotalTaskNum
()
{
return
totalTaskNum
;
}
public
void
setTotalTaskNum
(
int
totalTaskNum
)
{
this
.
totalTaskNum
=
totalTaskNum
;
}
public
String
getLine
()
{
return
line
;
}
...
...
@@ -412,6 +440,14 @@ public class OutInfo extends BaseMongoBean {
this
.
line
=
line
;
}
public
int
getTotalBindNum
()
{
return
totalBindNum
;
}
public
void
setTotalBindNum
(
int
totalBindNum
)
{
this
.
totalBindNum
=
totalBindNum
;
}
@Override
public
String
toString
()
{
return
"OutInfo{"
+
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
84b80ea
...
...
@@ -344,14 +344,19 @@ public class OutInfoCache {
* @param hSerial
* @param outReelNum
* @param lessSend 是否是缺料补发
* @param needAdd 是否需要累计
*/
public
void
resetTaskNum
(
String
hSerial
,
int
outReelNum
,
boolean
lessSend
){
public
void
resetTaskNum
(
String
hSerial
,
int
outReelNum
,
boolean
lessSend
,
boolean
needAdd
){
OutInfo
outInfo
=
getOutInfoFromCache
(
hSerial
);
if
(
outInfo
!=
null
){
outInfo
.
setOutReelNum
(
0
);
outInfo
.
setTaskFinishNum
(
0
);
outInfo
.
setTaskNum
(
outReelNum
);
if
(
outReelNum
!=
0
){
if
(
needAdd
){
int
totalTaskNum
=
outInfo
.
getTotalTaskNum
()
+
outReelNum
;
outInfo
.
setTotalTaskNum
(
totalTaskNum
);
}
outInfo
.
setSendStatus
(
StorageConstants
.
SEND_STATUS
.
EXECUTING
);
}
else
{
outInfo
.
setSendStatus
(
StorageConstants
.
SEND_STATUS
.
SEND_LESS
);
...
...
@@ -731,7 +736,8 @@ public class OutInfoCache {
for
(
DataLog
itemTask
:
itemTasks
)
{
tasks
.
add
(
itemTask
);
}
resetTaskNum
(
hSerial
,
tasks
.
size
(),
outInfoExecuted
);
boolean
needAddToTotal
=
false
;
resetTaskNum
(
hSerial
,
tasks
.
size
(),
outInfoExecuted
,
needAddToTotal
);
updateOutItem
(
outItem
.
getId
());
}
}
...
...
@@ -740,8 +746,8 @@ public class OutInfoCache {
int
outReelNum
=
tasks
.
size
();
if
(
outReelNum
>
0
){
log
.
info
(
"需求单"
+
outInfo
.
gethSerial
()+
"已出("
+
outInfo
.
getOutReelNum
()+
")/已发("
+
outInfo
.
getTaskFinishNum
()+
") 本次出库料盘数量:"
+
outReelNum
);
resetTaskNum
(
hSerial
,
outReelNum
,
outInfoExecuted
);
boolean
needAddToTotal
=
true
;
resetTaskNum
(
hSerial
,
outReelNum
,
outInfoExecuted
,
needAddToTotal
);
//补料出库,且不是缺料重发,需要重新排序,按站位序号循环出,每次出最大的盘
if
(
outInfo
.
isTailAction
()
&&
!
outInfoExecuted
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/ChartController.java
查看文件 @
84b80ea
...
...
@@ -43,10 +43,10 @@ public class ChartController extends BaseController{
public
String
showChart
(
HttpServletRequest
request
)
{
//TODO:首页查询订单的时候需要只显示一部分,
request
.
setAttribute
(
"dataLogs"
,
dataLogDao
.
latestLogs
(
10
));
//
request.setAttribute("dataLogs",dataLogDao.latestLogs(10));
request
.
setAttribute
(
"usedPosData"
,
storageManager
.
countUsedPos
());
return
"
storage/chart
"
;
//
request.setAttribute("usedPosData",storageManager.countUsedPos());
return
"
homeMenu
"
;
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
84b80ea
...
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.controller.webService;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.myproject.bean.json.ChartItem
;
import
com.myproject.bean.qisda.*
;
import
com.myproject.bean.update.*
;
import
com.myproject.bean.update.qisda.DNInfo
;
...
...
@@ -409,7 +410,9 @@ public class QisdaApiController extends BaseController {
for
(
OutInfo
outInfo
:
outInfoMap
.
values
())
{
log
.
info
(
"创建出库需求单["
+
outInfo
.
gethSerial
()+
"]"
+
outInfo
.
getAction
());
int
bindReelNum
=
getBindReelNum
(
outInfo
);
outInfo
.
setTotalBindNum
(
bindReelNum
);
log
.
info
(
"创建出库需求单["
+
outInfo
.
gethSerial
()+
"]"
+
outInfo
.
getAction
()
+
" 预估需求料盘数量为:"
+
bindReelNum
);
outInfoDao
.
save
(
outInfo
);
//新的需求单,更新缓存
outInfoCache
.
addOutInfo
(
outInfo
);
...
...
@@ -427,9 +430,6 @@ public class QisdaApiController extends BaseController {
}
//-------------------------Private Method----------------------------------------
/**
* 出库接口 (出仓完成时调用)
...
...
@@ -470,6 +470,69 @@ public class QisdaApiController extends BaseController {
}
}
//-------------------------Private Method----------------------------------------
/**
* 更新需求单的绑定数量
*/
private
int
getBindReelNum
(
OutInfo
outInfo
){
List
<
OutItem
>
allItems
=
outInfo
.
getOutItems
();
if
(
outInfo
.
isUrgentAction
()){
//紧急料,每一条是一盘
return
allItems
.
size
();
}
else
if
(
outInfo
.
isReelCutAction
()){
//分盘,需求数量与分盘任务数相同
int
cutReelCount
=
0
;
for
(
OutItem
outItem
:
allItems
)
{
if
(
outItem
.
isCutMaterial
()){
List
<
StoragePos
>
cutPosList
=
storagePosDao
.
findCutList
(
outItem
.
getSo
(),
outItem
.
getSlotlocation
(),
outItem
.
getSoseq
());
cutReelCount
=
cutReelCount
+
cutPosList
.
size
();
}
}
return
cutReelCount
;
}
else
if
(
outInfo
.
isFirstReelAction
()){
//首盘,每一条是一盘
return
allItems
.
size
();
}
else
if
(
outInfo
.
isTailAction
()){
//尾料,根据绑定信息进行统计
//绑定信息暂时放到ChartItem中,value1为需求量,value2为累计物料数量,value3为累计料盘数量
Map
<
String
,
ChartItem
>
bindItemMap
=
new
HashMap
<>();
for
(
OutItem
outItem
:
allItems
)
{
String
slotLocationStr
=
outItem
.
getSlotlocation
()
+
""
;
int
needNum
=
outItem
.
getQty
();
ChartItem
bindItem
=
new
ChartItem
();
bindItem
.
setLabel
(
slotLocationStr
);
bindItem
.
setValue
(
needNum
);
bindItemMap
.
put
(
bindItem
.
getLabel
(),
bindItem
);
}
List
<
StoragePos
>
bindList
=
storagePosDao
.
listSoSeqBindPos
(
outInfo
.
getSoseq
());
for
(
StoragePos
storagePos
:
bindList
)
{
Barcode
barcode
=
storagePos
.
getBarcode
();
String
slotIndex
=
barcode
.
getAppendInfo
().
getPreBindSlot
();
ChartItem
bindItem
=
bindItemMap
.
get
(
slotIndex
);
if
(
bindItem
!=
null
){
if
(
bindItem
.
getValue2
()
<
bindItem
.
getValue
()){
//未满足需求
int
amount
=
barcode
.
getAmount
();
int
bindAmount
=
bindItem
.
getValue2
()
+
amount
;
int
reelNum
=
bindItem
.
getValue3
()
+
1
;
bindItem
.
setValue2
(
bindAmount
);
bindItem
.
setValue3
(
reelNum
);
bindItemMap
.
put
(
bindItem
.
getLabel
(),
bindItem
);
}
}
}
int
totalBindReelNum
=
0
;
for
(
ChartItem
chartItem
:
bindItemMap
.
values
())
{
totalBindReelNum
=
totalBindReelNum
+
chartItem
.
getValue3
();
}
return
totalBindReelNum
;
}
return
0
;
}
/**
* 出仓完成时的参数
* @param task
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
84b80ea
...
...
@@ -934,7 +934,7 @@ public class TaskService implements ITaskService {
hasFirstReelAction
=
true
;
}
int
rfidIndex
=
appendInfo
.
getRfidIndex
();
boolean
isAShelf
=
StorageConstants
.
SHEFL_TYPE
.
isAShelf
(
appendInfo
.
getShelfType
()
);
boolean
isAShelf
=
appendInfo
.
isAShelfTask
(
);
if
(
isAShelf
){
//包装料最小的料架编号
if
(
minARfidIndex
==
-
1
||
rfidIndex
<
minARfidIndex
){
...
...
@@ -942,7 +942,7 @@ public class TaskService implements ITaskService {
}
}
boolean
isDShelf
=
StorageConstants
.
SHEFL_TYPE
.
isDShelf
(
appendInfo
.
getShelfType
())
;
boolean
isDShelf
=
appendInfo
.
isDShelfTask
();
;
if
(
isDShelf
){
//小料架
if
(
minDRfidIndex
==
-
1
||
rfidIndex
<
minDRfidIndex
){
...
...
@@ -950,7 +950,7 @@ public class TaskService implements ITaskService {
}
}
boolean
isCShelf
=
StorageConstants
.
SHEFL_TYPE
.
isCShelf
(
appendInfo
.
getShelfType
()
);
boolean
isCShelf
=
appendInfo
.
isCShelfTask
(
);
if
(
isCShelf
){
//大料架
if
(
minCRfidIndex
==
-
1
||
rfidIndex
<
minCRfidIndex
){
...
...
@@ -1150,12 +1150,12 @@ public class TaskService implements ITaskService {
return
findPackageMinTask
(
storage
,
minARfidIndex
);
}
else
{
//一次性把D料架出完,再出C料架,包装料可以同时出
Collection
<
DataLog
>
waitTasks
=
taskMap
.
values
(
);
List
<
DataLog
>
waitTasks
=
new
ArrayList
<>(
taskMap
.
values
()
);
List
<
DataLog
>
allTaskList
=
new
ArrayList
<>();
if
(!
waitTasks
.
isEmpty
()){
allTaskList
.
addAll
(
waitTasks
);
allTaskList
.
sort
(
new
Comparator
<
DataLog
>()
{
waitTasks
.
sort
(
new
Comparator
<
DataLog
>()
{
@Override
public
int
compare
(
DataLog
o1
,
DataLog
o2
)
{
return
o1
.
getOutOrder
()
-
o2
.
getOutOrder
();
...
...
@@ -1163,32 +1163,37 @@ public class TaskService implements ITaskService {
});
}
for
(
DataLog
task
:
allTaskList
)
{
if
(
storage
.
getCid
().
equals
(
task
.
getCid
())
&&
task
.
isCheckOutTask
()
&&
task
.
isWait
()
){
//还有小料架出库任务,出小料架
if
(
minDRfidIndex
!=
-
1
){
//还有小料架出库任务,出小料架
if
(
minDRfidIndex
!=
-
1
){
for
(
DataLog
task
:
waitTasks
)
{
if
(
storage
.
getCid
().
equals
(
task
.
getCid
())
&&
task
.
isCheckOutTask
()
&&
task
.
isWait
()
){
if
(
task
.
isSmallReel
()){
log
.
info
(
"出库小料任务"
+
task
.
getBarcode
()+
"["
+
task
.
getPosName
()+
"] outOrder="
+
task
.
getOutOrder
());
return
task
;
}
}
else
{
}
}
}
else
{
Collection
<
DataLog
>
finishedTasks
=
finishedTaskMap
.
values
();
if
(!
finishedTasks
.
isEmpty
()){
allTaskList
.
addAll
(
finishedTasks
);
}
//未完成的大料数量(正在执行和未放上料架的)
int
unFinishedBigTaskCount
=
0
;
for
(
DataLog
task
:
allTaskList
)
{
////非包装料大料任务还未完成(未放入料架),暂时不出大料
if
(
task
.
isCheckOutTask
()
&&
task
.
getAppendInfo
().
isCShelfTask
()){
if
(!
task
.
isFinished
()
&&
!
task
.
isWait
()
&&
!
task
.
isCancel
()){
unFinishedBigTaskCount
=
unFinishedBigTaskCount
+
1
;
}
}
}
for
(
DataLog
task
:
waitTasks
)
{
if
(
storage
.
getCid
().
equals
(
task
.
getCid
())
&&
task
.
isCheckOutTask
()
&&
task
.
isWait
()){
//开始出大料架,不需要按顺序
if
(!
task
.
isSmallReel
()){
//未完成的大料数量(正在执行和未放上料架的)
int
unFinishedBigTaskCount
=
0
;
for
(
DataLog
dataLog
:
allTaskList
)
{
if
(!
dataLog
.
isPackageReel
()
&&
!
dataLog
.
isSmallReel
()
&&
dataLog
.
isExecuting
()){
unFinishedBigTaskCount
=
unFinishedBigTaskCount
+
1
;
}
}
for
(
DataLog
dataLog
:
finishedTaskMap
.
values
())
{
if
(!
dataLog
.
isPackageReel
()){
if
(!
dataLog
.
isSmallReel
()
&&
!
dataLog
.
isFinished
()
&&
!
dataLog
.
isLessSendReel
()){
//非包装料大料任务还未完成(未放入料架),暂时不出大料
unFinishedBigTaskCount
=
unFinishedBigTaskCount
+
1
;
}
}
}
if
(
InquiryShelfBean
.
canCheckOutTailActionTask
(
task
,
unFinishedBigTaskCount
)){
log
.
info
(
"出库大料任务"
+
task
.
getBarcode
()+
"["
+
task
.
getPosName
()+
"]"
);
return
task
;
...
...
@@ -1197,6 +1202,7 @@ public class TaskService implements ITaskService {
}
}
}
}
return
null
;
}
...
...
myproject/src/main/resources/log4j2.xml
查看文件 @
84b80ea
<?xml version="1.0" encoding="UTF-8"?>
<configuration
status=
"WARN"
>
<Properties>
<Property
name=
"LOG_HOME"
>
logs
</Property>
<Property
name=
"LOG_HOME"
>
E:/tomcatLog/
logs
</Property>
<Property
name=
"LOG_NAME"
>
storage.txt
</Property>
</Properties>
<appenders>
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/alarmMsg.jsp
查看文件 @
84b80ea
...
...
@@ -235,7 +235,7 @@
$.post("${ctx}/service/store/tasks", {}, function (data) {
var html = "";
for(var item in data){
if(!data[item].timeout ||
!data[item].executing
){
if(!data[item].timeout ||
data[item].wait
){
continue;
}
var partNumber = data[item].partNumber;
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
84b80ea
...
...
@@ -97,6 +97,11 @@
<display:column titleKey="任务" sortable="true" sortProperty="mdate">
${outInfo.taskFinishNum}/${outInfo.taskNum}
</display:column>
<display:column titleKey="累计任务" sortable="true" sortProperty="totalTaskNum">
${outInfo.totalTaskNum}/${outInfo.totalBindNum}
</display:column>
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate">
<fmt:formatDate value="${outInfo.createDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
...
...
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
查看文件 @
84b80ea
...
...
@@ -12,6 +12,57 @@
<div class="row">
<div class="col-md-12">
<ul class="timeline">
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">09-15 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020091510</h2>
<div class="timeline-content">
<ul>
<li>需求单绑定数量统计,用于统计需求数量分布</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">09-08 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020090814</h2>
<div class="timeline-content">
<ul>
<li>需求单任务数量累计,用于统计需求数量分布</li>
</ul>
</div>
</div>
</li>
<li class="timeline-purple">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">09-07 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020090715</h2>
<div class="timeline-content">
<ul>
<li>出大料逻辑修改</li>
</ul>
</div>
</div>
</li>
<li class="timeline-green">
<div class="timeline-time">
<span class="date">2020</span>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论