Browse Source

金融方案添加其他融贴息

master
dimengzhe 2 years ago
parent
commit
feffbdf0be
  1. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApply.java
  2. 10
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeign.java
  3. 10
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeignFallback.java
  4. 67
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/UnBusDeliveredApplyDto.java
  5. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/SolutionsDetailsssVo.java
  6. 12
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyRest.java
  7. 120
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java
  8. 2
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmvehicledemand/AppCrmSolutions.java
  9. 7
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  10. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/SolutionDetailsDto.java
  11. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDetailsVo.java
  12. 1
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDto.java
  13. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssDto.java
  14. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssQuery.java
  15. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssVo.java
  16. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/calculate/CalculateQuery.java
  17. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/calculate/CalculateVo.java
  18. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsotherpolicy/LoanSolutionsOtherpolicy.java
  19. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantemplate/LoanTemplateSolutionsDto.java
  20. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantemplate/LoanTemplateSolutionsVo.java
  21. 96
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java
  22. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionQuery.java
  23. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionVo.java
  24. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionssDto.java

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApply.java

@ -125,4 +125,6 @@ public class BusDeliveredApply extends BaseEntity {
private String hasInvoiceKey;
@ApiModelProperty("是否开票(1开票,0不开票)")
private String hasInvoice;
@ApiModelProperty("类型:0正常出库,1欠款出库")
private int typeState;
}

10
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeign.java

