|
|
@ -58,6 +58,7 @@ import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModel; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModelFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPriceFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderprice.app.AppBusSalesOrderPriceVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; |
|
|
@ -88,6 +89,8 @@ import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatecustomer.LoanHomevis |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigatefile.LoanHomevisitInvestigateFileService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigateotherpeo.LoanHomevisitInvestigateOtherpeoService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService; |
|
|
|
import com.yxt.anrui.scm.api.scmwarehouse.ScmWarehouseFeign; |
|
|
|
import com.yxt.anrui.scm.api.scmwarehouse.ScmWarehouseVo; |
|
|
|
import com.yxt.common.base.config.component.DocPdfComponent; |
|
|
|
import com.yxt.common.base.utils.TransformMoney; |
|
|
|
import com.yxt.common.base.utils.WordConvertUtils; |
|
|
@ -177,6 +180,8 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
private LoanHomevisitInvestigateFileService loanHomevisitInvestigateFileService; |
|
|
|
@Autowired |
|
|
|
private FinCompanyInvoicingFeign finCompanyInvoicingFeign; |
|
|
|
@Autowired |
|
|
|
private ScmWarehouseFeign scmWarehouseFeign; |
|
|
|
|
|
|
|
public PagerVo<LoanHomevisitPrepVo> listPageVo(PagerQuery<LoanHomevisitPrepQuery> pq) { |
|
|
|
LoanHomevisitPrepQuery query = pq.getParams(); |
|
|
@ -292,7 +297,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
public ResultBean visit(String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
LoanHomevisitPrep loanHomevisitPrep = fetchBySid(sid); |
|
|
|
if (StringUtils.isBlank(loanHomevisitPrep.getDownUrl())){ |
|
|
|
if (StringUtils.isBlank(loanHomevisitPrep.getDownUrl())) { |
|
|
|
return rb.setMsg("未生成消贷合同信息"); |
|
|
|
} |
|
|
|
/*List<BusSalesOrderLoancontract> busSalesOrderLoancontracts = busSalesOrderLoancontractFeign.fetchAllByOrderSidAndDkrSid(loanHomevisitPrep.getSaleOrderSid(), loanHomevisitPrep.getSaleOrderBorrowerSid()).getData(); |
|
|
@ -482,7 +487,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
List<BusSalesOrderMakeupDetailsVo> busSalesOrderMakeupDetailsVoList = busSalesOrderMakeupFeign.selectTopByOrderSid(busSalesOrder.getSid()).getData(); |
|
|
|
//查询金融方案中挂车信息
|
|
|
|
List<String> cljszcghtUrls = new ArrayList<>(); |
|
|
|
if ((busSalesOrderMakeupDetailsVoList != null && busSalesOrderMakeupDetailsVoList.size() > 0) || solutionsDetailsVo.isTrailerAmountCb()){ |
|
|
|
if ((busSalesOrderMakeupDetailsVoList != null && busSalesOrderMakeupDetailsVoList.size() > 0) || solutionsDetailsVo.isTrailerAmountCb()) { |
|
|
|
//生成车辆及上装采购合同
|
|
|
|
cljszcghtUrls = cljszcght(printConfirmDto, conSetUpKey); |
|
|
|
} |
|
|
@ -573,7 +578,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
} |
|
|
|
urlAllVo = docPdfComponent.getPrefixTemplateUrl() + urlAll; |
|
|
|
} |
|
|
|
baseMapper.updateDownUrl(sid,"/template/" + urlAll); |
|
|
|
baseMapper.updateDownUrl(sid, "/template/" + urlAll); |
|
|
|
return rb.success().setData(urlAllVo); |
|
|
|
} |
|
|
|
|
|
|
@ -670,11 +675,21 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
//身份证号
|
|
|
|
map.put("idNo2", ""); |
|
|
|
//接收时间
|
|
|
|
map.put("jssj", DateUtil.formatDate(new Date())); |
|
|
|
map.put("jssj", ""); |
|
|
|
//车辆信息
|
|
|
|
BaseVehicle baseVehicle1 = baseVehicleFeign.fetchBySid(salesOrderVehicles.get(0).getLinkSid()).getData(); |
|
|
|
//接收地点
|
|
|
|
map.put("jsdd", baseVehicle1.getLocationName()); |
|
|
|
AppBusSalesOrderPriceVo appBusSalesOrderPriceVo = busSalesOrderPriceFeign.getPriceInfo(salesOrderVehicles.get(0).getSalesOrderSid()).getData(); |
|
|
|
if (StringUtils.isNotBlank(appBusSalesOrderPriceVo.getAddressKey())) { |
|
|
|
ScmWarehouseVo scmWarehouseVo = scmWarehouseFeign.fetchBySid(appBusSalesOrderPriceVo.getAddressKey()).getData(); |
|
|
|
if (StringUtils.isNotBlank(scmWarehouseVo.getCounty()) && StringUtils.isNotBlank(scmWarehouseVo.getCounty())) { |
|
|
|
map.put("jsdd", appBusSalesOrderPriceVo.getAddress() + "(" + scmWarehouseVo.getCity() + scmWarehouseVo.getCounty() + scmWarehouseVo.getWarehouseAttribute() + ")"); |
|
|
|
} else { |
|
|
|
map.put("jsdd", appBusSalesOrderPriceVo.getAddress() + "(" + scmWarehouseVo.getWarehouseAttribute() + ")"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
map.put("jsdd", ""); |
|
|
|
} |
|
|
|
//品牌
|
|
|
|
map.put("brandName", baseVehicle1.getCarBrandName()); |
|
|
|
//名称
|
|
|
@ -1119,7 +1134,8 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsService.selectDetails(busSalesOrder.getSid()).getData(); |
|
|
|
String replace = solutionsDetailsVo.getDownPayAmountsRatio().replace("%", ""); |
|
|
|
BigDecimal downPayRatio = BigDecimal.valueOf(Double.valueOf(replace)).divide(new BigDecimal(100)); |
|
|
|
BigDecimal zf = money.multiply(downPayRatio).setScale(2,BigDecimal.ROUND_HALF_UP);; |
|
|
|
BigDecimal zf = money.multiply(downPayRatio).setScale(2, BigDecimal.ROUND_HALF_UP); |
|
|
|
; |
|
|
|
map.put("zf", String.valueOf(zf)); |
|
|
|
//剩余xxx元
|
|
|
|
BigDecimal sy = money.subtract(zf); |
|
|
@ -1160,7 +1176,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
SolutionsDetailsVo solutionsDetailsVo = loanSolutionsService.selectDetails(busSalesOrder.getSid()).getData(); |
|
|
|
String replace = solutionsDetailsVo.getDownPayAmountsRatio().replace("%", ""); |
|
|
|
BigDecimal downPayRatio = BigDecimal.valueOf(Double.valueOf(replace)).divide(new BigDecimal(100)); |
|
|
|
BigDecimal zf = moneyTotal.multiply(downPayRatio).setScale(2,BigDecimal.ROUND_HALF_UP); |
|
|
|
BigDecimal zf = moneyTotal.multiply(downPayRatio).setScale(2, BigDecimal.ROUND_HALF_UP); |
|
|
|
map.put("zf", String.valueOf(zf)); |
|
|
|
//剩余xxx元
|
|
|
|
BigDecimal sy = moneyTotal.subtract(zf); |
|
|
@ -1586,7 +1602,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
//上装成交价/挂车成交价
|
|
|
|
if (topInfo != null) { |
|
|
|
map.put("je", topInfo.getTopPrice()); |
|
|
|
}else if (solutionsDetailsVo.isTrailerAmountCb()){ |
|
|
|
} else if (solutionsDetailsVo.isTrailerAmountCb()) { |
|
|
|
map.put("je", solutionsDetailsVo.getTrailerAmount()); |
|
|
|
} |
|
|
|
} |
|
|
@ -1600,7 +1616,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
if ("0".equals(homeKcCust.getIsCompBuy())) { |
|
|
|
//消贷合同编号
|
|
|
|
map.put("con1", busSalesOrderLoancontractDetailsVo.getLoanContractNo()); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//消贷合同编号
|
|
|
|
map.put("con1", "_____"); |
|
|
|
} |
|
|
@ -1629,7 +1645,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
if ("0".equals(homeKcCust.getIsCompBuy())) { |
|
|
|
//消贷合同编号
|
|
|
|
map.put("con1", busSalesOrderLoancontractDetailsVo.getLoanContractNo()); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//消贷合同编号
|
|
|
|
map.put("con1", "_____"); |
|
|
|
} |
|
|
@ -1670,12 +1686,12 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr |
|
|
|
map.put("jf", finCompanyInvoicingDetailsVo.getName()); |
|
|
|
//乙方
|
|
|
|
map.put("yf", salesOrderVehicles.get(0).getBorrowName()); |
|
|
|
if (StringUtils.isNotBlank(homeKcCust.getShareNum())){ |
|
|
|
if (StringUtils.isNotBlank(homeKcCust.getShareNum())) { |
|
|
|
//股东人数1
|
|
|
|
map.put("gdrs1", homeKcCust.getShareNum()); |
|
|
|
//股东人数2
|
|
|
|
map.put("gdrs2", homeKcCust.getShareNum()); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//股东人数1
|
|
|
|
map.put("gdrs1", "_____"); |
|
|
|
//股东人数2
|
|
|
|