Merge remote-tracking branch 'origin/master'

# Conflicts:
#	acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java
This commit is contained in:
2024-08-16 10:19:50 +08:00
37 changed files with 523 additions and 193 deletions

View File

@@ -77,6 +77,11 @@ public interface AcsConfig {
* 是否存在wms系统 * 是否存在wms系统
*/ */
String HASWMS = "hasWms"; String HASWMS = "hasWms";
/**
* 是否请求wms系统
*/
String ISWMS = "isWms";
/** /**
* lucene日志索引目录 * lucene日志索引目录
*/ */

View File

@@ -22,6 +22,7 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
import org.nl.config.SpringContextHolder; import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService; import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService; import org.nl.system.service.param.ISysParamService;
import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.system.service.param.impl.SysParamServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -325,6 +326,12 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
System.out.println("TwoAgv链接异常"); System.out.println("TwoAgv链接异常");
log.info("TwoAgv链接异常"); log.info("TwoAgv链接异常");
log.error("agv连接出现异常:{}", e); log.error("agv连接出现异常:{}", e);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code("agv连接出现异常")
.content("agv异常" + e.getMessage())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
logServer.deviceExecuteLog("NDC2", "", "", "agv异常" + e.getMessage()); logServer.deviceExecuteLog("NDC2", "", "", "agv异常" + e.getMessage());
logServer.deviceExecuteLog("NDC2", "", "", "agv异常" + e); logServer.deviceExecuteLog("NDC2", "", "", "agv异常" + e);
if (ObjectUtil.isNotEmpty(s)) { if (ObjectUtil.isNotEmpty(s)) {

View File

@@ -495,7 +495,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
if (ObjectUtil.isNotEmpty(byNextDeviceCodeFromCache)) { if (ObjectUtil.isNotEmpty(byNextDeviceCodeFromCache)) {
LuceneLogDto logDto = LuceneLogDto.builder() LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("存在堆垛机对接的指令") .content("存在堆垛机对接位的就绪指令或者执行中的指令,"+"指令号为:"+byNextDeviceCodeFromCache.getInstruction_code())
.build(); .build();
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);

View File

@@ -329,6 +329,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
String hand_barcode = null; String hand_barcode = null;
this.instruction_require_time = date; this.instruction_require_time = date;
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
if (StrUtil.equals(paramService.findByCode(AcsConfig.ISWMS).getValue(), "1")) {
//判断是否有手动补码 如果有就申请补码agv任务 //判断是否有手动补码 如果有就申请补码agv任务
if (StrUtil.isNotEmpty(hand_barcode)) { if (StrUtil.isNotEmpty(hand_barcode)) {
JSONObject apply = new JSONObject(); JSONObject apply = new JSONObject();
@@ -406,6 +407,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
} }
} }
} }
}
public boolean exe_business() { public boolean exe_business() {

View File

@@ -121,7 +121,6 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
int last_to_height = 0; int last_to_height = 0;
String material_barcode = null; String material_barcode = null;
String last_material_barcode = null; String last_material_barcode = null;
@@ -306,7 +305,6 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
} }
last_mode = mode; last_mode = mode;
last_move = move; last_move = move;
last_carrier_direction = carrier_direction; last_carrier_direction = carrier_direction;
@@ -349,7 +347,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
} else { } else {
this.require_apply_strangulation_time = date; this.require_apply_strangulation_time = date;
Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task)); Instruction inst = instructionService.findByCodeFromCache(String.valueOf(task));
if (ObjectUtil.isEmpty(inst) && StrUtil.isEmpty(inst.getVehicle_code())) { if (ObjectUtil.isEmpty(inst) || StrUtil.isEmpty(inst.getVehicle_code())) {
message = "指令为空、或者托盘码未空"; message = "指令为空、或者托盘码未空";
return; return;
} }

View File

@@ -355,7 +355,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
if (mode != 2) { if (mode != 2) {
remark = "universal_remark2"; remark = "universal_remark2";
} }
if (move != 0) { if (move != 1) {
remark = "universal_remark3"; remark = "universal_remark3";
} }
if (task != 0) { if (task != 0) {
@@ -1063,6 +1063,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
.device_code(device_code) .device_code(device_code)
.content("下发多个电气信号" + itemMap) .content("下发多个电气信号" + itemMap)
.build(); .build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap); logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
try { try {

View File

@@ -260,7 +260,7 @@ public class UnBoxLableConveyorDeviceDriver extends AbstractOpcDeviceDriver impl
.build(); .build();
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.getBoxInfo(param); String response = acsToWmsService.getIsUncap(param);
JSONObject jo = JSON.parseObject(response); JSONObject jo = JSON.parseObject(response);
message = "木箱开盖,返回参数:" + jo; message = "木箱开盖,返回参数:" + jo;
if (jo.getInteger("status") == 200) { if (jo.getInteger("status") == 200) {

View File

@@ -315,7 +315,7 @@ public class OneRgvDeviceDriver extends AbstractOpcDeviceDriver implements Devic
map.put("mode", mode); map.put("mode", mode);
map.put("move", move); map.put("move", move);
/*jo.put("action", action);*/ /*jo.put("action", action);*/
/*jo.put("task", task);*/ map.put("task", task);
/*jo.put("walk_y", this.walk_y);*/ /*jo.put("walk_y", this.walk_y);*/
map.put("isOnline", this.getIsonline()); map.put("isOnline", this.getIsonline());
map.put("error", ErrorUtil.getDictDetail("rgv_error_type", String.valueOf(this.getError()))); map.put("error", ErrorUtil.getDictDetail("rgv_error_type", String.valueOf(this.getError())));

View File

@@ -162,7 +162,6 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
if (mode != last_mode) { if (mode != last_mode) {
requireSucess = false; requireSucess = false;
} }
// 更新指令状态 // 更新指令状态
@@ -306,6 +305,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
return false; return false;
} else { } else {
boolean flag = true;
this.instruction_require_time = date; this.instruction_require_time = date;
//抓取工位 //抓取工位
if (ObjectUtil.isEmpty(getDeviceCodeList)) { if (ObjectUtil.isEmpty(getDeviceCodeList)) {
@@ -406,6 +406,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
BeltConveyorDeviceDriver beltConveyorDeviceDriverStart; BeltConveyorDeviceDriver beltConveyorDeviceDriverStart;
BeltConveyorDeviceDriver beltConveyorDeviceDriverEnd; BeltConveyorDeviceDriver beltConveyorDeviceDriverEnd;
if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriverStart = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver(); beltConveyorDeviceDriverStart = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver();
if (beltConveyorDeviceDriverStart.getMove() != 1 && beltConveyorDeviceDriverStart.getMode() != 2) { if (beltConveyorDeviceDriverStart.getMove() != 1 && beltConveyorDeviceDriverStart.getMode() != 2) {
@@ -415,7 +416,20 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
} }
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriverEnd = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver(); beltConveyorDeviceDriverEnd = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
if (beltConveyorDeviceDriverEnd.getMove() != 1 && beltConveyorDeviceDriverEnd.getMode() != 2) { if (beltConveyorDeviceDriverEnd.getMove() == 1 && beltConveyorDeviceDriverEnd.getMode() == 2) {
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("当前任务号:" + taskDto.getTask_code() + " " + next_device_code + "当前move值为" + beltConveyorDeviceDriverEnd.getMove() + "当前mode值为"+beltConveyorDeviceDriverEnd.getMode())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}else {
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("当前任务号:" + taskDto.getTask_code() + " " + next_device_code + "当前move值为" + beltConveyorDeviceDriverEnd.getMove() + "当前mode值为"+beltConveyorDeviceDriverEnd.getMode())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
notCreateInstMessage = "universal_notCreateInstMessage2"; notCreateInstMessage = "universal_notCreateInstMessage2";
return false; return false;
} }
@@ -436,7 +450,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
.device_code(device_code) .device_code(device_code)
.content(device_code + "创建指令时出现异常:" + e.getMessage()) .content(device_code + "创建指令时出现异常:" + e.getMessage())
.build(); .build();
logDto.setLog_level(2); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
return false; return false;
} }

View File

@@ -377,7 +377,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (mode == 0 || command == 9) { if (mode == 0 || command == 9) {
this.setIsonline(false); this.setIsonline(false);
message = "universal_off"; message = "universal_off-line";
} else { } else {
this.setIsonline(true); this.setIsonline(true);
} }

View File

@@ -692,7 +692,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
jo.put("task", task); jo.put("task", task);
jo.put("walk_y", walk_y); jo.put("walk_y", walk_y);
jo.put("isOnline", this.getIsonline()); jo.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); jo.put("error", ErrorUtil.getDictDetail("bchj_error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); jo.put("isError", this.getIserror());
jo.put("message", LangProcess.msg(message)); jo.put("message", LangProcess.msg(message));
jo.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage)); jo.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));

View File

@@ -749,12 +749,18 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
} }
return true; return true;
} else { } else {
LuceneLogDto logDto2 = LuceneLogDto.builder() Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 99);
this.writing(map);
requireSucess = true;
message = "请求密集库出气胀轴,申请行架任务失败";
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("请求密集库出气胀轴" + httpResponse.body()) .content("请求密集库出气胀轴,申请行架任务失败,返回参数:" + jsonObject)
.build(); .build();
logDto2.setLog_level(4); logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto2); luceneExecuteLogService.deviceExecuteLog(logDto1);
logServer.deviceExecuteLog(this.device_code, "", "", "请求密集库出气胀轴,申请行架任务失败,返回参数:" + jsonObject);
return false; return false;
} }
} }

