Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhangzhiqiang
2023-01-29 02:08:31 +08:00
31 changed files with 588 additions and 180 deletions

View File

@@ -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;
} }

View File

@@ -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");

View File

@@ -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() + "再次下发电气信号");
} }

View File

@@ -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;
} }

View File

@@ -45,46 +45,47 @@
########################################## ##########################################
# 3、业务主过程 # # 3、业务主过程 #
########################################## ##########################################
IF 输入.flag = "1"
PAGEQUERY IF 输入.flag = "1"
SELECT PAGEQUERY
* SELECT
FROM *
acs_instruction inst FROM
WHERE acs_instruction inst
is_delete =0 WHERE
OPTION 输入.is_over = "1" is_delete =0
inst.instruction_status >= 2 OPTION 输入.is_over = "1"
ENDOPTION inst.instruction_status >= 2
OPTION 输入.is_over <> "1" ENDOPTION
inst.instruction_status < 2 OPTION 输入.is_over <> "1"
ENDOPTION inst.instruction_status < 2
OPTION 输入.task_code <> "" ENDOPTION
( OPTION 输入.task_code <> ""
inst.instruction_code = 输入.code (
OR inst.instruction_code = 输入.code
inst.task_code = 输入.code OR
) inst.task_code = 输入.code
ENDOPTION )
OPTION 输入.status <> "" ENDOPTION
inst.instruction_status = 输入.status OPTION 输入.status <> ""
ENDOPTION inst.instruction_status = 输入.status
OPTION 输入.vehicle_code <> "" ENDOPTION
inst.vehicle_code = 输入.vehicle_code OPTION 输入.vehicle_code <> ""
ENDOPTION inst.vehicle_code = 输入.vehicle_code
OPTION 输入.material_type <> "" ENDOPTION
inst.material = 输入.material_type OPTION 输入.material_type <> ""
ENDOPTION inst.material = 输入.material_type
OPTION 输入.point_code <> "" ENDOPTION
( OPTION 输入.point_code <> ""
inst.start_point_code = 输入.point_code (
OR inst.start_point_code = 输入.point_code
inst.next_point_code = 输入.point_code OR
) inst.next_point_code = 输入.point_code
ENDOPTION )
ENDSELECT ENDOPTION
ENDPAGEQUERY ENDSELECT
ENDIF ENDPAGEQUERY
ENDIF
IF 输入.flag = "2" IF 输入.flag = "2"
PAGEQUERY PAGEQUERY

View File

@@ -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;
} }

View File

@@ -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 <> ""

View File

