Commit 591fe8ab sunke

Fixed: 已完成需求单不关闭的问题

1 个父辈 4d567aba
...@@ -98,6 +98,21 @@ public class OutInfoCache { ...@@ -98,6 +98,21 @@ public class OutInfoCache {
OutInfo suggestOutInfo = null; OutInfo suggestOutInfo = null;
Date now = new Date(); Date now = new Date();
for (OutInfo unEndOutInfo : getCachedOutInfos()) { for (OutInfo unEndOutInfo : getCachedOutInfos()) {
if(!unEndOutInfo.isClosed() && unEndOutInfo.isTaskEnd() && !unEndOutInfo.isReelCutAction()){
long lastEndTime = unEndOutInfo.getTaskEndTime();
if(now.getTime() - lastEndTime >= 5 * 60 * 1000){
//任务已结束5分钟
if(unEndOutInfo.isEndOutInfo()){
log.info("需求单["+unEndOutInfo.gethSerial()+"]已执行过,且是工单的最后一个需求单,关闭工单"+unEndOutInfo.getSo()+"["+unEndOutInfo.getSoseq()+"]");
closeSoSeq(unEndOutInfo.getSoseq());
}else{
log.info("需求单["+unEndOutInfo.gethSerial()+"]已执行过,关闭需求单,不再自动缺料重发");
closeHSerial(unEndOutInfo.gethSerial());
}
}
}
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()){
...@@ -355,6 +370,7 @@ public class OutInfoCache { ...@@ -355,6 +370,7 @@ public class OutInfoCache {
*/ */
public List<OutInfo> getCachedOutInfos(){ public List<OutInfo> getCachedOutInfos(){
List<OutInfo> outInfoList = Lists.newArrayList(); List<OutInfo> outInfoList = Lists.newArrayList();
long now = System.currentTimeMillis();
for (OutInfo outInfo : outInfoMap.values()) { for (OutInfo outInfo : outInfoMap.values()) {
if(outInfo.isClosed() || outInfo.isSendEnd()){ if(outInfo.isClosed() || outInfo.isSendEnd()){
removeFromCache(outInfo.gethSerial()); removeFromCache(outInfo.gethSerial());
...@@ -780,16 +796,16 @@ public class OutInfoCache { ...@@ -780,16 +796,16 @@ public class OutInfoCache {
} }
}else{ }else{
//已经执行过的首盘和补料,如果是工单的最后一个需求单,关闭工单 //已经执行过的首盘和补料,如果是工单的最后一个需求单,关闭工单
if(outInfo.isFirstReelAction() || outInfo.isTailAction()){ // if(outInfo.isFirstReelAction() || outInfo.isTailAction()){
if(outInfo.isEndOutInfo()){ // if(outInfo.isEndOutInfo()){
log.info("需求单["+outInfo.gethSerial()+"]已执行过,且是工单的最后一个需求单,关闭工单"+outInfo.getSo()+"["+outInfo.getSoseq()+"]"); // log.info("需求单["+outInfo.gethSerial()+"]已执行过,且是工单的最后一个需求单,关闭工单"+outInfo.getSo()+"["+outInfo.getSoseq()+"]");
closeSoSeq(outInfo.getSoseq()); // closeSoSeq(outInfo.getSoseq());
}else{ // }else{
log.info("需求单["+outInfo.gethSerial()+"]已执行过,关闭需求单,不再自动缺料重发"); // log.info("需求单["+outInfo.gethSerial()+"]已执行过,关闭需求单,不再自动缺料重发");
closeHSerial(outInfo.gethSerial()); // closeHSerial(outInfo.gethSerial());
//
} // }
} // }
} }
log.info("执行需求单["+hSerial+"]出库"); log.info("执行需求单["+hSerial+"]出库");
......
...@@ -12,6 +12,23 @@ ...@@ -12,6 +12,23 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<ul class="timeline"> <ul class="timeline">
<li class="timeline-green">
<div class="timeline-time">
<span class="date">2020</span>
<span class="time">11-03</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020110309</h2>
<div class="timeline-content">
<ul>
<li>Fixed: 已完成需求单不关闭的问题</li>
</ul>
</div>
</div>
</li>
<li class="timeline-blue"> <li class="timeline-blue">
<div class="timeline-time"> <div class="timeline-time">
<span class="date">2020 </span> <span class="date">2020 </span>
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a> 2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 2020.10.30</span> <span class="right" style="color: #a3a3a3;">Version: 2020.11.03</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!