From 523c8ea7e54077cc15f7f84e9a6e7b3f1673e862 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Sat, 19 Nov 2022 14:43:51 +0800 Subject: [PATCH] AGV --- .../zzjee/md/controller/MdBinController.java | 33 ++++++++--- .../webpage/com/zzjee/md/mdbinagvlist.jsp | 56 ++++++++++++++----- 2 files changed, 69 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zzjee/md/controller/MdBinController.java b/src/main/java/com/zzjee/md/controller/MdBinController.java index 6ce52d05..0f5352e5 100644 --- a/src/main/java/com/zzjee/md/controller/MdBinController.java +++ b/src/main/java/com/zzjee/md/controller/MdBinController.java @@ -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 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); + } } /** diff --git a/src/main/webapp/webpage/com/zzjee/md/mdbinagvlist.jsp b/src/main/webapp/webpage/com/zzjee/md/mdbinagvlist.jsp index b0780008..1e2d2ba4 100644 --- a/src/main/webapp/webpage/com/zzjee/md/mdbinagvlist.jsp +++ b/src/main/webapp/webpage/com/zzjee/md/mdbinagvlist.jsp @@ -5,32 +5,46 @@
<%--
桃红色标识此储位有货,淡绿色标识此储位为空
--%>
- 仓库: - + - 开始: - + - 结束: - + - 层数: - 行数: - 列数: - - + 开始指令: + + + 中间指令: + + + 结束指令: + + + + +<%-- --%> +
@@ -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 += "
"; - messageContent += list[i].tincount+ "
"; + messageContent += list[i].binid+ "
"; // tincount = list[i].tincount + 0; // if (tincount > 0) { // messageContent += " ";