@@ -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({

View File

@@ -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({

View File

@@ -10,6 +10,7 @@ import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log; import org.nl.modules.logging.annotation.Log;
import org.nl.system.service.param.ISysParamService; import org.nl.system.service.param.ISysParamService;
import org.nl.system.service.param.dao.Param; import org.nl.system.service.param.dao.Param;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -33,7 +34,6 @@ import java.util.Map;
@RequestMapping("/api/param") @RequestMapping("/api/param")
@RequiredArgsConstructor @RequiredArgsConstructor
class SysParamController { class SysParamController {
private final ISysParamService paramService; private final ISysParamService paramService;
@GetMapping @GetMapping
@Log("查询系统参数") @Log("查询系统参数")

View File

@@ -821,6 +821,12 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String thickness_request = detail.getString("Attribute2");//物料主数据厚度 String thickness_request = detail.getString("Attribute2");//物料主数据厚度
String width_standard = detail.getString("Attribute3");//要求幅宽 String width_standard = detail.getString("Attribute3");//要求幅宽
//查询库内是否存在相同的子卷号
JSONObject container_jo = WQLObject.getWQLObject("PDM_BI_SubPackageRelation").query("container_name = '"+ContainerName+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(container_jo)){
throw new BadRequestException("LMS系统中已存在子卷号"+ContainerName+",请检查!");
}
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("workorder_id", IdUtil.getSnowflake(1, 1).nextId()); jo.put("workorder_id", IdUtil.getSnowflake(1, 1).nextId());
jo.put("package_box_sn", PackageBoxSN); jo.put("package_box_sn", PackageBoxSN);

View File

@@ -115,7 +115,7 @@ public class BakingServiceImpl implements BakingService {
hotParam.put("workorder_id", jsonRaw.getString("workorder_id")); hotParam.put("workorder_id", jsonRaw.getString("workorder_id"));
hotParam.put("material_id", jsonMater.getString("material_id")); hotParam.put("material_id", jsonMater.getString("material_id"));
hotParam.put("qty", jsonRaw.get("productin_qty")); hotParam.put("qty", jsonRaw.get("productin_qty"));
hotParam.put("io_type", "1"); hotParam.put("io_type", "0");
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id")); hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
hotParam.put("task_id", task_id); hotParam.put("task_id", task_id);
hotParam.put("start_point_code", point_code1); hotParam.put("start_point_code", point_code1);

View File

@@ -171,7 +171,7 @@ public class ShippingServiceImpl implements ShippingService {
throw new BadRequestException("未查询到可用的空点位!"); throw new BadRequestException("未查询到可用的空点位!");
} }
/*//如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发 //如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发
//判断输送出来的任务起点是否靠近分切机,如果靠近分切机且远离分切机的点位上存在载具且不存在任务进行载具横移 //判断输送出来的任务起点是否靠近分切机,如果靠近分切机且远离分切机的点位上存在载具且不存在任务进行载具横移
char dtl_type = empty_point.getString("point_code").charAt(empty_point.getString("point_code").length() - 1); char dtl_type = empty_point.getString("point_code").charAt(empty_point.getString("point_code").length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) { if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
@@ -179,9 +179,9 @@ public class ShippingServiceImpl implements ShippingService {
//判断是否存在任务 //判断是否存在任务
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0); JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(task_jo)){ if (ObjectUtil.isNotEmpty(task_jo)){
throw new BadRequestException("当前一截输送线存在未完成的任务,请稍等几分钟后进行下发!"); throw new BadRequestException(empty_point.getString("point_code")+"所在一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
} }
}*/ }
//下发输送线任务 //下发输送线任务
JSONObject form = new JSONObject(); JSONObject form = new JSONObject();

View File

@@ -89,7 +89,7 @@
PDM_BI_SlittingProductionPlan plan PDM_BI_SlittingProductionPlan plan
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
WHERE WHERE
plan.STATUS < 09 plan.STATUS <> '09'
AND AND
is_child_tz_ok = 0 is_child_tz_ok = 0
AND AND

View File

@@ -44,4 +44,18 @@ public class ProductInstorController {
return new ResponseEntity<>(productInstorService.confirm(whereJson),HttpStatus.OK); return new ResponseEntity<>(productInstorService.confirm(whereJson),HttpStatus.OK);
} }
@PostMapping("/mendCode")
@Log("补码")
@ApiOperation("补码")
public ResponseEntity<Object> mendCode(@RequestBody JSONObject whereJson){
return new ResponseEntity<>(productInstorService.mendCode(whereJson),HttpStatus.OK);
}
@PostMapping("/bale")
@Log("捆扎")
@ApiOperation("捆扎")
public ResponseEntity<Object> bale(@RequestBody JSONObject whereJson){
return new ResponseEntity<>(productInstorService.bale(whereJson),HttpStatus.OK);
}
} }

View File

@@ -19,4 +19,8 @@ public interface ProductInstorService {
JSONObject boxQuery(JSONObject whereJson); JSONObject boxQuery(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson); JSONObject confirm(JSONObject whereJson);
JSONObject mendCode(JSONObject whereJson);
JSONObject bale(JSONObject whereJson);
} }

View File

@@ -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();

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@@ -16,6 +17,8 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.modules.wql.util.WqlUtil; import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.pda.st.service.CoolInService; import org.nl.wms.pda.st.service.CoolInService;
import org.nl.wms.pda.st.service.ProductInstorService; import org.nl.wms.pda.st.service.ProductInstorService;
import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.AbstractAcsTask;
@@ -248,4 +251,61 @@ public class ProductInstorServiceImpl implements ProductInstorService {
jo.put("message", "确认成功!"); jo.put("message", "确认成功!");
return jo; return jo;
} }
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject mendCode(JSONObject whereJson) {
String vehicle_code = whereJson.getString("box_no");
if (ObjectUtil.isEmpty(vehicle_code)) throw new BadRequestException("木箱号不能为空");
JSONObject param = new JSONObject();
param.put("vehicle_code",vehicle_code);
param.put("type","1");
AcsToWmsServiceImpl bean = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
bean.deviceApply(param);
JSONObject jo = new JSONObject();
jo.put("message", "补码成功!");
return jo;
}
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject bale(JSONObject whereJson) {
String vehicle_code = whereJson.getString("box_no");
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("木箱码不能为空!");
}
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("点位不能为空!");
}
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(sub_jo)) {
throw new BadRequestException("未查询到该木箱对应的包装关系!");
}
String box_length = sub_jo.getString("box_length");
String box_width = sub_jo.getString("box_width");
String box_high = sub_jo.getString("box_high");
JSONArray array = new JSONArray();
JSONObject jsonLength = new JSONObject();
jsonLength.put("device_code", point_code);
jsonLength.put("code", "");
jsonLength.put("value", box_length);
array.add(jsonLength);
// 调用接口返回数据
WmsToAcsServiceImpl wmsToAcsServiceImpl = SpringContextHolder.getBean(WmsToAcsServiceImpl.class);
wmsToAcsServiceImpl.action(array);
JSONObject jo = new JSONObject();
jo.put("message", "捆扎成功!");
return jo;
}
} }

