Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -27,6 +27,7 @@ import org.nl.acs.opc.DeviceType;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.service.ParamService;
|
import org.nl.modules.system.service.ParamService;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -40,6 +41,7 @@ import java.util.Map;
|
|||||||
public class MagicAgvServiceImpl implements MagicAgvService {
|
public class MagicAgvServiceImpl implements MagicAgvService {
|
||||||
private final DeviceAppService deviceAppService;
|
private final DeviceAppService deviceAppService;
|
||||||
private final ParamService paramService;
|
private final ParamService paramService;
|
||||||
|
@Lazy
|
||||||
private final AcsToWmsService acsToWmsService;
|
private final AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.system.service.ParamService;
|
import org.nl.modules.system.service.ParamService;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -41,6 +42,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
|
|
||||||
private final DeviceAppService deviceAppService;
|
private final DeviceAppService deviceAppService;
|
||||||
private final ParamService paramService;
|
private final ParamService paramService;
|
||||||
|
@Lazy
|
||||||
private final AcsToWmsService acsToWmsService;
|
private final AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
private final DeviceExecuteLogService logServer;
|
private final DeviceExecuteLogService logServer;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.nl.acs.opc.DeviceAppService;
|
|||||||
import org.nl.acs.opc.DeviceType;
|
import org.nl.acs.opc.DeviceType;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.service.ParamService;
|
import org.nl.modules.system.service.ParamService;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -34,6 +35,7 @@ import java.util.Map;
|
|||||||
public class XianGongAgvServiceImpl implements XianGongAgvService {
|
public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||||
private final DeviceAppService deviceAppService;
|
private final DeviceAppService deviceAppService;
|
||||||
private final ParamService paramService;
|
private final ParamService paramService;
|
||||||
|
@Lazy
|
||||||
private final AcsToWmsService acsToWmsService;
|
private final AcsToWmsService acsToWmsService;
|
||||||
Map<String, AgvDto> AGVDeviceStatus = new HashMap();
|
Map<String, AgvDto> AGVDeviceStatus = new HashMap();
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import org.nl.acs.AcsConfig;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
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.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
|
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||||
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;
|
||||||
@@ -334,7 +335,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
//申请捆扎
|
//申请捆扎
|
||||||
@@ -748,6 +748,16 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
map3.put("value", "1");
|
map3.put("value", "1");
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
|
while(!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer()+"."+this.getOpcPlc()+"."+this.getDevice_code()+".task").toString()
|
||||||
|
,instdto.getInstruction_code())){
|
||||||
|
this.writing(list);
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||||
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
// if (task != Integer.parseInt(inst.getInstruction_code())) {
|
// if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
// this.writing(list);
|
// this.writing(list);
|
||||||
// message = "重新下发电气信号";
|
// message = "重新下发电气信号";
|
||||||
@@ -780,10 +790,20 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
map3.put("value", "1");
|
map3.put("value", "1");
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
while(!StrUtil.equals(this.getOpcValueAccessor().getValue(this.getOpcServer()+"."+this.getOpcPlc()+"."+this.getDevice_code()+".task").toString()
|
||||||
|
,inst.getInstruction_code())){
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||||
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
|
// this.writing(list);
|
||||||
|
// logServer.deviceExecuteLog(device_code, "", "", inst.getInstruction_code() + "再次下发电气信号");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -340,10 +340,10 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
map.put("code", "to_target");
|
map.put("code", "to_target");
|
||||||
map.put("value", "0");
|
map.put("value", "0");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
Map map2 = new HashMap();
|
// Map map2 = new HashMap();
|
||||||
map2.put("code", "to_task");
|
// map2.put("code", "to_task");
|
||||||
map2.put("value", "0");
|
// map2.put("value", "0");
|
||||||
list.add(map2);
|
// list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code", "to_command");
|
map3.put("code", "to_command");
|
||||||
map3.put("value", "0");
|
map3.put("value", "0");
|
||||||
@@ -648,12 +648,16 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
list.add(map);
|
list.add(map);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code", "to_task");
|
map2.put("code", "to_task");
|
||||||
map2.put("value", inst.getInstruction_code());
|
map2.put("value", "0");
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code", "to_command");
|
map3.put("code", "to_command");
|
||||||
map3.put("value", "1");
|
map3.put("value", "1");
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
|
Map map4 = new HashMap();
|
||||||
|
map2.put("code", "to_task");
|
||||||
|
map2.put("value", inst.getInstruction_code());
|
||||||
|
list.add(map4);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
@@ -755,12 +759,16 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
list.add(map);
|
list.add(map);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code", "to_task");
|
map2.put("code", "to_task");
|
||||||
map2.put("value", instdto.getInstruction_code());
|
map2.put("value", "0");
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code", "to_command");
|
map3.put("code", "to_command");
|
||||||
map3.put("value", "1");
|
map3.put("value", "1");
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
|
Map map4 = new HashMap();
|
||||||
|
map2.put("code", "to_task");
|
||||||
|
map2.put("value", inst.getInstruction_code());
|
||||||
|
list.add(map4);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
@@ -784,12 +792,16 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
list.add(map);
|
list.add(map);
|
||||||
Map map2 = new HashMap();
|
Map map2 = new HashMap();
|
||||||
map2.put("code", "to_task");
|
map2.put("code", "to_task");
|
||||||
map2.put("value", inst.getInstruction_code());
|
map2.put("value", "0");
|
||||||
list.add(map2);
|
list.add(map2);
|
||||||
Map map3 = new HashMap();
|
Map map3 = new HashMap();
|
||||||
map3.put("code", "to_command");
|
map3.put("code", "to_command");
|
||||||
map3.put("value", "1");
|
map3.put("value", "1");
|
||||||
list.add(map3);
|
list.add(map3);
|
||||||
|
Map map4 = new HashMap();
|
||||||
|
map2.put("code", "to_task");
|
||||||
|
map2.put("value", inst.getInstruction_code());
|
||||||
|
list.add(map4);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
if (task != Integer.parseInt(inst.getInstruction_code())) {
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class FaultDeviceServiceImpl implements FaultDeviceService {
|
|||||||
JSONObject result = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).realTimefaultInfo(param);
|
JSONObject result = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).realTimefaultInfo(param);
|
||||||
JSONArray data = result.getJSONArray("data");
|
JSONArray data = result.getJSONArray("data");
|
||||||
|
|
||||||
JSONObject result2 = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).queryDeviceInfo(null);
|
JSONObject result2 = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).queryDeviceInfo(new JSONObject());
|
||||||
JSONObject jsonData = result2.getJSONObject("data");
|
JSONObject jsonData = result2.getJSONObject("data");
|
||||||
JSONArray data1 = new JSONArray();
|
JSONArray data1 = new JSONArray();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user