diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java index 04d1e495..bfbfa88e 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java @@ -2,6 +2,7 @@ package com.op.system.api; import com.op.common.core.constant.ServiceNameConstants; import com.op.common.core.domain.R; +import com.op.system.api.domain.sap.SapMaterialPreparation; import com.op.system.api.factory.RemoteSapFallbackFactory; import com.op.system.api.model.SapProOrder; import org.springframework.cloud.openfeign.FeignClient; @@ -23,5 +24,5 @@ public interface RemoteSapService { public R bomSync(); @PostMapping("/sap/sapProRouteProcess") public R sapProRouteProcess(); - + public R>materialPreparation(SapMaterialPreparation sapMaterialPreparation); } diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java index 54c96f81..b3fc47eb 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java @@ -2,6 +2,7 @@ package com.op.system.api.factory; import com.op.common.core.domain.R; import com.op.system.api.RemoteSapService; +import com.op.system.api.domain.sap.SapMaterialPreparation; import com.op.system.api.model.SapProOrder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,6 +25,16 @@ public class RemoteSapFallbackFactory implements FallbackFactory bomSync() { return null; } + + @Override + public R sapProRouteProcess() { + return null; + } + + @Override + public R> materialPreparation(SapMaterialPreparation sapMaterialPreparation) { + return R.fail("SAP服务获取SAP领料单失败:" + throwable.getMessage()); + } }; } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java index 5e138fd8..69228280 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java @@ -1,18 +1,20 @@ package com.op.mes.service; import java.util.List; + +import com.op.common.core.domain.R; import com.op.mes.domain.MesPrepare; /** * 备料单Service接口 - * + * * @author Open Platform * @date 2023-08-03 */ public interface IMesPrepareService { /** * 查询备料单 - * + * * @param prepareId 备料单主键 * @return 备料单 */ @@ -20,7 +22,7 @@ public interface IMesPrepareService { /** * 查询备料单列表 - * + * * @param mesPrepare 备料单 * @return 备料单集合 */ @@ -28,7 +30,7 @@ public interface IMesPrepareService { /** * 新增备料单 - * + * * @param mesPrepare 备料单 * @return 结果 */ @@ -36,7 +38,7 @@ public interface IMesPrepareService { /** * 修改备料单 - * + * * @param mesPrepare 备料单 * @return 结果 */ @@ -44,7 +46,7 @@ public interface IMesPrepareService { /** * 批量删除备料单 - * + * * @param prepareIds 需要删除的备料单主键集合 * @return 结果 */ @@ -52,9 +54,11 @@ public interface IMesPrepareService { /** * 删除备料单信息 - * + * * @param prepareId 备料单主键 * @return 结果 */ public int deleteMesPrepareByPrepareId(String prepareId); + + public R getMesPrepare(); }