From 42779eb4d328af7ff496c81b33fd86ae55ae7bb7 Mon Sep 17 00:00:00 2001 From: zhenggl Date: Thu, 14 Sep 2023 18:25:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:demo.ptc.athenapot.receivables.get?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=B6=E9=97=B4=E5=85=A5=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paymentdetails/ReceivablesGetEAIService.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java index 5693de0..bc83041 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java @@ -1,14 +1,14 @@ package com.digiwin.athena.app.ptc.service.paymentdetails; import com.alibaba.nacos.common.utils.CollectionUtils; +import com.alibaba.nacos.common.utils.StringUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.digiwin.app.service.DWEAIResult; import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; -import com.digiwin.athena.app.ptc.infra.entity.PaymentDetailsEntity; import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; import com.digiwin.athena.app.ptc.infra.service.LimitCreditService; -import com.digiwin.athena.app.ptc.infra.service.PaymentDetailsService; import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService; +import com.digiwin.athena.opt.common.eai.EAIRequest; import com.digiwin.athena.opt.common.eai.service.AbsEAIService; import com.digiwin.athena.opt.common.security.SecurityUtil; import lombok.extern.log4j.Log4j2; @@ -42,8 +42,18 @@ public class ReceivablesGetEAIService extends AbsEAIService { @Override public DWEAIResult execute(Map headers, String messageBody) throws Exception { + EAIRequest build = EAIRequest.build(messageBody); + String startTime = build.getString("start_datetime"); + String endTime = build.getString("end_datetime"); + + LambdaQueryWrapper lmq = new LambdaQueryWrapper<>(); lmq.eq(ReceivablesDetailEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); + if (StringUtils.isNotEmpty(startTime)&&StringUtils.isNotEmpty(endTime)){ + lmq.gt(ReceivablesDetailEntity::getCreateDate,startTime); + lmq.le(ReceivablesDetailEntity::getCreateDate,endTime); + } + List list = receivablesDetailService.list(lmq); if (CollectionUtils.isEmpty(list)){