From 7c6e35558f7a8ecac24624be422de67e6a5cf756 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Wed, 27 Dec 2023 16:57:57 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E5=88=B0=E8=B4=A6?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E6=9F=A5=E8=AF=A2=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PayPaymentRecordServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentRecordServiceImpl.java b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentRecordServiceImpl.java index 2d01f7c0..ecd866dd 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentRecordServiceImpl.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/payment/service/impl/PayPaymentRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.jero.payment.service.impl; +import cn.hutool.core.collection.CollStreamUtil; import com.alibaba.druid.sql.visitor.functions.If; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -157,26 +158,26 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.select(PayPaymentRecordSub::getProjectId,PayPaymentRecordSub::getPaymentStatus); wrapper.eq(PayPaymentRecordSub::getLastSign, LastSignEnum.LAST.getCode()); wrapper.eq(PayPaymentRecordSub::getDelFlag, PayProjectCommon.NO); List RecordSubList = payPaymentCheckService.list(wrapper); - + Map projectIdPaymentStatusMap = CollStreamUtil.toMap(RecordSubList, PayPaymentRecordSub::getProjectId, PayPaymentRecordSub::getPaymentStatus); for (PayCommonProject commonProject : list) { //如果是会议类型,就查询会议的具体类型 + String id = commonProject.getId(); if (commonProject.getProjectType().equals(Integer.parseInt(ProjectCommon.PROJECT_TYPE3))) { - String id = commonProject.getId(); PayMeeting payMeeting = payMeetingService.getMeetingBySituationId(id); commonProject.setMeetingType(payMeeting.getMeetingType()); commonProject.setSituationId(id); } //插入待审核状态,供前端判断是否显示审核按钮 //先查审核记录表有没有待审核的 - for(PayPaymentRecordSub recordSub : RecordSubList){ - if(commonProject.getId().equals(recordSub.getProjectId())){ - if(PaymentStatusEnum.TO_BE_REVIEWED.getCode().equals(recordSub.getPaymentStatus())){ - commonProject.setCheckPaymentStatus(recordSub.getPaymentStatus()); - continue; - } + if(projectIdPaymentStatusMap.containsKey(id)){ + String paymentStatus = projectIdPaymentStatusMap.get(id); + if(PaymentStatusEnum.TO_BE_REVIEWED.getCode().equals(paymentStatus)){ + commonProject.setCheckPaymentStatus(paymentStatus); + continue; } } //再查项目主表状态是不是待审核