Browse Source

feat:demo.ptc.athenapot.receivables.get添加开始时间结束时间入参

master
郑贵龙 1 year ago
parent
commit
42779eb4d3
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java

+ 12
- 2
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java View File

@ -1,14 +1,14 @@
package com.digiwin.athena.app.ptc.service.paymentdetails; package com.digiwin.athena.app.ptc.service.paymentdetails;
import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.common.utils.CollectionUtils;
import com.alibaba.nacos.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; 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.entity.ReceivablesDetailEntity;
import com.digiwin.athena.app.ptc.infra.service.LimitCreditService; 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.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.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil; import com.digiwin.athena.opt.common.security.SecurityUtil;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
@ -42,8 +42,18 @@ public class ReceivablesGetEAIService extends AbsEAIService {
@Override @Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
EAIRequest build = EAIRequest.build(messageBody);
String startTime = build.getString("start_datetime");
String endTime = build.getString("end_datetime");
LambdaQueryWrapper<ReceivablesDetailEntity> lmq = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ReceivablesDetailEntity> lmq = new LambdaQueryWrapper<>();
lmq.eq(ReceivablesDetailEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); 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<ReceivablesDetailEntity> list = receivablesDetailService.list(lmq); List<ReceivablesDetailEntity> list = receivablesDetailService.list(lmq);
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){


Loading…
Cancel
Save