rev:任务号校验
This commit is contained in:
@@ -22,6 +22,7 @@ import org.nl.acs.task.instruction.service.impl.InstructionServiceImpl;
|
|||||||
import org.nl.acs.task.task.service.TaskService;
|
import org.nl.acs.task.task.service.TaskService;
|
||||||
import org.nl.acs.task.task.service.dto.TaskDto;
|
import org.nl.acs.task.task.service.dto.TaskDto;
|
||||||
import org.nl.acs.task.task.service.impl.TaskServiceImpl;
|
import org.nl.acs.task.task.service.impl.TaskServiceImpl;
|
||||||
|
import org.nl.common.db.CommonFinalParam;
|
||||||
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.thread.ThreadPoolExecutorUtil;
|
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||||
@@ -189,8 +190,10 @@ public class AgvNdcOneDeviceDriver extends AbstractStandardDeviceDriver {
|
|||||||
agv_status = 1;
|
agv_status = 1;
|
||||||
//到达普通站点
|
//到达普通站点
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
// 请求wms是否可以取货
|
boolean canTake = StrUtil.startWith(task.getTask_code(), CommonFinalParam.HYPHEN_)
|
||||||
if (acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.APPLY_TAKE.getValue())) {
|
|| acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.APPLY_TAKE.getValue());
|
||||||
|
|
||||||
|
if (canTake) {
|
||||||
log.info("到达{}取货点开始取货", device_code + "指令号:" + ikey);
|
log.info("到达{}取货点开始取货", device_code + "指令号:" + ikey);
|
||||||
inst.setExecute_status("1");
|
inst.setExecute_status("1");
|
||||||
instructionService.update(inst);
|
instructionService.update(inst);
|
||||||
@@ -242,8 +245,10 @@ public class AgvNdcOneDeviceDriver extends AbstractStandardDeviceDriver {
|
|||||||
agv_status = 2;
|
agv_status = 2;
|
||||||
//到达普通站点取货完成
|
//到达普通站点取货完成
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
// 通知wms取货完成
|
boolean canTake = StrUtil.startWith(task.getTask_code(), CommonFinalParam.HYPHEN_)
|
||||||
if (acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.TAKE_FINISH.getValue())) {
|
|| acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.TAKE_FINISH.getValue());
|
||||||
|
|
||||||
|
if (canTake) {
|
||||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
log.info("agv进入" + device_code + "取货完成" + "指令号:" + ikey);
|
log.info("agv进入" + device_code + "取货完成" + "指令号:" + ikey);
|
||||||
flag = true;
|
flag = true;
|
||||||
@@ -299,8 +304,11 @@ public class AgvNdcOneDeviceDriver extends AbstractStandardDeviceDriver {
|
|||||||
agv_status = 3;
|
agv_status = 3;
|
||||||
//普通站点
|
//普通站点
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
if (acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.APPLY_PUT.getValue())) {
|
boolean canTake = StrUtil.startWith(task.getTask_code(), CommonFinalParam.HYPHEN_)
|
||||||
log.info("到达{}放货点", device_code + "指令号:" + ikey);
|
|| acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.APPLY_PUT.getValue());
|
||||||
|
|
||||||
|
if (canTake) {
|
||||||
|
log.info("到达{}放货点开始放货", device_code + "指令号:" + ikey);
|
||||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
@@ -346,7 +354,10 @@ public class AgvNdcOneDeviceDriver extends AbstractStandardDeviceDriver {
|
|||||||
agv_status = 4;
|
agv_status = 4;
|
||||||
//agv普通站点放货完成
|
//agv普通站点放货完成
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
if (acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.PUT_FINISH.getValue())) {
|
boolean canTake = StrUtil.startWith(task.getTask_code(), CommonFinalParam.HYPHEN_)
|
||||||
|
|| acsToWmsService.feedbackTask(inst, WmsFeedbackStatusEnum.PUT_FINISH.getValue());
|
||||||
|
|
||||||
|
if (canTake) {
|
||||||
log.info("{}放货完成", device_code + "指令号:" + ikey);
|
log.info("{}放货完成", device_code + "指令号:" + ikey);
|
||||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user