|
|
@ -9,27 +9,35 @@ import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemDetailsVo; |
|
|
|
import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrower; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerDetailsVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.*; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJR; |
|
|
|
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; |
|
|
|
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer; |
|
|
|
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganization; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.LoanFinOtherPolicy; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanfundday.LoanFundDay; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsDto; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.*; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.historyData.HistoryDataImportVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy; |
|
|
@ -43,6 +51,7 @@ import com.yxt.anrui.riskcenter.biz.loansolutionsotherpolicy.LoanSolutionsOtherp |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanwarrantinformation.LoanWarrantInformationService; |
|
|
|
import com.yxt.common.base.config.component.DocPdfComponent; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.HanZiConverterPinYin; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import com.yxt.common.base.utils.WordConvertUtils; |
|
|
@ -3262,7 +3271,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
page = "1"; |
|
|
|
} else if (c == 2) { |
|
|
|
page = "2"; |
|
|
|
} else if (c == 0){ |
|
|
|
} else if (c == 0) { |
|
|
|
page = "3"; |
|
|
|
} |
|
|
|
if (pdfList.size() > (num - 1) * 3) { |
|
|
@ -4619,4 +4628,85 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme |
|
|
|
} |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 客户编码生成规则 |
|
|
|
*/ |
|
|
|
public String getPrefix(SysOrganization orgDept, SysOrganization orgCompany, String name, String mobile) { |
|
|
|
String customerNoPrefix = ""; |
|
|
|
if (null != orgCompany) { |
|
|
|
customerNoPrefix = customerNoPrefix + orgCompany.getOrgAbbre(); |
|
|
|
} |
|
|
|
if (null != orgDept) { |
|
|
|
customerNoPrefix = customerNoPrefix + orgDept.getOrgCode(); |
|
|
|
} |
|
|
|
customerNoPrefix = customerNoPrefix + mobile + HanZiConverterPinYin.getPinYinFirst(name); |
|
|
|
System.out.println(customerNoPrefix.length() > 30 ? customerNoPrefix.substring(0, 30) : customerNoPrefix); |
|
|
|
return customerNoPrefix.length() > 30 ? customerNoPrefix.substring(0, 30) : customerNoPrefix; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 导入历史数据生成还款计划表 |
|
|
|
*/ |
|
|
|
public void saveHistoryRecord(List<HistoryDataImportVo> list) { |
|
|
|
List<LoanRepaymentSchedule> schedules = new ArrayList<>(); //还款计划表主表
|
|
|
|
List<LoanRepaymentPlanDetails> planDetails = new ArrayList<>();//还款计划表明细
|
|
|
|
List<LoanRepaymentHistory> histories = new ArrayList<>();//还款记录
|
|
|
|
List<CrmCustomerTemp> customerTemps = new ArrayList<>();//客户表
|
|
|
|
List<BusSalesOrder> orders = new ArrayList<>();//销售订单
|
|
|
|
List<BusSalesOrderVehicle> vehicles = new ArrayList<>();//销售订单车辆
|
|
|
|
List<BusSalesOrderBorrower> borrowers = new ArrayList<>();//贷款人
|
|
|
|
List<BusSalesOrderLoancontract> contracts = new ArrayList<>();//消贷合同
|
|
|
|
List<FinUncollectedReceivablesDetailedJR> jrList = new ArrayList<>();//金融应收
|
|
|
|
List<LoanFundDay> loanFundDays = new ArrayList<>();//资金占用费生成记录
|
|
|
|
for (HistoryDataImportVo v : list) { |
|
|
|
String customerNo = ""; //客户编码
|
|
|
|
String customerSid = ""; |
|
|
|
String customerName = ""; |
|
|
|
String deptName = ""; |
|
|
|
String deptSid = ""; |
|
|
|
String useOrgName = ""; |
|
|
|
String useOrgSid = ""; |
|
|
|
String orgPath = ""; |
|
|
|
String borrowerCustomerSid = ""; |
|
|
|
String borrowerCustomerName = ""; |
|
|
|
SysOrganization orgDept = sysOrganizationFeign.selectByOrgCode(v.getSalesDeptNo()).getData(); |
|
|
|
if (orgDept != null) { |
|
|
|
deptSid = orgDept.getSid(); |
|
|
|
deptName = orgDept.getName(); |
|
|
|
orgPath = orgDept.getOrgSidPath(); |
|
|
|
} |
|
|
|
SysOrganization orgCompany = sysOrganizationFeign.selectByOrgCode(v.getUseOrgNo()).getData(); |
|
|
|
if (orgCompany != null) { |
|
|
|
useOrgSid = orgCompany.getSid(); |
|
|
|
useOrgName = orgCompany.getName(); |
|
|
|
} |
|
|
|
String prefix = getPrefix(orgDept, orgCompany, v.getActualName(), v.getActualPhone()); |
|
|
|
//客户表新增实际购车人
|
|
|
|
if (StringUtils.isNotBlank(prefix)) { |
|
|
|
CrmCustomerTemp customerTemp = crmCustomerTempFeign.fetchEntityByCustomerNo(prefix).getData(); |
|
|
|
if (null != customerTemp) { |
|
|
|
customerSid = customerTemp.getSid(); |
|
|
|
customerName = customerTemp.getName(); |
|
|
|
} else { |
|
|
|
CrmCustomerTemp crmCustomerTemp = new CrmCustomerTemp(); |
|
|
|
customerSid = crmCustomerTemp.getSid(); |
|
|
|
customerName = v.getActualName(); |
|
|
|
crmCustomerTemp.setCustomerNo(prefix); |
|
|
|
crmCustomerTemp.setMobile(v.getActualPhone()); |
|
|
|
crmCustomerTemp.setCustomerType("个人"); |
|
|
|
crmCustomerTemp.setCustomerTypeKey("1"); |
|
|
|
crmCustomerTemp.setCreateOrgSid(useOrgSid); |
|
|
|
crmCustomerTemp.setIsEnable(3); |
|
|
|
customerTemps.add(crmCustomerTemp); |
|
|
|
} |
|
|
|
} |
|
|
|
//客户表新增贷款人
|
|
|
|
crmCustomerTempFeign.fetchEntityByCustomerNo(v.getBorrowerNo()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|