add:检测站点,手动任务增加安全
This commit is contained in:
@@ -177,6 +177,28 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
|
||||
return;
|
||||
}
|
||||
Object ext_system = device.getExtraValue().get("ext_system");
|
||||
if ("3".equals(ext_system)){
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("point", this.devicecode);
|
||||
jo1.put("type", "1");
|
||||
jo1.put("containerCode", task.getVehicle_code());
|
||||
Object url = device.getExtraValue().get("address");
|
||||
if (StringUtil.isEmpty(ext_system)) {
|
||||
log.error("请求安全交互失败,未配置焊接线IP" + this.devicecode);
|
||||
return;
|
||||
}
|
||||
jo1.put("url", url);
|
||||
HttpResponse result = acsToHJXService.actionRequest(jo1);
|
||||
if (result==null){
|
||||
return;
|
||||
}
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int code = response.getInteger("code");
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
instruction.setOffSet(dto.getAddress());
|
||||
instruction.setOffSetName(instruction.getStart_point_code());
|
||||
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
|
||||
@@ -284,6 +306,28 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
|
||||
return;
|
||||
}
|
||||
Object ext_system = device.getExtraValue().get("ext_system");
|
||||
if ("3".equals(ext_system)){
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("point", this.devicecode);
|
||||
jo1.put("type", "3");
|
||||
jo1.put("containerCode", task.getVehicle_code());
|
||||
Object url = device.getExtraValue().get("address");
|
||||
if (StringUtil.isEmpty(ext_system)) {
|
||||
log.error("请求焊接线失败,未配置焊接线IP" + this.devicecode);
|
||||
return;
|
||||
}
|
||||
jo1.put("url", url);
|
||||
HttpResponse result = acsToHJXService.actionFinish(jo1);
|
||||
if (result==null){
|
||||
return;
|
||||
}
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int code = response.getInteger("code");
|
||||
if (code != 200) {
|
||||
log.error("请求焊接线取货完成失败,焊接线返回失败");
|
||||
}
|
||||
}
|
||||
instruction.setOffSet(dto.getAddress());
|
||||
instruction.setOffSetName(instruction.getStart_point_code());
|
||||
HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);
|
||||
@@ -419,6 +463,29 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
|
||||
return;
|
||||
}
|
||||
Object ext_system = device.getExtraValue().get("ext_system");
|
||||
if ("3".equals(ext_system)){
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("point", this.devicecode);
|
||||
jo1.put("type", "2");
|
||||
jo1.put("containerCode", task.getVehicle_code());
|
||||
Object url = device.getExtraValue().get("address");
|
||||
if (StringUtil.isEmpty(ext_system)) {
|
||||
log.error("请求焊接线请求放货,未配置焊接线IP" + this.devicecode);
|
||||
return;
|
||||
}
|
||||
jo1.put("url", url);
|
||||
HttpResponse result = acsToHJXService.actionRequest(jo1);
|
||||
if (result==null){
|
||||
return;
|
||||
}
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int code = response.getInteger("code");
|
||||
if (code != 200) {
|
||||
log.error("请求焊接线请求放货失败,焊接线返回失败");
|
||||
return;
|
||||
}
|
||||
}
|
||||
instruction.setOffSet(dto.getAddress1());
|
||||
instruction.setOffSetName(instruction.getNext_point_code());
|
||||
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
|
||||
@@ -529,6 +596,27 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在");
|
||||
return;
|
||||
}
|
||||
Object ext_system = device.getExtraValue().get("ext_system");
|
||||
if ("3".equals(ext_system)){
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("point", this.devicecode);
|
||||
jo1.put("type", "4");
|
||||
jo1.put("containerCode", task.getVehicle_code());
|
||||
Object url = device.getExtraValue().get("address");
|
||||
if (StringUtil.isEmpty(ext_system)) {
|
||||
log.error("请求MES放货完成失败,未配置焊接线IP" + this.devicecode);
|
||||
}
|
||||
jo1.put("url", url);
|
||||
HttpResponse result = acsToHJXService.actionFinish(jo1);
|
||||
if (result==null){
|
||||
return;
|
||||
}
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int code = response.getInteger("code");
|
||||
if (code != 200) {
|
||||
log.error("请求焊接线放货完成失败,焊接线返回失败");
|
||||
}
|
||||
}
|
||||
instruction.setOffSet(dto.getAddress1());
|
||||
instruction.setOffSetName(instruction.getNext_point_code());
|
||||
HttpResponse result1 = acsToNDCService.genAgvSchedulingTask(instruction, 10);
|
||||
|
||||
@@ -47,6 +47,8 @@ public class AcsToHJXServiceImpl implements AcsToHJXService {
|
||||
AddressDto addressDto = addressService.findByCode("actionRequest");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
long start = System.currentTimeMillis();
|
||||
System.out.println("----------------AcsToHJXService:actionRequest---------------------"+point);
|
||||
|
||||
try {
|
||||
log.info("actionRequest-----请求路径:{},输入参数{}", url, jsonObject);
|
||||
LuceneLogDto build = LuceneLogDto.builder()
|
||||
@@ -106,6 +108,7 @@ public class AcsToHJXServiceImpl implements AcsToHJXService {
|
||||
HttpResponse result = null;
|
||||
long start = System.currentTimeMillis();
|
||||
try {
|
||||
System.out.println("----------------AcsToHJXService:actionFinish---------------------"+point);
|
||||
log.info("actionFinish-----输入参数{}, 动作请求{}", whereJson,url);
|
||||
LuceneLogDto build = LuceneLogDto.builder()
|
||||
.log(LogLevelEnum.INFO, LogTypeEnum.接口请求, LogDirectEnum.ACS_TO_HJX)
|
||||
|
||||
Reference in New Issue
Block a user