Commit 60d34fd3 sunke

流水线在横移上锁定非紧急料架位,当返回码为99时,不放上托盘

需求单出库为0时关闭
执行队列页面显示绑定数量
取消任务时增加PN需求单判断
Http请求增加URLEncode
1 个父辈 dc411eff
...@@ -18,6 +18,7 @@ import org.apache.logging.log4j.util.Strings; ...@@ -18,6 +18,7 @@ import org.apache.logging.log4j.util.Strings;
import java.io.*; import java.io.*;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
...@@ -41,7 +42,7 @@ public class HttpHelper { ...@@ -41,7 +42,7 @@ public class HttpHelper {
// return postJson(url,params,null, "http"); // return postJson(url,params,null, "http");
// } // }
public static String get(String url,HashMap<String, String> params) throws ApiException { public static String get(String url,Map<String, String> params) throws ApiException {
return get(url,params,null, "http"); return get(url,params,null, "http");
} }
...@@ -233,7 +234,7 @@ public class HttpHelper { ...@@ -233,7 +234,7 @@ public class HttpHelper {
* 请求协议 "http" / "https" * 请求协议 "http" / "https"
* @return 服务器响应的请求结果 * @return 服务器响应的请求结果
*/ */
public static String get(String url, HashMap<String, String> params, public static String get(String url, Map<String, String> params,
HashMap<String, String> cookies, String protocol) throws ApiException { HashMap<String, String> cookies, String protocol) throws ApiException {
// if (protocol.equalsIgnoreCase("https")) { // if (protocol.equalsIgnoreCase("https")) {
// Protocol httpsProtocol = new Protocol("https", new SecureProtocolSocketFactoryImpl(), 443); // Protocol httpsProtocol = new Protocol("https", new SecureProtocolSocketFactoryImpl(), 443);
...@@ -251,7 +252,9 @@ public class HttpHelper { ...@@ -251,7 +252,9 @@ public class HttpHelper {
int i = 0; int i = 0;
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entry<String, String> entry = iterator.next(); Entry<String, String> entry = iterator.next();
data[i] = new NameValuePair(entry.getKey(), entry.getValue()); String paramValue = entry.getValue();
paramValue = URLEncoder.encode(paramValue);
data[i] = new NameValuePair(entry.getKey(), paramValue);
++i; ++i;
} }
getMethod.setQueryString(data); getMethod.setQueryString(data);
......
...@@ -1159,12 +1159,6 @@ public class OutInfoCache { ...@@ -1159,12 +1159,6 @@ public class OutInfoCache {
msg = "需求单"+hSerial+"任务分配完成,共["+outReelNum+"]盘任务"; msg = "需求单"+hSerial+"任务分配完成,共["+outReelNum+"]盘任务";
log.info(msg); log.info(msg);
}else{
msg = "需求单"+outInfo.gethSerial()+"本次出库料盘数量为0";
if(outInfo.isEndOutInfo()){
log.info("需求单["+outInfo.gethSerial()+"]是工单的最后一个需求单,关闭工单"+outInfo.getSo()+"["+outInfo.getSoseq()+"]");
closeSoSeq(outInfo.getSoseq());
}
} }
if(outInfo.isReelCutAction() || outInfo.isFirstReelAction()){ if(outInfo.isReelCutAction() || outInfo.isFirstReelAction()){
...@@ -1174,6 +1168,15 @@ public class OutInfoCache { ...@@ -1174,6 +1168,15 @@ public class OutInfoCache {
QisdaApi.VMILocationOutFeedback(outItemList, lessBind); QisdaApi.VMILocationOutFeedback(outItemList, lessBind);
} }
} }
if(outReelNum == 0){
msg = "需求单"+outInfo.gethSerial()+"本次出库料盘数量为0";
if(outInfo.isEndOutInfo()){
log.info("需求单["+outInfo.gethSerial()+"]是工单的最后一个需求单,关闭工单"+outInfo.getSo()+"["+outInfo.getSoseq()+"]");
closeSoSeq(outInfo.getSoseq());
}else{
closeHSerial(outInfo.gethSerial());
}
}
return ResultBean.newOkResult(msg,"ok"); return ResultBean.newOkResult(msg,"ok");
} }
......
...@@ -65,7 +65,6 @@ public class GreeDeviceController { ...@@ -65,7 +65,6 @@ public class GreeDeviceController {
} }
} }
String hSerial = QisdaCache.getCurrentOrderHSerial(); String hSerial = QisdaCache.getCurrentOrderHSerial();
List<String> usedRfidList = InquiryShelfBean.getUsedRfidList(hSerial);
Map<String,Integer> rfidMap = new HashMap<>(); Map<String,Integer> rfidMap = new HashMap<>();
if (!Strings.isBlank(rfids)) { if (!Strings.isBlank(rfids)) {
......
...@@ -130,6 +130,8 @@ public class QisdaApiController extends BaseController { ...@@ -130,6 +130,8 @@ public class QisdaApiController extends BaseController {
OutInfo outInfo = outInfoCache.getOutInfoFromCache(hSerial); OutInfo outInfo = outInfoCache.getOutInfoFromCache(hSerial);
if(!Strings.isNullOrEmpty(line) && outInfo != null){ if(!Strings.isNullOrEmpty(line) && outInfo != null){
outInfo.setLine(line); outInfo.setLine(line);
outInfo.setSdate(new Date());
outInfo.setMdate(new Date());
outInfoCache.updateOutInfo(outInfo); outInfoCache.updateOutInfo(outInfo);
return ResultBean.newOkResult(outInfo); return ResultBean.newOkResult(outInfo);
}else{ }else{
......
...@@ -171,6 +171,8 @@ public class QisdaDeviceController extends BaseController { ...@@ -171,6 +171,8 @@ public class QisdaDeviceController extends BaseController {
try{ try{
String rfid = request.getParameter("rfid"); String rfid = request.getParameter("rfid");
//是否是在横移上判断
String onMoving = request.getParameter("onMoving");
String codeStr = request.getParameter("barcode"); String codeStr = request.getParameter("barcode");
Barcode barcode = dataCache.resolveOneValideBarcode(codeStr); Barcode barcode = dataCache.resolveOneValideBarcode(codeStr);
DataLog task = taskService.getFinishedTask(barcode.getBarcode()); DataLog task = taskService.getFinishedTask(barcode.getBarcode());
...@@ -199,9 +201,9 @@ public class QisdaDeviceController extends BaseController { ...@@ -199,9 +201,9 @@ public class QisdaDeviceController extends BaseController {
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
ShelfLoc shelfLoc = InquiryShelfBean.lockShelfLoc(task, rfid); ShelfLoc shelfLoc = InquiryShelfBean.lockShelfLoc(task, rfid);
if(shelfLoc == null){ if(shelfLoc == null){
String msg = "获取料架["+rfid+"]位置信息失败"; String msg = task.getBarcode() + "获取料架["+rfid+"]位置信息失败";
log.info(msg); //log.info(msg);
return ResultBean.newErrorResult(202, msg); return ResultBean.newErrorResult(99, msg);
} }
String rfidToSave = shelfLoc.getRealRfid(); String rfidToSave = shelfLoc.getRealRfid();
...@@ -214,8 +216,10 @@ public class QisdaDeviceController extends BaseController { ...@@ -214,8 +216,10 @@ public class QisdaDeviceController extends BaseController {
appendInfo.setRfidLoc(shelfLoc.getLoc()); appendInfo.setRfidLoc(shelfLoc.getLoc());
task.setAppendInfo(appendInfo); task.setAppendInfo(appendInfo);
task.setStatus(StorageConstants.OP_STATUS.INROBOT.name()); if(!Boolean.valueOf(onMoving)){
task.setLocInfo(""); task.setStatus(StorageConstants.OP_STATUS.INROBOT.name());
task.setLocInfo("");
}
task = dataLogDao.save(task); task = dataLogDao.save(task);
taskService.updateFinishedTask(task); taskService.updateFinishedTask(task);
......
...@@ -843,7 +843,7 @@ public class TaskService implements ITaskService { ...@@ -843,7 +843,7 @@ public class TaskService implements ITaskService {
QisdaApi.VMIMateriaRecAss(task, barcode, latest); QisdaApi.VMIMateriaRecAss(task, barcode, latest);
} }
} }
}else if(taskAppendInfo.isUrgentAction() || taskAppendInfo.isReelCutAction()){ }else if(taskAppendInfo.isUrgentAction() || taskAppendInfo.isReelCutAction() || taskAppendInfo.isPnAction()){
//紧急料或分盘料,增加任务完成数量 //紧急料或分盘料,增加任务完成数量
log.info("紧急料或分盘料["+task.getBarcode()+"]任务已出库完成,发料任务完成数量+1"); log.info("紧急料或分盘料["+task.getBarcode()+"]任务已出库完成,发料任务完成数量+1");
outInfoCache.incTaskFinishNum(taskAppendInfo.gethSerial(), 0, 0); outInfoCache.incTaskFinishNum(taskAppendInfo.gethSerial(), 0, 0);
......
...@@ -211,11 +211,11 @@ ...@@ -211,11 +211,11 @@
<%--</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}">
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<h4 class="panel-title"> <h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder">
<i class="icon-cursor-move"></i> <i class="icon-cursor-move"></i>
[首盘] 需求单: 808 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span> [首盘] 需求单: 808 工单: 879235 <span class="right">建议时间: 2019-11-18 08:59</span>
</a> </a>
</h4> </h4>
</div> </div>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<h4 class="panel-title"> <h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder">
<i class="icon-cursor-move"></i> <i class="icon-cursor-move"></i>
[首盘] 需求单: 808 工单: 879235 备料单: F001_879235N_1 <span class="right">建议时间: 2019-11-18 08:59</span> [首盘] 需求单: 808 工单: 879235 <span class="right">建议时间: 2019-11-18 08:59</span>
</a> </a>
</h4> </h4>
</div> </div>
...@@ -144,10 +144,10 @@ ...@@ -144,10 +144,10 @@
'<h4 class="panel-title">' + '<h4 class="panel-title">' +
'<a class="accordion-toggle" data-toggle="collapse" href="#'+outInfo.hSerial+'">' + '<a class="accordion-toggle" data-toggle="collapse" href="#'+outInfo.hSerial+'">' +
moveHandle + //outInfo.firstExecuteTime + moveHandle + //outInfo.firstExecuteTime +
'需求单:'+ outInfo.hSerial+' ['+outInfo.action+'] 工单: ' + outInfo.so +' 线别: ' + outInfo.line + ' 工单序号:' + outInfo.soseq + '需求单:'+ outInfo.hSerial+' ['+outInfo.action+'] 工单: ' + outInfo.so +' 线别: ' + outInfo.line + ' 绑定:' + outInfo.totalBindNum +
'<span class="right">创建时间: '+createDate+'</span>' + '<span class="right">创建时间: '+createDate+'</span>' +
'<span class="right">建议时间: '+sdate+'</span>' + '<span class="right">建议时间: '+sdate+'</span>' +
'<span class="right">必须时间: '+mdate+'</span>' + //'<span class="right">必须时间: '+mdate+'</span>' +
//'<span class="right">['+outInfo.firstExecuteTime+']</span>' + //'<span class="right">['+outInfo.firstExecuteTime+']</span>' +
'</a></h4></div>' + '</a></h4></div>' +
'<div id="'+outInfo.hSerial+'" class="panel-collapse collapse">' + '<div id="'+outInfo.hSerial+'" class="panel-collapse collapse">' +
...@@ -159,9 +159,9 @@ ...@@ -159,9 +159,9 @@
'<li><i class="fa fa-star"></i>必须出仓日期:'+mdate+'</li>' + '<li><i class="fa fa-star"></i>必须出仓日期:'+mdate+'</li>' +
'<li><i class="fa fa-star"></i>创建时间:'+createDate+'</li>' + '<li><i class="fa fa-star"></i>创建时间:'+createDate+'</li>' +
'</ul>' + '</ul>' +
'<h4 class="list-inline '+bgClass+'">' + // '<h4 class="list-inline '+bgClass+'">' +
'线体['+outInfo.line+']未解绑料架信息: '+outInfo.lineBindShelfInfo+'' + // '线体['+outInfo.line+']未解绑料架信息: '+outInfo.lineBindShelfInfo+'' +
'</h4>' + // '</h4>' +
'</div></div></div></div>'; '</div></div></div></div>';
return infoHtml; return infoHtml;
} }
...@@ -174,6 +174,9 @@ ...@@ -174,6 +174,9 @@
for(var i in data){ for(var i in data){
var outInfo = data[i]; var outInfo = data[i];
if(outInfo.line == '' || outInfo.line == null){
continue;
}
var infoHtml = getOutInfoHtml(outInfo); var infoHtml = getOutInfoHtml(outInfo);
if(outInfo.executing || outInfo.sendLess || outInfo.firstExecuteTime > 0){ if(outInfo.executing || outInfo.sendLess || outInfo.firstExecuteTime > 0){
executingHtml = executingHtml + infoHtml; executingHtml = executingHtml + infoHtml;
......
...@@ -89,6 +89,10 @@ ...@@ -89,6 +89,10 @@
<c:if test="${outInfo.endOutInfo}"> <c:if test="${outInfo.endOutInfo}">
<c:set var="endOutInfoClass" value="bg-yellow"/> <c:set var="endOutInfoClass" value="bg-yellow"/>
</c:if> </c:if>
<c:set var="closedClass" value=""/>
<c:if test="${outInfo.closed}">
<c:set var="closedClass" value="closed"/>
</c:if>
<display:column titleKey="需求单号" sortable="true" sortProperty="hSerial" media="html"> <display:column titleKey="需求单号" sortable="true" sortProperty="hSerial" media="html">
<a href="#" onclick="showDetail('${outInfo.hSerial}')">${outInfo.hSerial}</a> <a href="#" onclick="showDetail('${outInfo.hSerial}')">${outInfo.hSerial}</a>
</display:column> </display:column>
...@@ -100,11 +104,11 @@ ...@@ -100,11 +104,11 @@
<display:column titleKey="线别" sortable="true" sortProperty="line" media="html"> <display:column titleKey="线别" sortable="true" sortProperty="line" media="html">
<span id="${outInfo.hSerial}Line">${outInfo.line}</span> <span id="${outInfo.hSerial}Line">${outInfo.line}</span>
<c:if test="${outInfo.firstExecuteTime <=0}"> <c:if test="${outInfo.firstExecuteTime <=0}">
[<a href="#" onclick="changeLine('${outInfo.hSerial}')">编辑</a>] <a href="#" onclick="changeLine('${outInfo.hSerial}')">[编辑]</a>
</c:if> </c:if>
</display:column> </display:column>
<display:column titleKey="备料单号" property="refno" sortable="true" sortProperty="refno"/> <%--<display:column titleKey="备料单号" property="refno" sortable="true" sortProperty="refno"/>--%>
<display:column titleKey="建议出仓时间" sortable="true" sortProperty="sdate"> <display:column titleKey="建议出仓时间" sortable="true" sortProperty="sdate">
<fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/> <fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column> </display:column>
...@@ -116,16 +120,21 @@ ...@@ -116,16 +120,21 @@
${outInfo.taskFinishNum}/${outInfo.taskNum} ${outInfo.taskFinishNum}/${outInfo.taskNum}
</display:column> </display:column>
<display:column titleKey="绑定数量" sortable="true" sortProperty="totalBindNum"> <display:column titleKey="绑定数量" sortable="true" sortProperty="totalBindNum" class="${closedClass}">
${outInfo.totalBindNum} ${outInfo.totalBindNum}
<%--<c:if test="${!outInfo.closed}">--%>
<%--<a href="#" class="right" onclick="closeOut('${outInfo.hSerial}')" id="${outInfo.hSerial}Btn">--%>
<%--[<fmt:message key="关闭"/>]--%>
<%--</a>--%>
<%--</c:if>--%>
</display:column> </display:column>
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate"> <display:column titleKey="创建时间" sortable="true" sortProperty="createDate" >
<fmt:formatDate value="${outInfo.createDate}" pattern="yyyy-MM-dd HH:mm"/> <fmt:formatDate value="${outInfo.createDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column> </display:column>
<display:column titleKey="更新时间" sortable="true" sortProperty="updateDate"> <%--<display:column titleKey="更新时间" sortable="true" sortProperty="updateDate">--%>
<fmt:formatDate value="${outInfo.updateDate}" pattern="yyyy-MM-dd HH:mm"/> <%--<fmt:formatDate value="${outInfo.updateDate}" pattern="yyyy-MM-dd HH:mm"/>--%>
</display:column> <%--</display:column>--%>
<display:column titleKey="需求时间" sortable="true" sortProperty="taskNeedOutDate"> <display:column titleKey="需求时间" sortable="true" sortProperty="taskNeedOutDate">
<fmt:formatDate value="${outInfo.taskNeedOutDate}" pattern="yyyy-MM-dd HH:mm"/> <fmt:formatDate value="${outInfo.taskNeedOutDate}" pattern="yyyy-MM-dd HH:mm"/>
...@@ -315,6 +324,27 @@ ...@@ -315,6 +324,27 @@
}); });
} }
closeOut = function(hSerial){
Lobibox.confirm({
title: "确认",
msg: "确定要关闭并解绑需求单["+hSerial+"]吗?",
callback: function ($this, type, ev) {
if(type == 'yes'){
$.post("${ctx}/service/store/qisda/closeHSerial", {hSerial: hSerial}, function (data) {
if(data){
Lobibox.alert("success",
{
msg: data
});
var btnId = "#" +hSerial + "Btn";
$(btnId).hide();
}
});
}
}
});
}
changeLine = function (hSerial){ changeLine = function (hSerial){
$("#hSerialToModify").val(hSerial); $("#hSerialToModify").val(hSerial);
var oldLine = $("#lineToModify").text(); var oldLine = $("#lineToModify").text();
...@@ -343,6 +373,11 @@ ...@@ -343,6 +373,11 @@
}); });
}); });
$(".closed").each(function(){
var oldClass = $(this).parent().attr("class");
$(this).parents("tr").attr("class",oldClass + " font-grey");
});
}); });
</script> </script>
</c:set> </c:set>
\ No newline at end of file \ No newline at end of file
...@@ -237,9 +237,9 @@ ...@@ -237,9 +237,9 @@
<!-- BEGIN FOOTER --> <!-- BEGIN FOOTER -->
<div class="page-footer"> <div class="page-footer">
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a> 2016&copy; <a href="">SMD BOX</a>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 1.5.2118</span> <span class="right" style="color: #a3a3a3;">Version: 1.6.2910</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!