|
@@ -532,35 +532,35 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
|
|
|
List<FileStorage> acceptanceFiles = new ArrayList<>();
|
|
|
CFinancingBasicInfo financingBasicInfo = financingBasicInfoService.getById(financingBasicInfoId);
|
|
|
if (financingBasicInfo != null) {
|
|
|
- Map<String, Object> map = financingGoodsInfoService.getMap(new QueryWrapper<CFinancingGoodsInfo>().select("DISTINCT acceptance_basic_info_id")
|
|
|
+ List<CFinancingGoodsInfo> financingGoodsInfoList = financingGoodsInfoService.list(new QueryWrapper<CFinancingGoodsInfo>()
|
|
|
+ .select("DISTINCT acceptance_basic_info_id AS cAcceptanceBasicInfoId")
|
|
|
.eq("c_financing_basic_info_id", financingBasicInfo.getId()));
|
|
|
- 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);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return acceptanceFiles;
|