|
|
@ -46,12 +46,14 @@ import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomer; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanbeoverdueveh.LoanBeOverdueVehService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigate.LoanHomevisitInvestigateService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatecustomer.LoanHomevisitInvestigateCustomerService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService; |
|
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -70,183 +72,183 @@ import java.util.List; |
|
|
|
@Service |
|
|
|
public class LoanBeCollectionRecordService extends MybatisBaseService<LoanBeCollectionRecordMapper, LoanBeCollectionRecord> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateCustomerService loanHomevisitInvestigateCustomerService; |
|
|
|
@Autowired |
|
|
|
private SysStaffOrgFeign sysStaffOrgFeign; |
|
|
|
@Autowired |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
|
private LoanFileService loanFileService; |
|
|
|
@Autowired |
|
|
|
private FileUploadComponent fileUploadComponent; |
|
|
|
@Autowired |
|
|
|
private LoanBeOverdueVehService loanBeOverdueVehService; |
|
|
|
@Autowired |
|
|
|
private BusSalesOrderFeign busSalesOrderFeign; |
|
|
|
@Autowired |
|
|
|
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign; |
|
|
|
@Autowired |
|
|
|
private FinVehicleInvoiceFeign finVehicleInvoiceFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateService loanHomevisitInvestigateService; |
|
|
|
@Autowired |
|
|
|
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateCustomerService loanHomevisitInvestigateCustomerService; |
|
|
|
@Autowired |
|
|
|
private SysStaffOrgFeign sysStaffOrgFeign; |
|
|
|
@Autowired |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
|
private LoanFileService loanFileService; |
|
|
|
@Autowired |
|
|
|
private FileUploadComponent fileUploadComponent; |
|
|
|
@Autowired |
|
|
|
private LoanBeOverdueVehService loanBeOverdueVehService; |
|
|
|
@Autowired |
|
|
|
private BusSalesOrderFeign busSalesOrderFeign; |
|
|
|
@Autowired |
|
|
|
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign; |
|
|
|
@Autowired |
|
|
|
private FinVehicleInvoiceFeign finVehicleInvoiceFeign; |
|
|
|
@Autowired |
|
|
|
private LoanHomevisitInvestigateService loanHomevisitInvestigateService; |
|
|
|
@Autowired |
|
|
|
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService; |
|
|
|
|
|
|
|
private QueryWrapper<LoanBeCollectionRecord> createQueryWrapper(LoanBeCollectionRecordQuery query) { |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
|
QueryWrapper<LoanBeCollectionRecord> qw = new QueryWrapper<>(); |
|
|
|
return qw; |
|
|
|
} |
|
|
|
private QueryWrapper<LoanBeCollectionRecord> createQueryWrapper(LoanBeCollectionRecordQuery query) { |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
|
QueryWrapper<LoanBeCollectionRecord> qw = new QueryWrapper<>(); |
|
|
|
return qw; |
|
|
|
} |
|
|
|
|
|
|
|
public PagerVo<LoanBeCollectionRecordVo> listPageVo(PagerQuery<LoanBeCollectionRecordQuery> pq) { |
|
|
|
LoanBeCollectionRecordQuery query = pq.getParams(); |
|
|
|
QueryWrapper<LoanBeCollectionRecord> qw = createQueryWrapper(query); |
|
|
|
IPage<LoanBeCollectionRecord> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<LoanBeCollectionRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
PagerVo<LoanBeCollectionRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|
} |
|
|
|
public PagerVo<LoanBeCollectionRecordVo> listPageVo(PagerQuery<LoanBeCollectionRecordQuery> pq) { |
|
|
|
LoanBeCollectionRecordQuery query = pq.getParams(); |
|
|
|
QueryWrapper<LoanBeCollectionRecord> qw = createQueryWrapper(query); |
|
|
|
IPage<LoanBeCollectionRecord> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<LoanBeCollectionRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
PagerVo<LoanBeCollectionRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|
} |
|
|
|
|
|
|
|
public void saveOrUpdateDto(LoanBeCollectionRecordDto dto){ |
|
|
|
public void saveOrUpdateDto(LoanBeCollectionRecordDto dto) { |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
List<LoanBeCollectionRecordFile> loanBeCollectionRecordFileList = dto.getLoanBeCollectionRecordFileList(); |
|
|
|
List<LoanBeCollectionRecordVehInit> loanBeCollectionRecordVehInitList = dto.getLoanBeCollectionRecordVehInitList(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
for (LoanBeCollectionRecordVehInit loanBeCollectionRecordVehInit : loanBeCollectionRecordVehInitList) { |
|
|
|
String orgPath = dto.getOrgPath(); |
|
|
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData(); |
|
|
|
dto.setUseOrgName(sysOrganizationVo.getName()); |
|
|
|
dto.setUseOrgSid(useOrgSid); |
|
|
|
dto.setSaleVehSid(loanBeCollectionRecordVehInit.getSaleVehSid()); |
|
|
|
String sid = this.insertByDto(dto); |
|
|
|
if (loanBeCollectionRecordFileList.size() > 0){ |
|
|
|
for (LoanBeCollectionRecordFile loanBeCollectionRecordFile : loanBeCollectionRecordFileList) { |
|
|
|
LoanFile loanFile = new LoanFile(); |
|
|
|
loanFile.setLinkSid(sid); |
|
|
|
loanFile.setAttachType(LoanFileEnum.BECOLLECTIONRECORD.getAttachType()); |
|
|
|
String filePath = loanBeCollectionRecordFile.getUrl(); |
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
} |
|
|
|
loanFile.setFilePath(filePath); |
|
|
|
loanFileService.save(loanFile); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
List<LoanBeCollectionRecordFile> loanBeCollectionRecordFileList = dto.getLoanBeCollectionRecordFileList(); |
|
|
|
List<LoanBeCollectionRecordVehInit> loanBeCollectionRecordVehInitList = dto.getLoanBeCollectionRecordVehInitList(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
for (LoanBeCollectionRecordVehInit loanBeCollectionRecordVehInit : loanBeCollectionRecordVehInitList) { |
|
|
|
String orgPath = dto.getOrgPath(); |
|
|
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData(); |
|
|
|
dto.setUseOrgName(sysOrganizationVo.getName()); |
|
|
|
dto.setUseOrgSid(useOrgSid); |
|
|
|
dto.setSaleVehSid(loanBeCollectionRecordVehInit.getSaleVehSid()); |
|
|
|
String sid = this.insertByDto(dto); |
|
|
|
if (loanBeCollectionRecordFileList.size() > 0) { |
|
|
|
for (LoanBeCollectionRecordFile loanBeCollectionRecordFile : loanBeCollectionRecordFileList) { |
|
|
|
LoanFile loanFile = new LoanFile(); |
|
|
|
loanFile.setLinkSid(sid); |
|
|
|
loanFile.setAttachType(LoanFileEnum.BECOLLECTIONRECORD.getAttachType()); |
|
|
|
String filePath = loanBeCollectionRecordFile.getUrl(); |
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
} |
|
|
|
loanFile.setFilePath(filePath); |
|
|
|
loanFileService.save(loanFile); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
this.updateByDto(dto); |
|
|
|
} |
|
|
|
this.updateByDto(dto); |
|
|
|
} |
|
|
|
|
|
|
|
public String insertByDto(LoanBeCollectionRecordDto dto){ |
|
|
|
LoanBeCollectionRecord entity = new LoanBeCollectionRecord(); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.insert(entity); |
|
|
|
return entity.getSid(); |
|
|
|
} |
|
|
|
public String insertByDto(LoanBeCollectionRecordDto dto) { |
|
|
|
LoanBeCollectionRecord entity = new LoanBeCollectionRecord(); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.insert(entity); |
|
|
|
return entity.getSid(); |
|
|
|
} |
|
|
|
|
|
|
|
public void updateByDto(LoanBeCollectionRecordDto dto){ |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
public void updateByDto(LoanBeCollectionRecordDto dto) { |
|
|
|
String dtoSid = dto.getSid(); |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
LoanBeCollectionRecord entity = fetchBySid(dtoSid); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} |
|
|
|
LoanBeCollectionRecord entity = fetchBySid(dtoSid); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
public LoanBeCollectionRecordDetailsVo fetchDetailsVoBySid(String sid){ |
|
|
|
LoanBeCollectionRecord entity = fetchBySid(sid); |
|
|
|
LoanBeCollectionRecordDetailsVo vo = new LoanBeCollectionRecordDetailsVo(); |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
List<LoanFile> loanFiles = loanFileService.selectByLinkSid(sid, LoanFileEnum.BECOLLECTIONRECORD.getAttachType()); |
|
|
|
List<LoanBeCollectionRecordFile> loanBeCollectionRecordFiles = new ArrayList<>(); |
|
|
|
if (loanFiles != null && loanFiles.size() > 0){ |
|
|
|
for (LoanFile loanFile : loanFiles) { |
|
|
|
LoanBeCollectionRecordFile loanBeCollectionRecordFile = new LoanBeCollectionRecordFile(); |
|
|
|
String filePath = loanFile.getFilePath(); |
|
|
|
String urlPrefix = fileUploadComponent.getUrlPrefix(); |
|
|
|
filePath = urlPrefix + filePath; |
|
|
|
loanBeCollectionRecordFile.setUrl(filePath); |
|
|
|
loanBeCollectionRecordFiles.add(loanBeCollectionRecordFile); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setLoanBeCollectionRecordFileList(loanBeCollectionRecordFiles); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
public LoanBeCollectionRecordDetailsVo fetchDetailsVoBySid(String sid) { |
|
|
|
LoanBeCollectionRecord entity = fetchBySid(sid); |
|
|
|
LoanBeCollectionRecordDetailsVo vo = new LoanBeCollectionRecordDetailsVo(); |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
List<LoanFile> loanFiles = loanFileService.selectByLinkSid(sid, LoanFileEnum.BECOLLECTIONRECORD.getAttachType()); |
|
|
|
List<LoanBeCollectionRecordFile> loanBeCollectionRecordFiles = new ArrayList<>(); |
|
|
|
if (loanFiles != null && loanFiles.size() > 0) { |
|
|
|
for (LoanFile loanFile : loanFiles) { |
|
|
|
LoanBeCollectionRecordFile loanBeCollectionRecordFile = new LoanBeCollectionRecordFile(); |
|
|
|
String filePath = loanFile.getFilePath(); |
|
|
|
String urlPrefix = fileUploadComponent.getUrlPrefix(); |
|
|
|
filePath = urlPrefix + filePath; |
|
|
|
loanBeCollectionRecordFile.setUrl(filePath); |
|
|
|
loanBeCollectionRecordFiles.add(loanBeCollectionRecordFile); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setLoanBeCollectionRecordFileList(loanBeCollectionRecordFiles); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|
public LoanBeCollectionRecordInit init(String saleVehSid) { |
|
|
|
LoanBeCollectionRecordInit loanBeCollectionRecordInit = new LoanBeCollectionRecordInit(); |
|
|
|
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(saleVehSid).getData(); |
|
|
|
BusSalesOrderBorrower busSalesOrderBorrower = busSalesOrderBorrowerFeign.fetchEntityBySid(busSalesOrderVehicle.getBorrowerSid()).getData(); |
|
|
|
LoanHomevisitInvestigateCustomerDetailsVo loanHomevisitInvestigateCustomerDetailsVo = loanHomevisitInvestigateCustomerService.fetchByBorrowerSid(busSalesOrderVehicle.getBorrowerSid()); |
|
|
|
if (loanHomevisitInvestigateCustomerDetailsVo == null){ |
|
|
|
if (busSalesOrderBorrower == null){ |
|
|
|
loanBeCollectionRecordInit.setBorrowerName(busSalesOrderVehicle.getBorrowName()); |
|
|
|
}else { |
|
|
|
loanBeCollectionRecordInit.setBorrowerName(busSalesOrderBorrower.getBorrowerName()); |
|
|
|
loanBeCollectionRecordInit.setBorrowerMobile(busSalesOrderBorrower.getMobile()); |
|
|
|
} |
|
|
|
}else { |
|
|
|
loanBeCollectionRecordInit.setBorrowerName(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerName()); |
|
|
|
loanBeCollectionRecordInit.setBorrowerMobile(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerMobile()); |
|
|
|
loanBeCollectionRecordInit.setSpouseName(loanHomevisitInvestigateCustomerDetailsVo.getSpouseName()); |
|
|
|
loanBeCollectionRecordInit.setSpouseMobile(loanHomevisitInvestigateCustomerDetailsVo.getSpouseMobile()); |
|
|
|
} |
|
|
|
List<LoanBeCollectionRecordVehInit> loanBeCollectionRecordVehInits = loanBeOverdueVehService.initVehListByBorrSid(busSalesOrderVehicle.getBorrowerSid()); |
|
|
|
for (LoanBeCollectionRecordVehInit loanBeCollectionRecordVehInit : loanBeCollectionRecordVehInits) { |
|
|
|
List<LoanBeCollectionVehFile> loanBeCollectionVehFiles = new ArrayList<>(); |
|
|
|
loanBeCollectionRecordVehInit.setCustNameAndPhone(loanBeCollectionRecordVehInit.getCustName() + loanBeCollectionRecordVehInit.getCustPhone()); |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(loanBeCollectionRecordVehInit.getSalesOrderSid()).getData(); |
|
|
|
BusSalesOrderVehicle busSalesOrderVehicle1 = busSalesOrderVehicleFeign.details(loanBeCollectionRecordVehInit.getSaleVehSid()).getData(); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentNameAndPhone(busSalesOrderVehicle1.getReaRepaymentName() + busSalesOrderVehicle1.getReaRepaymentPhone()); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentName(busSalesOrderVehicle1.getReaRepaymentName()); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentPhone(busSalesOrderVehicle1.getReaRepaymentPhone()); |
|
|
|
//催收记录sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile1 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile1.setName("催收记录"); |
|
|
|
loanBeCollectionVehFile1.setSid(loanBeCollectionRecordVehInit.getSaleVehSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile1); |
|
|
|
//开票管理sid
|
|
|
|
FinVehicleInvoice finVehicleInvoice = finVehicleInvoiceFeign.selectByVinAndContractNo(busSalesOrderVehicle1.getLinkSid(), busSalesOrder.getContractNo()).getData(); |
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile2 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile2.setName("开票信息"); |
|
|
|
loanBeCollectionVehFile2.setSid(finVehicleInvoice.getSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile2); |
|
|
|
//月还明细sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile3 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile3.setName("月还明细"); |
|
|
|
loanBeCollectionVehFile3.setSid(saleVehSid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile3); |
|
|
|
//金融方案sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile4 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile4.setName("金融方案"); |
|
|
|
loanBeCollectionVehFile4.setSid(loanBeCollectionRecordVehInit.getSalesOrderSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile4); |
|
|
|
//家访考察报告sid
|
|
|
|
String sid = loanHomevisitInvestigateService.selectByBorrSid(busSalesOrderVehicle.getBorrowerSid()); |
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile5 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile5.setName("家访考察报告"); |
|
|
|
loanBeCollectionVehFile5.setSid(sid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile5); |
|
|
|
//家访考察资料sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile6 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile6.setName("家访考察资料"); |
|
|
|
loanBeCollectionVehFile6.setSid(sid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile6); |
|
|
|
loanBeCollectionRecordVehInit.setSids(loanBeCollectionVehFiles); |
|
|
|
} |
|
|
|
loanBeCollectionRecordInit.setLoanBeCollectionRecordVehInitList(loanBeCollectionRecordVehInits); |
|
|
|
return loanBeCollectionRecordInit; |
|
|
|
} |
|
|
|
public LoanBeCollectionRecordInit init(String saleVehSid) { |
|
|
|
LoanBeCollectionRecordInit loanBeCollectionRecordInit = new LoanBeCollectionRecordInit(); |
|
|
|
LoanRepaymentPlanDetails loanRepaymentPlanDetails = loanRepaymentPlanDetailsService.fetchMainBankByBusVinSid(saleVehSid); |
|
|
|
//贷款人名称
|
|
|
|
loanBeCollectionRecordInit.setBorrowerName(loanRepaymentPlanDetails.getBorrowerName()); |
|
|
|
BusSalesOrderBorrower busSalesOrderBorrower = busSalesOrderBorrowerFeign.fetchEntityBySid(loanRepaymentPlanDetails.getBorrowerSid()).getData(); |
|
|
|
LoanHomevisitInvestigateCustomerDetailsVo loanHomevisitInvestigateCustomerDetailsVo = loanHomevisitInvestigateCustomerService.fetchByBorrowerSid(loanRepaymentPlanDetails.getBorrowerSid()); |
|
|
|
if (loanHomevisitInvestigateCustomerDetailsVo == null) { |
|
|
|
if (busSalesOrderBorrower != null) { |
|
|
|
loanBeCollectionRecordInit.setBorrowerMobile(busSalesOrderBorrower.getMobile()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
loanBeCollectionRecordInit.setBorrowerMobile(loanHomevisitInvestigateCustomerDetailsVo.getBorrowerMobile()); |
|
|
|
loanBeCollectionRecordInit.setSpouseName(loanHomevisitInvestigateCustomerDetailsVo.getSpouseName()); |
|
|
|
loanBeCollectionRecordInit.setSpouseMobile(loanHomevisitInvestigateCustomerDetailsVo.getSpouseMobile()); |
|
|
|
} |
|
|
|
List<LoanBeCollectionRecordVehInit> loanBeCollectionRecordVehInits = loanBeOverdueVehService.initVehListByBorrSid(loanRepaymentPlanDetails.getBorrowerSid()); |
|
|
|
for (LoanBeCollectionRecordVehInit loanBeCollectionRecordVehInit : loanBeCollectionRecordVehInits) { |
|
|
|
List<LoanBeCollectionVehFile> loanBeCollectionVehFiles = new ArrayList<>(); |
|
|
|
loanBeCollectionRecordVehInit.setCustNameAndPhone(loanBeCollectionRecordVehInit.getCustName() + loanBeCollectionRecordVehInit.getCustPhone()); |
|
|
|
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(loanBeCollectionRecordVehInit.getSalesOrderSid()).getData(); |
|
|
|
BusSalesOrderVehicle busSalesOrderVehicle1 = busSalesOrderVehicleFeign.details(loanBeCollectionRecordVehInit.getSaleVehSid()).getData(); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentNameAndPhone(busSalesOrderVehicle1.getReaRepaymentName() + busSalesOrderVehicle1.getReaRepaymentPhone()); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentName(busSalesOrderVehicle1.getReaRepaymentName()); |
|
|
|
loanBeCollectionRecordVehInit.setReaRepaymentPhone(busSalesOrderVehicle1.getReaRepaymentPhone()); |
|
|
|
//催收记录sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile1 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile1.setName("催收记录"); |
|
|
|
loanBeCollectionVehFile1.setSid(loanBeCollectionRecordVehInit.getSaleVehSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile1); |
|
|
|
//开票管理sid
|
|
|
|
FinVehicleInvoice finVehicleInvoice = finVehicleInvoiceFeign.selectByVinAndContractNo(busSalesOrderVehicle1.getLinkSid(), busSalesOrder.getContractNo()).getData(); |
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile2 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile2.setName("开票信息"); |
|
|
|
loanBeCollectionVehFile2.setSid(finVehicleInvoice.getSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile2); |
|
|
|
//月还明细sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile3 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile3.setName("月还明细"); |
|
|
|
loanBeCollectionVehFile3.setSid(saleVehSid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile3); |
|
|
|
//金融方案sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile4 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile4.setName("金融方案"); |
|
|
|
loanBeCollectionVehFile4.setSid(loanBeCollectionRecordVehInit.getSalesOrderSid()); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile4); |
|
|
|
//家访考察报告sid
|
|
|
|
String sid = loanHomevisitInvestigateService.selectByBorrSid(loanRepaymentPlanDetails.getBorrowerSid()); |
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile5 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile5.setName("家访考察报告"); |
|
|
|
loanBeCollectionVehFile5.setSid(sid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile5); |
|
|
|
//家访考察资料sid
|
|
|
|
LoanBeCollectionVehFile loanBeCollectionVehFile6 = new LoanBeCollectionVehFile(); |
|
|
|
loanBeCollectionVehFile6.setName("家访考察资料"); |
|
|
|
loanBeCollectionVehFile6.setSid(sid); |
|
|
|
loanBeCollectionVehFiles.add(loanBeCollectionVehFile6); |
|
|
|
loanBeCollectionRecordVehInit.setSids(loanBeCollectionVehFiles); |
|
|
|
} |
|
|
|
loanBeCollectionRecordInit.setLoanBeCollectionRecordVehInitList(loanBeCollectionRecordVehInits); |
|
|
|
return loanBeCollectionRecordInit; |
|
|
|
} |
|
|
|
|
|
|
|
public LoanBeCollectionRecordHistoryVehVo viewHistory(String saleVehSid) { |
|
|
|
LoanBeCollectionRecordHistoryVehVo loanBeCollectionRecordHistoryVehVo = baseMapper.viewHistoryVeh(saleVehSid); |
|
|
|
List<LoanBeCollectionRecordHistoryVo> loanBeCollectionRecordDetailsVoList = baseMapper.viewHistory(saleVehSid); |
|
|
|
loanBeCollectionRecordHistoryVehVo.setLoanBeCollectionRecordHistoryVoList(loanBeCollectionRecordDetailsVoList); |
|
|
|
return loanBeCollectionRecordHistoryVehVo; |
|
|
|
} |
|
|
|
public LoanBeCollectionRecordHistoryVehVo viewHistory(String saleVehSid) { |
|
|
|
LoanBeCollectionRecordHistoryVehVo loanBeCollectionRecordHistoryVehVo = baseMapper.viewHistoryVeh(saleVehSid); |
|
|
|
List<LoanBeCollectionRecordHistoryVo> loanBeCollectionRecordDetailsVoList = baseMapper.viewHistory(saleVehSid); |
|
|
|
loanBeCollectionRecordHistoryVehVo.setLoanBeCollectionRecordHistoryVoList(loanBeCollectionRecordDetailsVoList); |
|
|
|
return loanBeCollectionRecordHistoryVehVo; |
|
|
|
} |
|
|
|
} |