|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.sunxung.factoring.component.util.CollectionUtil;
|
|
import com.sunxung.factoring.component.util.CollectionUtil;
|
|
import com.sunxung.factoring.component.util.ConstantConversionUtil;
|
|
import com.sunxung.factoring.component.util.ConstantConversionUtil;
|
|
import com.sunxung.factoring.component.util.ConstantUtil;
|
|
import com.sunxung.factoring.component.util.ConstantUtil;
|
|
|
|
+import com.sunxung.factoring.component.util.StringUtil;
|
|
import com.sunxung.factoring.dict.impl.FileModuleDict;
|
|
import com.sunxung.factoring.dict.impl.FileModuleDict;
|
|
import com.sunxung.factoring.entity.ResponseJson;
|
|
import com.sunxung.factoring.entity.ResponseJson;
|
|
import com.sunxung.factoring.entity.credit.CreditDetail;
|
|
import com.sunxung.factoring.entity.credit.CreditDetail;
|
|
@@ -308,8 +309,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
|
|
if(creditInfo != null){
|
|
if(creditInfo != null){
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
- List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
|
|
|
|
- creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
|
|
|
|
|
|
+ CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
|
|
|
|
+ if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
|
|
|
|
+ List<FileStorage> list = new ArrayList<>();
|
|
|
|
+ FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
|
|
|
|
+ list.add(creditDetailFiles);
|
|
|
|
+ creditInvestigationInfoHistory.setCreditDetailFiles(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
|
|
List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
|
|
@@ -339,8 +345,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
|
|
if(creditInfo != null){
|
|
if(creditInfo != null){
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
- List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
|
|
|
|
- creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
|
|
|
|
|
|
+ CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
|
|
|
|
+ if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
|
|
|
|
+ List<FileStorage> list = new ArrayList<>();
|
|
|
|
+ FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
|
|
|
|
+ list.add(creditDetailFiles);
|
|
|
|
+ creditInvestigationInfoHistory.setCreditDetailFiles(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
creditSituation.setCreditInvestigationInfoHistory(creditInvestigationInfoHistory);
|
|
creditSituation.setCreditInvestigationInfoHistory(creditInvestigationInfoHistory);
|
|
@@ -362,8 +373,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
|
|
if(creditInfo != null){
|
|
if(creditInfo != null){
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
- List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
|
|
|
|
- corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
|
|
|
|
|
|
+ CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
|
|
|
|
+ if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
|
|
|
|
+ List<FileStorage> list = new ArrayList<>();
|
|
|
|
+ FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
|
|
|
|
+ list.add(creditDetailFiles);
|
|
|
|
+ corporateGoodwill.setCreditDetailFiles(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
enterprise.setCorporateGoodwill(corporateGoodwill);
|
|
enterprise.setCorporateGoodwill(corporateGoodwill);
|
|
@@ -742,8 +758,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
|
|
if(creditInfo != null){
|
|
if(creditInfo != null){
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
- List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
|
|
|
|
- creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
|
|
|
|
|
|
+ CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
|
|
|
|
+ if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
|
|
|
|
+ List<FileStorage> list = new ArrayList<>();
|
|
|
|
+ FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
|
|
|
|
+ list.add(creditDetailFiles);
|
|
|
|
+ creditInvestigationInfoHistory.setCreditDetailFiles(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
|
|
List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
|
|
@@ -761,8 +782,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
|
|
if(creditInfo != null){
|
|
if(creditInfo != null){
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
if(CollectionUtil.isNotEmpty(creditDetails)){
|
|
- List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
|
|
|
|
- corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
|
|
|
|
|
|
+ CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
|
|
|
|
+ if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
|
|
|
|
+ List<FileStorage> list = new ArrayList<>();
|
|
|
|
+ FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
|
|
|
|
+ list.add(creditDetailFiles);
|
|
|
|
+ corporateGoodwill.setCreditDetailFiles(list);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
enterprise.setCorporateGoodwill(corporateGoodwill);
|
|
enterprise.setCorporateGoodwill(corporateGoodwill);
|