fix: 分切行架任务就绪不下发
This commit is contained in:
@@ -4,6 +4,7 @@ package org.nl.acs.device.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -741,7 +741,6 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.setDeviceStatus(form);
|
standardInspectSiteDeviceDriver.setDeviceStatus(form);
|
||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof SlitTwoManipulatorDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof SlitTwoManipulatorDeviceDriver) {
|
||||||
slitTwoManipulatorDeviceDriver = (SlitTwoManipulatorDeviceDriver) device.getDeviceDriver();
|
slitTwoManipulatorDeviceDriver = (SlitTwoManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
slitTwoManipulatorDeviceDriver.setDeviceStatus(form);
|
slitTwoManipulatorDeviceDriver.setDeviceStatus(form);
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ import lombok.Data;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
||||||
|
import org.nl.acs.device.service.DeviceExtraService;
|
||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
|
import org.nl.acs.device.service.impl.DeviceExtraServiceImpl;
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.FeedLmsRealFailed;
|
import org.nl.acs.device_driver.FeedLmsRealFailed;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
@@ -62,7 +64,6 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||||
@Autowired
|
@Autowired
|
||||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||||
|
|
||||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||||
@Autowired
|
@Autowired
|
||||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||||
@@ -359,9 +360,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//申请任务
|
//申请任务
|
||||||
if (mode == 2 && move1 == 0 && move2 == 0 && action1 == 0 && action2 == 0 && task1 == 0 && task2 == 0 && !requireSucess) {
|
if (mode == 2 && move1 == 0 && move2 == 0 && action1 == 0 && action2 == 0 && task1 == 0 && task2 == 0 && !requireSucess) {
|
||||||
apply_task();
|
apply_task();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
String remark = "";
|
String remark = "";
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
|
|||||||
@@ -344,8 +344,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((task.getStart_device_code().equals(start_device_code)
|
if ((task.getStart_device_code().equals(start_device_code)
|
||||||
|| task.getStart_device_code2().equals(start_device_code))
|
|| (StrUtil.isNotEmpty(task.getStart_device_code2()) && task.getStart_device_code2().equals(start_device_code))
|
||||||
&& StrUtil.equals(task.getTask_status(), "0")) {
|
&& StrUtil.equals(task.getTask_status(), "0"))) {
|
||||||
list.add(task);
|
list.add(task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,7 +458,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((task.getStart_device_code().equals(head_start_device_code)
|
if ((task.getStart_device_code().equals(head_start_device_code)
|
||||||
|| task.getStart_device_code2().equals(head_start_device_code))
|
|| (StrUtil.isNotEmpty(task.getStart_device_code2()) && task.getStart_device_code2().equals(head_start_device_code)))
|
||||||
&& StrUtil.equals(task.getTask_status(), "1")) {
|
&& StrUtil.equals(task.getTask_status(), "1")) {
|
||||||
Instruction instruction = instructionService.findByTaskcodeAndStatus(task.getTask_code());
|
Instruction instruction = instructionService.findByTaskcodeAndStatus(task.getTask_code());
|
||||||
if (ObjectUtil.isNotEmpty(instruction)) {
|
if (ObjectUtil.isNotEmpty(instruction)) {
|
||||||
@@ -1238,6 +1238,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据任务号查询任务
|
* 根据任务号查询任务
|
||||||
|
*
|
||||||
* @param task_code
|
* @param task_code
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user