二次请求地址使用配置

This commit is contained in:
miguannan
2026-05-09 13:14:29 +08:00
parent 5d6dce55d2
commit c247604d5c
4 changed files with 14 additions and 4 deletions

View File

@@ -12,9 +12,11 @@ import org.nl.acs.device.deviceDriver.service.defination.ordinaryDefination.Abst
import org.nl.acs.device.storageMgt.service.dto.StorageCellDto;
import org.nl.acs.device.storageMgt.service.impl.StorageCellServiceImpl;
import org.nl.acs.device.device.service.DeviceAppService;
import org.nl.acs.task.TaskConfig;
import org.nl.acs.task.instruction.domain.Instruction;
import org.nl.acs.task.instruction.service.InstructionService;
import org.nl.config.SpringContextHolder;
import org.nl.system.service.param.ISysParamService;
import org.nl.extInterface.agvKit.service.AcsToKitService;
import org.nl.extInterface.wms.service.AcsToWmsService;
import org.nl.extInterface.wms.service.enums.WmsFeedbackStatusEnum;
@@ -33,6 +35,7 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractStandardDeviceDriv
private final DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
private final AcsToKitService acsToKitService = SpringContextHolder.getBean(AcsToKitService.class);
private final AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
private final ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
private int flag;
@@ -245,8 +248,8 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractStandardDeviceDriv
}
private Instruction redirectIfNeeded(Instruction instruction) {
if (!StrUtil.equals(instruction.getNext_point_code(), "7E")) {
String redirectionPoint = paramService.findByCode(TaskConfig.REDIRECTION_POINT).getValue();
if (!StrUtil.equals(instruction.getNext_point_code(), redirectionPoint)) {
return instruction;
}
JSONObject response = acsToWmsService.taskRedirection(instruction.getTask_code(), instruction.getNext_point_code());

View File

@@ -73,6 +73,8 @@ public class TaskConfig {
*/
public static String WCSURL = "wcsurl";
public static String KITAGVURL = "kitagvurl";
public static String HASOTHERSYSTEM = "hasOtherSystem";
public static String ERPURL = "erpurl";
@@ -152,6 +154,11 @@ public class TaskConfig {
*/
public static String CHOOSE = "choose";
/**
* 需要重定向的目标点位编码(如 7E
*/
public static String REDIRECTION_POINT = "redirectionPoint";
public static String ELECTRIC ="electric";
public static String ELECTRIC2 ="electric2";

View File

@@ -82,7 +82,7 @@ public class AcsToKitServiceImpl implements AcsToKitService {
ja.put("location_name", instruction.getOffSetName());
jo.put("params", ja);
}
String wmsurl = paramService.findByCode(TaskConfig.WCSURL).getValue();
String wmsurl = paramService.findByCode(TaskConfig.KITAGVURL).getValue();
String url = wmsurl;
log.info("任务号:{},指令号{},下发agv订单序列下发:{}", instruction.getTask_code(), instruction.getInstruction_code(), JSON.toJSONString(jo));
LuceneLogDto logDto =

View File

@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@Api(tags = "wms->ACS")
@RequestMapping({"/api/wms", "/restful/api/v3"})
@RequestMapping("/api/wms")
@Slf4j
public class WmsToAcsController {
private final WmsToAcsService wmsToAcsService;