View File

@@ -71,7 +71,7 @@ public class ProductionOutServiceImpl implements ProductionOutService {
* 生产区确认 * 生产区确认
* a.解锁出库点位、清除木箱号 * a.解锁出库点位、清除木箱号
*/ */
jsonPoint.put("point_status", "00"); jsonPoint.put("point_status", "1");
jsonPoint.put("lock_type", "1"); jsonPoint.put("lock_type", "1");
jsonPoint.put("vehicle_code", ""); jsonPoint.put("vehicle_code", "");
jsonPoint.put("vehicle_type", ""); jsonPoint.put("vehicle_type", "");

View File

@@ -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

View File

@@ -186,7 +186,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
JSONObject material = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + row.get("product_name") + "'").uniqueResult(0); JSONObject material = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + row.get("product_name") + "'").uniqueResult(0);
row.put("material_id", material.getString("material_id")); row.put("material_id", material.getString("material_id"));
row.put("pcsn", row.get("container_name")); row.put("pcsn", row.get("container_name"));
row.put("bill_status", "30"); row.put("bill_status", "10");
row.put("quality_scode", "01"); row.put("quality_scode", "01");
row.put("qty_unit_id", material.getString("base_unit_id")); row.put("qty_unit_id", material.getString("base_unit_id"));
JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + material.getString("base_unit_id") + "'").uniqueResult(0); JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + material.getString("base_unit_id") + "'").uniqueResult(0);
@@ -356,7 +356,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
JSONObject material = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + row.get("product_name") + "'").uniqueResult(0); JSONObject material = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + row.get("product_name") + "'").uniqueResult(0);
row.put("material_id", material.getString("material_id")); row.put("material_id", material.getString("material_id"));
row.put("pcsn", row.get("container_name")); row.put("pcsn", row.get("container_name"));
row.put("bill_status", "30"); row.put("bill_status", "10");
row.put("quality_scode", "01"); row.put("quality_scode", "01");
row.put("qty_unit_id", material.getString("base_unit_id")); row.put("qty_unit_id", material.getString("base_unit_id"));
JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + material.getString("base_unit_id") + "'").uniqueResult(0); JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + material.getString("base_unit_id") + "'").uniqueResult(0);
@@ -472,7 +472,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
HashMap<String, String> map = rows.get(0); HashMap<String, String> map = rows.get(0);
Boolean auto_div = false; Boolean auto_div = false;
if (whereJson2.containsKey("auto_div")){ if (whereJson2.containsKey("auto_div")) {
auto_div = whereJson2.getBoolean("auto_div"); auto_div = whereJson2.getBoolean("auto_div");
} }
//判断该载具是否已经分配货位或者起点 //判断该载具是否已经分配货位或者起点
@@ -605,9 +605,8 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
i_form.put("qty_unit_name", dis_jo.getString("qty_unit_name")); i_form.put("qty_unit_name", dis_jo.getString("qty_unit_name"));
storPublicService.IOStor(i_form, "31"); storPublicService.IOStor(i_form, "31");
JSONObject dtl_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "'").uniqueResult(0);
if (StrUtil.isNotEmpty(ios_dis.getString("point_id")) || is_virtual) { if (StrUtil.isNotEmpty(ios_dis.getString("point_id")) || is_virtual) {
//更新明细表状态
JSONObject dtl_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "'").uniqueResult(0);
if (dtl_jo.getDoubleValue("unassign_qty") == 0) { if (dtl_jo.getDoubleValue("unassign_qty") == 0) {
//判断该明细下是否还存在未分配货位的分配明细 //判断该明细下是否还存在未分配货位的分配明细
JSONArray disdiv_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "' AND (struct_id = '' OR struct_id is null) AND (point_id = '' OR point_id is null)").getResultJSONArray(0); JSONArray disdiv_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinvdtl_id = '" + dis_jo.getString("iostorinvdtl_id") + "' AND (struct_id = '' OR struct_id is null) AND (point_id = '' OR point_id is null)").getResultJSONArray(0);
@@ -622,9 +621,23 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
mst_jo.put("dis_optname", nickName); mst_jo.put("dis_optname", nickName);
mst_jo.put("dis_time", now); mst_jo.put("dis_time", now);
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo); WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo);
} else {
mst_jo.put("bill_status", "30");
mst_jo.put("dis_optid", currentUserId);
mst_jo.put("dis_optname", nickName);
mst_jo.put("dis_time", now);
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo);
} }
} }
} }
} else {
dtl_jo.put("bill_status", "30");
WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(dtl_jo);
mst_jo.put("bill_status", "30");
mst_jo.put("dis_optid", currentUserId);
mst_jo.put("dis_optname", nickName);
mst_jo.put("dis_time", now);
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo);
} }
} }
//如果是虚拟区,直接更新完成分配任务 //如果是虚拟区,直接更新完成分配任务
@@ -696,9 +709,11 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'"); WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'");
//修改明细状态 //修改明细状态
JSONObject dtl_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinvdtl_id = '" + dis_rows.getJSONObject(0).getString("iostorinvdtl_id") + "'").uniqueResult(0);
HashMap<String, String> dtl_map = new HashMap<>(); HashMap<String, String> dtl_map = new HashMap<>();
map.put("bill_status", "30"); dtl_map.put("bill_status", "10");
WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'"); WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(dtl_map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'");
//更新主表状态 //更新主表状态
JSONArray dtl_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND bill_status IN ('20','30')").getResultJSONArray(0); JSONArray dtl_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND bill_status IN ('20','30')").getResultJSONArray(0);
@@ -843,10 +858,19 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
//根据分切计划查询该订单物料大概还有多少未入 //根据分切计划查询该订单物料大概还有多少未入
row_map.put("flag", "12"); row_map.put("flag", "12");
JSONArray plan_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0); JSONArray plan_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
int box_num = (int) Math.ceil(plan_rows.size() / 2); if (ObjectUtil.isEmpty(plan_rows)){
plan_rows = new JSONArray();
}
//查询该销售订单及行号有多少个生成状态的箱子
row_map.put("flag", "27");
JSONArray box_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(row_map).process().getResultJSONArray(0);
if (ObjectUtil.isEmpty(box_rows)){
box_rows = new JSONArray();
}
int box_num = (int) Math.ceil(plan_rows.size() / 2) + box_rows.size();
//查询数量与订单物料箱子数量相近的一排 //查询数量与订单物料箱子数量相近的一排
JSONObject empty_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "13").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num)").process().uniqueResult(0); JSONObject empty_row = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("sect_id", sect_id).addParam("flag", "13").addParam("sql_str", " ORDER BY abs(" + box_num + "-a.struct_num),block_num,row_num").process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(empty_row)) { if (ObjectUtil.isNotEmpty(empty_row)) {
String block_num = empty_row.getString("block_num"); String block_num = empty_row.getString("block_num");
String row_num = empty_row.getString("row_num"); String row_num = empty_row.getString("row_num");
@@ -1059,7 +1083,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
//修改明细状态 //修改明细状态
HashMap<String, String> dtl_map = new HashMap<>(); HashMap<String, String> dtl_map = new HashMap<>();
map.put("bill_status", "30"); map.put("bill_status", "10");
WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'"); WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").update(map, "iostorinv_id = '" + mst_jo.get("iostorinv_id") + "' AND box_no = '" + whereJson.get("box_no") + "'");
//更新主表状态 //更新主表状态
@@ -1077,7 +1101,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
public void reIssueTask(Map whereJson) { public void reIssueTask(Map whereJson) {
String task_id = (String) whereJson.get("task_id"); String task_id = (String) whereJson.get("task_id");
//判断指令状态,只能下发生成、执行中状态的任务 //判断指令状态,只能下发生成、执行中状态的任务
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("task_id = '"+task_id+"'").uniqueResult(0); JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("task_id = '" + task_id + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(task_jo)) { if (ObjectUtil.isEmpty(task_jo)) {
throw new BadRequestException("请输入正确的任务号!"); throw new BadRequestException("请输入正确的任务号!");
} }

View File

@@ -930,6 +930,19 @@
ENDQUERY ENDQUERY
ENDIF ENDIF
IF 输入.flag = "27"
QUERY
SELECT DISTINCT
package_box_sn
FROM
pdm_bi_subpackagerelation
WHERE
sale_order_name = 输入.sale_order_name
AND `status` = '0'
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -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);
} }
} }