@ -70,6 +70,7 @@ public interface BusDeliveredApplyFeign {
@ResponseBody
public ResultBean<PagerVo<BusDeliveredApplyVo>> listPage(@RequestBody PagerQuery<BusDeliveredApplyQuery> pq);
/**
* 出库申请新增或修改
*
@ -230,5 +231,14 @@ public interface BusDeliveredApplyFeign {
@ResponseBody
ResultBean<DeliveredFinVo> deliveredFinSelectByBusVinSid(@RequestParam("contractNo") String contractNo, @RequestParam("vinSid") String vinSid);
@ApiOperation("欠款出库申请分页列表")
@PostMapping("/unListPage")
@ResponseBody
public ResultBean<PagerVo<BusDeliveredApplyVo>> unListPage(@RequestBody PagerQuery<BusDeliveredApplyQuery> pq);
@ApiOperation("欠款出库保存")
@PostMapping("/unSave")
@ResponseBody
public ResultBean unSave(@RequestBody UnBusDeliveredApplyDto dto);
}

10
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeignFallback.java

@ -131,6 +131,16 @@ public class BusDeliveredApplyFeignFallback implements BusDeliveredApplyFeign {
return null;
}
@Override
public ResultBean<PagerVo<BusDeliveredApplyVo>> unListPage(PagerQuery<BusDeliveredApplyQuery> pq) {
return null;
}
@Override
public ResultBean unSave(UnBusDeliveredApplyDto dto) {
return null;
}
@Override
public ResultBean complete(BusDeliveredApplyCompleteDto query) {
return null;

67
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/UnBusDeliveredApplyDto.java

@ -0,0 +1,67 @@
package com.yxt.anrui.buscenter.api.busdeliveredapply;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetailsDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @description:
* @author: dimengzhe
* @date: 2023/10/7
**/
@Data
public class UnBusDeliveredApplyDto {
@ApiModelProperty(value = "出库申请sid")
private String sid;
private String userSid;
@ApiModelProperty("发起部门sid")
private String applyDeptSid;
@ApiModelProperty("发起部门")
private String applyDept;
@ApiModelProperty("发起人sid")
private String applySid;
@ApiModelProperty("发起人")
private String applyName;
@ApiModelProperty("销售部门sid")
private String staffDeptSid;
@ApiModelProperty("销售部门")
private String staffDeptName;
@ApiModelProperty("销售专员用户sid")
private String staffUserSid;
@ApiModelProperty("销售专员")
private String staffName;
@ApiModelProperty("销售类型key")
private String paymentMethodKey;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("客户手机号")
private String mobile;
@ApiModelProperty("车型别名")
private String modelName;
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("贷款人手机号")
private String loanMobile;
@ApiModelProperty("实际购车人类型:0订单客户,1贷款人,2其他人")
private String type;
@ApiModelProperty(value = "出库申请的车辆信息")
private List<BusDeliveredApplyDetailsDto> detailsList;
private String orgPath;
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("返利人sid")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2sid")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
}

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/SolutionsDetailsssVo.java

@ -92,6 +92,8 @@ public class SolutionsDetailsssVo {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

12
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyRest.java

@ -195,6 +195,18 @@ public class BusDeliveredApplyRest implements BusDeliveredApplyFeign {
return busDeliveredApplyService.deliveredFinSelectByBusVinSid(contractNo,vinSid);
}
@Override
public ResultBean<PagerVo<BusDeliveredApplyVo>> unListPage(PagerQuery<BusDeliveredApplyQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<BusDeliveredApplyVo> pv = busDeliveredApplyService.unListPage(pq);
return rb.success().setData(pv);
}
@Override
public ResultBean unSave(UnBusDeliveredApplyDto dto) {
return busDeliveredApplyService.unSave(dto);
}
@Override
public ResultBean complete(BusDeliveredApplyCompleteDto query) {
BusinessVariables bv = new BusinessVariables();

120
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java

@ -352,6 +352,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
qw.eq("bd.applySid", query.getApplySid());
}
qw.eq("bd.typeState",0);
}
IPage<BusDeliveredApply> page = PagerUtil.queryToPage(pq);
IPage<BusDeliveredApplyVo> pagging = baseMapper.selectPageVo(page, qw);
@ -388,7 +389,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
BeanUtil.copyProperties(dto, busDeliveredApply, "sid");
busDeliveredApply.setCreateBySid(dto.getUserSid());
BusSalesOrder busSalesOrder = busSalesOrderService.selectByContractNos(dto.getContractNo());
if(busSalesOrder != null){
if (busSalesOrder != null) {
busDeliveredApply.setStaffDeptName(busSalesOrder.getOrgName());
busDeliveredApply.setStaffDeptSid(busSalesOrder.getOrgSid());
}
@ -405,7 +406,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
save(busDeliveredApply);
dtoSid = busDeliveredApply.getSid();
if ("0".equals(dto.getIsInvoicing())){//开票
if ("0".equals(dto.getIsInvoicing())) {//开票
busBillApplicationService.saveOrUpdateDto(dto.getBusBillApplicationDto());
}
} else {
@ -430,7 +431,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
busDeliveredApplyDetailsService.saveList(dtoList, busDeliveredApply.getSid());
}
busBillApplicationService.delAllByCkSid(dtoSid);
if ("0".equals(dto.getIsInvoicing())){//开票
if ("0".equals(dto.getIsInvoicing())) {//开票
busBillApplicationService.saveOrUpdateDto(dto.getBusBillApplicationDto());
}
}
@ -486,7 +487,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
vo.setListVo(voList);
}
BusBillApplicationVo busBillApplicationVo = busBillApplicationService.selectByCkSid(sid);
if (busBillApplicationVo != null && "1".equals(vo.getHasInvoiceKey())){
if (busBillApplicationVo != null && "1".equals(vo.getHasInvoiceKey())) {
BusBillApplicationDetailsVo busBillApplicationDetailsVo = busBillApplicationService.fetchDetailByCkSid(busBillApplicationVo.getSid());
vo.setBusBillApplicationDetailsVo(busBillApplicationDetailsVo);
}
@ -846,7 +847,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
variables.put("isDanBao", false);
}
}else{
} else {
variables.put("isDanBao", false);
}
} else {
@ -897,7 +898,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
log.error("获取销售订单详情出错啦!!!");
}
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(busDeliveredApply.getStaffUserSid());
if ("1".equals(busDeliveredApply.getHasInvoiceKey())){
if ("1".equals(busDeliveredApply.getHasInvoiceKey())) {
BusSalesOrderPrice data = busSalesOrderService.selectByContractNoOne(busDeliveredApply.getContractNo()).getData();
BusSalesOrder busSalesOrder = busSalesOrderService.selectByContractNos(busDeliveredApply.getContractNo());
BusBillApplication busBillApplication = busBillApplicationService.selectByCkSidAll(busDeliveredApply.getSid());
@ -1033,7 +1034,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (oneBillMoney == null) {
busSalesOrderService.updateOneBillMoneyByOrderSid(busSalesOrder.getSid(), busBillApplication.getOneBillMoney().toString());
}
}else {
} else {
//推送开票申请数据
Future future1 = pool.submit(() -> {
pushInvoice(busDeliveredApply, detailsList, orderDetailsVoResultBean.getData(), userVoResultBean.getData());
@ -1617,7 +1618,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
variables.put("isDanBao", false);
}
}else{
} else {
variables.put("isDanBao", false);
}
} else {
@ -1681,7 +1682,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
variables.put("isDanBao", false);
}
}else{
} else {
variables.put("isDanBao", false);
}
} else {
@ -1748,7 +1749,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
variables.put("isDanBao", false);
}
}else{
} else {
variables.put("isDanBao", false);
}
} else {
@ -1888,7 +1889,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
} else {
variables.put("isDanBao", false);
}
}else{
} else {
variables.put("isDanBao", false);
}
} else {
@ -2109,6 +2110,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
qw.eq("useOrgSid", orgSid);
qw.eq("applySid", pagerQuery.getParams().getUserSid());
}
qw.eq("bd.typeState",0);
IPage<AppDeliveredApplyPageQuery> page = PagerUtil.queryToPage(pagerQuery);
IPage<AppDeliveredApplyPageVo> iPage = baseMapper.getRetrievalApplyList(page, qw, pagerQuery.getParams().getName());
List<AppDeliveredApplyPageVo> records = iPage.getRecords();
@ -2181,7 +2183,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
busDeliveredApply.setStaffName(userVoResultBean.getData().getName());
busDeliveredApply.setOrgSidPath(orgSidPath);
BusSalesOrder busSalesOrder = busSalesOrderService.selectByContractNos(dto.getContractId());
if(busSalesOrder != null){
if (busSalesOrder != null) {
busDeliveredApply.setStaffDeptName(busSalesOrder.getOrgName());
busDeliveredApply.setStaffDeptSid(busSalesOrder.getOrgSid());
}
@ -2363,7 +2365,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
BeanUtil.copyProperties(dto, busDeliveredApply, "sid");
BusSalesOrder busSalesOrder = busSalesOrderService.selectByContractNos(dto.getContractId());
if(busSalesOrder != null){
if (busSalesOrder != null) {
busDeliveredApply.setStaffDeptName(busSalesOrder.getOrgName());
busDeliveredApply.setStaffDeptSid(busSalesOrder.getOrgSid());
}
@ -2633,7 +2635,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
//判断出库车辆列表是否已存在待出库车辆记录,存在提示不能重复出库
for (AppCarListVo appCarListVo : carList) {
int i = busDeliveredApplyDetailsService.fetchByIsDeleteVinSid(appCarListVo.getVinSid());
if (i > 0){
if (i > 0) {
return rb.setMsg("车辆已存在出库中");
}
}
@ -2727,16 +2729,16 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
String sid = resultBean.getData();
busDeliveredApply = fetchBySid(sid);
if ("1".equals(busDeliveredApply.getHasInvoiceKey())){
if ("1".equals(busDeliveredApply.getHasInvoiceKey())) {
BusBillApplicationDetailsVo busBillApplicationDetailsVo = busBillApplicationService.fetchDetailByCkSid(sid);
if (StringUtils.isBlank(busBillApplicationDetailsVo.getSid())){
if (StringUtils.isBlank(busBillApplicationDetailsVo.getSid())) {
return rb.setMsg("未保存开票信息,无法提交");
}
List<BusBillVehicleVo> busBillVehicleVos = busBillVehicleService.fetchByMainSid(busBillApplicationDetailsVo.getSid());
for (BusBillVehicleVo busBillVehicleVo : busBillVehicleVos) {
if (StringUtils.isBlank(busBillVehicleVo.getBillTypeKey())){
if (StringUtils.isBlank(busBillVehicleVo.getBillTypeKey())) {
return rb.setMsg(busBillVehicleVo.getVinNo() + "开票类型不能为空");
}else if (StringUtils.isBlank(busBillVehicleVo.getOpenTickName())){
} else if (StringUtils.isBlank(busBillVehicleVo.getOpenTickName())) {
return rb.setMsg(busBillVehicleVo.getVinNo() + "开票名称不能为空");
}
}
@ -3010,4 +3012,86 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
return rb.success().setData(deliveredFinVo);
}
public PagerVo<BusDeliveredApplyVo> unListPage(PagerQuery<BusDeliveredApplyQuery> pq) {
BusDeliveredApplyQuery query = pq.getParams();
QueryWrapper<BusDeliveredApply> qw = new QueryWrapper<>();
if (query != null) {
//合同编号
if (StringUtils.isNotBlank(query.getContractNo())) {
qw.like("bd.contractNo", query.getContractNo());
}
//客户名称
if (StringUtils.isNotBlank(query.getName())) {
qw.like("bd.name", query.getName());
}
if (StringUtils.isNotBlank(query.getApplyDateStart()) && StringUtils.isNotBlank(query.getApplyDateEnd())) {
qw.between("bd.createTime", query.getApplyDateStart(), query.getApplyDateEnd());
}
if (StringUtils.isNotBlank(query.getApplyName())) {
qw.like("bd.applyName", query.getApplyName());
}
if (StringUtils.isNotBlank(query.getPaymentMethodKey())) {
qw.eq("bd.paymentMethodKey", query.getPaymentMethodKey());
}
//========================================数据授权开始
if (StringUtils.isNotBlank(query.getMenuUrl())) {
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setMenuUrl(query.getMenuUrl());
privilegeQuery.setUserSid(query.getApplySid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("bd.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("bd.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("bd.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("bd.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("bd.createBySid", query.getApplySid());
} else {
PagerVo<BusDeliveredApplyVo> p = new PagerVo<>();
return p;
}
} else {
PagerVo<BusDeliveredApplyVo> p = new PagerVo<>();
return p;
}
} else {
qw.eq("bd.applySid", query.getApplySid());
}
qw.eq("typeState",1);
}
IPage<BusDeliveredApply> page = PagerUtil.queryToPage(pq);
IPage<BusDeliveredApplyVo> pagging = baseMapper.selectPageVo(page, qw);
List<BusDeliveredApplyVo> records = pagging.getRecords();
for (BusDeliveredApplyVo record : records) {
if (query.getApplySid().equals(record.getCreateBySid())) {
record.setAllowModify(true);
} else {
record.setAllowModify(false);
}
}
PagerVo<BusDeliveredApplyVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public ResultBean unSave(UnBusDeliveredApplyDto dto) {
return null;
}
}

2
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmvehicledemand/AppCrmSolutions.java

@ -97,6 +97,8 @@ public class AppCrmSolutions {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

7
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -20,7 +20,7 @@ public enum ProcDefEnum {
ARREARSCARRYVEHICLE("欠款提车审批流程", "process_f2dkbvny:5:4975004"),
VEHICLEAPPLY("排产申请流程", "process_9egcg169:14:3120004"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:9:1865007"),
// BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:8:725012"),
// BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:8:725012"),
BASEVEHICLEACTUALSALES("未售买断", "process_6qx07b75:9:4087504"),
FINCOSTAPPLY("费用申请", "process_u0pahv0s:6:725016"),
FINPAYAPPLY("付款申请", "process_gin2tntb:4:725020"),
@ -29,12 +29,13 @@ public enum ProcDefEnum {
SEALAPPLY("盖章申请", "process_7h0z66tp:1:240064"),
SALESORDER("销售订单审批流程", "process_p5ils2rn:10:1250008"),
BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:7:3100008"),
// BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:8:1865012"),
// BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:8:1865012"),
BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:10:4035008"),
BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:3:722516"),
BASEACCADJAPPLY("调账申请", "process_r6pyzqoz:4:1362508"),
// BUSDELIVEREDAPPLY("出库申请", "process_wgt1n66l:10:1700004"),
// BUSDELIVEREDAPPLY("出库申请", "process_wgt1n66l:10:1700004"),
BUSDELIVEREDAPPLY("出库申请", "process_30ixry76:2:5357504"),
QKBUSDELIVEREDAPPLY("欠款出库申请", ""),
BASESHUNINVOICAPPLY("调车开票申请", "process_u4xrvaso:1:400008"),
BASEVEHINSTALLMODPRICE("上装调价申请", "process_s0a0svth:1:492508"),
SCMVEHREBATEWITHAPPLY("单车返利预提申请", "process_qegarc7r:1:535004"),

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/SolutionDetailsDto.java

@ -95,6 +95,9 @@ public class SolutionDetailsDto implements Dto {
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
private String otherPolicySid;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDetailsVo.java

@ -100,6 +100,10 @@ public class SolutionsDetailsVo implements Vo {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

1
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionsDto.java

@ -97,6 +97,7 @@ public class SolutionsDto implements Dto {
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("'融资首付")
private String loanDownPay;
@ApiModelProperty("总贷款金额")

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssDto.java

@ -95,6 +95,9 @@ public class SolutionssDto implements Dto {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssQuery.java

@ -72,6 +72,8 @@ public class SolutionssQuery implements Query {
private String returnTime;
private String otherPolicySid;
private String otherPolicyName;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
/*********************************金融方案费用明细*****************************/

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/app/SolutionssVo.java

@ -91,6 +91,8 @@ public class SolutionssVo implements Vo {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
/*************************方案汇总*********************************/
@ApiModelProperty("'融资首付")
private String loanDownPay;

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/calculate/CalculateQuery.java

@ -63,6 +63,8 @@ public class CalculateQuery {
private String otherPolicyYearRatio;
@ApiModelProperty("其他融sid")
private String otherPolicySid;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
/*********************************金融方案费用明细*****************************/

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutions/calculate/CalculateVo.java

@ -27,6 +27,8 @@ public class CalculateVo {
private String otherPolicyMonthlyRepay;
@ApiModelProperty("其它融利息总额")
private String otherPolicyInterest;
@ApiModelProperty("其他融年利率")
private String otherPolicyYearRatio;
/***********方案汇总*************/
@ApiModelProperty("'融资首付")

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansolutionsotherpolicy/LoanSolutionsOtherpolicy.java

@ -82,6 +82,9 @@ public class LoanSolutionsOtherpolicy extends BaseEntity {
@ApiModelProperty("实际首付比例")
private String downPayAmountsRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
}

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantemplate/LoanTemplateSolutionsDto.java

@ -90,6 +90,8 @@ public class LoanTemplateSolutionsDto implements Dto {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loantemplate/LoanTemplateSolutionsVo.java

@ -82,6 +82,8 @@ public class LoanTemplateSolutionsVo implements Vo {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

96
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansolutions/LoanSolutionsService.java

@ -1318,16 +1318,27 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
BigDecimal policyYearRatioNew = simpleCalculateRate(new BigDecimal(loanPeriod).doubleValue(), loanPayMoneyNew.doubleValue(), -loanAmount.doubleValue()).multiply(new BigDecimal("12")).multiply(new BigDecimal("100"));
//四舍五入取两位小数
policyYearRatioNew = policyYearRatioNew.setScale(2, BigDecimal.ROUND_HALF_UP);
//四舍五入取整数
loanPayMoneyNew = loanPayMoneyNew.setScale(0, BigDecimal.ROUND_HALF_UP);
loanInterestNew = loanInterestNew.setScale(0, BigDecimal.ROUND_HALF_UP);
if(policyYearRatioNew.compareTo(BigDecimal.ZERO)<0){
//根据年利率和期数、贷款金额计算月还
loanPayMoneyNew = calculatePMT(BigDecimal.ZERO.divide(new BigDecimal("100"), 4, BigDecimal.ROUND_CEILING).doubleValue(), new BigDecimal(loanPeriod).doubleValue(), loanAmount.doubleValue());
//根据月还计算利息总额=月还金额 乘以 期数 减去 本金
loanInterestNew = loanPayMoney.multiply(new BigDecimal(loanPeriod)).subtract(loanAmount);
//四舍五入取整数
loanPayMoneyNew = loanPayMoney.setScale(0, BigDecimal.ROUND_HALF_UP);
loanInterestNew = loanInterest.setScale(0, BigDecimal.ROUND_HALF_UP);
loanPayMoneyAll = loanPayMoneyAll.add(loanPayMoneyNew);
policyYearRatioNew = BigDecimal.ZERO.setScale(2, BigDecimal.ROUND_HALF_UP);
}else{
//四舍五入取整数
loanPayMoneyNew = loanPayMoneyNew.setScale(0, BigDecimal.ROUND_HALF_UP);
loanInterestNew = loanInterestNew.setScale(0, BigDecimal.ROUND_HALF_UP);
}
loanPayMoneyAll = loanPayMoneyAll.add(loanPayMoneyNew);
interstAll = interstAll.add(loanInterestNew);
yueAll = yueAll.add(loanPayMoneyNew.multiply(new BigDecimal(loanPeriod)));
calculateVo.setLoanInterest(loanInterestNew.toString());
calculateVo.setPolicyYearRatio(policyYearRatioNew.toString());
calculateVo.setLoanPayMoney(loanPayMoneyNew.toString());
} else {
//年利率
BigDecimal policyYearRatio = loanFinPolicy.getYearRatio();
@ -1364,21 +1375,59 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
if (StringUtils.isBlank(otherPolicyPeriod)) {
otherPolicyPeriod = "0";
}
loanDownPay = loanDownPay.subtract(new BigDecimal(otherPolicyAmount));
//总贷款金额的计算
loanAmountTotal = loanAmountTotal.add(new BigDecimal(otherPolicyAmount));
//根据年利率和期数、贷款金额计算月还
BigDecimal otherPolicyMonthlyRepay = calculatePMT(new BigDecimal(otherPolicyYearRatio).divide(new BigDecimal("100"), 4, BigDecimal.ROUND_CEILING).doubleValue(), new BigDecimal(otherPolicyPeriod).doubleValue(), new BigDecimal(otherPolicyAmount).doubleValue());
//根据月还计算利息总额=月还金额 乘以 期数 减去 本金
BigDecimal otherPolicyInterest = otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)).subtract(new BigDecimal(otherPolicyAmount));
//四舍五入取整数
otherPolicyMonthlyRepay = otherPolicyMonthlyRepay.setScale(0, BigDecimal.ROUND_HALF_UP);
otherPolicyInterest = otherPolicyInterest.setScale(0, BigDecimal.ROUND_HALF_UP);
loanPayMoneyAll = loanPayMoneyAll.add(otherPolicyMonthlyRepay);
interstAll = interstAll.add(otherPolicyInterest);
yueAll = yueAll.add(otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)));
calculateVo.setOtherPolicyInterest(otherPolicyInterest.toString());
calculateVo.setOtherPolicyMonthlyRepay(otherPolicyMonthlyRepay.toString());
//其他融贴息
String otherDiscount = query.getOtherDiscount();
if (StringUtils.isNotBlank(otherDiscount) && !"0".equals(otherDiscount)) {
//根据年利率和期数、贷款金额计算旧月还
BigDecimal otherPolicyMonthlyRepay = calculatePMT(new BigDecimal(otherPolicyYearRatio).divide(new BigDecimal("100"), 4, BigDecimal.ROUND_CEILING).doubleValue(), new BigDecimal(loanPeriod).doubleValue(), loanAmount.doubleValue());
//根据月还计算旧利息总额=旧月还金额 乘以 期数 减去 本金
BigDecimal otherPolicyInterest = otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)).subtract(new BigDecimal(otherPolicyAmount));
//根据旧利息总额和厂家贴息计算新利息总额
BigDecimal otherPolicyInterestNew = otherPolicyInterest.subtract(new BigDecimal(otherDiscount));
//再根据厂家贴息、旧月还计算新月还金额 = 旧月还金额 减去 厂家贴息 除以 期数
BigDecimal otherPolicyMonthlyRepayNew = otherPolicyMonthlyRepay.subtract(new BigDecimal(otherDiscount).divide(new BigDecimal(otherPolicyPeriod), 4, BigDecimal.ROUND_HALF_UP));
//根据新月还rate计算新年利率。
BigDecimal otherPolicyYearRatioNew = simpleCalculateRate(new BigDecimal(otherPolicyPeriod).doubleValue(), otherPolicyMonthlyRepayNew.doubleValue(), -new BigDecimal(otherPolicyAmount).doubleValue()).multiply(new BigDecimal("12")).multiply(new BigDecimal("100"));
//四舍五入取两位小数
otherPolicyYearRatioNew = otherPolicyYearRatioNew.setScale(2, BigDecimal.ROUND_HALF_UP);
if(otherPolicyYearRatioNew.compareTo(BigDecimal.ZERO)<0){
//根据年利率和期数、贷款金额计算月还
otherPolicyMonthlyRepayNew = calculatePMT(BigDecimal.ZERO.divide(new BigDecimal("100"), 4, BigDecimal.ROUND_CEILING).doubleValue(), new BigDecimal(otherPolicyPeriod).doubleValue(), new BigDecimal(otherPolicyAmount).doubleValue());
//根据月还计算利息总额=月还金额 乘以 期数 减去 本金
otherPolicyInterestNew = otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)).subtract(new BigDecimal(otherPolicyAmount));
//四舍五入取整数
otherPolicyMonthlyRepayNew = otherPolicyMonthlyRepayNew.setScale(0, BigDecimal.ROUND_HALF_UP);
otherPolicyInterestNew = otherPolicyInterestNew.setScale(0, BigDecimal.ROUND_HALF_UP);
otherPolicyYearRatioNew = BigDecimal.ZERO.setScale(2, BigDecimal.ROUND_HALF_UP);
}else{
//四舍五入取整数
otherPolicyMonthlyRepayNew = otherPolicyMonthlyRepayNew.setScale(0, BigDecimal.ROUND_HALF_UP);
otherPolicyInterestNew = otherPolicyInterestNew.setScale(0, BigDecimal.ROUND_HALF_UP);
}
loanPayMoneyAll = loanPayMoneyAll.add(otherPolicyMonthlyRepayNew);
interstAll = interstAll.add(otherPolicyInterestNew);
yueAll = yueAll.add(otherPolicyMonthlyRepayNew.multiply(new BigDecimal(otherPolicyPeriod)));
calculateVo.setOtherPolicyInterest(otherPolicyInterestNew.toString());
calculateVo.setOtherPolicyYearRatio(otherPolicyYearRatioNew.toString());
calculateVo.setOtherPolicyMonthlyRepay(otherPolicyMonthlyRepayNew.toString());
}else{
loanDownPay = loanDownPay.subtract(new BigDecimal(otherPolicyAmount));
//总贷款金额的计算
loanAmountTotal = loanAmountTotal.add(new BigDecimal(otherPolicyAmount));
//根据年利率和期数、贷款金额计算月还
BigDecimal otherPolicyMonthlyRepay = calculatePMT(new BigDecimal(otherPolicyYearRatio).divide(new BigDecimal("100"), 4, BigDecimal.ROUND_CEILING).doubleValue(), new BigDecimal(otherPolicyPeriod).doubleValue(), new BigDecimal(otherPolicyAmount).doubleValue());
//根据月还计算利息总额=月还金额 乘以 期数 减去 本金
BigDecimal otherPolicyInterest = otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)).subtract(new BigDecimal(otherPolicyAmount));
//四舍五入取整数
otherPolicyMonthlyRepay = otherPolicyMonthlyRepay.setScale(0, BigDecimal.ROUND_HALF_UP);
otherPolicyInterest = otherPolicyInterest.setScale(0, BigDecimal.ROUND_HALF_UP);
loanPayMoneyAll = loanPayMoneyAll.add(otherPolicyMonthlyRepay);
interstAll = interstAll.add(otherPolicyInterest);
yueAll = yueAll.add(otherPolicyMonthlyRepay.multiply(new BigDecimal(otherPolicyPeriod)));
calculateVo.setOtherPolicyInterest(otherPolicyInterest.toString());
calculateVo.setOtherPolicyMonthlyRepay(otherPolicyMonthlyRepay.toString());
}
} else {
otherPolicyPeriod = "0";
}
@ -1991,6 +2040,15 @@ public class LoanSolutionsService extends MybatisBaseService<LoanSolutionsMapper
otherPolicyMonthlyRepayValue = otherPolicyMonthlyRepayValue.append("月还金额:").append("-");
}
list.add(getValueSpanSize(otherPolicyMonthlyRepayValue.toString(), 2, 0, false));
//其他融贴息
StringBuilder otherDiscountValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionssVo.getOtherPolicyMonthlyRepay())) {
otherDiscountValue = otherDiscountValue.append("其它融贴息:").append(solutionssVo.getOtherDiscount());
} else {
otherDiscountValue = otherDiscountValue.append("其它融贴息:").append("-");
}
list.add(getValueSpanSize(otherDiscountValue.toString(), 2, 0, false));
}
//方案汇总
list.add(getValueSpanSize("方案汇总", 2, 1, true));

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionQuery.java

@ -73,6 +73,8 @@ public class AppSolutionQuery implements Query {
private String returnTime;
private String otherPolicySid;
private String otherPolicyName;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
/*********************************金融方案费用明细*****************************/

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionVo.java

@ -118,6 +118,8 @@ public class AppSolutionVo {
private String otherPolicyYearRatio;
private boolean otherPolicyIsMain;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
@JsonSerialize(using = ToStringSerializer.class)

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/AppSolutionssDto.java

@ -99,6 +99,8 @@ public class AppSolutionssDto implements Dto {
private String otherPolicyInterest;
@ApiModelProperty("其它融年利率")
private String otherPolicyYearRatio;
@ApiModelProperty("其他融贴息")
private String otherDiscount;
@ApiModelProperty("'融资首付")
private String loanDownPay;

Loading…
Cancel
Save