소스 검색

付款审核优化

liuj 1 개월 전
부모
커밋
46fe031c9f
1개의 변경된 파일28개의 추가작업 그리고 27개의 파일을 삭제
  1. 28 27
      src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

+ 28 - 27
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

@@ -532,34 +532,35 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
         List<FileStorage> acceptanceFiles = new ArrayList<>();
         CFinancingBasicInfo financingBasicInfo = financingBasicInfoService.getById(financingBasicInfoId);
         if (financingBasicInfo != null) {
-            List<CFinancingGoodsInfo> financingGoodsInfoList = financingGoodsInfoService.list(new QueryWrapper<CFinancingGoodsInfo>().select("DISTINCT acceptance_basic_info_id")
+            Map<String, Object> map = financingGoodsInfoService.getMap(new QueryWrapper<CFinancingGoodsInfo>().select("DISTINCT acceptance_basic_info_id")
                     .eq("c_financing_basic_info_id", financingBasicInfo.getId()));
-            if (CollectionUtil.isNotEmpty(financingGoodsInfoList)) {
-                for (CFinancingGoodsInfo goodsInfo : financingGoodsInfoList) {
-                    if (goodsInfo.getcAcceptanceBasicInfoId() != null) {
-                        AcceptanceSignConfirmation acceptanceSignConfirmation = acceptanceSignConfirmationService.lambdaQuery()
-                                .eq(AcceptanceSignConfirmation::getAcceptanceBasicInfoId, goodsInfo.getcAcceptanceBasicInfoId()).one();
-                        if (acceptanceSignConfirmation != null) {
-                            List<AcceptanceSignConfirmationElectronicInfo> acceptanceSignConfirmationElectronicInfos = acceptanceSignConfirmationElectronicInfoService.lambdaQuery()
-                                    .eq(AcceptanceSignConfirmationElectronicInfo::getAcceptanceSignConfirmationId, acceptanceSignConfirmation.getId())
-                                    .eq(AcceptanceSignConfirmationElectronicInfo::getCallBack, 1)
-                                    .list();
-                            if (CollectionUtil.isNotEmpty(acceptanceSignConfirmationElectronicInfos)) {
-                                acceptanceSignConfirmationElectronicInfos.forEach(x -> {
-                                    //获取已签署文件
-                                    AttachmentDto attachmentDto = AttachmentDto.builder()
-                                            .setEntityId(x.getId())
-                                            .setChildEnum(FileModuleDict.ChildEnum.ACCEPTANCE_SIGN_CONFIRM_BACK_FILE)
-                                            .build();
-                                    List<FileStorage> files = sysAttachmentRefService.getFiles(attachmentDto);
-                                    if (CollectionUtil.isNotEmpty(files)) {
-                                        acceptanceFiles.addAll(files);
-                                    }
-                                });
-                            }
-                        }
-                    }
-                }
+            List<Long> acceptanceBasicInfoIds = (List<Long>) map.get("acceptance_basic_info_id");
+            if (CollectionUtil.isNotEmpty(acceptanceBasicInfoIds)) {
+//                for (CFinancingGoodsInfo goodsInfo : financingGoodsInfoList) {
+//                    if (goodsInfo.getcAcceptanceBasicInfoId() != null) {
+//                        AcceptanceSignConfirmation acceptanceSignConfirmation = acceptanceSignConfirmationService.lambdaQuery()
+//                                .eq(AcceptanceSignConfirmation::getAcceptanceBasicInfoId, goodsInfo.getcAcceptanceBasicInfoId()).one();
+//                        if (acceptanceSignConfirmation != null) {
+//                            List<AcceptanceSignConfirmationElectronicInfo> acceptanceSignConfirmationElectronicInfos = acceptanceSignConfirmationElectronicInfoService.lambdaQuery()
+//                                    .eq(AcceptanceSignConfirmationElectronicInfo::getAcceptanceSignConfirmationId, acceptanceSignConfirmation.getId())
+//                                    .eq(AcceptanceSignConfirmationElectronicInfo::getCallBack, 1)
+//                                    .list();
+//                            if (CollectionUtil.isNotEmpty(acceptanceSignConfirmationElectronicInfos)) {
+//                                acceptanceSignConfirmationElectronicInfos.forEach(x -> {
+//                                    //获取已签署文件
+//                                    AttachmentDto attachmentDto = AttachmentDto.builder()
+//                                            .setEntityId(x.getId())
+//                                            .setChildEnum(FileModuleDict.ChildEnum.ACCEPTANCE_SIGN_CONFIRM_BACK_FILE)
+//                                            .build();
+//                                    List<FileStorage> files = sysAttachmentRefService.getFiles(attachmentDto);
+//                                    if (CollectionUtil.isNotEmpty(files)) {
+//                                        acceptanceFiles.addAll(files);
+//                                    }
+//                                });
+//                            }
+//                        }
+//                    }
+//                }
             }
         }
         return acceptanceFiles;