View File

@@ -4,6 +4,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.druid.sql.visitor.functions.If;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.Data; import lombok.Data;
@@ -238,10 +239,25 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
}*/ }*/
map.put("to_command", "5"); map.put("to_command", "5");
this.writing(map); this.writing(map);
message = "universal_message1";
finish_instruction(inst); finish_instruction(inst);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
feedMessage = "";
}
} else {
if (mode != 3) {
feedMessage = "universal_feedMessage1";
}
if (action != 4) {
feedMessage = "universal_feedMessage2";
}
if (move != 0) {
feedMessage = "universal_feedMessage3";
}
if (task == 0) {
feedMessage = "universal_feedMessage4";
} }
} }
} }
@@ -340,55 +356,76 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
for (int i = 0; i < getDeviceCodeList.size(); i++) { for (int i = 0; i < getDeviceCodeList.size(); i++) {
String startDeviceCode = getDeviceCodeList.get(i); String startDeviceCode = getDeviceCodeList.get(i);
//先查指令 //先查指令
List<TaskDto> taskDtos = taskserver.queryTaskByDeviceCodeAndStatus2(startDeviceCode); List<TaskDto> taskDtos = taskserver.queryTaskByDeviceCodeAndStatus3(startDeviceCode);
if (ObjectUtil.isNotEmpty(taskDtos)) { if (ObjectUtil.isNotEmpty(taskDtos)) {
List<TaskDto> taskDtoStream = taskDtos.stream().sorted(Comparator.comparing(TaskDto::getCreate_time)).collect(Collectors.toList()); taskDtos = this.sortTask(taskDtos);
if (ObjectUtil.isNotEmpty(taskDtoStream)) {
TaskDto taskDto = taskDtos.get(0); TaskDto taskDto = taskDtos.get(0);
if (TaskTypeEnum.Truss_Task.getIndex().equals(taskDto.getTask_type())) {
String startPoint = taskDto.getStart_device_code(); if (!StrUtil.equals(taskDto.getTask_type(), "6") && !StrUtil.equals(taskDto.getTask_type(), "8")) {
Device startPointDevice = deviceAppService.findDeviceByCode(startPoint); taskDto = null;
if (startPointDevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startPointDevice.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 1) {
notCreateInstMessage = "universal_notCreateInstMessage9";
continue; continue;
} }
}
String nextDeviceCode = taskDto.getNext_device_code();
Device device = deviceAppService.findDeviceByCode(nextDeviceCode);
if (device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) device.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getMove() != 0 || plugPullDeviceSiteDeviceDriver.getAction() != 2) {
notCreateInstMessage = "universal_notCreateInstMessage9";
continue;
}
}
Instruction instruction = instructionService.findByTaskcode(taskDto.getTask_code()); Instruction instruction = instructionService.findByTaskcode(taskDto.getTask_code());
if (ObjectUtil.isNotEmpty(instruction)) {
String startCode = instruction.getStart_device_code(); String startCode = instruction.getStart_device_code();
String nextCode = instruction.getNext_device_code(); String nextCode = instruction.getNext_device_code();
instruction.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
instruction.setUpdate_time(DateUtil.now());
instructionService.update(instruction);
Device startDevice = deviceAppService.findDeviceByCode(startCode); Device startDevice = deviceAppService.findDeviceByCode(startCode);
Device nextDevice = deviceAppService.findDeviceByCode(nextCode); Device nextDevice = deviceAppService.findDeviceByCode(nextCode);
if (startDevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startDevice.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 1) {
notCreateInstMessage = startCode + "工位状态为不允许取,无法生成指令";
return false;
}
}
if (nextDevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) device.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 2) {
notCreateInstMessage = nextCode + "工位状态为不允许放,无法生成指令";
return false;
}
}
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
notCreateInstMessage = "universal_notCreateInstMessage1"; notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
} }
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) { if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
notCreateInstMessage = "universal_notCreateInstMessage1"; notCreateInstMessage = "未设置电气调度号!";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
} }
String startAddr = startDevice.getExtraValue().get("address").toString(); String startAddr = startDevice.getExtraValue().get("address").toString();
String nextAddr = nextDevice.getExtraValue().get("address").toString(); String nextAddr = nextDevice.getExtraValue().get("address").toString();
String msg = "当前设备:" + device_code + ",下发指令:"
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
+ ",指令终点:" + instruction.getNext_device_code();
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(device_code)
.content(msg)
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);
String interaction_json = taskDto.getInteraction_json(); String interaction_json = taskDto.getInteraction_json();
Map<String, Object> map = toStringObjectMap(instruction, startAddr, nextAddr, interaction_json); Map<String, Object> map = toStringObjectMap(instruction, startAddr, nextAddr, interaction_json);
try {
this.writing(map); this.writing(map);
} catch (Exception e) {
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("当前设备:" + device_code + ",下发指令:"
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
+ ",指令终点:" + instruction.getNext_device_code() + ",指令执行失败:" + e.getMessage())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
instruction.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
instruction.setUpdate_time(DateUtil.now());
instructionService.update(instruction);
this.setRequireSucess(true); this.setRequireSucess(true);
return true; return true;
} }
}
} else { } else {
List<TaskDto> taskDtoList = taskserver.findByTrappedManipulatorReady(); List<TaskDto> taskDtoList = taskserver.findByTrappedManipulatorReady();
if (ObjectUtil.isNotEmpty(taskDtoList)) { if (ObjectUtil.isNotEmpty(taskDtoList)) {
@@ -402,36 +439,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
List<TaskDto> readyTaskDtos = new ArrayList<>(); List<TaskDto> readyTaskDtos = new ArrayList<>();
for (int j = 0; j < taskDtosReady.size(); j++) { for (int j = 0; j < taskDtosReady.size(); j++) {
task = taskDtosReady.get(j); task = taskDtosReady.get(j);
String firstDeviceCode = task.getStart_device_code();
Device start_device = deviceAppService.findDeviceByCode(firstDeviceCode);
if (start_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) start_device.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 1) {
notCreateInstMessage = "universal_notCreateInstMessage12";
continue;
}
}
String nextDeviceCode = task.getNext_device_code();
Device next_device = deviceAppService.findDeviceByCode(nextDeviceCode);
if (next_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) next_device.getDeviceDriver();
String remark = "";
// if (plugPullDeviceSiteDeviceDriver.getMode() != 2) {
// remark = "universal_notCreateInstMessage9";
// notCreateInstMessage = remark;
// continue;
// }
if (plugPullDeviceSiteDeviceDriver.getMove() != 0) {
remark = "universal_notCreateInstMessage9";
notCreateInstMessage = remark;
continue;
}
if (plugPullDeviceSiteDeviceDriver.getAction() != 2) {
remark = "universal_notCreateInstMessage11";
notCreateInstMessage = remark;
continue;
}
}
readyTaskDtos.add(task); readyTaskDtos.add(task);
} }
//按照优先级排序 优先级相等按照创建时间排序 //按照优先级排序 优先级相等按照创建时间排序
@@ -451,8 +459,25 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
String startPointCode = task.getStart_point_code(); String startPointCode = task.getStart_point_code();
String routePlanCode = task.getRoute_plan_code(); String routePlanCode = task.getRoute_plan_code();
String nextPointCode = task.getNext_point_code(); String nextPointCode = task.getNext_point_code();
String firstDeviceCode = task.getStart_device_code(); String firstDeviceCode = task.getStart_device_code();
Device start_device = deviceAppService.findDeviceByCode(firstDeviceCode);
if (start_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) start_device.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 1) {
notCreateInstMessage = firstDeviceCode + "工位状态为不允许取,无法生成指令";
return false;
}
}
String nextDeviceCode = task.getNext_device_code(); String nextDeviceCode = task.getNext_device_code();
Device next_device = deviceAppService.findDeviceByCode(nextDeviceCode);
if (next_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) next_device.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 2) {
notCreateInstMessage = nextDeviceCode + "工位状态为不允许放,无法生成指令";
return false;
}
}
Instruction instdto = new Instruction(); Instruction instdto = new Instruction();
instdto.setInstruction_id(IdUtil.simpleUUID()); instdto.setInstruction_id(IdUtil.simpleUUID());
@@ -484,6 +509,9 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
return false; return false;
} }
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
+ ",指令终点:" + instdto.getNext_device_code());
//创建指令后修改任务状态 //创建指令后修改任务状态
task.setTask_status(TaskStatusEnum.BUSY.getIndex()); task.setTask_status(TaskStatusEnum.BUSY.getIndex());
task.setUpdate_time(DateUtil.now()); task.setUpdate_time(DateUtil.now());
@@ -492,12 +520,12 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
Device startDevice = deviceAppService.findDeviceByCode(instdto.getStart_device_code()); Device startDevice = deviceAppService.findDeviceByCode(instdto.getStart_device_code());
Device nextDevice = deviceAppService.findDeviceByCode(instdto.getNext_device_code()); Device nextDevice = deviceAppService.findDeviceByCode(instdto.getNext_device_code());
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
notCreateInstMessage = "universal_notCreateInstMessage1"; notCreateInstMessage = "未设置电气调度号";
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code())); throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code()));
} }
if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) { if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) {
notCreateInstMessage = "universal_notCreateInstMessage1"; notCreateInstMessage = "未设置电气调度号!";
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code())); throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code()));
@@ -506,12 +534,22 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
String nextAddr = nextDevice.getExtraValue().get("address").toString(); String nextAddr = nextDevice.getExtraValue().get("address").toString();
String interaction_json = task.getInteraction_json(); String interaction_json = task.getInteraction_json();
Map<String, Object> map = toStringObjectMap(instdto, startAddr, nextAddr, interaction_json); Map<String, Object> map = toStringObjectMap(instdto, startAddr, nextAddr, interaction_json);
try {
this.writing(map); this.writing(map);
} catch (Exception e) {
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("当前设备:" + device_code + ",下发指令:"
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
+ ",指令终点:" + instdto.getNext_device_code() + ",指令执行失败:" + e.getMessage())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
this.setRequireSucess(true); this.setRequireSucess(true);
notCreateInstMessage = ""; return true;
notCreateTaskMessage = "";
} else { } else {
notCreateInstMessage = "universal_notCreateInstMessage"; notCreateInstMessage = "找到关联设备的任务,指令无法创建";
} }
return true; return true;
} }
@@ -679,7 +717,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
.device_code(device_code) .device_code(device_code)
.content("下发多个电气信号" + itemMap) .content("下发多个电气信号" + itemMap)
.build(); .build();
logDto.setLog_level(3); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
} }
@@ -757,7 +795,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
map.put("is_click", true); map.put("is_click", true);
map.put("message", LangProcess.msg(message)); map.put("message", LangProcess.msg(message));
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage)); map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
map.put("notCreateInstMessage", this.getDeviceCode() + LangProcess.msg(notCreateInstMessage)); map.put("notCreateInstMessage", notCreateInstMessage);
map.put("error", ErrorUtil.getDictDetail("bqhj_error_type", String.valueOf(this.getError()))); map.put("error", ErrorUtil.getDictDetail("bqhj_error_type", String.valueOf(this.getError())));
/*jo.put("x", xPosition); /*jo.put("x", xPosition);
jo.put("y", yPosition);*/ jo.put("y", yPosition);*/

