浙大调度同步永裕
This commit is contained in:
@@ -30,4 +30,12 @@ public interface ZheDaAgvService {
|
||||
|
||||
public HttpResponse markComplete(String code);
|
||||
|
||||
/**
|
||||
* 删除先知任务
|
||||
*
|
||||
* @param instCode
|
||||
* @return
|
||||
*/
|
||||
public HttpResponse deleteZDAgvInst(String instCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
private final ISysParamService paramService;
|
||||
private final InstructionService instructionService;
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
@Override
|
||||
public HttpResponse sendAgvInstToAgv(Instruction inst) throws Exception {
|
||||
@@ -551,5 +552,27 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
return destinationOrder;
|
||||
}
|
||||
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
@Override
|
||||
public HttpResponse deleteZDAgvInst(String instCode) {
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
|
||||
String agvurl = paramService.findByCode(AcsConfig.AGVURL2).getValue();
|
||||
String agvport = paramService.findByCode(AcsConfig.AGVPORT2).getValue();
|
||||
Instruction instruction = instructionService.findByCode(instCode);
|
||||
if (instruction.getInstruction_type().equals("1")) {
|
||||
agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue();
|
||||
}
|
||||
agvurl = agvurl + ":" + agvport + "/rmds/v1/transportOrders/" + instCode + "/withdrawal";
|
||||
log.info("删除agv指令请求agvurl:{}", agvurl);
|
||||
HttpResponse result = HttpRequest.post(agvurl)
|
||||
.body("{}")
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
log.info("删除agv指令请求反馈:{}", result);
|
||||
return result;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user