From be875ee4ec936bb1f48a64d6b7f99256bcabe8d0 Mon Sep 17 00:00:00 2001 From: zhenggl Date: Wed, 13 Sep 2023 15:52:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/entity/ReceivablesDetailEntity.java | 6 +++++- .../ReceivablesGetEAIService.java | 18 ++++++++++-------- .../ReceivablesCreateEAIService.java | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java index b394bef..901f815 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java @@ -3,6 +3,7 @@ package com.digiwin.athena.app.ptc.infra.entity; import java.math.BigDecimal; import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; import com.google.gson.annotations.SerializedName; @@ -115,6 +116,9 @@ public class ReceivablesDetailEntity extends BaseMgrEntity headers, String messageBody) throws Exception { - LambdaQueryWrapper lmq = new LambdaQueryWrapper<>(); - lmq.eq(PaymentDetailsEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); - List list = paymentDetailsService.list(lmq); + LambdaQueryWrapper lmq = new LambdaQueryWrapper<>(); + lmq.eq(ReceivablesDetailEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); + List list = receivablesDetailService.list(lmq); if (CollectionUtils.isEmpty(list)){ return buildOK("query_result",list); } //查询限制额度 - List customerNoList = list.stream().map(PaymentDetailsEntity::getCustomerNo).collect(Collectors.toList()); + List customerNoList = list.stream().map(ReceivablesDetailEntity::getCustomerNo).collect(Collectors.toList()); LambdaQueryWrapper creditLmq = new LambdaQueryWrapper<>(); creditLmq.in(LimitCreditEntity::getCustomerNo,customerNoList); List limitCreditEntityList = limitCreditService.list(creditLmq); if (CollectionUtils.isNotEmpty(limitCreditEntityList)){ - for (PaymentDetailsEntity paymentDetailsEntity : list) { + for (ReceivablesDetailEntity receivablesDetailEntity : list) { for (LimitCreditEntity limitCreditEntity : limitCreditEntityList) { - if (Objects.nonNull(limitCreditEntity.getLimitAmount())&&paymentDetailsEntity.getCustomerNo().equals(limitCreditEntity.getCustomerNo())){ - paymentDetailsEntity.setLimitAmount(limitCreditEntity.getLimitAmount()); + if (Objects.nonNull(limitCreditEntity.getLimitAmount())&&receivablesDetailEntity.getCustomerNo().equals(limitCreditEntity.getCustomerNo())){ + receivablesDetailEntity.setLimitAmount(limitCreditEntity.getLimitAmount()); } } } diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesCreateEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesCreateEAIService.java index 217823e..2d5d218 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesCreateEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesCreateEAIService.java @@ -39,9 +39,9 @@ public class ReceivablesCreateEAIService extends AbsEAIService { EAIRequest eaiRequest = EAIRequest.build(messageBody); List receivablesDetailEntities = eaiRequest.getObject("get_data", new TypeReference>() {}); - //根据bk删除数据 + /*//根据bk删除数据 //先删除 - collectionDetailRepository.deleteBatch(receivablesDetailEntities, SecurityUtil.getUserProfile().getTenantSid()); + collectionDetailRepository.deleteBatch(receivablesDetailEntities, SecurityUtil.getUserProfile().getTenantSid());*/ collectionDetailService.saveBatch(receivablesDetailEntities); return buildOK("query_result",receivablesDetailEntities);