View File

@@ -253,11 +253,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
message = "反馈LMS子卷重量失败:"+ applyfeedbackSubVolumeWeightResponse.getMessage(); message = "反馈LMS子卷重量失败:"+ applyfeedbackSubVolumeWeightResponse.getMessage();
luceneExecuteLogService.deviceExecuteLog(logDto1); luceneExecuteLogService.deviceExecuteLog(logDto1);
} }
} else if(mode == 3){ } else {
feedMessage = "行架机械手:"; feedMessage = "行架机械手:";
/*if (mode != 3) { if (mode != 3) {
feedMessage = feedMessage + "mode不为运行中状态,"; feedMessage = feedMessage + "mode不为运行中状态,";
}*/ }
if (action != 5) { if (action != 5) {
feedMessage = feedMessage + "action不为反馈重量状态,"; feedMessage = feedMessage + "action不为反馈重量状态,";
} }

View File

@@ -41,6 +41,11 @@ public class CreateTaskRequest extends BaseRequest {
*/ */
String vehicle_code; String vehicle_code;
/**
* 木箱号
*/
String vehicle_code2;
/** /**
* 载具类型 * 载具类型
*/ */

View File

@@ -193,6 +193,8 @@ public interface AcsToWmsService {
String getBoxInfo(JSONObject param); String getBoxInfo(JSONObject param);
String getIsUncap(JSONObject param);
/** /**
* 反馈管芯抓取位 * 反馈管芯抓取位
* @param param * @param param

View File

@@ -661,7 +661,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
log.info("getBoxInfo-----输出参数{}", result2.body()); log.info("getBoxInfo-----输出参数{}", result2.body());
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getBoxInfo", String.valueOf(result2.getStatus()), LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getBoxInfo", String.valueOf(result2.getStatus()),
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标"); JSON.toJSONString(param), String.valueOf(result2.body()), "申请高度等级");
luceneLogService.interfaceExecuteLog(luceneLogDto); luceneLogService.interfaceExecuteLog(luceneLogDto);
return result2.body(); return result2.body();
@@ -670,6 +670,51 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
} }
@Override
public String getIsUncap(JSONObject param) {
try {
MDC.put(log_file_type, log_type);
log.info("getIsUncap-----输入参数{}", param);
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("getIsUncap");
String url = wmsurl + addressDto.getMethods_url();
HttpResponse result2 = null;
try {
result2 = HttpRequest.post(url)
.addInterceptor(tLogHutoolhttpInterceptor)
.header(Header.USER_AGENT, "Hutool http")
.header("Authorization", token)
.body(String.valueOf(param))
.execute();
} catch (Exception e) {
String msg = e.getMessage();
log.info("getIsUncap-----输出参数{}", msg);
//网络不通
}
if(ObjectUtil.isEmpty(result2)){
log.info("getIsUncap-----输出参数{}", "返回结果为空");
return null;
}
String type = "";
if (result2.getStatus() == 200) {
type = "info";
} else {
type = "error";
}
log.info("getIsUncap-----输出参数{}", result2.body());
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getIsUncap", String.valueOf(result2.getStatus()),
JSON.toJSONString(param), String.valueOf(result2.body()), "申请开盖");
luceneLogService.interfaceExecuteLog(luceneLogDto);
return result2.body();
} finally {
MDC.remove(log_file_type);
}
}
@Override @Override
public String secondaryAllocationPoint(JSONObject param) { public String secondaryAllocationPoint(JSONObject param) {
try { try {

View File

@@ -127,6 +127,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String put_device_code = request.getPut_device_code(); String put_device_code = request.getPut_device_code();
String priority = request.getPriority(); String priority = request.getPriority();
String vehicle_code = request.getVehicle_code(); String vehicle_code = request.getVehicle_code();
String vehicle_code2 = request.getVehicle_code2();
String vehicle_type = request.getVehicle_type(); String vehicle_type = request.getVehicle_type();
String route_plan_code = request.getRoute_plan_code(); String route_plan_code = request.getRoute_plan_code();
String task_type = request.getTask_type(); String task_type = request.getTask_type();
@@ -310,6 +311,15 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
} }
} }
// if (StrUtil.isEmpty(vehicle_code2)) {
// JSONObject json = new JSONObject();
// json.put("task_code", task_code);
// json.put("ext_task_id", ext_task_id);
// json.put("message", " 木箱号不能为空!");
// errArr.add(json);
// continue;
// }
if (StrUtil.isEmpty(start_point_code)) { if (StrUtil.isEmpty(start_point_code)) {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("task_code", task_code); json.put("task_code", task_code);
@@ -345,6 +355,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("agv_action_type", agv_action_type); jo.put("agv_action_type", agv_action_type);
jo.put("priority", priority); jo.put("priority", priority);
jo.put("vehicle_code", vehicle_code); jo.put("vehicle_code", vehicle_code);
jo.put("vehicle_code2", vehicle_code2);
jo.put("vehicle_type", vehicle_type); jo.put("vehicle_type", vehicle_type);
jo.put("storage_task_type", storage_task_type); jo.put("storage_task_type", storage_task_type);
jo.put("agv_system_type", agv_system_type); jo.put("agv_system_type", agv_system_type);

View File

@@ -183,7 +183,7 @@ public interface InstructionService extends CommonService<InstructionMybatis> {
* @param dto * @param dto
* @throws Exception * @throws Exception
*/ */
void create(Instruction dto) throws Exception; boolean create(Instruction dto) throws Exception;

View File

@@ -286,6 +286,11 @@ public class InstructionDto implements Serializable {
*/ */
private String vehicle_code; private String vehicle_code;
/**
* 木箱号
*/
private String vehicle_code2;
/** /**
* 载具类型 * 载具类型
*/ */

View File

@@ -83,7 +83,11 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.*; import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -333,6 +337,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
public Instruction findByTaskcode(String code) { public Instruction findByTaskcode(String code) {
InstructionMybatis ins = new LambdaQueryChainWrapper<>(instructionMapper) InstructionMybatis ins = new LambdaQueryChainWrapper<>(instructionMapper)
.eq(InstructionMybatis::getTask_code, code) .eq(InstructionMybatis::getTask_code, code)
.eq(InstructionMybatis::getInstruction_status, InstructionStatusEnum.BUSY.getIndex())
.one(); .one();
if (ObjectUtil.isEmpty(ins)) { if (ObjectUtil.isEmpty(ins)) {
return null; return null;
@@ -375,7 +380,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void create(Instruction dto) throws Exception { public boolean create(Instruction dto) throws Exception {
dto = foramte(dto); dto = foramte(dto);
String task_code = dto.getTask_code(); String task_code = dto.getTask_code();
TaskDto task = taskService.findByCodeFromCache(task_code); TaskDto task = taskService.findByCodeFromCache(task_code);
@@ -389,7 +394,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
.eq(InstructionMybatis::getTask_code, dto.getTask_code())); .eq(InstructionMybatis::getTask_code, dto.getTask_code()));
if (CollUtil.isNotEmpty(instructionMybatis) && instructionMybatis.stream().anyMatch(inst -> inst.getStart_device_code() if (CollUtil.isNotEmpty(instructionMybatis) && instructionMybatis.stream().anyMatch(inst -> inst.getStart_device_code()
.equals(start_device_code))) { .equals(start_device_code))) {
return; return false;
} }
} }
String currentUsername = SecurityUtils.getCurrentNickName(); String currentUsername = SecurityUtils.getCurrentNickName();
@@ -412,6 +417,10 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (StrUtil.isEmpty(dto.getLink_num())) { if (StrUtil.isEmpty(dto.getLink_num())) {
dto.setIs_send(task.getLink_num()); dto.setIs_send(task.getLink_num());
} }
if (StrUtil.isEmpty(dto.getVehicle_code2())) {
dto.setVehicle_code2(task.getVehicle_code2());
}
if (StrUtil.isEmpty(task.getClass_type())) { if (StrUtil.isEmpty(task.getClass_type())) {
dto.setInstruction_type(task.getTask_type()); dto.setInstruction_type(task.getTask_type());
} else { } else {
@@ -471,6 +480,34 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
// 0为输送、立库任务 1 1楼叉车系统 2 2楼1区域AGV系统 3 2楼2区域AGV系统 // 0为输送、立库任务 1 1楼叉车系统 2 2楼1区域AGV系统 3 2楼2区域AGV系统
if (!StrUtil.equals(task.getAgv_system_type(), "0") if (!StrUtil.equals(task.getAgv_system_type(), "0")
&& ObjectUtil.isNotEmpty(task.getAgv_system_type())) { && ObjectUtil.isNotEmpty(task.getAgv_system_type())) {
if (StrUtil.isBlank(dto.getAgv_inst_type())) {
String agv_system_type = task.getAgv_system_type();
String task_type = task.getTask_type();
if (!StrUtil.equals(agv_system_type, "1")) {
// task_type
//1、生箔 Itype=1:取空,取满,放空,放满;
//2、分切 Itype=3取满、取空、放满、放空
//3、普通任务 Itype=2:取货、放货;
//4、叉车任务
//5、输送任务
//6、行架
//7、立库
if (StrUtil.equals(task_type, "1")) {
dto.setAgv_inst_type("1");
} else if (StrUtil.equals(task_type, "3")) {
dto.setAgv_inst_type("2");
} else if (StrUtil.equals(task_type, "2")) {
dto.setAgv_inst_type("3");
} else if (StrUtil.equals(task_type, "8")) {
dto.setAgv_inst_type("2");
} else {
log.info("未找到对应的AGV指令类型任务号:" + task.getTask_code() + ",task_type:" + task.getTask_type());
}
} else {
dto.setAgv_inst_type("4");
}
dto.setAgv_system_type(task.getAgv_system_type());
}
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class); NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
log.warn("下发AGV指令数据," + "指令号:" + dto.getInstruction_code() + ",AGV系统类型:" + dto.getAgv_system_type() log.warn("下发AGV指令数据," + "指令号:" + dto.getInstruction_code() + ",AGV系统类型:" + dto.getAgv_system_type()
+ ",AGV指令类型:" + dto.getInstruction_type()); + ",AGV指令类型:" + dto.getInstruction_type());
@@ -479,7 +516,17 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
log.info("sendAgvInstToNDC 指令校验:" + dto.getInstruction_code() + ",inst_type:" + dto.getInstruction_type() log.info("sendAgvInstToNDC 指令校验:" + dto.getInstruction_code() + ",inst_type:" + dto.getInstruction_type()
+ ",inst_system_type:" + dto.getAgv_system_type()); + ",inst_system_type:" + dto.getAgv_system_type());
} }
// log.info("2楼1区域AGV系统链接开始");
// String ip = paramService.findByCode(AcsConfig.AGVURL).getValue();
// int port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue());
// InetSocketAddress socketAddress = new InetSocketAddress(ip, port);
// Socket s = new Socket();
// s.connect(socketAddress, 2 * 1000);
// if (ObjectUtil.isNotEmpty(s)&&s.isConnected()==true) {
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto); ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
// } else {
// log.error("agv连接出现异常:服务端被关闭");
// }
} catch (Exception e) { } catch (Exception e) {
dto.setSend_status("2"); dto.setSend_status("2");
dto.setRemark(e.getMessage()); dto.setRemark(e.getMessage());
@@ -491,6 +538,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
.build(); .build();
logDto1.setLog_level(4); logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1); luceneExecuteLogService.deviceExecuteLog(logDto1);
return false;
} }
} else { } else {
// Boolean result = createLkInst(task.getStorage_task_type(),dto); // Boolean result = createLkInst(task.getStorage_task_type(),dto);
@@ -543,6 +591,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
InstructionMybatis entity = ConvertUtil.convert(dto, InstructionMybatis.class); InstructionMybatis entity = ConvertUtil.convert(dto, InstructionMybatis.class);
instructionMapper.insert(entity); instructionMapper.insert(entity);
instructions.add(dto); instructions.add(dto);
return true;
} }
@@ -584,6 +633,10 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (StrUtil.isEmpty(dto.getLink_num())) { if (StrUtil.isEmpty(dto.getLink_num())) {
dto.setIs_send(task.getLink_num()); dto.setIs_send(task.getLink_num());
} }
if (StrUtil.isEmpty(dto.getVehicle_code2())) {
dto.setVehicle_code2(task.getVehicle_code2());
}
// if (task.getTask_type().equals(CommonFinalParam.ONE) || task.getTask_type().equals("2")) { // if (task.getTask_type().equals(CommonFinalParam.ONE) || task.getTask_type().equals("2")) {
if (StrUtil.isEmpty(task.getClass_type())) { if (StrUtil.isEmpty(task.getClass_type())) {
dto.setInstruction_type(task.getTask_type()); dto.setInstruction_type(task.getTask_type());

View File

@@ -231,6 +231,17 @@ public interface TaskService extends CommonService<Task> {
*/ */
List<TaskDto> queryTaskByDeviceCodeAndStatus(String device_code); List<TaskDto> queryTaskByDeviceCodeAndStatus(String device_code);
/**
* 根据设备号和任务状态查询
*
* @param device_code
* @return List<TaskDto></TaskDto>
*/
List<TaskDto> queryTaskByDeviceCodeAndStatus3(String device_code);
/** /**
* 根据前工位取货点查找执行中的任务 * 根据前工位取货点查找执行中的任务
* *

View File

@@ -148,6 +148,11 @@ public class TaskDto implements Serializable {
*/ */
private String start_point_code2; private String start_point_code2;
/**
* 木箱号
*/
private String vehicle_code2;
/** /**
* 起始设备编码 * 起始设备编码
*/ */

View File

@@ -124,6 +124,14 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
private static final String TASK_TYPE = "8"; private static final String TASK_TYPE = "8";
/**
* 拔前行架任务类型
*/
private static final String BQHJ_TYPE = "6";
@Override @Override
public PageInfo<TaskDto> queryAll(TaskQueryParam query, Pageable pageable) { public PageInfo<TaskDto> queryAll(TaskQueryParam query, Pageable pageable) {
IPage<Task> queryPage = PageUtil.toMybatisPage(pageable); IPage<Task> queryPage = PageUtil.toMybatisPage(pageable);
@@ -483,6 +491,36 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
} }
@Override
public List<TaskDto> queryTaskByDeviceCodeAndStatus3(String device_code) {
List<TaskDto> collect = Optional
.ofNullable(this.tasks)
.orElse(new CopyOnWriteArrayList<>())
.stream()
.filter(task -> task.getStart_device_code().equals(device_code)
&& StrUtil.equals(task.getTask_status(), TaskStatusEnum.BUSY.getIndex()))
.filter(task -> instructionService.findByTaskcodeAndStatus(task.getTask_code()) != null)
.collect(Collectors.toList());
if(CollUtil.isEmpty(collect)){
tasks.forEach(
task ->{
if(BQHJ_TYPE.equals(task.getTask_type()) && StrUtil.isNotEmpty(task.getPut_device_code())){
Instruction instruction = instructionService.findByDeviceCodeFromCache(task.getNext_device_code());
if (ObjectUtil.isNotEmpty(instruction)) {
if (StrUtil.equals(instruction.getStart_device_code(), device_code)) {
collect.add(task);
}
}
}
}
);
}
return collect;
}
@Override @Override
public List<TaskDto> queryTaskByStartAndIntStatus(String head_start_device_code) { public List<TaskDto> queryTaskByStartAndIntStatus(String head_start_device_code) {
return Optional return Optional

View File

@@ -64,6 +64,7 @@ public class AutoCreateInst {
String taskcode = acsTask.getTask_code(); String taskcode = acsTask.getTask_code();
String task_type = acsTask.getTask_type(); String task_type = acsTask.getTask_type();
String vehiclecode = acsTask.getVehicle_code(); String vehiclecode = acsTask.getVehicle_code();
String vehiclecode2 = acsTask.getVehicle_code2();
String storage_task_type = acsTask.getStorage_task_type(); String storage_task_type = acsTask.getStorage_task_type();
String priority = acsTask.getPriority(); String priority = acsTask.getPriority();
String is_send = acsTask.getIs_send(); String is_send = acsTask.getIs_send();
@@ -139,6 +140,7 @@ public class AutoCreateInst {
instdto.setTask_id(taskid); instdto.setTask_id(taskid);
instdto.setTask_code(taskcode); instdto.setTask_code(taskcode);
instdto.setVehicle_code(vehiclecode); instdto.setVehicle_code(vehiclecode);
instdto.setVehicle_code2(vehiclecode2);
String now = DateUtil.now(); String now = DateUtil.now();
instdto.setCreate_time(now); instdto.setCreate_time(now);
instdto.setCreate_by(SecurityUtils.getCurrentNickName()); instdto.setCreate_by(SecurityUtils.getCurrentNickName());
@@ -191,9 +193,9 @@ public class AutoCreateInst {
} else { } else {
instdto.setAgv_inst_type("4"); instdto.setAgv_inst_type("4");
} }
boolean flag;
try { try {
instructionService.create(instdto); flag = instructionService.create(instdto);
} catch (Exception e) { } catch (Exception e) {
acsTask.setRemark(e.getMessage()); acsTask.setRemark(e.getMessage());
taskserver.updateByCodeFromCache(acsTask); taskserver.updateByCodeFromCache(acsTask);
@@ -206,9 +208,11 @@ public class AutoCreateInst {
continue; continue;
} }
//创建指令后修改任务状态 //创建指令后修改任务状态
if (flag) {
acsTask.setTask_status(TaskStatusEnum.BUSY.getIndex()); acsTask.setTask_status(TaskStatusEnum.BUSY.getIndex());
acsTask.setUpdate_time(DateUtil.now()); acsTask.setUpdate_time(DateUtil.now());
taskserver.update(acsTask); taskserver.update(acsTask);
}
} }
} }

View File

@@ -76,6 +76,7 @@ public class CreateDDJInst {
String taskcode = taskDto.getTask_code(); String taskcode = taskDto.getTask_code();
String task_type = taskDto.getTask_type(); String task_type = taskDto.getTask_type();
String vehiclecode = taskDto.getVehicle_code(); String vehiclecode = taskDto.getVehicle_code();
String vehiclecode2 = taskDto.getVehicle_code2();
String priority = taskDto.getPriority(); String priority = taskDto.getPriority();
String start_device_code = taskDto.getStart_device_code(); String start_device_code = taskDto.getStart_device_code();
@@ -230,6 +231,7 @@ public class CreateDDJInst {
instdto.setTask_id(taskid); instdto.setTask_id(taskid);
instdto.setTask_code(taskcode); instdto.setTask_code(taskcode);
instdto.setVehicle_code(vehiclecode); instdto.setVehicle_code(vehiclecode);
instdto.setVehicle_code2(vehiclecode2);
String now = DateUtil.now(); String now = DateUtil.now();
instdto.setCreate_time(now); instdto.setCreate_time(now);
instdto.setCreate_by(SecurityUtils.getCurrentNickName()); instdto.setCreate_by(SecurityUtils.getCurrentNickName());
@@ -331,6 +333,7 @@ public class CreateDDJInst {
instdto.setTask_id(taskid); instdto.setTask_id(taskid);
instdto.setTask_code(taskcode); instdto.setTask_code(taskcode);
instdto.setVehicle_code(vehiclecode); instdto.setVehicle_code(vehiclecode);
instdto.setVehicle_code2(vehiclecode2);
String now = DateUtil.now(); String now = DateUtil.now();
instdto.setCreate_time(now); instdto.setCreate_time(now);
instdto.setCreate_by(SecurityUtils.getCurrentNickName()); instdto.setCreate_by(SecurityUtils.getCurrentNickName());

View File

@@ -51,7 +51,7 @@ universal_feedMessage10=\u524D\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u
universal_feedMessage11=\u540E\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001 universal_feedMessage11=\u540E\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001
universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25 universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25
universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7! universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7!
universal_notCreateInstMessage2=\u5149\u7535\u65E0\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! universal_notCreateInstMessage2=\u5149\u7535\u65E0\u8D27\u5E76\u4E14\u5DE5\u4F5C\u6A21\u5F0F\u4E0D\u4E3A\u5F85\u673A,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4!
universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8\u8FDB\u5165 universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8\u8FDB\u5165
universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4!
universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4! universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4!

View File

@@ -5,6 +5,7 @@ export default {
'instruction_type': 'Instruction Type', 'instruction_type': 'Instruction Type',
'task_code': 'Task Code', 'task_code': 'Task Code',
'vehicle_code': 'Vehicle Code', 'vehicle_code': 'Vehicle Code',
'vehicle_code2': 'Box Code',
'instruction_status': 'Instruction Status', 'instruction_status': 'Instruction Status',
'send_status': 'Send Status', 'send_status': 'Send Status',
'start_point_code': 'Start Device Code', 'start_point_code': 'Start Device Code',
@@ -21,6 +22,7 @@ export default {
'update_time': 'Update Time', 'update_time': 'Update Time',
'input_taskCode_or_instCode': 'Input TaskCode Or InstCode', 'input_taskCode_or_instCode': 'Input TaskCode Or InstCode',
'input_vehicleCode': 'Input VehicleCode', 'input_vehicleCode': 'Input VehicleCode',
'input_vehicleCode2': 'Input BoxCode',
'material': 'Material Type', 'material': 'Material Type',
'task_status': 'Task Status', 'task_status': 'Task Status',
'input_startCode_or_nextCode': 'Input StartCode Or NextCode', 'input_startCode_or_nextCode': 'Input StartCode Or NextCode',

View File

@@ -5,6 +5,7 @@ export default {
'instruction_type': 'Jenis Instruksi', 'instruction_type': 'Jenis Instruksi',
'task_code': 'Nomor Tugas', 'task_code': 'Nomor Tugas',
'vehicle_code': 'Nomor Kendaraan', 'vehicle_code': 'Nomor Kendaraan',
'vehicle_code2': 'Nomor kotak kayu',
'instruction_status': 'Status Perintah', 'instruction_status': 'Status Perintah',
'send_status': 'Status Pengiriman', 'send_status': 'Status Pengiriman',
'start_point_code': 'Titik Penjemputan', 'start_point_code': 'Titik Penjemputan',
@@ -21,6 +22,7 @@ export default {
'update_time': 'Ubah Waktu', 'update_time': 'Ubah Waktu',
'input_taskCode_or_instCode': 'Masukkan Nomor Tugas Atau Nomor Instruksi', 'input_taskCode_or_instCode': 'Masukkan Nomor Tugas Atau Nomor Instruksi',
'input_vehicleCode': 'Masukkan Nomor Kendaraan', 'input_vehicleCode': 'Masukkan Nomor Kendaraan',
'input_vehicleCode2': 'Masukkan Nomor kotak kayu',
'material': 'Jenis Barang', 'material': 'Jenis Barang',
'task_status': 'Status Tugas', 'task_status': 'Status Tugas',
'input_startCode_or_nextCode': 'Jenis Barang', 'input_startCode_or_nextCode': 'Jenis Barang',

View File

@@ -5,6 +5,7 @@ export default {
'instruction_type': '指令类型', 'instruction_type': '指令类型',
'task_code': '任务号', 'task_code': '任务号',
'vehicle_code': '载具号', 'vehicle_code': '载具号',
'vehicle_code2': '木箱号',
'instruction_status': '指令状态', 'instruction_status': '指令状态',
'send_status': '下发状态', 'send_status': '下发状态',
'start_point_code': '取货点', 'start_point_code': '取货点',
@@ -21,6 +22,7 @@ export default {
'update_time': '修改时间', 'update_time': '修改时间',
'input_taskCode_or_instCode': '输入任务号或指令号', 'input_taskCode_or_instCode': '输入任务号或指令号',
'input_vehicleCode': '输入载具号', 'input_vehicleCode': '输入载具号',
'input_vehicleCode2': '输入木箱号',
'material': '物料类型', 'material': '物料类型',
'task_status': '任务状态', 'task_status': '任务状态',
'input_startCode_or_nextCode': '输入起点或终点', 'input_startCode_or_nextCode': '输入起点或终点',

View File

@@ -3,6 +3,7 @@ export default {
'txt_box': { 'txt_box': {
'Enter_task_number': '输入任务号', 'Enter_task_number': '输入任务号',
'Vehicle_registration_number': '输入载具号', 'Vehicle_registration_number': '输入载具号',
'Vehicle2_registration_number': '输入木箱号',
'Material_type': '物料类型', 'Material_type': '物料类型',
'Task_status': '任务状态', 'Task_status': '任务状态',
'Origin_or_destination': '输入起点或终点', 'Origin_or_destination': '输入起点或终点',
@@ -18,6 +19,7 @@ export default {
'agv_action_type': 'agv二次分配类型', 'agv_action_type': 'agv二次分配类型',
'Priority': '优先级', 'Priority': '优先级',
'Vehicle_number': '载具号', 'Vehicle_number': '载具号',
'Vehicle_number2': '木箱号',
'Task_code': '任务号', 'Task_code': '任务号',
'Task': '任务', 'Task': '任务',
'start_or_end': '起点或终点', 'start_or_end': '起点或终点',

View File

@@ -32,6 +32,17 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Vehicle_number2')">
<el-input
v-model="query.vehicle_code2"
size="small"
clearable
:placeholder="$t('task.txt_box.Vehicle2_registration_number')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('task.txt_box.Material_type')"> <el-form-item :label="$t('task.txt_box.Material_type')">
<el-select <el-select
v-model="query.material_type" v-model="query.material_type"
@@ -149,6 +160,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" /> <el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" />
<el-table-column prop="vehicle_code2" :label="$t('task.txt_box.Vehicle_number2')" :min-width="flexWidth('vehicle_code2',crud.data,$t('task.txt_box.Vehicle_number2'))" />
<el-table-column prop="instruction_status" :label="$t('TaskRecord.table.Instruction_status')" :min-width="flexWidth('instruction_status',crud.data,$t('TaskRecord.table.Instruction_status'))"> <el-table-column prop="instruction_status" :label="$t('TaskRecord.table.Instruction_status')" :min-width="flexWidth('instruction_status',crud.data,$t('TaskRecord.table.Instruction_status'))">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.instruction_status=='0' ">{{ $t('task.select.Ready') }}</span> <span v-if="scope.row.instruction_status=='0' ">{{ $t('task.select.Ready') }}</span>
@@ -299,6 +311,7 @@ export default {
const params = { const params = {
code: this.query.task_code, code: this.query.task_code,
vehicle_code: this.query.vehicle_code, vehicle_code: this.query.vehicle_code,
vehicle_code2: this.query.vehicle_code2,
material_type: this.query.material_type, material_type: this.query.material_type,
status: this.query.status, status: this.query.status,
point_code: this.crud.pointCode, point_code: this.crud.pointCode,

View File

@@ -32,6 +32,17 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Vehicle_number2')">
<el-input
v-model="query.vehicle_code2"
size="small"
clearable
:placeholder="$t('task.txt_box.Vehicle2_registration_number')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('task.txt_box.Material_type')"> <el-form-item :label="$t('task.txt_box.Material_type')">
<el-select <el-select
v-model="query.material_type" v-model="query.material_type"
@@ -277,8 +288,8 @@
<el-table-column v-if="false" prop="task_id" label="任务标识" /> <el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" :label="$t('task.txt_box.Task_code')" :min-width="flexWidth('task_code',crud.data,$t('task.txt_box.Task_code'))" /> <el-table-column prop="task_code" :label="$t('task.txt_box.Task_code')" :min-width="flexWidth('task_code',crud.data,$t('task.txt_box.Task_code'))" />
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" /> <el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" />
<el-table-column prop="vehicle_code2" :label="$t('task.txt_box.Vehicle_number2')" />
<el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px"> <el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px">
debugger
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.class_type!=null && scope.row.class_type.length===2 ">{{ dict.label.task_type[scope.row.class_type] }}</span> <span v-if="scope.row.class_type!=null && scope.row.class_type.length===2 ">{{ dict.label.task_type[scope.row.class_type] }}</span>
<span v-else>{{ dict.label.task_type[scope.row.task_type] }}</span> <span v-else>{{ dict.label.task_type[scope.row.task_type] }}</span>
@@ -327,6 +338,7 @@ import { downloadFile } from '@/utils'
const defaultForm = { const defaultForm = {
task_id: null, task_id: null,
vehicle_code: null, vehicle_code: null,
vehicle_code2: null,
vehicle_type: null, vehicle_type: null,
task_type: null, task_type: null,
class_type: null, class_type: null,
@@ -493,6 +505,7 @@ export default {
const params = { const params = {
task_code: this.query.task_code, task_code: this.query.task_code,
vehicle_code: this.query.vehicle_code, vehicle_code: this.query.vehicle_code,
vehicle_code2: this.query.vehicle_code2,
material_type: this.query.material_type, material_type: this.query.material_type,
status: this.query.status, status: this.query.status,
point_code: this.crud.pointCode, point_code: this.crud.pointCode,

View File

@@ -32,6 +32,17 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Vehicle_number2')">
<el-input
v-model="query.vehicle_code2"
size="small"
clearable
:placeholder="$t('task.txt_box.Vehicle2_registration_number')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('task.txt_box.Material_type')"> <el-form-item :label="$t('task.txt_box.Material_type')">
<el-select <el-select
v-model="query.material_type" v-model="query.material_type"
@@ -123,6 +134,7 @@
<el-table-column v-if="false" prop="task_id" label="任务标识" /> <el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" :label="$t('TaskRecord.table.Task_number')" :min-width="flexWidth('task_code',crud.data,$t('TaskRecord.table.Task_number'))" /> <el-table-column prop="task_code" :label="$t('TaskRecord.table.Task_number')" :min-width="flexWidth('task_code',crud.data,$t('TaskRecord.table.Task_number'))" />
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" /> <el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" />
<el-table-column prop="vehicle_code2" :label="$t('task.txt_box.Vehicle_number2')" :min-width="flexWidth('vehicle_code2',crud.data,$t('task.txt_box.Vehicle_number2'))" />
<el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px"> <el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.class_type!=null && scope.row.class_type.length===2">{{ dict.label.task_type[scope.row.class_type] }}</span> <span v-if="scope.row.class_type!=null && scope.row.class_type.length===2">{{ dict.label.task_type[scope.row.class_type] }}</span>
@@ -182,6 +194,7 @@ import { downloadFile } from '@/utils'
const defaultForm = { const defaultForm = {
task_id: null, task_id: null,
vehicle_code: null, vehicle_code: null,
vehicle_code2: null,
vehicle_type: null, vehicle_type: null,
task_type: null, task_type: null,
task_status: null, task_status: null,
@@ -262,6 +275,7 @@ export default {
const params = { const params = {
task_code: this.query.task_code, task_code: this.query.task_code,
vehicle_code: this.query.vehicle_code, vehicle_code: this.query.vehicle_code,
vehicle_code2: this.query.vehicle_code2,
material_type: this.query.material_type, material_type: this.query.material_type,
status: this.query.is_over, status: this.query.is_over,
point_code: this.crud.pointCode, point_code: this.crud.pointCode,

View File

@@ -32,6 +32,17 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('Inst.table.vehicle_code2')">
<el-input
v-model="query.vehicle_code2"
size="small"
clearable
:placeholder="$t('task.txt_box.Vehicle2_registration_number')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('Inst.table.material')"> <el-form-item :label="$t('Inst.table.material')">
<el-select <el-select
v-model="query.material_type" v-model="query.material_type"
@@ -159,6 +170,7 @@
<!-- <el-table-column prop="link_num" label="关联编号" />--> <!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="task_code" :label="$t('Inst.table.task_code')" :min-width="flexWidth('task_code',crud.data,$t('Inst.table.task_code'))" /> <el-table-column prop="task_code" :label="$t('Inst.table.task_code')" :min-width="flexWidth('task_code',crud.data,$t('Inst.table.task_code'))" />
<el-table-column prop="vehicle_code" :label="$t('Inst.table.vehicle_code')" :min-width="flexWidth('vehicle_code',crud.data,$t('Inst.table.vehicle_code'))" /> <el-table-column prop="vehicle_code" :label="$t('Inst.table.vehicle_code')" :min-width="flexWidth('vehicle_code',crud.data,$t('Inst.table.vehicle_code'))" />
<el-table-column prop="vehicle_code2" :label="$t('Inst.table.vehicle_code2')" :min-width="flexWidth('vehicle_code2',crud.data,$t('Inst.table.vehicle_code2'))" />
<el-table-column prop="instruction_status" :label="$t('Inst.table.instruction_status')" :min-width="flexWidth('instruction_status',crud.data,$t('Inst.table.instruction_status'))"> <el-table-column prop="instruction_status" :label="$t('Inst.table.instruction_status')" :min-width="flexWidth('instruction_status',crud.data,$t('Inst.table.instruction_status'))">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.instruction_status=='0' ">{{ $t('Inst.table.ready') }}</span> <span v-if="scope.row.instruction_status=='0' ">{{ $t('Inst.table.ready') }}</span>
@@ -235,6 +247,8 @@ const defaultForm = {
instruction_id: null, instruction_id: null,
task_id: null, task_id: null,
instruction_code: null, instruction_code: null,
vehicle_code: null,
vehicle_code2: null,
execute_device_code: null, execute_device_code: null,
execute_status: null, execute_status: null,
execute_status_description: null, execute_status_description: null,

View File

@@ -46,6 +46,17 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Vehicle_number2')">
<el-input
v-model="query.vehicle_code2"
size="small"
clearable
:placeholder="$t('task.txt_box.Vehicle2_registration_number')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('task.txt_box.Material_type')"> <el-form-item :label="$t('task.txt_box.Material_type')">
<el-select <el-select
v-model="query.material_type" v-model="query.material_type"
@@ -546,6 +557,9 @@
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" <el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')"
:min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))"
/> />
<el-table-column prop="vehicle_code2" :label="$t('task.txt_box.Vehicle_number2')"
:min-width="flexWidth('vehicle_code2',crud.data,$t('task.txt_box.Vehicle_number2'))"
/>
<el-table-column prop="task_status" :label="$t('task.txt_box.Task_status')" width="150px"> <el-table-column prop="task_status" :label="$t('task.txt_box.Task_status')" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.task_status==='0' ">{{ $t('task.select.Ready') }}</span> <span v-if="scope.row.task_status==='0' ">{{ $t('task.select.Ready') }}</span>
@@ -724,6 +738,7 @@ export default {
form: { form: {
task_id: null, task_id: null,
vehicle_code: null, vehicle_code: null,
vehicle_code2: null,
vehicle_type: null, vehicle_type: null,
task_type: '1', task_type: '1',
storage_task_type: '', storage_task_type: '',