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)){