Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -219,7 +219,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public boolean exe_error() {
|
public boolean exe_error() {
|
||||||
if (this.error == 0) {
|
if (this.error == 0) {
|
||||||
return true;
|
return true;
|
||||||
@@ -242,6 +241,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
protected void thingToNothing() throws Exception {
|
protected void thingToNothing() throws Exception {
|
||||||
this.setRequireSucess(false);
|
this.setRequireSucess(false);
|
||||||
this.setApplySucess(false);
|
this.setApplySucess(false);
|
||||||
|
this.writing("to_command", "0");
|
||||||
|
this.writing("to_target", "0");
|
||||||
|
this.writing("to_container_type", "0");
|
||||||
|
this.writing("to_task", "0");
|
||||||
|
this.writing("to_strap_times", "0");
|
||||||
|
this.writing("to_length", "0");
|
||||||
|
this.writing("to_weight", "0");
|
||||||
|
this.writing("to_height", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +339,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求指令
|
* 请求指令
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public synchronized boolean instruction_require() throws Exception {
|
public synchronized boolean instruction_require() throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|||||||
@@ -284,14 +284,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//双任务/单任务 后工位取空时判断动作信号,并反馈
|
//双任务/单任务 后工位取空时判断动作信号,并反馈
|
||||||
if (mode == 3 && action2 == 1 && move2 == 0 && task2 > 0) {
|
if (mode == 3 && action2 == 1 && move2 == 0 && task2 > 0) {
|
||||||
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2));
|
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2));
|
||||||
String start_device_code = "";
|
String start_device_code = inst1.getStart_device_code();
|
||||||
if (type == 2) {
|
|
||||||
start_device_code = inst1.getStart_device_code();
|
|
||||||
}
|
|
||||||
if (type == 3) {
|
|
||||||
start_device_code = inst1.getStart_device_code2();
|
|
||||||
}
|
|
||||||
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||||
|
if (ObjectUtil.isEmpty(startDevice)) {
|
||||||
|
feedMessage = "后工位取货位:" + start_device_code + "为空!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||||
if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver();
|
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||||
@@ -307,13 +305,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} 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";
|
feedMessage = "请检查输送线:mode == 2 && move == 1,此时读取到mode = " + mode + "move = " + move;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} 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";
|
feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0,此时读取到mode = " + mode
|
||||||
|
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +327,8 @@ 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";
|
feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0,此时读取到mode = " + mode
|
||||||
|
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +342,8 @@ 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";
|
feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0,此时读取到mode = " + mode
|
||||||
|
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +358,8 @@ 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";
|
feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0,此时读取到mode = " + mode
|
||||||
|
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,7 +374,8 @@ 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";
|
feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0,此时读取到mode = " + mode
|
||||||
|
+ "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +405,8 @@ 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 == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2,此时读取到 " +
|
||||||
|
"mode =" + mode + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2 + "type = " + type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,21 +416,31 @@ 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";
|
feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode
|
||||||
|
+ "action2 = " + action2 + "move2 = " + move2 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//单任务/双任务 前工位放货时判断放货位光电信号
|
//单任务/双任务 前工位放货时判断放货位光电信号
|
||||||
if (mode == 3 && action1 == 3 && move1 == 1 && task1 > 0) {
|
if (mode == 3 && action1 == 3 && move1 == 1 && task1 > 0) {
|
||||||
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1));
|
Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1));
|
||||||
String next_device_code = inst1.getNext_device_code();
|
String next_device_code = "";
|
||||||
|
if (type == 1) {
|
||||||
|
next_device_code = inst1.getNext_device_code();
|
||||||
|
} else if (type == 3) {
|
||||||
|
next_device_code = inst1.getNext_device_code2();
|
||||||
|
}
|
||||||
Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code);
|
Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code);
|
||||||
|
if (ObjectUtil.isEmpty(nextDevice)) {
|
||||||
|
feedMessage = "前工位放货位:" + next_device_code + "为空!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||||
if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
int move = siemensConveyorDeviceDriver.getMove();
|
int move = siemensConveyorDeviceDriver.getMove();
|
||||||
int mode = siemensConveyorDeviceDriver.getMode();
|
int mode = siemensConveyorDeviceDriver.getMode();
|
||||||
if (move == 0 && mode == 2) {
|
if (move == 1 && mode == 2) {
|
||||||
this.writing("to_command1", "4");
|
this.writing("to_command1", "4");
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
this.setNow_steps_type1(5);
|
this.setNow_steps_type1(5);
|
||||||
@@ -436,13 +450,14 @@ 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 == 0 && mode == 2";
|
feedMessage = "请检查输送线:move == 1 && mode == 2,此时读取到mode = " + mode + "move = " + move;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} 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";
|
feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + "action1 = "
|
||||||
|
+ action1 + "move1 = " + move1 + "task1 = " + task1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,7 +488,8 @@ 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";
|
feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1,此时读取到 mode = " +
|
||||||
|
mode + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "type = " + type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,7 +520,8 @@ 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";
|
feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode
|
||||||
|
+ "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,9 +862,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code);
|
Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code);
|
||||||
Device startDevice2 = deviceAppservice.findDeviceByCode(start_device_code2);
|
Device startDevice2 = deviceAppservice.findDeviceByCode(start_device_code2);
|
||||||
Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2);
|
Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2);
|
||||||
|
logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" +
|
||||||
|
"执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + ",任务信息为:" + taskDto.toString());
|
||||||
//如果指令表中的取货点1和取货点2 都不为空 则说明时下双工位任务
|
//如果指令表中的取货点1和取货点2 都不为空 则说明时下双工位任务
|
||||||
if (StrUtil.isNotEmpty(start_device_code2) && StrUtil.isNotEmpty(start_device_code)) {
|
if (StrUtil.isNotEmpty(start_device_code2) && StrUtil.isNotEmpty(start_device_code)) {
|
||||||
type = "3";
|
type = "3";
|
||||||
|
logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" +
|
||||||
|
"执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 +
|
||||||
|
"type值为:" + type + ",任务信息为:" + taskDto.toString());
|
||||||
//判断四个点位是否都设置电气值
|
//判断四个点位是否都设置电气值
|
||||||
this.isSetAddress(startDevice);
|
this.isSetAddress(startDevice);
|
||||||
this.isSetAddress(nextDevice);
|
this.isSetAddress(nextDevice);
|
||||||
@@ -862,6 +884,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
} else if (backGetIndex != -1) {
|
} else if (backGetIndex != -1) {
|
||||||
type = "2"; //后工位
|
type = "2"; //后工位
|
||||||
}
|
}
|
||||||
|
logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" +
|
||||||
|
"执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2
|
||||||
|
+ "type值为:" + type + ",任务信息为:" + taskDto.toString());
|
||||||
//判断单任务下的两个点位是否都设置电气值
|
//判断单任务下的两个点位是否都设置电气值
|
||||||
this.isSetAddress(startDevice);
|
this.isSetAddress(startDevice);
|
||||||
this.isSetAddress(nextDevice);
|
this.isSetAddress(nextDevice);
|
||||||
@@ -905,6 +930,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
instdto.setNext_point_code2(next_point_code2);
|
instdto.setNext_point_code2(next_point_code2);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" +
|
||||||
|
"执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2
|
||||||
|
+ "type值为:" + type + ",创建指令信息为:" + instdto.toString());
|
||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
flag = true;
|
flag = true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -927,6 +955,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
//下发电气信号
|
//下发电气信号
|
||||||
public synchronized void sendSignalType(Instruction dto, String type) {
|
public synchronized void sendSignalType(Instruction dto, String type) {
|
||||||
|
logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "开始下发电气信号,即下发电气指令信息为:"
|
||||||
|
+ dto.toString() + ",type = " + type);
|
||||||
String start_device_code = dto.getStart_device_code();
|
String start_device_code = dto.getStart_device_code();
|
||||||
String next_device_code = dto.getNext_device_code();
|
String next_device_code = dto.getNext_device_code();
|
||||||
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
Device startDevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
|
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
||||||
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
||||||
hongXiangStationDeviceDriver.writing(code,value);
|
hongXiangStationDeviceDriver.writing(code, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.setStatus(200);
|
response.setStatus(200);
|
||||||
@@ -200,8 +200,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("mode", hongXiangStationDeviceDriver.getMode());
|
jo.put("mode", hongXiangStationDeviceDriver.getMode());
|
||||||
jo.put("move", hongXiangStationDeviceDriver.getMove());
|
jo.put("move", hongXiangStationDeviceDriver.getMove());
|
||||||
|
|
||||||
}
|
} else if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
else if(device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){
|
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
jo.put("device_code", parent_device_code);
|
jo.put("device_code", parent_device_code);
|
||||||
jo.put("mode", hongXiangConveyorDeviceDriver.getMode());
|
jo.put("mode", hongXiangConveyorDeviceDriver.getMode());
|
||||||
@@ -214,8 +213,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
|
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
|
||||||
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
|
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
|
||||||
jo.put("error", hongXiangConveyorDeviceDriver.getError());
|
jo.put("error", hongXiangConveyorDeviceDriver.getError());
|
||||||
}
|
} else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
||||||
else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
|
||||||
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
||||||
jo.put("device_code", parent_device_code);
|
jo.put("device_code", parent_device_code);
|
||||||
jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove());
|
jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove());
|
||||||
@@ -299,9 +297,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
String storage_task_type = request.getDtl_type();
|
String storage_task_type = request.getDtl_type();
|
||||||
String agv_system_type = request.getAgv_system_type();
|
String agv_system_type = request.getAgv_system_type();
|
||||||
String remark = request.getRemark();
|
String remark = request.getRemark();
|
||||||
double oven_time = Double.parseDouble(request.getOven_time());
|
double oven_time = 0.00d;
|
||||||
|
if (StrUtil.isNotEmpty(request.getOven_time())) {
|
||||||
|
oven_time = Double.parseDouble(request.getOven_time());
|
||||||
|
}
|
||||||
String temperature = request.getTemperature();
|
String temperature = request.getTemperature();
|
||||||
Map<String,String> params = request.getParams();
|
Map<String, String> params = request.getParams();
|
||||||
|
|
||||||
String start_point_code = "";
|
String start_point_code = "";
|
||||||
String start_point_code2 = "";
|
String start_point_code2 = "";
|
||||||
@@ -339,7 +340,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
if (!ObjectUtil.isEmpty(put_device_json)) {
|
if (!ObjectUtil.isEmpty(put_device_json)) {
|
||||||
put_point_code = (String) put_device_json.get("parent_storage_code") == null ? put_device_code : (String) next_device_json.get("storage_code");
|
put_point_code = (String) put_device_json.get("parent_storage_code") == null ? put_device_code : (String) next_device_json.get("storage_code");
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) {
|
if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) {
|
||||||
String str[] = start_point_code.split("-");
|
String str[] = start_point_code.split("-");
|
||||||
start_device_code = str[0];
|
start_device_code = str[0];
|
||||||
} else {
|
} else {
|
||||||
@@ -353,21 +354,21 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
next_device_code = next_point_code;
|
next_device_code = next_point_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) {
|
if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) {
|
||||||
String str[] = start_point_code2.split("-");
|
String str[] = start_point_code2.split("-");
|
||||||
start_device_code2 = str[0];
|
start_device_code2 = str[0];
|
||||||
} else {
|
} else {
|
||||||
start_device_code2 = start_point_code2;
|
start_device_code2 = start_point_code2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) {
|
if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) {
|
||||||
String str[] = next_point_code2.split("-");
|
String str[] = next_point_code2.split("-");
|
||||||
next_device_code2 = str[0];
|
next_device_code2 = str[0];
|
||||||
} else {
|
} else {
|
||||||
next_device_code2 = next_point_code2;
|
next_device_code2 = next_point_code2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) {
|
if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) {
|
||||||
String str[] = put_point_code.split("-");
|
String str[] = put_point_code.split("-");
|
||||||
put_device_code = str[0];
|
put_device_code = str[0];
|
||||||
} else {
|
} else {
|
||||||
@@ -393,7 +394,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_code", task_code);
|
json.put("task_code", task_code);
|
||||||
json.put("ext_task_id", ext_task_id);
|
json.put("ext_task_id", ext_task_id);
|
||||||
json.put("message", request.getStart_device_code() +" 该设备号未找到对应点位");
|
json.put("message", request.getStart_device_code() + " 该设备号未找到对应点位");
|
||||||
errArr.add(json);
|
errArr.add(json);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -401,7 +402,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_code", task_code);
|
json.put("task_code", task_code);
|
||||||
json.put("ext_task_id", ext_task_id);
|
json.put("ext_task_id", ext_task_id);
|
||||||
json.put("message", request.getNext_device_code() +" 该设备号未找到对应点位");
|
json.put("message", request.getNext_device_code() + " 该设备号未找到对应点位");
|
||||||
errArr.add(json);
|
errArr.add(json);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -438,7 +439,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
||||||
try {
|
try {
|
||||||
// task_type=7 则是立库任务需要下刻下发
|
// task_type=7 则是立库任务需要下刻下发
|
||||||
if(StrUtil.equals(task_dto.getTask_type(),"7")){
|
if (StrUtil.equals(task_dto.getTask_type(), "7")) {
|
||||||
taskService.create(task_dto);
|
taskService.create(task_dto);
|
||||||
} else {
|
} else {
|
||||||
taskService.create(task_dto);
|
taskService.create(task_dto);
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public class StructivtServiceImpl implements StructivtService {
|
|||||||
String package_box_sn = MapUtil.getStr(whereJson, "package_box_sn");
|
String package_box_sn = MapUtil.getStr(whereJson, "package_box_sn");
|
||||||
String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name");
|
String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name");
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "2");
|
||||||
map.put("stor_id", stor_id);
|
map.put("stor_id", stor_id);
|
||||||
if (StrUtil.isNotEmpty(material)) {
|
if (StrUtil.isNotEmpty(material)) {
|
||||||
map.put("material", "%" + material + "%");
|
map.put("material", "%" + material + "%");
|
||||||
@@ -217,21 +217,36 @@ public class StructivtServiceImpl implements StructivtService {
|
|||||||
JSONObject json = resultJSONArray.getJSONObject(i);
|
JSONObject json = resultJSONArray.getJSONObject(i);
|
||||||
Map<String, Object> mp = new LinkedHashMap<>();
|
Map<String, Object> mp = new LinkedHashMap<>();
|
||||||
|
|
||||||
mp.put("仓位编码", json.getString("struct_code"));
|
|
||||||
mp.put("仓位名称", json.getString("struct_name"));
|
|
||||||
mp.put("仓库", json.getString("stor_name"));
|
mp.put("仓库", json.getString("stor_name"));
|
||||||
mp.put("库区", json.getString("sect_name"));
|
mp.put("库区", json.getString("sect_name"));
|
||||||
|
mp.put("仓位编码", json.getString("struct_code"));
|
||||||
|
mp.put("仓位名称", json.getString("struct_name"));
|
||||||
|
mp.put("木箱码", json.getString("package_box_sn"));
|
||||||
mp.put("物料编码", json.getString("material_code"));
|
mp.put("物料编码", json.getString("material_code"));
|
||||||
mp.put("物料名称", json.getString("material_name"));
|
mp.put("物料名称", json.getString("material_name"));
|
||||||
mp.put("木箱码", json.getString("package_box_sn"));
|
|
||||||
mp.put("子卷号", json.getString("pcsn"));
|
mp.put("子卷号", json.getString("pcsn"));
|
||||||
mp.put("sap批次", json.getString("sap_pcsn"));
|
mp.put("sap批次", json.getString("sap_pcsn"));
|
||||||
mp.put("可用数", json.getString("canuse_qty"));
|
mp.put("重量", json.getString("canuse_qty"));
|
||||||
mp.put("冻结数", json.getString("frozen_qty"));
|
mp.put("单位", json.getString("unit_name"));
|
||||||
mp.put("库存数", json.getString("ivt_qty"));
|
mp.put("客户编码", json.getString("customer_name"));
|
||||||
mp.put("待入数", json.getString("warehousing_qty"));
|
mp.put("客户名称", json.getString("customer_description"));
|
||||||
mp.put("计量单位", json.getString("unit_name"));
|
mp.put("销售订单", json.getString("sale_order_name"));
|
||||||
mp.put("入库时间", json.getString("instorage_time"));
|
mp.put("入库日期", json.getString("instorage_time"));
|
||||||
|
mp.put("生产日期", json.getString("date_of_production"));
|
||||||
|
mp.put("产品规格(幅宽)", json.getString("width"));
|
||||||
|
mp.put("产品厚度", json.getString("thickness"));
|
||||||
|
mp.put("单位面积重量", json.getString("mass_per_unit_area"));
|
||||||
|
mp.put("净重", json.getString("net_weight"));
|
||||||
|
mp.put("长度", json.getString("length"));
|
||||||
|
mp.put("计划外分切的子卷", json.getString("is_un_plan_production"));
|
||||||
|
mp.put("子卷的物性值1", json.getString("un_plan_product_property1"));
|
||||||
|
mp.put("子卷的物性值2", json.getString("un_plan_product_property2"));
|
||||||
|
mp.put("子卷的物性值3", json.getString("un_plan_product_property3"));
|
||||||
|
mp.put("备注", json.getString("remark"));
|
||||||
|
mp.put("是否需要重打外包装标签", json.getString("isreprintpackageboxlabel"));
|
||||||
|
mp.put("是否需要拆包重打子卷标签", json.getString("isunpackbox"));
|
||||||
|
mp.put("客户要求规格幅宽", json.getString("width_standard"));
|
||||||
|
mp.put("物料标准厚度", json.getString("thickness_request"));
|
||||||
list.add(mp);
|
list.add(mp);
|
||||||
}
|
}
|
||||||
FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|||||||
@@ -107,5 +107,84 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
ivt.*,
|
||||||
|
attr.sect_id,
|
||||||
|
attr.sect_code,
|
||||||
|
attr.sect_name,
|
||||||
|
attr.stor_name,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name,
|
||||||
|
unit.unit_name,
|
||||||
|
region.region_name,
|
||||||
|
sub.sap_pcsn,
|
||||||
|
sub.package_box_sn,
|
||||||
|
sub.sale_order_name,
|
||||||
|
sub.customer_name,
|
||||||
|
sub.customer_description,
|
||||||
|
sub.date_of_production,
|
||||||
|
sub.width,
|
||||||
|
sub.thickness,
|
||||||
|
sub.mass_per_unit_area,
|
||||||
|
sub.net_weight,
|
||||||
|
sub.length,
|
||||||
|
sub.is_un_plan_production,
|
||||||
|
sub.un_plan_product_property1,
|
||||||
|
sub.un_plan_product_property2,
|
||||||
|
sub.un_plan_product_property3,
|
||||||
|
sub.remark,
|
||||||
|
sub.isUnPackBox,
|
||||||
|
sub.isRePrintPackageBoxLabel,
|
||||||
|
sub.width_standard,
|
||||||
|
sub.thickness_request
|
||||||
|
FROM
|
||||||
|
ST_IVT_StructIvt ivt
|
||||||
|
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
||||||
|
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
|
||||||
|
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id
|
||||||
|
LEFT JOIN SCH_BASE_Region region ON region.region_id = ivt.region_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = ivt.pcsn AND attr.storagevehicle_code = sub.package_box_sn
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
and attr.stor_id in 输入.in_stor_id
|
||||||
|
|
||||||
|
OPTION 输入.struct <> ""
|
||||||
|
(
|
||||||
|
ivt.struct_code like 输入.struct or
|
||||||
|
ivt.struct_name like 输入.struct
|
||||||
|
)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.material <> ""
|
||||||
|
(
|
||||||
|
mater.material_code like 输入.material or
|
||||||
|
mater.material_name like 输入.material
|
||||||
|
)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
ivt.pcsn like 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.sap_pcsn <> ""
|
||||||
|
sub.sap_pcsn like 输入.sap_pcsn
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
attr.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.package_box_sn <> ""
|
||||||
|
sub.package_box_sn like 输入.package_box_sn
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.sale_order_name <> ""
|
||||||
|
sub.sale_order_name like 输入.sale_order_name
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) {
|
if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) {
|
||||||
map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%");
|
map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%");
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotEmpty(map.get("cust_code"))) {
|
||||||
|
map.put("cust_code", "%" + map.get("cust_code") + "%");
|
||||||
|
}
|
||||||
|
|
||||||
//获取人员对应的仓库
|
//获取人员对应的仓库
|
||||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
输入.box_no TYPEAS s_string
|
输入.box_no TYPEAS s_string
|
||||||
输入.canuse_qty TYPEAS s_string
|
输入.canuse_qty TYPEAS s_string
|
||||||
输入.sap_pcsn TYPEAS s_string
|
输入.sap_pcsn TYPEAS s_string
|
||||||
|
输入.cust_code TYPEAS s_string
|
||||||
输入.in_stor_id TYPEAS f_string
|
输入.in_stor_id TYPEAS f_string
|
||||||
[临时表]
|
[临时表]
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
@@ -97,6 +98,11 @@
|
|||||||
sub.sap_pcsn like 输入.sap_pcsn
|
sub.sap_pcsn like 输入.sap_pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.cust_code <> ""
|
||||||
|
(cu.cust_code like 输入.cust_code or
|
||||||
|
cu.cust_simple_name like 输入.cust_code)
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.pcsn <> ""
|
OPTION 输入.pcsn <> ""
|
||||||
dis.pcsn like 输入.pcsn
|
dis.pcsn like 输入.pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -100,10 +100,10 @@
|
|||||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="sect_name" label="库区" align="center" />
|
<el-table-column show-overflow-tooltip prop="sect_name" label="库区" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" align="center" />
|
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="箱号" align="center" />
|
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="箱号" align="center" width="250px" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="子卷批次号" align="center" />
|
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="子卷批次号" align="center" width="150px" />
|
||||||
<el-table-column show-overflow-tooltip sortable prop="sap_pcsn" label="sap批次" align="center" />
|
<el-table-column show-overflow-tooltip sortable prop="sap_pcsn" label="sap批次" align="center" width="140px" />
|
||||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">-->
|
<!-- <el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">-->
|
||||||
<!-- <template scope="scope">-->
|
<!-- <template scope="scope">-->
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
|
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
<!-- <el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />-->
|
||||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||||
|
|||||||
@@ -119,6 +119,15 @@
|
|||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="客户搜索">
|
||||||
|
<el-input
|
||||||
|
v-model="query.cust_code"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
placeholder="编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="创建时间">
|
<el-form-item label="创建时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
|
|||||||
Reference in New Issue
Block a user