View File

@@ -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,

View File

@@ -84,7 +84,7 @@
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="interface_type" label="回传类型" :formatter="formatType" :min-width="flexWidth('interface_type',crud.data,'类型')" /> <el-table-column prop="interface_type" label="回传类型" :formatter="formatType" :min-width="flexWidth('interface_type',crud.data,'回传类型')" />
<el-table-column prop="interface_name" label="接口名称" :min-width="flexWidth('interface_name',crud.data,'接口名称')"/> <el-table-column prop="interface_name" label="接口名称" :min-width="flexWidth('interface_name',crud.data,'接口名称')"/>
<el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')"/> <el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')"/>
<el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')"/> <el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')"/>

View File

@@ -425,7 +425,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="un_plan_product_property1" label="子卷的物性值1" <el-table-column prop="un_plan_product_property1" label="子卷的物性值1"
:min-width="flexWidth('un_plan_product_property1',crud.data,'子卷的物性值1')"/> :min-width="flexWidth('un_plan_product_property1',crud.data,'子卷的物性值1',-220)"/>
<el-table-column prop="un_plan_product_property2" label="子卷的物性值2" <el-table-column prop="un_plan_product_property2" label="子卷的物性值2"
:min-width="flexWidth('un_plan_product_property2',crud.data,'子卷的物性值2')"/> :min-width="flexWidth('un_plan_product_property2',crud.data,'子卷的物性值2')"/>
<el-table-column prop="un_plan_product_property3" label="子卷的物性值3" <el-table-column prop="un_plan_product_property3" label="子卷的物性值3"

