|
@@ -774,8 +774,7 @@ public class FinancialInstitutionServiceImpl extends ServiceImpl<FinancialInstit
|
|
});
|
|
});
|
|
}
|
|
}
|
|
//下游结算单
|
|
//下游结算单
|
|
- List<FileStorage> settlementFileList = sysAttachmentRefService.getFiles(AttachmentDto.builder().setChildEnum(FileModuleDict.ChildEnum.SETTLEMENT_FILE)
|
|
|
|
- .setEntityId(settlementBasicInfoId).build());
|
|
|
|
|
|
+ List<FileStorageDO> settlementFileList = fileService.findByBusinessId(settlementBasicInfoId, FileModuleDict.ChildEnum.SETTLEMENT_FILE.getCode());
|
|
if (CollectionUtil.isNotEmpty(settlementFileList)) {
|
|
if (CollectionUtil.isNotEmpty(settlementFileList)) {
|
|
settlementFileList.stream().forEach(s -> {
|
|
settlementFileList.stream().forEach(s -> {
|
|
sysAttachmentRefService.copyFile(s, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_DOWNSTREAM_SETTLEMENT_FILE,
|
|
sysAttachmentRefService.copyFile(s, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_DOWNSTREAM_SETTLEMENT_FILE,
|
|
@@ -789,8 +788,7 @@ public class FinancialInstitutionServiceImpl extends ServiceImpl<FinancialInstit
|
|
List<Long> InvoiceBasicInfoIdList = invoiceGoodsInfoList.stream().map(InvoiceGoodsInfo::getInvoiceBasicInfoId).distinct().collect(Collectors.toList());
|
|
List<Long> InvoiceBasicInfoIdList = invoiceGoodsInfoList.stream().map(InvoiceGoodsInfo::getInvoiceBasicInfoId).distinct().collect(Collectors.toList());
|
|
for (Long invoiceBasicInfoId : InvoiceBasicInfoIdList) {
|
|
for (Long invoiceBasicInfoId : InvoiceBasicInfoIdList) {
|
|
//采购发票
|
|
//采购发票
|
|
- List<FileStorage> purchaseFileList = sysAttachmentRefService.getFiles(AttachmentDto.builder().setChildEnum(FileModuleDict.ChildEnum.INVOICE_PURCHASE_FILE)
|
|
|
|
- .setEntityId(invoiceBasicInfoId).build());
|
|
|
|
|
|
+ List<FileStorageDO> purchaseFileList = fileService.findByBusinessId(invoiceBasicInfoId, FileModuleDict.ChildEnum.SETTLEMENT_FILE.getCode());
|
|
if (CollectionUtil.isNotEmpty(purchaseFileList)) {
|
|
if (CollectionUtil.isNotEmpty(purchaseFileList)) {
|
|
purchaseFileList.stream().forEach(p -> {
|
|
purchaseFileList.stream().forEach(p -> {
|
|
sysAttachmentRefService.copyFile(p, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_UPSTREAM_INVOICE_FILE,
|
|
sysAttachmentRefService.copyFile(p, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_UPSTREAM_INVOICE_FILE,
|
|
@@ -798,14 +796,14 @@ public class FinancialInstitutionServiceImpl extends ServiceImpl<FinancialInstit
|
|
});
|
|
});
|
|
}
|
|
}
|
|
//销售待开发票
|
|
//销售待开发票
|
|
-// List<FileStorage> salesFileList = sysAttachmentRefService.getFiles(AttachmentDto.builder().setChildEnum(FileModuleDict.ChildEnum.INVOICE_SALES_FILE)
|
|
|
|
-// .setEntityId(invoiceBasicInfoId).build());
|
|
|
|
-// if (CollectionUtil.isNotEmpty(salesFileList)) {
|
|
|
|
-// salesFileList.stream().forEach(p -> {
|
|
|
|
-// sysAttachmentRefService.copyFile(p, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_DOWNSTREAM_INVOICE_FILE,
|
|
|
|
-// AttachmentDto.builder().setEntityId(customerExpenditureContractInfo.getId()).build());
|
|
|
|
-// });
|
|
|
|
-// }
|
|
|
|
|
|
+ List<FileStorage> salesFileList = sysAttachmentRefService.getFiles(AttachmentDto.builder().setChildEnum(FileModuleDict.ChildEnum.INVOICE_SALES_FILE)
|
|
|
|
+ .setEntityId(invoiceBasicInfoId).build());
|
|
|
|
+ if (CollectionUtil.isNotEmpty(salesFileList)) {
|
|
|
|
+ salesFileList.stream().forEach(p -> {
|
|
|
|
+ sysAttachmentRefService.copyFile(p, FileModuleDict.ChildEnum.FINANCIAL_EXPENDITURE_DOWNSTREAM_INVOICE_FILE,
|
|
|
|
+ AttachmentDto.builder().setEntityId(customerExpenditureContractInfo.getId()).build());
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|