拆封盖
This commit is contained in:
@@ -317,14 +317,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 请求进入
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 1);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (removeSealCoverPositionDriver.getAction() == 1) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("to_command", 1);
|
||||
// try {
|
||||
// removeSealCoverPositionDriver.writing(map);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//到达取货点1
|
||||
if (removeSealCoverPositionDriver.getAction() == 3 && "1".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0 ) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
@@ -452,10 +453,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 取货完毕
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 2);
|
||||
map.put("to_command", 4);
|
||||
try {
|
||||
// 取货完毕
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
@@ -607,15 +608,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 请求进入
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 3);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (removeSealCoverPositionDriver.getAction() == 1) {
|
||||
// 到达放货点
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("to_command", 3);
|
||||
// try {
|
||||
// removeSealCoverPositionDriver.writing(map);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
if (removeSealCoverPositionDriver.getAction() == 1 && "1".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
@@ -747,9 +748,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 取货完毕
|
||||
// 放货完毕
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 4);
|
||||
map.put("to_command", 1);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
@@ -896,16 +897,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
// removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// // 请求进入
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("to_command", 1);
|
||||
// try {
|
||||
// removeSealCoverPositionDriver.writing(map);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//到达取货2
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 请求进入
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 1);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (removeSealCoverPositionDriver.getAction() == 1) {
|
||||
if (removeSealCoverPositionDriver.getAction() == 4 && "2".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
@@ -1028,9 +1031,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 取货完毕
|
||||
// 取货完毕2
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 2);
|
||||
map.put("to_command", 3);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
@@ -1178,15 +1181,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
if (device.getDeviceDriver() instanceof RemoveSealCoverPositionDriver) {
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 请求进入
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 3);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (removeSealCoverPositionDriver.getAction() == 1) {
|
||||
// 请求进入 到达放货2
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("to_command", 3);
|
||||
// try {
|
||||
// removeSealCoverPositionDriver.writing(map);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
if (removeSealCoverPositionDriver.getAction() == 2 && "2".equals(instruction.getHave_lid()) && removeSealCoverPositionDriver.getMode() > 0) {
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(this.getDeviceCode())
|
||||
@@ -1299,7 +1302,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
removeSealCoverPositionDriver = (RemoveSealCoverPositionDriver) device.getDeviceDriver();
|
||||
// 取货完毕
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_command", 4);
|
||||
map.put("to_command", 2);
|
||||
try {
|
||||
removeSealCoverPositionDriver.writing(map);
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||
|
||||
@@ -120,6 +120,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String remark = request.getRemark();
|
||||
String taskGroupId = request.getTask_group_id();
|
||||
BigDecimal taskGroupSeq = request.getTask_group_seq();
|
||||
JSONObject interaction_json = request.getInteraction_json();
|
||||
|
||||
double oven_time = 0.00d;
|
||||
if (StrUtil.isNotEmpty(request.getOven_time())) {
|
||||
oven_time = Double.parseDouble(request.getOven_time());
|
||||
|
||||
@@ -247,6 +247,8 @@ public class InstructionMybatis extends CommonModel<InstructionMybatis> implemen
|
||||
private String task_group_id;
|
||||
private BigDecimal task_group_seq;
|
||||
|
||||
private String have_lid;
|
||||
|
||||
public void copyFrom(Instruction source) {
|
||||
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
||||
@@ -383,4 +383,6 @@ public class InstructionDto implements Serializable {
|
||||
// private String to_device_code;
|
||||
private String task_group_id;
|
||||
private BigDecimal task_group_seq;
|
||||
|
||||
private String have_lid;
|
||||
}
|
||||
|
||||
@@ -373,4 +373,9 @@ public class TaskDto implements Serializable {
|
||||
private String class_type;
|
||||
private String task_group_id;
|
||||
private BigDecimal task_group_seq;
|
||||
|
||||
/**
|
||||
* 是否有盖子
|
||||
*/
|
||||
private String have_lid;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
@@ -139,6 +140,9 @@ public class AutoCreateInst {
|
||||
|
||||
String taskGroupId = acsTask.getTask_group_id();
|
||||
BigDecimal taskGroupSeq = acsTask.getTask_group_seq();
|
||||
JSONObject interaction_json = JSONObject.parseObject(acsTask.getInteraction_json());
|
||||
|
||||
String have_lid = interaction_json == null ? null: interaction_json.getString("have_lid");
|
||||
|
||||
if (StrUtil.equals(is_send, "0")) {
|
||||
continue;
|
||||
@@ -220,6 +224,7 @@ public class AutoCreateInst {
|
||||
|
||||
instdto.setTask_group_id(taskGroupId);
|
||||
instdto.setTask_group_seq(taskGroupSeq);
|
||||
instdto.setHave_lid(have_lid);
|
||||
|
||||
instdto.setPriority(priority);
|
||||
instdto.setCarno(carNo);
|
||||
|
||||
Reference in New Issue
Block a user