add:检测站点,手动任务增加安全

This commit is contained in:
zhangzq
2026-06-09 16:59:49 +08:00
parent 988452c821
commit dc078f9c55
2 changed files with 91 additions and 0 deletions

View File

@@ -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);

View File

@@ -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)