master
erzhongxmu 2022-11-19 14:43:51 +08:00
parent 083479ab09
commit 523c8ea7e5
2 changed files with 69 additions and 20 deletions

View File

@ -305,6 +305,9 @@ public class MdBinController extends BaseController {
String type = req.getParameter("type");
String binFrom = req.getParameter("binid");
String binTo = req.getParameter("des");
String startcom = req.getParameter("startcom");
String midcom = req.getParameter("midcom");
String endcom = req.getParameter("endcom");
if ("diaodu".equals(type)) {//调度需要方式指令
// 异步发送指令
if(StringUtil.isEmpty(binFrom)){
@ -321,7 +324,7 @@ public class MdBinController extends BaseController {
executor.execute(new Runnable() {
@Override
public void run() {
runagv(binFrom, binTo);
runagv(binFrom, binTo,startcom,midcom,endcom);
}
});
} catch (Exception e) {
@ -403,7 +406,7 @@ public class MdBinController extends BaseController {
return j;
}
public void runagv(String binfrom, String binto) {
public void runagv(String binfrom, String binto, String startcom, String midcom, String endcom) {
List<MdBinEntity> mdblistfrom = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", binfrom);
@ -421,6 +424,13 @@ public class MdBinController extends BaseController {
String hxstepNum = "1";
xstepNum = Integer.toString(xStep);
ystepNum = Integer.toString(yStep);
if(!"no".equals(startcom)){
hxstepNum = "1";
System.out.println("startcom,startcom:"+startcom);
wmsPlcController.run("",startcom,hxstepNum);
}
if(y0.equals("01")){
System.out.println("1,runx:"+xstepNum);
wmsPlcController.run("","runx",xstepNum);
@ -431,11 +441,16 @@ public class MdBinController extends BaseController {
}
if(xStep>0 && yStep>0){
// if(xStep>0 && yStep>0){
// hxstepNum = "1";
// System.out.println("3,change:"+hxstepNum);
//
// wmsPlcController.run("","change",hxstepNum);
// }
if(!"no".equals(midcom)){
hxstepNum = "1";
System.out.println("3,change:"+hxstepNum);
wmsPlcController.run("","change",hxstepNum);
System.out.println("midcom,midcom:"+midcom);
wmsPlcController.run("",midcom,hxstepNum);
}
if(y0.equals("01")){
@ -446,7 +461,11 @@ public class MdBinController extends BaseController {
wmsPlcController.run("","runx",xstepNum);
}
if(!"no".equals(endcom)){
hxstepNum = "1";
System.out.println("endcom,endcom:"+endcom);
wmsPlcController.run("",endcom,hxstepNum);
}
}
/**

View File

@ -5,32 +5,46 @@
<div style="padding:0px;border:0px">
<%-- <div style="margin-left:100px"> 桃红色标识此储位有货,淡绿色标识此储位为空</div>--%>
<div name="searchColums" style="float: left; padding-left: 0px;padding-top: 5px;">
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 50px;text-align:right;"
title="仓库">仓库: </span>
<input type="text" name="cangku" value="agv" style="width: 100px; height: 30px;">
<input type="text" name="cangku" value="agv" style="width: 50px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
title="开始">开始: </span>
<input type="text" id = "chuweiid" name="chuwei" style="width: 80px; height: 30px;">
<input type="text" id = "chuweiid" name="chuwei" style="width: 55px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 55px;text-align:right;"
title="结束">结束: </span>
<input type="text" id = "desid" name="des" style="width: 80px; height: 30px;">
<input type="text" id = "desid" name="des" style="width: 55px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 30px;text-align:right;"
title="层数">层数: </span>
<input type="text" name="cengshu" value="01" style="width: 20px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 30px;text-align:right;"
title="行数">行数: </span>
<input type="text" name="hangshu" value="03" style="width: 20px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 30px;text-align:right;"
title="列数">列数: </span>
<input type="text" name="lieshu" value="03" style="width: 20px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;">
<button onclick="chaxun('zhengxiang')">查询</button> </span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
title="开始指令">开始指令: </span>
<input type="text" name="startcom" value="no" style="width: 70px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
title="中间指令">中间指令: </span>
<input type="text" name="midcom" value="no" style="width: 70px; height: 30px;">
</span>
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 75px;text-align:right;"
title="结束指令">结束指令: </span>
<input type="text" name="endcom" value="no" style="width: 70px; height: 30px;">
</span>
<%-- <span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;">--%>
<button onclick="chaxun('zhengxiang')">加载储位</button> </span>
<button onclick="chaxun('diaodu')">调度</button> </span>
</div>
@ -123,14 +137,30 @@
var cangku;
var chuwei;
var des;
var startcom;
var midcom;
var endcom;
cangku = $('input[name="cangku"]').attr("value");
chuwei = $('input[name="chuwei"]').attr("value");
var hangshu = $('input[name="hangshu"]').attr("value") * 1;
var lieshu = $('input[name="lieshu"]').attr("value") * 1;
var cengshu = $('input[name="cengshu"]').attr("value");
des = $('input[name="des"]').attr("value");
startcom = $('input[name="startcom"]').attr("value");
midcom = $('input[name="midcom"]').attr("value");
endcom = $('input[name="endcom"]').attr("value");
//加载消息
var url = "mdBinController.do?getbinallagv&binstore=" + cangku + "&binid=" + chuwei + "&des=" + des+ "&cengshu=" + cengshu+ "&hangshu=" + hangshu+ "&type=" + type;
var url = "mdBinController.do?getbinallagv&binstore=" +
cangku +
"&binid=" + chuwei +
"&des=" + des+
"&cengshu=" + cengshu+
"&hangshu=" + hangshu+
"&type=" + type+
"&startcom=" + startcom+
"&midcom=" + midcom+
"&endcom=" + endcom;
$.ajax({
url: url,
type: "GET",
@ -177,7 +207,7 @@
for (let i = 1; i < list.length; i++) {
messageContent += " <div class='all' href='javascript:void(0);' style='background:" +list[i].colour+"' id='" +list[i].binid+"' onclick='javascript:addtab(\"" + list[i].binid + "\")';return false;'>";
messageContent += list[i].tincount+ " </div> ";
messageContent += list[i].binid+ " </div> ";
// tincount = list[i].tincount + 0;
// if (tincount > 0) {
// messageContent += " <a class='a01 all' href='javascript:void(0);' onclick='javascript:addtab(\"" + list[i].des + "\")';return false;'>";