View File

@@ -112,7 +112,7 @@
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip /> <el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
<el-table-column prop="task_type_name" label="任务类型" min-width="120" show-overflow-tooltip /> <el-table-column prop="task_type_name" label="任务类型" min-width="150" show-overflow-tooltip />
<el-table-column prop="task_status_name" label="任务状态" width="95px" :formatter="formatTaskStatusName" /> <el-table-column prop="task_status_name" label="任务状态" width="95px" :formatter="formatTaskStatusName" />
<el-table-column prop="point_code1" label="取货点1" width="100" show-overflow-tooltip /> <el-table-column prop="point_code1" label="取货点1" width="100" show-overflow-tooltip />
<el-table-column prop="point_code2" label="放货点1" width="100" show-overflow-tooltip /> <el-table-column prop="point_code2" label="放货点1" width="100" show-overflow-tooltip />
@@ -161,11 +161,11 @@
width="30%" width="30%"
> >
<!-- 组件--> <!-- 组件-->
<component <!--<component
:is="currentComponent" :is="currentComponent"
:task-uuid="task_id" :task-uuid="task_id"
:dialog-visible="viewDialogVisible" :dialog-visible="viewDialogVisible"
/> />-->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false"> </el-button> <el-button @click="viewDialogVisible = false"> </el-button>
<el-button type="primary" @click="viewDialogVisible = false"> </el-button> <el-button type="primary" @click="viewDialogVisible = false"> </el-button>
@@ -200,7 +200,7 @@ export default {
sort: 'task_id,desc', sort: 'task_id,desc',
crudMethod: { ...crudTask }, crudMethod: { ...crudTask },
query: { query: {
task_code: '', vehicle_code: '', start_point_code: '', next_point_code: '', task_type: '', finished_type: '', task_status: '' task_code: '', vehicle_code: '', start_point_code: '', next_point_code: '', task_type: '', finished_type: '', task_status: ['-1']
}, },
optShow: { optShow: {
add: false, add: false,
@@ -236,10 +236,14 @@ export default {
crudTask.getFinishType().then(data => { crudTask.getFinishType().then(data => {
this.finishTypeList = data this.finishTypeList = data
}) })
this.crud.query.task_status = ['-1'] // this.crud.query.task_status = ['-1']
this.crud.toQuery() // this.crud.toQuery()
}, },
methods: { methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
initClass1() { initClass1() {
const param = { const param = {
parent_class_code: 'task_type' parent_class_code: 'task_type'
@@ -263,6 +267,7 @@ export default {
// 获取子节点数据 // 获取子节点数据
loadChildNodes({ action, parentNode, callback }) { loadChildNodes({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) { if (action === LOAD_CHILDREN_OPTIONS) {
debugger
crudClassstandard.getClass({ pid: parentNode.id }).then(res => { crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) { parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) { if (obj.hasChildren) {
@@ -277,9 +282,11 @@ export default {
} }
}, },
hand(value) { hand(value) {
debugger
this.crud.toQuery() this.crud.toQuery()
}, },
handTaskStatus(value) { handTaskStatus(value) {
debugger
if (value) { if (value) {
this.query.task_status = this.task_status.toString() this.query.task_status = this.task_status.toString()
} }

View File

@@ -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

View File

@@ -216,7 +216,7 @@ export default {
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
return return
} }
if (this.dis_row.work_status !== '01') { if (this.dis_row.work_status !== '04') {
this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO)
return return
} }

View File

@@ -109,7 +109,8 @@
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" /> <el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" /> <el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" /> <el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column prop="pcsn" label="批次号" align="center" /> <el-table-column prop="pcsn" label="子卷号" width="150" align="center" />
<el-table-column prop="sap_pcsn" label="SAP批次号" width="150" align="center" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" /> <el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="qty_unit_name" label="单位" align="center" /> <el-table-column prop="qty_unit_name" label="单位" align="center" />
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" /> <el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
@@ -135,7 +136,8 @@
> >
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" /> <el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" /> <el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column prop="pcsn" label="批次号" align="center" /> <el-table-column prop="pcsn" label="子卷号" align="center" width="150"/>
<el-table-column prop="sap_pcsn" label="SAP批次号" align="center" />
<el-table-column prop="box_no" label="载具号" align="center" /> <el-table-column prop="box_no" label="载具号" align="center" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" /> <el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="next_point_code" label="起始位置" align="center" /> <el-table-column prop="next_point_code" label="起始位置" align="center" />
@@ -151,8 +153,6 @@
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
import checkoutbill from '@/views/wms/st/outbill/checkoutbill' import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor' import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
export default { export default {

View File

@@ -31,6 +31,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="物料编码">
<el-input
style="width: 220px"
v-model="query.material_code"
clearable
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="日期"> <el-form-item label="日期">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label> <label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-date-picker <el-date-picker
@@ -44,15 +54,7 @@
</el-form-item> </el-form-item>
<el-form-item label="物料编码">
<el-input
style="width: 220px"
v-model="query.material_code"
clearable
placeholder="物料编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="子卷批次"> <el-form-item label="子卷批次">
<el-input <el-input