mes接口更新
This commit is contained in:
@@ -175,15 +175,13 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
|||||||
if (move_1 == 0) {
|
if (move_1 == 0) {
|
||||||
this.setRequireSucess1(false);
|
this.setRequireSucess1(false);
|
||||||
}
|
}
|
||||||
|
logServer.deviceItemValue(this.device_code, "move_1", String.valueOf(move_1));
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_1:" + last_move_1 + "->" + move_1);
|
||||||
}
|
}
|
||||||
if (move_2 != last_move_2) {
|
if (move_2 != last_move_2) {
|
||||||
if (move_2 == 0) {
|
if (move_2 == 0) {
|
||||||
this.setRequireSucess2(false);
|
this.setRequireSucess2(false);
|
||||||
}
|
}
|
||||||
logServer.deviceItemValue(this.device_code, "move_1", String.valueOf(move_1));
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_1:" + last_move_1 + "->" + move_1);
|
|
||||||
}
|
|
||||||
if (move_2 != last_move_2) {
|
|
||||||
logServer.deviceItemValue(this.device_code, "move_2", String.valueOf(move_2));
|
logServer.deviceItemValue(this.device_code, "move_2", String.valueOf(move_2));
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_2:" + last_move_2 + "->" + move_2);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号move_2:" + last_move_2 + "->" + move_2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.nl.acs.route.service.RouteLineService;
|
|||||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
import org.nl.acs.task.service.dto.TaskDto;
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.exception.WDKException;
|
import org.nl.exception.WDKException;
|
||||||
import org.nl.utils.SpringContextHolder;
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
@@ -305,6 +306,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
RljnPackagePalletSplitManipulatorDeviceDriver rljnPackagePalletSplitManipulatorDeviceDriver;
|
RljnPackagePalletSplitManipulatorDeviceDriver rljnPackagePalletSplitManipulatorDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||||
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (lnshPalletizingManipulatorSiteDeviceDriver.getIserror()) {
|
||||||
|
throw new BadRequestException("设备状态异常,下发失败!");
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(qty)) {
|
if (StrUtil.isEmpty(qty)) {
|
||||||
throw new WDKException("数量不能为空");
|
throw new WDKException("数量不能为空");
|
||||||
}
|
}
|
||||||
@@ -319,6 +323,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
}
|
}
|
||||||
if (device.getDeviceDriver() instanceof LnshSplitManipulatorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof LnshSplitManipulatorDeviceDriver) {
|
||||||
lnshSplitManipulatorDeviceDriver = (LnshSplitManipulatorDeviceDriver) device.getDeviceDriver();
|
lnshSplitManipulatorDeviceDriver = (LnshSplitManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (lnshSplitManipulatorDeviceDriver.getIserror()) {
|
||||||
|
throw new BadRequestException("设备状态异常,下发失败!");
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(qty)) {
|
if (StrUtil.isEmpty(qty)) {
|
||||||
throw new WDKException("数量不能为空");
|
throw new WDKException("数量不能为空");
|
||||||
}
|
}
|
||||||
@@ -347,6 +354,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
}
|
}
|
||||||
if (device.getDeviceDriver() instanceof LnshPackagePalletManipulatorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof LnshPackagePalletManipulatorDeviceDriver) {
|
||||||
lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver();
|
lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (lnshPackagePalletManipulatorDeviceDriver.getIserror()) {
|
||||||
|
throw new BadRequestException("设备状态异常,下发失败!");
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(qty)) {
|
if (StrUtil.isEmpty(qty)) {
|
||||||
throw new WDKException("数量不能为空");
|
throw new WDKException("数量不能为空");
|
||||||
}
|
}
|
||||||
@@ -363,6 +373,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
|
|
||||||
if (device.getDeviceDriver() instanceof RljnPackagePalletSplitManipulatorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof RljnPackagePalletSplitManipulatorDeviceDriver) {
|
||||||
rljnPackagePalletSplitManipulatorDeviceDriver = (RljnPackagePalletSplitManipulatorDeviceDriver) device.getDeviceDriver();
|
rljnPackagePalletSplitManipulatorDeviceDriver = (RljnPackagePalletSplitManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
|
if (rljnPackagePalletSplitManipulatorDeviceDriver.getIserror()) {
|
||||||
|
throw new BadRequestException("设备状态异常,下发失败!");
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(qty)) {
|
if (StrUtil.isEmpty(qty)) {
|
||||||
throw new WDKException("数量不能为空");
|
throw new WDKException("数量不能为空");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -569,6 +569,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
//更新窑的信息
|
//更新窑的信息
|
||||||
KilnUtil.outKiln(vehicle_code);
|
KilnUtil.outKiln(vehicle_code);
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("vehicle_code",vehicle_code);
|
||||||
|
//调用wms的接口
|
||||||
|
WmsToJnServiceImpl wmsToJnService = new WmsToJnServiceImpl();
|
||||||
|
wmsToJnService.feedBackOutKiln(jo);
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
result.put("message", "任务状态反馈成功!");
|
result.put("message", "任务状态反馈成功!");
|
||||||
|
|||||||
Reference in New Issue
Block a user