Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -55,6 +55,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ldjun
|
* @author ldjun
|
||||||
@@ -104,6 +105,13 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
param.put("opc_id", whereJson.get("opc_id"));
|
param.put("opc_id", whereJson.get("opc_id"));
|
||||||
}
|
}
|
||||||
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||||
|
JSONArray jsonArray = json.getJSONArray("content");
|
||||||
|
List<Object> objects = jsonArray.toJavaList(Object.class);
|
||||||
|
Integer currentPageNumber = page.getPageNumber() + 1;
|
||||||
|
Integer pageMaxSize = page.getPageSize();
|
||||||
|
List<Object> protocolList = objects.stream().skip((currentPageNumber - 1) * pageMaxSize).limit(pageMaxSize).collect(Collectors.toList());
|
||||||
|
json.put("content",protocolList);
|
||||||
|
json.put("totalElements",jsonArray.size());
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,12 +185,28 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
int mode = hongXiangConveyorDeviceDriver.getMode();
|
||||||
|
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||||
|
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||||
|
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||||
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||||
this.writing("to_command", "2");
|
this.writing("to_command", "2");
|
||||||
this.setNow_steps_type(3);
|
this.setNow_steps_type(3);
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 2) {
|
if (this.getNow_steps_type() == 2) {
|
||||||
feedMessage = "请检查烘箱:door=1&&action==1&&error1=0";
|
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||||
|
if (mode != 1) {
|
||||||
|
feedMessage = feedMessage + "mode未联机,";
|
||||||
|
}
|
||||||
|
if (door != 1) {
|
||||||
|
feedMessage = feedMessage + "door未开门,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "action未允许取放,";
|
||||||
|
}
|
||||||
|
if (error1 != 0) {
|
||||||
|
feedMessage = feedMessage + "error1出现故障。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -200,7 +216,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 2) {
|
if (this.getNow_steps_type() == 2) {
|
||||||
feedMessage = "请检查:mode == 3 && action == 1 && move == 0 && task > 0";
|
feedMessage = "行架机械手:";
|
||||||
|
if (mode != 3) {
|
||||||
|
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "action不为取货中状态,";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
feedMessage = feedMessage + "move不为无货状态,";
|
||||||
|
}
|
||||||
|
if (task == 0) {
|
||||||
|
feedMessage = feedMessage + "task为0。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +248,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 3) {
|
if (this.getNow_steps_type() == 3) {
|
||||||
feedMessage = "请检查:mode == 3 && action == 2 && move == 1 && task > 0";
|
feedMessage = "行架机械手:";
|
||||||
|
if (mode != 3) {
|
||||||
|
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||||
|
}
|
||||||
|
if (action != 2) {
|
||||||
|
feedMessage = feedMessage + "action不为取货完成状态,";
|
||||||
|
}
|
||||||
|
if (move != 1) {
|
||||||
|
feedMessage = feedMessage + "move不为有货状态,";
|
||||||
|
}
|
||||||
|
if (task == 0) {
|
||||||
|
feedMessage = feedMessage + "task为0。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,11 +273,27 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
//hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
if (hongXiangConveyorDeviceDriver.getMode() == 1 && hongXiangConveyorDeviceDriver.getDoor() == 1 && hongXiangConveyorDeviceDriver.getAction() == 1 && hongXiangConveyorDeviceDriver.getError1() == 0) {
|
int mode = hongXiangConveyorDeviceDriver.getMode();
|
||||||
|
int door = hongXiangConveyorDeviceDriver.getDoor();
|
||||||
|
int action = hongXiangConveyorDeviceDriver.getAction();
|
||||||
|
int error1 = hongXiangConveyorDeviceDriver.getError1();
|
||||||
|
if (mode == 1 && door == 1 && action == 1 && error1 == 0) {
|
||||||
this.writing("to_command", "4");
|
this.writing("to_command", "4");
|
||||||
this.setNow_steps_type(5);
|
this.setNow_steps_type(5);
|
||||||
} else {
|
} else {
|
||||||
feedMessage = "请检查烘箱:door=1&&action==1&&error1=0";
|
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||||
|
if (mode != 1) {
|
||||||
|
feedMessage = feedMessage + "mode未联机,";
|
||||||
|
}
|
||||||
|
if (door != 1) {
|
||||||
|
feedMessage = feedMessage + "door未开门,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "action未允许取放,";
|
||||||
|
}
|
||||||
|
if (error1 != 0) {
|
||||||
|
feedMessage = feedMessage + "error1出现故障。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.writing("to_command", "4");
|
this.writing("to_command", "4");
|
||||||
@@ -245,7 +301,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 4) {
|
if (this.getNow_steps_type() == 4) {
|
||||||
feedMessage = "请检查:mode == 3 && action == 3 && move == 1 && task > 0";
|
feedMessage = "行架机械手:";
|
||||||
|
if (mode != 3) {
|
||||||
|
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||||
|
}
|
||||||
|
if (action != 3) {
|
||||||
|
feedMessage = feedMessage + "action不为放货中状态,";
|
||||||
|
}
|
||||||
|
if (move != 1) {
|
||||||
|
feedMessage = feedMessage + "move不为有货状态,";
|
||||||
|
}
|
||||||
|
if (task == 0) {
|
||||||
|
feedMessage = feedMessage + "task为0。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +361,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 5) {
|
if (this.getNow_steps_type() == 5) {
|
||||||
feedMessage = "请检查:mode == 3 && action == 4 && move == 0 && task > 0";
|
feedMessage = "行架机械手:";
|
||||||
|
if (mode != 3) {
|
||||||
|
feedMessage = feedMessage + "mode不为运行中状态,";
|
||||||
|
}
|
||||||
|
if (action != 4) {
|
||||||
|
feedMessage = feedMessage + "action不为放货完成状态,";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
feedMessage = feedMessage + "move不为无货状态,";
|
||||||
|
}
|
||||||
|
if (task == 0) {
|
||||||
|
feedMessage = feedMessage + "task为0。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,15 +414,18 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} else {
|
} else {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
//if (!requireSucess) {
|
//if (!requireSucess) {
|
||||||
String remark = "";
|
String remark = "未查找任务原因为:";
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = remark + "mode不为2,";
|
remark = remark + "mode不是待机状态,";
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
if (move != 0) {
|
||||||
remark = remark + "move不为0,";
|
remark = remark + "move为有货状态,";
|
||||||
}
|
}
|
||||||
if (task != 0) {
|
if (task != 0) {
|
||||||
remark = remark + "task不为0,";
|
remark = remark + "task任务号不为0,";
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = remark + "请求标记requireSucess为true。";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateTaskMessage(remark);
|
||||||
//}
|
//}
|
||||||
@@ -505,7 +588,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
}
|
}
|
||||||
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){
|
if (startDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
|
|||||||
@@ -306,16 +306,32 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.setNow_steps_type3(3);
|
this.setNow_steps_type3(3);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.warn("前工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move);
|
log.warn("后工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move);
|
||||||
if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) {
|
if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) {
|
||||||
feedMessage = "请检查输送线:mode == 2 && move == 1,此时读取到mode = " + mode + "move = " + move;
|
feedMessage = "后工位未取货原因-->";
|
||||||
|
if (mode != 2) {
|
||||||
|
feedMessage += "后工位取货位工作模式不为待机(mode != 2),";
|
||||||
|
} else if (move != 1) {
|
||||||
|
feedMessage += "后工位取货位无货(move != 1)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) {
|
if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) {
|
||||||
feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0,此时读取到mode = " + mode
|
feedMessage = "后工位未取货原因-->";
|
||||||
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action2 != 1) {
|
||||||
|
feedMessage += "后工位动作信号不为取货中(action2 != 1),";
|
||||||
|
}
|
||||||
|
if (move2 != 0) {
|
||||||
|
feedMessage += "后工位光电信号不为空(move2 != 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,8 +346,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type2() == 3 || this.getNow_steps_type3() == 3) {
|
if (this.getNow_steps_type2() == 3 || this.getNow_steps_type3() == 3) {
|
||||||
feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0,此时读取到mode = " + mode
|
feedMessage = "后工位取货完成后未反馈原因-->";
|
||||||
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action2 != 2) {
|
||||||
|
feedMessage += "后工位未取货完成(action2 != 2),";
|
||||||
|
}
|
||||||
|
if (move2 == 0) {
|
||||||
|
feedMessage += "后工位光电信号为空(move2 == 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,8 +372,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type1() == 2 || this.getNow_steps_type3() == 4) {
|
if (this.getNow_steps_type1() == 2 || this.getNow_steps_type3() == 4) {
|
||||||
feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0,此时读取到mode = " + mode
|
feedMessage = "前工位未取货原因";
|
||||||
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action1 != 1) {
|
||||||
|
feedMessage += "前工位动作信号不为取货中(action2 != 1),";
|
||||||
|
}
|
||||||
|
if (move1 != 0) {
|
||||||
|
feedMessage += "前工位光电信号不为空(move2 != 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task2 == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,8 +399,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type1() == 3 || this.getNow_steps_type3() == 5) {
|
if (this.getNow_steps_type1() == 3 || this.getNow_steps_type3() == 5) {
|
||||||
feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0,此时读取到mode = " + mode
|
feedMessage = "前工位取货完成后未反馈原因";
|
||||||
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action1 != 2) {
|
||||||
|
feedMessage += "前工位未取货完成(action2 != 2),";
|
||||||
|
}
|
||||||
|
if (move1 == 0) {
|
||||||
|
feedMessage += "前工位光电信号为空(move2 == 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task2 == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,8 +426,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type2() == 4 || this.getNow_steps_type3() == 6) {
|
if (this.getNow_steps_type2() == 4 || this.getNow_steps_type3() == 6) {
|
||||||
feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0,此时读取到mode = " + mode
|
feedMessage = "后工位未放货原因-->";
|
||||||
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action2 != 3) {
|
||||||
|
feedMessage += "后工位动作信号不为放货中(action2 != 3),";
|
||||||
|
}
|
||||||
|
if (move2 == 0) {
|
||||||
|
feedMessage += "后工位光电信号为空(move2 == 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,8 +468,22 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type2() == 5) {
|
if (this.getNow_steps_type2() == 5) {
|
||||||
feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2,此时读取到 " +
|
feedMessage = "单任务后工位放货完成后未反馈原因-->";
|
||||||
"mode =" + mode + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2 + "type = " + type;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action2 != 4) {
|
||||||
|
feedMessage += "后工位未放货完成(action2 != 4),";
|
||||||
|
}
|
||||||
|
if (move2 != 0) {
|
||||||
|
feedMessage += "后工位光电信号为有货(move2 != 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0),";
|
||||||
|
}
|
||||||
|
if (type != 2) {
|
||||||
|
feedMessage += "不是后工位单任务(type != 2)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,8 +493,25 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.setNow_steps_type3(8);
|
this.setNow_steps_type3(8);
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type3() == 7) {
|
if (this.getNow_steps_type3() == 7) {
|
||||||
feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode
|
feedMessage = "双任务后工位放货完成后未反馈原因-->";
|
||||||
+ "action2 = " + action2 + "move2 = " + move2 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action2 != 4) {
|
||||||
|
feedMessage += "后工位未放货完成(action2 != 4),";
|
||||||
|
}
|
||||||
|
if (move2 != 0) {
|
||||||
|
feedMessage += "后工位光电信号为有货(move2 != 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task1 == 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0),";
|
||||||
|
}
|
||||||
|
if (type != 3) {
|
||||||
|
feedMessage += "不是双任务(type != 3)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,14 +544,30 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} else {
|
} else {
|
||||||
log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move);
|
log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move);
|
||||||
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
||||||
feedMessage = "请检查输送线:move == 1 && mode == 2,此时读取到mode = " + mode + "move = " + move;
|
feedMessage = "前工位未放货原因-->";
|
||||||
|
if (mode != 2) {
|
||||||
|
feedMessage += "前工位放货位工作模式不为待机(mode != 2),";
|
||||||
|
} else if (move == 0) {
|
||||||
|
feedMessage += "前工位放货位无货(move == 0)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) {
|
||||||
feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + "action1 = "
|
feedMessage = "前工位未放货原因-->";
|
||||||
+ action1 + "move1 = " + move1 + "task1 = " + task1;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action1 != 3) {
|
||||||
|
feedMessage += "前工位动作信号不为放货中(action1 != 3),";
|
||||||
|
}
|
||||||
|
if (move1 == 0) {
|
||||||
|
feedMessage += "前工位光电信号为空(move1 == 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task1 == 0),";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,8 +598,22 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type1() == 5) {
|
if (this.getNow_steps_type1() == 5) {
|
||||||
feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1,此时读取到 mode = " +
|
feedMessage = "单任务前工位放货完成后未反馈原因-->";
|
||||||
mode + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "type = " + type;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action1 != 4) {
|
||||||
|
feedMessage += "前工位未放货完成(action1 != 4),";
|
||||||
|
}
|
||||||
|
if (move1 != 0) {
|
||||||
|
feedMessage += "前工位光电信号为有货(move1 != 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task1 == 0),";
|
||||||
|
}
|
||||||
|
if (type != 1) {
|
||||||
|
feedMessage += "不为前工位单任务(type != 1)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,8 +644,25 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type3() == 9) {
|
if (this.getNow_steps_type3() == 9) {
|
||||||
feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode
|
feedMessage = "双任务前工位放货完成后未反馈原因-->";
|
||||||
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type;
|
if (mode != 3) {
|
||||||
|
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||||
|
}
|
||||||
|
if (action1 != 4) {
|
||||||
|
feedMessage += "前工位未放货完成(action1 != 4),";
|
||||||
|
}
|
||||||
|
if (move1 != 0) {
|
||||||
|
feedMessage += "前工位光电信号为有货(move1 != 0),";
|
||||||
|
}
|
||||||
|
if (task1 == 0) {
|
||||||
|
feedMessage += "前工位没有任务(task1 == 0),";
|
||||||
|
}
|
||||||
|
if (task2 == 0) {
|
||||||
|
feedMessage += "后工位没有任务(task2 == 0),";
|
||||||
|
}
|
||||||
|
if (type != 3) {
|
||||||
|
feedMessage += "不是双任务(type != 3)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -592,25 +730,25 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
String remark = "";
|
String remark = "";
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = remark + "mode不为2,";
|
remark = remark + "行架工作模式不为待机(mode != 2),";
|
||||||
}
|
}
|
||||||
if (move1 != 0) {
|
if (move1 != 0) {
|
||||||
remark = remark + "move1不为0,";
|
remark = remark + "前工位有货(move1 != 0),";
|
||||||
}
|
}
|
||||||
if (move2 != 0) {
|
if (move2 != 0) {
|
||||||
remark = remark + "move2不为0,";
|
remark = remark + "后工位有货(move2 != 0),";
|
||||||
}
|
}
|
||||||
if (action1 != 0) {
|
if (action1 != 0) {
|
||||||
remark = remark + "action1不为0,";
|
remark = remark + "前工位动作信号不为0(action1 != 0),";
|
||||||
}
|
}
|
||||||
if (action2 != 0) {
|
if (action2 != 0) {
|
||||||
remark = remark + "action2不为0,";
|
remark = remark + "后工位动作信号不为0(action2 != 0),";
|
||||||
}
|
}
|
||||||
if (task1 != 0) {
|
if (task1 != 0) {
|
||||||
remark = remark + "task1不为0,";
|
remark = remark + "前工位存在任务(task1 != 0),";
|
||||||
}
|
}
|
||||||
if (task2 != 0) {
|
if (task2 != 0) {
|
||||||
remark = remark + "task2不为0,";
|
remark = remark + "后工位存在任务(task2 != 0),";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateTaskMessage(remark);
|
||||||
}
|
}
|
||||||
@@ -973,24 +1111,24 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
if (StrUtil.equals(type, "1")) {
|
if (StrUtil.equals(type, "1")) {
|
||||||
Map map1 = new HashMap();
|
Map map1 = new HashMap();
|
||||||
map1.put("code","to_onset1");
|
map1.put("code", "to_onset1");
|
||||||
map1.put("value",start_addr);
|
map1.put("value", start_addr);
|
||||||
list.add(map1);
|
list.add(map1);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code","to_target1");
|
map2.put("code", "to_target1");
|
||||||
map2.put("value",next_addr);
|
map2.put("value", next_addr);
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code","to_task1");
|
map3.put("code", "to_task1");
|
||||||
map3.put("value",dto.getInstruction_code());
|
map3.put("value", dto.getInstruction_code());
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
Map map4 = new HashMap();
|
Map map4 = new HashMap();
|
||||||
map4.put("code","to_type");
|
map4.put("code", "to_type");
|
||||||
map4.put("value","1");
|
map4.put("value", "1");
|
||||||
list.add(map4);
|
list.add(map4);
|
||||||
Map map5 = new HashMap();
|
Map map5 = new HashMap();
|
||||||
map5.put("code","to_command1");
|
map5.put("code", "to_command1");
|
||||||
map5.put("value","1");
|
map5.put("value", "1");
|
||||||
list.add(map5);
|
list.add(map5);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发前工位任务");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发前工位任务");
|
||||||
@@ -1003,24 +1141,24 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.setNow_steps_type1(2);
|
this.setNow_steps_type1(2);
|
||||||
} else if (StrUtil.equals(type, "2")) {
|
} else if (StrUtil.equals(type, "2")) {
|
||||||
Map map1 = new HashMap();
|
Map map1 = new HashMap();
|
||||||
map1.put("code","to_onset2");
|
map1.put("code", "to_onset2");
|
||||||
map1.put("value",start_addr);
|
map1.put("value", start_addr);
|
||||||
list.add(map1);
|
list.add(map1);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code","to_target2");
|
map2.put("code", "to_target2");
|
||||||
map2.put("value",next_addr);
|
map2.put("value", next_addr);
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code","to_task2");
|
map3.put("code", "to_task2");
|
||||||
map3.put("value",dto.getInstruction_code());
|
map3.put("value", dto.getInstruction_code());
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
Map map4 = new HashMap();
|
Map map4 = new HashMap();
|
||||||
map4.put("code","to_type");
|
map4.put("code", "to_type");
|
||||||
map4.put("value","2");
|
map4.put("value", "2");
|
||||||
list.add(map4);
|
list.add(map4);
|
||||||
Map map5 = new HashMap();
|
Map map5 = new HashMap();
|
||||||
map5.put("code","to_command2");
|
map5.put("code", "to_command2");
|
||||||
map5.put("value","1");
|
map5.put("value", "1");
|
||||||
list.add(map5);
|
list.add(map5);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发后工位任务");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发后工位任务");
|
||||||
@@ -1041,40 +1179,40 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
|
|
||||||
Map map1 = new HashMap();
|
Map map1 = new HashMap();
|
||||||
map1.put("code","to_onset1");
|
map1.put("code", "to_onset1");
|
||||||
map1.put("value",start_addr2);
|
map1.put("value", start_addr2);
|
||||||
list.add(map1);
|
list.add(map1);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code","to_target1");
|
map2.put("code", "to_target1");
|
||||||
map2.put("value",next_addr2);
|
map2.put("value", next_addr2);
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code","to_task1");
|
map3.put("code", "to_task1");
|
||||||
map3.put("value",dto.getInstruction_code());
|
map3.put("value", dto.getInstruction_code());
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
Map map4 = new HashMap();
|
Map map4 = new HashMap();
|
||||||
map4.put("code","to_onset2");
|
map4.put("code", "to_onset2");
|
||||||
map4.put("value",start_addr);
|
map4.put("value", start_addr);
|
||||||
list.add(map4);
|
list.add(map4);
|
||||||
Map map5 = new HashMap();
|
Map map5 = new HashMap();
|
||||||
map5.put("code","to_target2");
|
map5.put("code", "to_target2");
|
||||||
map5.put("value",next_addr);
|
map5.put("value", next_addr);
|
||||||
list.add(map5);
|
list.add(map5);
|
||||||
Map map6 = new HashMap();
|
Map map6 = new HashMap();
|
||||||
map6.put("code","to_task2");
|
map6.put("code", "to_task2");
|
||||||
map6.put("value",dto.getInstruction_code());
|
map6.put("value", dto.getInstruction_code());
|
||||||
list.add(map6);
|
list.add(map6);
|
||||||
Map map7 = new HashMap();
|
Map map7 = new HashMap();
|
||||||
map7.put("code","to_type");
|
map7.put("code", "to_type");
|
||||||
map7.put("value","3");
|
map7.put("value", "3");
|
||||||
list.add(map7);
|
list.add(map7);
|
||||||
Map map8 = new HashMap();
|
Map map8 = new HashMap();
|
||||||
map8.put("code","to_command1");
|
map8.put("code", "to_command1");
|
||||||
map8.put("value","1");
|
map8.put("value", "1");
|
||||||
list.add(map8);
|
list.add(map8);
|
||||||
Map map9 = new HashMap();
|
Map map9 = new HashMap();
|
||||||
map9.put("code","to_command2");
|
map9.put("code", "to_command2");
|
||||||
map9.put("value","1");
|
map9.put("value", "1");
|
||||||
list.add(map9);
|
list.add(map9);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发双工位任务");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发双工位任务");
|
||||||
@@ -1092,7 +1230,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
this.setNow_steps_type3(2);
|
this.setNow_steps_type3(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(task1 != Integer.parseInt(dto.getInstruction_code()) || task2 != Integer.parseInt(dto.getInstruction_code()) ){
|
if (task1 != Integer.parseInt(dto.getInstruction_code()) || task2 != Integer.parseInt(dto.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "再次下发电气信号");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "再次下发电气信号");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ldjun
|
* @author ldjun
|
||||||
@@ -122,8 +123,14 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
map.put("is_over", is_over);
|
map.put("is_over", is_over);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Integer currentPageNumber = page.getPageNumber() + 1;
|
||||||
|
Integer pageMaxSize = page.getPageSize();
|
||||||
final JSONObject jo = WQL.getWO("QINST_QUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
|
final JSONObject jo = WQL.getWO("QINST_QUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
|
||||||
|
JSONArray jsonArray = jo.getJSONArray("content");
|
||||||
|
List<Instruction> instructions = jsonArray.toJavaList(Instruction.class);
|
||||||
|
List<Instruction> instDtoList = instructions.stream().skip((currentPageNumber - 1) * pageMaxSize).limit(pageMaxSize).collect(Collectors.toList());
|
||||||
|
jo.put("content",instDtoList);
|
||||||
|
jo.put("totalElements",jsonArray.size());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
##########################################
|
##########################################
|
||||||
# 3、业务主过程 #
|
# 3、业务主过程 #
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ import java.io.IOException;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ldjun
|
* @author ldjun
|
||||||
@@ -175,8 +176,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
}
|
}
|
||||||
taskList.add(task);
|
taskList.add(task);
|
||||||
}
|
}
|
||||||
|
Integer currentPageNumber = page.getPageNumber() + 1;
|
||||||
|
Integer pageMaxSize = page.getPageSize();
|
||||||
|
List<TaskDto> taskDtoList = taskList.stream().skip((currentPageNumber - 1) * pageMaxSize).limit(pageMaxSize).collect(Collectors.toList());
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("content", taskList);
|
jo.put("content", taskDtoList);
|
||||||
jo.put("totalElements", taskList.size());
|
jo.put("totalElements", taskList.size());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,16 +95,16 @@ IF 输入.flag = "2"
|
|||||||
task.task_status = 输入.status
|
task.task_status = 输入.status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.vehicle_code <> ""
|
OPTION 输入.vehicle_code <> ""
|
||||||
task.vehicle_code = 输入.vehicle_code
|
task.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' )
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.material_type <> ""
|
OPTION 输入.material_type <> ""
|
||||||
task.material = 输入.material_type
|
task.material = 输入.material_type
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.point_code <> ""
|
OPTION 输入.point_code <> ""
|
||||||
(
|
(
|
||||||
task.start_point_code = 输入.point_code
|
task.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
OR
|
OR
|
||||||
task.next_point_code = 输入.point_code
|
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
|
||||||
)
|
)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.create_time <> ""
|
OPTION 输入.create_time <> ""
|
||||||
|
|||||||
@@ -113,6 +113,8 @@
|
|||||||
<el-table-column prop="opc_code" label="OpcServer" />
|
<el-table-column prop="opc_code" label="OpcServer" />
|
||||||
<el-table-column prop="plc_code" label="OpcPlc" />
|
<el-table-column prop="plc_code" label="OpcPlc" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -125,10 +127,11 @@ import { get } from '@/api/system/dictDetail'
|
|||||||
import { selectOpcList } from '@/api/acs/device/opc'
|
import { selectOpcList } from '@/api/acs/device/opc'
|
||||||
import { download } from '@/api/data'
|
import { download } from '@/api/data'
|
||||||
import { downloadFile } from '@/utils'
|
import { downloadFile } from '@/utils'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Protocol',
|
name: 'Protocol',
|
||||||
components: { crudOperation, rrOperation },
|
components: { crudOperation, rrOperation, pagination },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
<el-table-column v-if="false" prop="instruction_id" label="指令标识" />
|
<el-table-column v-if="false" prop="instruction_id" label="指令标识" />
|
||||||
<el-table-column prop="instruction_code" label="指令编号" />
|
<el-table-column prop="instruction_code" label="指令编号" />
|
||||||
<el-table-column prop="instruction_type" label="指令类型" />
|
<el-table-column prop="instruction_type" label="指令类型" />
|
||||||
<!-- <el-table-column prop="link_num" label="关联编号" />-->
|
<!-- <el-table-column prop="link_num" label="关联编号" />-->
|
||||||
<el-table-column prop="task_code" label="任务号" />
|
<el-table-column prop="task_code" label="任务号" />
|
||||||
<el-table-column prop="vehicle_code" label="载具号" />
|
<el-table-column prop="vehicle_code" label="载具号" />
|
||||||
<el-table-column prop="instruction_status" label="指令状态">
|
<el-table-column prop="instruction_status" label="指令状态">
|
||||||
@@ -133,13 +133,13 @@
|
|||||||
<el-table-column prop="start_point_code2" label="取货点2" />
|
<el-table-column prop="start_point_code2" label="取货点2" />
|
||||||
<el-table-column prop="next_point_code2" label="放货点2" />
|
<el-table-column prop="next_point_code2" label="放货点2" />
|
||||||
<el-table-column prop="carno" label="车号" />
|
<el-table-column prop="carno" label="车号" />
|
||||||
<!-- <el-table-column prop="compound_inst" label="复合指令">-->
|
<!-- <el-table-column prop="compound_inst" label="复合指令">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- <span v-if="scope.row.compound_inst==='0' ">否</span>-->
|
<!-- <span v-if="scope.row.compound_inst==='0' ">否</span>-->
|
||||||
<!-- <span v-if="scope.row.compound_inst==='1' ">是</span>-->
|
<!-- <span v-if="scope.row.compound_inst==='1' ">是</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<!-- <el-table-column prop="compound_inst_data" width="200" label="复合路线" />-->
|
<!-- <el-table-column prop="compound_inst_data" width="200" label="复合路线" />-->
|
||||||
<el-table-column prop="matarial" label="物料" />
|
<el-table-column prop="matarial" label="物料" />
|
||||||
<el-table-column prop="quantity" label="数量" />
|
<el-table-column prop="quantity" label="数量" />
|
||||||
<el-table-column prop="remark" label="描述" />
|
<el-table-column prop="remark" label="描述" />
|
||||||
@@ -169,6 +169,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -178,6 +179,7 @@ import crudInstruction from '@/api/acs/instruction/instruction'
|
|||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import { getDicts } from '@/api/system/dict'
|
import { getDicts } from '@/api/system/dict'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
instruction_id: null,
|
instruction_id: null,
|
||||||
@@ -218,7 +220,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
dicts: ['task_status'],
|
dicts: ['task_status'],
|
||||||
name: 'Instruction',
|
name: 'Instruction',
|
||||||
components: { crudOperation },
|
components: { crudOperation, pagination },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
|
|||||||
@@ -55,9 +55,13 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
||||||
|
String box_no = whereJson.getString("box_no");
|
||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "2");
|
map.put("flag", "2");
|
||||||
map.put("check_code", whereJson.getString("check_code"));
|
map.put("check_code", whereJson.getString("check_code"));
|
||||||
|
if (ObjectUtil.isNotEmpty(box_no)) map.put("storagevehicle_code","%"+box_no+"%");
|
||||||
|
|
||||||
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|||||||
@@ -116,8 +116,8 @@
|
|||||||
dtl.storagevehicle_code,
|
dtl.storagevehicle_code,
|
||||||
mater.material_code,
|
mater.material_code,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
ROUND(dtl.base_qty) AS base_qty,
|
ROUND(dtl.base_qty,3) AS net_qty,
|
||||||
ROUND(dtl.fac_qty) AS fac_qty,
|
ROUND(dtl.fac_qty,3) AS fac_qty,
|
||||||
dtl.qty_unit_name,
|
dtl.qty_unit_name,
|
||||||
(
|
(
|
||||||
CASE
|
CASE
|
||||||
@@ -142,6 +142,10 @@
|
|||||||
dtl.check_code = 输入.check_code
|
dtl.check_code = 输入.check_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.storagevehicle_code <> ""
|
||||||
|
dtl.storagevehicle_code like 输入.storagevehicle_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -186,3 +190,20 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "4"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
SUM(net_weight) AS net_weight
|
||||||
|
FROM
|
||||||
|
pdm_bi_subpackagerelation
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
|
||||||
|
OPTION 输入.storagevehicle_code <> ""
|
||||||
|
package_box_sn = 输入.storagevehicle_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -187,6 +187,9 @@ public class CheckServiceImpl implements CheckService {
|
|||||||
jsonDtl.put("qty_unit_id", json.getLongValue("measure_unit_id"));
|
jsonDtl.put("qty_unit_id", json.getLongValue("measure_unit_id"));
|
||||||
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));
|
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));
|
||||||
jsonDtl.put("status", "1");
|
jsonDtl.put("status", "1");
|
||||||
|
|
||||||
|
JSONObject jsonSub = WQL.getWO("PDA_CHECK").addParam("flag", "4").addParam("storagevehicle_code", json.getString("storagevehicle_code")).process().uniqueResult(0);
|
||||||
|
jsonDtl.put("base_qty", jsonSub.getDoubleValue("net_weight"));
|
||||||
dtlTab.insert(jsonDtl);
|
dtlTab.insert(jsonDtl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,6 +289,9 @@ public class CheckServiceImpl implements CheckService {
|
|||||||
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));
|
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));
|
||||||
jsonDtl.put("status", "1");
|
jsonDtl.put("status", "1");
|
||||||
jsonDtl.put("fac_qty", json.getDoubleValue("fac_qty"));
|
jsonDtl.put("fac_qty", json.getDoubleValue("fac_qty"));
|
||||||
|
|
||||||
|
JSONObject jsonSub = WQL.getWO("PDA_CHECK").addParam("flag", "4").addParam("storagevehicle_code", json.getString("storagevehicle_code")).process().uniqueResult(0);
|
||||||
|
jsonDtl.put("base_qty", jsonSub.getDoubleValue("net_weight"));
|
||||||
dtlTab.insert(jsonDtl);
|
dtlTab.insert(jsonDtl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,7 +341,7 @@
|
|||||||
CheckDtl.storagevehicle_id,
|
CheckDtl.storagevehicle_id,
|
||||||
CheckDtl.storagevehicle_code,
|
CheckDtl.storagevehicle_code,
|
||||||
CheckDtl.material_id,
|
CheckDtl.material_id,
|
||||||
CheckDtl.base_qty,
|
ROUND(CheckDtl.base_qty,3) AS base_qty,
|
||||||
CheckDtl.qty_unit_id,
|
CheckDtl.qty_unit_id,
|
||||||
CheckDtl.qty_unit_name,
|
CheckDtl.qty_unit_name,
|
||||||
CheckDtl.STATUS,
|
CheckDtl.STATUS,
|
||||||
|
|||||||
@@ -108,6 +108,7 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center" />
|
||||||
<el-table-column prop="material_name" show-overflow-tooltip label="物料名称" align="center" width="170px" />
|
<el-table-column prop="material_name" show-overflow-tooltip label="物料名称" align="center" width="170px" />
|
||||||
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" width="110px" />
|
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" width="110px" />
|
||||||
|
<el-table-column prop="base_qty" label="净重" align="center" width="110px" />
|
||||||
<el-table-column show-overflow-tooltip prop="check_result" label="是否异常" align="center" width="210px">
|
<el-table-column show-overflow-tooltip prop="check_result" label="是否异常" align="center" width="210px">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-select
|
<el-select
|
||||||
|
|||||||
Reference in New Issue
Block a user