Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1150,6 +1150,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait"))
|
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait"))
|
||||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())) {
|
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())) {
|
||||||
standardOrdinarySiteDeviceDriver.setOption(0);
|
standardOrdinarySiteDeviceDriver.setOption(0);
|
||||||
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(this.getDeviceCode())
|
||||||
|
.content("agvphase:" + phase + "反馈:" + data)
|
||||||
|
.build();
|
||||||
|
logDto.setLog_level(4);
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
@@ -1159,16 +1166,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
logDto.setLog_level(4);
|
logDto.setLog_level(4);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
}
|
}
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
|
||||||
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
|
||||||
standardOrdinarySiteDeviceDriver.setIndex(index);
|
standardOrdinarySiteDeviceDriver.setIndex(index);
|
||||||
standardOrdinarySiteDeviceDriver.setInst(inst);
|
standardOrdinarySiteDeviceDriver.setInst(inst);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
|
||||||
.device_code(this.getDeviceCode())
|
|
||||||
.content("agvphase:" + phase + "反馈:" + data)
|
|
||||||
.build();
|
|
||||||
logDto.setLog_level(4);
|
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
|
||||||
String task_code = inst.getTask_code();
|
String task_code = inst.getTask_code();
|
||||||
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
|
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
|
||||||
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) {
|
||||||
|
|||||||
@@ -500,9 +500,19 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
.build();
|
.build();
|
||||||
logDto.setLog_level(4);
|
logDto.setLog_level(4);
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
TaskDto dto = taskserver.findByBarcodeFromCache(barcode);
|
||||||
|
if (ObjectUtil.isNotEmpty(dto)) {
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "to_command");
|
||||||
|
map.put("value", mode);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
|
this.requireSucess = true;
|
||||||
|
} else {
|
||||||
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
||||||
JSONObject jsonObject = null;
|
JSONObject jsonObject = null;
|
||||||
if(ObjectUtil.isNotEmpty(httpResponse)){
|
if (ObjectUtil.isNotEmpty(httpResponse)) {
|
||||||
String body = httpResponse.body();
|
String body = httpResponse.body();
|
||||||
jsonObject = JSONObject.parseObject(body);
|
jsonObject = JSONObject.parseObject(body);
|
||||||
}
|
}
|
||||||
@@ -531,6 +541,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||||
message = "申请退货入库报错,返回参数:" + jsonObject;
|
message = "申请退货入库报错,返回参数:" + jsonObject;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -618,7 +629,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
||||||
JSONObject jsonObject = null;
|
JSONObject jsonObject = null;
|
||||||
if(ObjectUtil.isNotEmpty(httpResponse)){
|
if (ObjectUtil.isNotEmpty(httpResponse)) {
|
||||||
String body = httpResponse.body();
|
String body = httpResponse.body();
|
||||||
jsonObject = JSONObject.parseObject(body);
|
jsonObject = JSONObject.parseObject(body);
|
||||||
}
|
}
|
||||||
@@ -687,7 +698,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
HttpResponse httpResponse = acsToWmsService.applyTwo(param);
|
||||||
JSONObject jsonObject = null;
|
JSONObject jsonObject = null;
|
||||||
if(ObjectUtil.isNotEmpty(httpResponse)){
|
if (ObjectUtil.isNotEmpty(httpResponse)) {
|
||||||
String body = httpResponse.body();
|
String body = httpResponse.body();
|
||||||
jsonObject = JSONObject.parseObject(body);
|
jsonObject = JSONObject.parseObject(body);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1669,7 +1669,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
Iterator<Instruction> it = instructions.iterator();
|
Iterator<Instruction> it = instructions.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Instruction inst = it.next();
|
Instruction inst = it.next();
|
||||||
if (StrUtil.equals(devicecode, inst.getNext_device_code()) && Integer.parseInt(inst.getInstruction_status()) <= Integer.parseInt(InstructionStatusEnum.BUSY.getIndex()) && !inst.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex())) {
|
if (StrUtil.equals(devicecode, inst.getNext_device_code()) && Integer.parseInt(inst.getInstruction_status()) <= Integer.parseInt(InstructionStatusEnum.BUSY.getIndex()) && !inst.getInstruction_type().equals(TaskTypeEnum.Mxddhj_Task.getIndex())) {
|
||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1869,7 +1869,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
public Instruction findByStartCodeAndReady(String device_code) {
|
public Instruction findByStartCodeAndReady(String device_code) {
|
||||||
Optional<Instruction> optionalInstruction = instructions.stream()
|
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||||
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code)
|
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code)
|
||||||
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex()))
|
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Mxddhj_Task.getIndex()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
return optionalInstruction.orElse(null);
|
return optionalInstruction.orElse(null);
|
||||||
}
|
}
|
||||||
@@ -2039,7 +2039,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
|
|
||||||
//根据时间升序取第一个
|
//根据时间升序取第一个
|
||||||
List<Instruction> instructionsList = instructions.stream()
|
List<Instruction> instructionsList = instructions.stream()
|
||||||
.filter(item -> StrUtil.equals(item.getInstruction_type(), TaskTypeEnum.Truss_Task.getIndex())
|
.filter(item -> StrUtil.equals(item.getInstruction_type(), TaskTypeEnum.Mxddhj_Task.getIndex())
|
||||||
&& StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())).collect(Collectors.toList());
|
&& StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())).collect(Collectors.toList());
|
||||||
return instructionsList;
|
return instructionsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,13 +23,14 @@ public enum TaskTypeEnum {
|
|||||||
|
|
||||||
Oven_Truss_Task("8", "8", "烘箱行架任务"),
|
Oven_Truss_Task("8", "8", "烘箱行架任务"),
|
||||||
|
|
||||||
Inner_Truss_Task("9", "9", "子卷下线行架任务"),
|
|
||||||
|
|
||||||
Stacker_Task("11", "11", "堆垛机任务"),
|
Stacker_Task("11", "11", "堆垛机任务"),
|
||||||
Box_Storage("12", "12", "木箱入库行架任务"),
|
Box_Storage("12", "12", "木箱入库行架任务"),
|
||||||
Box_Package("13", "13", "装箱入库行架任务"),
|
Box_Package("13", "13", "装箱入库行架任务"),
|
||||||
Return_Good("14", "14", "退货入库行架任务"),
|
Return_Good("14", "14", "退货入库行架任务"),
|
||||||
Rgv_Conveyor_Task("15", "15", "RGV输送任务");
|
Rgv_Conveyor_Task("15", "15", "RGV输送任务"),
|
||||||
|
Inner_Truss_Task("16", "16", "子卷下线行架任务"),
|
||||||
|
Mxddhj_Task("17", "17", "木箱堆叠行架任务");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ public interface TaskService extends CommonService<Task> {
|
|||||||
*/
|
*/
|
||||||
TaskDto findByCode(String code);
|
TaskDto findByCode(String code);
|
||||||
|
|
||||||
|
TaskDto findByBarcodeFromCache(String barcode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据设备号查询未执行的任务
|
* 根据设备号查询未执行的任务
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -430,6 +430,15 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
|||||||
return ConvertUtil.convert(task, TaskDto.class);
|
return ConvertUtil.convert(task, TaskDto.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaskDto findByBarcodeFromCache(String barcode) {
|
||||||
|
Task task = new LambdaQueryChainWrapper<>(taskMapper)
|
||||||
|
.eq(Task::getVehicle_code, barcode)
|
||||||
|
.eq(Task::getTask_status,TaskStatusEnum.READY.getIndex())
|
||||||
|
.one();
|
||||||
|
return ConvertUtil.convert(task, TaskDto.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TaskDto> queryTaskByDeviceCode(String device_code) {
|
public List<TaskDto> queryTaskByDeviceCode(String device_code) {
|
||||||
return Optional
|
return Optional
|
||||||
|
|||||||
Reference in New Issue
Block a user