|
@ -6,6 +6,7 @@ import lombok.Getter; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.Setter; |
|
|
import lombok.Setter; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.nl.acs.agv.XgAgvEnum; |
|
|
import org.nl.acs.agv.server.impl.XianGongAgvServiceImpl; |
|
|
import org.nl.acs.agv.server.impl.XianGongAgvServiceImpl; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.DeviceDriverBaseReader; |
|
|
import org.nl.acs.device_driver.DeviceDriverBaseReader; |
|
@ -20,6 +21,8 @@ import org.nl.modules.lucene.service.LuceneExecuteLogService; |
|
|
import org.nl.modules.lucene.service.dto.LuceneLogDto; |
|
|
import org.nl.modules.lucene.service.dto.LuceneLogDto; |
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@Getter |
|
|
@Getter |
|
|
@Setter |
|
|
@Setter |
|
@ -144,6 +147,7 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void executeLogicBefore() { |
|
|
private void executeLogicBefore() { |
|
|
|
|
|
// 告诉agv急停
|
|
|
if (error == 1 && ObjectUtil.isNotEmpty(car_no)) { |
|
|
if (error == 1 && ObjectUtil.isNotEmpty(car_no)) { |
|
|
String[] carArr = {car_no}; |
|
|
String[] carArr = {car_no}; |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONObject json = new JSONObject(); |
|
@ -153,6 +157,24 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
//创建订单序列
|
|
|
//创建订单序列
|
|
|
xianGongAgv.sendOrderStopToXZ(json); |
|
|
xianGongAgv.sendOrderStopToXZ(json); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 给光栅下发命令5
|
|
|
|
|
|
if (error == 5) { |
|
|
|
|
|
String[] key = {"toCommand"}; |
|
|
|
|
|
Integer[] value = {5}; |
|
|
|
|
|
writing(Arrays.asList(key),Arrays.asList(value)); |
|
|
|
|
|
|
|
|
|
|
|
// 如果车号不为空则告诉agv继续作业
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(car_no)) { |
|
|
|
|
|
String[] carArr = {car_no}; |
|
|
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
|
|
json.put("vehicles", carArr); |
|
|
|
|
|
// 请求下发agv继续
|
|
|
|
|
|
XianGongAgvServiceImpl xianGongAgv = SpringContextHolder.getBean(XianGongAgvServiceImpl.class); |
|
|
|
|
|
//创建订单序列
|
|
|
|
|
|
xianGongAgv.sendOrderContinueToXZ(json); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|