diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/PurchaseOrderDetailEntity.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/PurchaseOrderDetailEntity.java index 8bd0f15..1f4c056 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/PurchaseOrderDetailEntity.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/PurchaseOrderDetailEntity.java @@ -3,6 +3,7 @@ package com.digiwin.athena.app.infra.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; @@ -102,12 +103,14 @@ public class PurchaseOrderDetailEntity extends BaseMgrEntity { + + public void updateAbnormalHandlePlan(@Param("list") List list); } diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/PurchaseDemoEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/PurchaseDemoEAIService.java index 8c67163..234233e 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/PurchaseDemoEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/PurchaseDemoEAIService.java @@ -21,5 +21,6 @@ public interface PurchaseDemoEAIService extends DWService { @EAIService(id = PurchaseUtil.DEMO_PURCHASE_DEMO_GET) DWEAIResult get(Map headers, String messageBody) throws Exception; - -} \ No newline at end of file + @EAIService(id = PurchaseUtil.DEMO_PURCHASE_ORDER_ABNORMAL_UPDATE) + DWEAIResult abnormalUpdate(Map headers, String messageBody) throws Exception; +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/PurchaseDemoEAIServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/PurchaseDemoEAIServiceImpl.java index 87a0f4a..24a12ec 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/PurchaseDemoEAIServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/PurchaseDemoEAIServiceImpl.java @@ -29,4 +29,9 @@ public class PurchaseDemoEAIServiceImpl implements PurchaseDemoEAIService { public DWEAIResult get(Map headers, String messageBody) throws Exception { return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_DEMO_GET, headers, messageBody); } + + @Override + public DWEAIResult abnormalUpdate(Map headers, String messageBody) throws Exception { + return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_ORDER_ABNORMAL_UPDATE, headers, messageBody); + } } diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/purchase/PurchaseUtil.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/purchase/PurchaseUtil.java index 7dde132..cbced95 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/purchase/PurchaseUtil.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/purchase/PurchaseUtil.java @@ -15,5 +15,8 @@ public class PurchaseUtil { //查询请购单 public static final String DEMO_PURCHASE_DEMO_GET = "demo.purchase.order.get"; + //异常排除更新 + public static final String DEMO_PURCHASE_ORDER_ABNORMAL_UPDATE = "demo.purchase.order.abnormal.update"; + } diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/supplier/SupplierGetEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/supplier/SupplierGetEAIService.java index e8fbe5b..345bc51 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/supplier/SupplierGetEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/supplier/SupplierGetEAIService.java @@ -1,6 +1,7 @@ package com.digiwin.athena.app.service.supplier; import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.common.utils.CollectionUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.digiwin.app.service.DWEAIResult; import com.digiwin.athena.app.infra.entity.ItemSupplierEntity; @@ -39,18 +40,20 @@ public class SupplierGetEAIService extends AbsEAIService { List supplierInfo = eaiRequest.getObject("item_supplier_info", SupplierUtil.LIST_ENTITY_SUPPLIER); LambdaQueryWrapper lmq = new LambdaQueryWrapper<>(); lmq.eq(ItemSupplierEntity::getTenantId, SecurityUtil.getUserProfile().getTenantId()); - lmq.and( - queryWrapperInner -> { - for (ItemSupplierEntity itemSupplierEntity : supplierInfo) { - queryWrapperInner.or( - wrapper -> wrapper - .eq(ItemSupplierEntity::getItemNo, itemSupplierEntity.getItemNo()) - .eq(ItemSupplierEntity::getItemName, itemSupplierEntity.getItemName()) - .eq(ItemSupplierEntity::getSupplierNo, itemSupplierEntity.getSupplierNo()) - .eq(ItemSupplierEntity::getSupplierName, itemSupplierEntity.getSupplierName()) - ); - } - }); + if (CollectionUtils.isNotEmpty(supplierInfo)) { + lmq.and( + queryWrapperInner -> { + for (ItemSupplierEntity itemSupplierEntity : supplierInfo) { + queryWrapperInner.or( + wrapper -> wrapper + .eq(ItemSupplierEntity::getItemNo, itemSupplierEntity.getItemNo()) + .eq(ItemSupplierEntity::getItemName, itemSupplierEntity.getItemName()) + .eq(ItemSupplierEntity::getSupplierNo, itemSupplierEntity.getSupplierNo()) + .eq(ItemSupplierEntity::getSupplierName, itemSupplierEntity.getSupplierName()) + ); + } + }); + } List list = supplierService.list(lmq); return EAIUtil.buildEAIResult(new JSONObject().fluentPut("item_supplier_info", list));