Browse Source

优化公司非担保进度维护

master
fanzongzhe 2 years ago
parent
commit
cda4e72a52
  1. 48
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusNoGuaranteeCreditReviewQuery.java
  2. 50
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusNoGuaranteeCreditReviewVo.java
  3. 9
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java
  4. 10
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeignFallback.java
  5. 30
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.java
  6. 67
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.xml
  7. 12
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java
  8. 120
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java
  9. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java
  10. 36
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReview.java
  11. 44
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewDetailsVo.java
  12. 46
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewDto.java
  13. 25
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewFallback.java
  14. 41
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewFeign.java
  15. 29
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewQuery.java
  16. 23
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewVo.java
  17. 36
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanDetailsVo.java
  18. 21
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanListDetailsVo.java
  19. 23
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanQuery.java
  20. 32
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanVo.java
  21. 6
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentSchedule.java
  22. 22
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java
  23. 12
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java
  24. 26
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewMapper.java
  25. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewMapper.xml
  26. 38
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewRest.java
  27. 152
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewService.java
  28. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleMapper.java
  29. 16
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleMapper.xml
  30. 15
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java
  31. 237
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  32. 35
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanDetailsVo.java
  33. 37
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java
  34. 27
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java
  35. 22
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanListDetailsVo.java
  36. 23
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanQuery.java
  37. 34
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVo.java
  38. 39
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java
  39. 57
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java

48
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusNoGuaranteeCreditReviewQuery.java

@ -0,0 +1,48 @@
package com.yxt.anrui.buscenter.api.bussalesorderborrower;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 9:09
*/
@Data
public class BusNoGuaranteeCreditReviewQuery implements Query {
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("组织全路径")
private String orgPath;
@ApiModelProperty("菜单sid")
private String menuSid;
@ApiModelProperty("菜单url")
private String menuUrl;
@ApiModelProperty("分公司")
private String company;
@ApiModelProperty("销售部门")
private String department;
@ApiModelProperty("销售专员")
private String salesman;
@ApiModelProperty("订单开始日期")
private String startTime;
@ApiModelProperty("订单结束日期")
private String endTime;
@ApiModelProperty("贷款人")
private String borrowerName;
@ApiModelProperty("消贷合同编号")
private String contractNo;
@ApiModelProperty("资方")
private String bankName;
@ApiModelProperty("家访考察结果")
private String homeVisit;
@ApiModelProperty("信审终审结果")
private String creditReview;
@ApiModelProperty("放款审核结果")
private String loanReview;
@ApiModelProperty("是否放款")
private String isLoan;
}

50
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusNoGuaranteeCreditReviewVo.java

@ -0,0 +1,50 @@
package com.yxt.anrui.buscenter.api.bussalesorderborrower;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 9:09
*/
@Data
public class BusNoGuaranteeCreditReviewVo implements Vo {
@ApiModelProperty("订单日期")
private String orderDate;
@ApiModelProperty("分公司")
private String company;
@ApiModelProperty("销售部门")
private String department;
@ApiModelProperty("销售专员")
private String salesman;
@ApiModelProperty("贷款人")
private String borrowerName;
@ApiModelProperty("消贷合同编号")
private String contractNo;
@ApiModelProperty("资方")
private String bankName;
@ApiModelProperty("手机号码")
private String mobile;
@ApiModelProperty("家访考察结果")
private String homeVisit;
@ApiModelProperty("家访考察日期")
private String homeVisitDate;
@ApiModelProperty("信审终审结果")
private String creditReview;
@ApiModelProperty("信审终审日期")
private String creditReviewDate;
@ApiModelProperty("放款审核结果")
private String loanReview;
@ApiModelProperty("放款审核日期")
private String loanReviewDate;
@ApiModelProperty("是否放款")
private String isLoan;
@ApiModelProperty("放款日期")
private String isLoanDate;
}

9
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java

@ -91,5 +91,14 @@ public interface BusSalesOrderBorrowerFeign {
@ResponseBody
ResultBean confirmBorrow(@RequestBody OrderBorrowQuery query);
@ApiOperation("公司非担保业务进度维护")
@PostMapping("/noGuaranteeCreditReviewPage")
@ResponseBody
public ResultBean<PagerVo<BusNoGuaranteeCreditReviewVo>> noGuaranteeCreditReviewPage(@RequestBody PagerQuery<BusNoGuaranteeCreditReviewQuery> pq);
@ApiOperation("根据销售订单SID获取一条记录")
@GetMapping("/fetchDetailsByOrderSid/{orderSid}")
@ResponseBody
public ResultBean<BusSalesOrderBorrowerDetailsVo> fetchDetailsByOrderSid(@PathVariable("orderSid") String orderSid);
}

10
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeignFallback.java

@ -84,4 +84,14 @@ public class BusSalesOrderBorrowerFeignFallback implements BusSalesOrderBorrower
public ResultBean confirmBorrow(OrderBorrowQuery query) {
return null;
}
@Override
public ResultBean<PagerVo<BusNoGuaranteeCreditReviewVo>> noGuaranteeCreditReviewPage(PagerQuery<BusNoGuaranteeCreditReviewQuery> pq) {
return null;
}
@Override
public ResultBean<BusSalesOrderBorrowerDetailsVo> fetchDetailsByOrderSid(String orderSid) {
return null;
}
}

30
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.java

@ -26,9 +26,11 @@
package com.yxt.anrui.buscenter.biz.bussalesorderborrower;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusNoGuaranteeCreditReviewVo;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
@ -57,23 +59,27 @@ import java.util.List;
@Mapper
public interface BusSalesOrderBorrowerMapper extends BaseMapper<BusSalesOrderBorrower> {
//@Update("update bus_sales_order_borrower set name=#{msg} where id=#{id}")
//IPage<BusSalesOrderBorrowerVo> voPage(IPage<BusSalesOrderBorrower> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrderBorrower> qw);
IPage<BusSalesOrderBorrowerVo> selectPageVo(IPage<BusSalesOrderBorrower> page, @Param(Constants.WRAPPER) Wrapper<BusSalesOrderBorrower> qw);
List<BusSalesOrderBorrowerVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<BusSalesOrderBorrower> qw);
@Select("select * from bus_sales_order_borrower")
List<BusSalesOrderBorrowerVo> selectListVo();
//@Update("update bus_sales_order_borrower set name=#{msg} where id=#{id}")
//IPage<BusSalesOrderBorrowerVo> voPage(IPage<BusSalesOrderBorrower> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrderBorrower> qw);
@Update("update bus_sales_order_borrower set busNo = #{busNo} where sid = #{saleOrderBorrowerSid}")
void updateBusNo(@Param("busNo") String busNo,@Param("saleOrderBorrowerSid") String saleOrderBorrowerSid);
IPage<BusSalesOrderBorrowerVo> selectPageVo(IPage<BusSalesOrderBorrower> page, @Param(Constants.WRAPPER) Wrapper<BusSalesOrderBorrower> qw);
List<BusSalesOrderBorrowerVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<BusSalesOrderBorrower> qw);
@Select("select * from bus_sales_order_borrower")
List<BusSalesOrderBorrowerVo> selectListVo();
@Update("update bus_sales_order_borrower set busNo = #{busNo} where sid = #{saleOrderBorrowerSid}")
void updateBusNo(@Param("busNo") String busNo, @Param("saleOrderBorrowerSid") String saleOrderBorrowerSid);
int selectBySalesOrderSid(String sid);
LoanFinPolicy selectBySid(String sid);
BusSalesOrderBorrower selectByOrderSid(@Param("sid") String sid,@Param("customerSid") String customerSid);
BusSalesOrderBorrower selectByOrderSid(@Param("sid") String sid, @Param("customerSid") String customerSid);
IPage<BusNoGuaranteeCreditReviewVo> noGuaranteeCreditReviewPage(IPage<BusSalesOrderBorrower> page, @Param(Constants.WRAPPER) QueryWrapper<BusSalesOrderBorrower> qw);
@Select("select * from bus_sales_order_borrower where salesOrderSid =#{orderSid}")
BusSalesOrderBorrower fetchDetailsByOrderSid(String orderSid);
}

67
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.xml

@ -1,27 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.buscenter.biz.bussalesorderborrower.BusSalesOrderBorrowerMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerVo">
SELECT * FROM bus_sales_order_borrower <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerVo">
SELECT * FROM bus_sales_order_borrower <where> ${ew.sqlSegment} </where>
</select>
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerVo">
SELECT * FROM bus_sales_order_borrower
<where>${ew.sqlSegment}</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerVo">
SELECT * FROM bus_sales_order_borrower
<where>${ew.sqlSegment}</where>
</select>
<select id="selectBySalesOrderSid" resultType="int">
select ifnull(sum(vehCount),0) from bus_sales_order_borrower where salesOrderSid = #{sid}
<select id="selectBySalesOrderSid" resultType="int">
select ifnull(sum(vehCount), 0)
from bus_sales_order_borrower
where salesOrderSid = #{sid}
</select>
<select id="selectBySid" resultType="com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy">
select lp.* from anrui_riskcenter.loan_solutions ls
left join anrui_riskcenter.loan_fin_policy lp on lp.sid = ls.policySid
where ls.salesOrderSid = #{sid}
<select id="selectBySid" resultType="com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy">
select lp.*
from anrui_riskcenter.loan_solutions ls
left join anrui_riskcenter.loan_fin_policy lp on lp.sid = ls.policySid
where ls.salesOrderSid = #{sid}
</select>
<select id="selectByOrderSid" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrower">
select * from bus_sales_order_borrower where salesOrderSid = #{sid} and customSid = #{customerSid}
</select>
<select id="selectByOrderSid" resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrower">
select *
from bus_sales_order_borrower
where salesOrderSid = #{sid}
and customSid = #{customerSid}
</select>
<select id="noGuaranteeCreditReviewPage"
resultType="com.yxt.anrui.buscenter.api.bussalesorderborrower.BusNoGuaranteeCreditReviewVo">
SELECT bo.sid AS salesOrderSid,
DATE_FORMAT(bo.createDate, '%Y-%m-%d') AS orderDate,
bo.useOrgName AS company,
bo.orgName AS department,
bo.staffName AS salesman,
bo.contractNo AS contractNo,
bor.borrowerName AS borrowerName,
bor.bankName AS bankName,
bor.mobile AS mobile,
cr.homeVisit AS homeVisit,
cr.homeVisitDate AS homeVisitDate,
cr.creditReview AS creditReview,
cr.creditReviewDate AS creditReviewDate,
cr.loanReview AS loanReview,
cr.loanReviewDate AS loanReviewDate,
cr.isLoan AS isLoan,
cr.isLoanDate AS isLoanDate
FROM bus_sales_order_borrower AS bor
LEFT JOIN bus_sales_order AS bo ON bor.salesOrderSid = bo.sid
LEFT JOIN anrui_riskcenter.loan_noguarantee_credit_review AS cr ON cr.salesOrderSid = bo.sid
</select>
</mapper>

12
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java

@ -107,4 +107,16 @@ public class BusSalesOrderBorrowerRest implements BusSalesOrderBorrowerFeign {
public ResultBean confirmBorrow(OrderBorrowQuery query) {
return busSalesOrderBorrowerService.confirmBorrow(query);
}
@Override
public ResultBean<PagerVo<BusNoGuaranteeCreditReviewVo>> noGuaranteeCreditReviewPage(PagerQuery<BusNoGuaranteeCreditReviewQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<BusNoGuaranteeCreditReviewVo> pv = busSalesOrderBorrowerService.noGuaranteeCreditReviewPage(pq);
return rb.success().setData(pv);
}
@Override
public ResultBean<BusSalesOrderBorrowerDetailsVo> fetchDetailsByOrderSid(String orderSid) {
return busSalesOrderBorrowerService.fetchDetailsByOrderSid(orderSid);
}
}

120
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java

@ -34,7 +34,12 @@ import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPriceDto;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.biz.bussalesorderprice.BusSalesOrderPriceService;
import com.yxt.anrui.buscenter.biz.bussalesordervehicle.BusSalesOrderVehicleService;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
@ -69,7 +74,8 @@ public class BusSalesOrderBorrowerService extends MybatisBaseService<BusSalesOrd
private BusSalesOrderPriceService busSalesOrderPriceService;
@Autowired
private BusSalesOrderVehicleService busSalesOrderVehicleService;
@Autowired
private SysUserFeign sysUserFeign;
private QueryWrapper<BusSalesOrderBorrower> createQueryWrapper(BusSalesOrderBorrowerQuery query) {
// todo: 这里根据具体业务调整查询条件
@ -175,4 +181,116 @@ public class BusSalesOrderBorrowerService extends MybatisBaseService<BusSalesOrd
baseMapper.insert(busSalesOrderBorrower);
return rb.success();
}
/**
* 公司非担保业务进度维护
*
* @param pq
* @return
*/
public PagerVo<BusNoGuaranteeCreditReviewVo> noGuaranteeCreditReviewPage(PagerQuery<BusNoGuaranteeCreditReviewQuery> pq) {
IPage<BusSalesOrderBorrower> page = PagerUtil.queryToPage(pq);
BusNoGuaranteeCreditReviewQuery pagerQuery = pq.getParams();
QueryWrapper<BusSalesOrderBorrower> qw = new QueryWrapper<>();
//=======================
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(pagerQuery.getOrgPath());
privilegeQuery.setMenuSid(pagerQuery.getMenuSid());
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl());
privilegeQuery.setUserSid(pagerQuery.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = pagerQuery.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("bo.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("bo.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("bo.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("bo.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("bo.createBySid", pagerQuery.getUserSid());
} else {
PagerVo<BusNoGuaranteeCreditReviewVo> p = new PagerVo<>();
return p;
}
} else {
PagerVo<BusNoGuaranteeCreditReviewVo> p = new PagerVo<>();
return p;
}
//=======================
//PC办结时间查询
String createStartTime = pagerQuery.getStartTime();
String createEndTime = pagerQuery.getEndTime();
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (bo.createDate,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(createEndTime), "date_format (bo.createDate,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
//分公司
if (StringUtils.isNotBlank(pagerQuery.getCompany())) {
qw.like("bo.usdOrgName", pagerQuery.getCompany());
}
//销售部门
if (StringUtils.isNotBlank(pagerQuery.getDepartment())) {
qw.like("bo.orgName", pagerQuery.getDepartment());
}
//销售专员
if (StringUtils.isNotBlank(pagerQuery.getSalesman())) {
qw.like("bo.staffName", pagerQuery.getSalesman());
}
//贷款人
if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) {
qw.like("bor.borrowerName", pagerQuery.getBorrowerName());
}
//合同号
if (StringUtils.isNotBlank(pagerQuery.getContractNo())) {
qw.like("bo.contractNo", pagerQuery.getContractNo());
}
//资方
if (StringUtils.isNotBlank(pagerQuery.getBankName())) {
qw.like("bor.bankName", pagerQuery.getBankName());
}
//家访考察结果
if (StringUtils.isNotBlank(pagerQuery.getHomeVisit())) {
qw.like("cr.homeVisit", pagerQuery.getHomeVisit());
}
//信审终审结果
if (StringUtils.isNotBlank(pagerQuery.getCreditReview())) {
qw.like("cr.creditReview", pagerQuery.getCreditReview());
}
//放款审核结果
if (StringUtils.isNotBlank(pagerQuery.getLoanReview())) {
qw.like("cr.loanReview", pagerQuery.getLoanReview());
}
//是否放款
if (StringUtils.isNotBlank(pagerQuery.getIsLoan())) {
qw.like("cr.isLoan", pagerQuery.getIsLoan());
}
qw.eq("bor.isDelete", 0);
qw.eq("bo.payTypeKey", "1");
qw.eq("bo.nodeState", "已办结");
qw.orderByDesc("bo.createDate");
IPage<BusNoGuaranteeCreditReviewVo> pagging = baseMapper.noGuaranteeCreditReviewPage(page, qw);
PagerVo<BusNoGuaranteeCreditReviewVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public ResultBean<BusSalesOrderBorrowerDetailsVo> fetchDetailsByOrderSid(String orderSid) {
ResultBean<BusSalesOrderBorrowerDetailsVo> rb = ResultBean.fireFail();
BusSalesOrderBorrower entity = baseMapper.fetchDetailsByOrderSid(orderSid);
BusSalesOrderBorrowerDetailsVo vo = new BusSalesOrderBorrowerDetailsVo();
BeanUtil.copyProperties(entity, vo);
return rb.success().setData(vo);
}
}

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfile/LoanFileEnum.java

@ -11,6 +11,9 @@ public enum LoanFileEnum {
REGISTRATION_FILES_TWO("002", "登记证(3、4页)"),
TAXI_FILES("003", "营运证"),
DRIVING_CARD_FILES("004", "行驶证"),
HOME_VISIT_FILES("005", "非担保业务进度家访考察结果"),
CREDIT_REVIEW_FILES("006", "非担保业务进度资方信审结果"),
LOAN_REVIEW_FILES("007", "非担保业务进度资方放款审核结果"),
;

36
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReview.java

@ -0,0 +1,36 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/16 14:34
*/
@Data
@ApiModel(value = "公司非担保业务进度维护", description = "公司非担保业务进度维护")
@TableName("loan_noguarantee_credit_review")
public class LoanNoGuaranteeCreditReview extends BaseEntity {
@ApiModelProperty("销售订单sid")
private String salesOrderSid;
@ApiModelProperty("家访考察结果")
private String homeVisit;
@ApiModelProperty("家访考察日期")
private String homeVisitDate;
@ApiModelProperty("信审终审结果")
private String creditReview;
@ApiModelProperty("信审终审日期")
private String creditReviewDate;
@ApiModelProperty("放款审核结果")
private String loanReview;
@ApiModelProperty("放款审核日期")
private String loanReviewDate;
@ApiModelProperty("是否放款")
private String isLoan;
@ApiModelProperty("放款日期")
private String isLoanDate;
}

44
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewDetailsVo.java

@ -0,0 +1,44 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/8/21 9:13
*/
@Data
public class LoanNoGuaranteeCreditReviewDetailsVo implements Vo {
private String salesOrderSid;
@ApiModelProperty("销售专员")
private String salesman;
@ApiModelProperty("贷款人")
private String borrowerName;
@ApiModelProperty("家访考察结果")
private String homeVisit;
@ApiModelProperty("家访考察日期")
private String homeVisitDate;
@ApiModelProperty("信审终审结果")
private String creditReview;
@ApiModelProperty("信审终审日期")
private String creditReviewDate;
@ApiModelProperty("放款审核结果")
private String loanReview;
@ApiModelProperty("放款审核日期")
private String loanReviewDate;
@ApiModelProperty("是否放款")
private String isLoan;
@ApiModelProperty("放款日期")
private String isLoanDate;
@ApiModelProperty("家访考察结果截图")
private List<String> homeVisitFiles = new ArrayList<>();
@ApiModelProperty("信审终审结果截图")
private List<String> creditReviewFiles = new ArrayList<>();
@ApiModelProperty("放款审核结果截图")
private List<String> loanReviewFiles = new ArrayList<>();
}

46
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewDto.java

@ -0,0 +1,46 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/8/21 9:12
*/
@Data
public class LoanNoGuaranteeCreditReviewDto implements Dto {
private String salesOrderSid;
@ApiModelProperty("销售专员")
private String salesman;
@ApiModelProperty("贷款人")
private String borrowerName;
@ApiModelProperty("家访考察结果")
private String homeVisit;
@ApiModelProperty("家访考察日期")
private String homeVisitDate;
@ApiModelProperty("信审终审结果")
private String creditReview;
@ApiModelProperty("信审终审日期")
private String creditReviewDate;
@ApiModelProperty("放款审核结果")
private String loanReview;
@ApiModelProperty("放款审核日期")
private String loanReviewDate;
@ApiModelProperty("是否放款")
private String isLoan;
@ApiModelProperty("放款日期")
private String isLoanDate;
@ApiModelProperty("家访考察结果截图")
private List<String> homeVisitFiles = new ArrayList<>();
@ApiModelProperty("信审终审结果截图")
private List<String> creditReviewFiles = new ArrayList<>();
@ApiModelProperty("放款审核结果截图")
private List<String> loanReviewFiles = new ArrayList<>();
}

25
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewFallback.java

@ -0,0 +1,25 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.stereotype.Component;
/**
* @author Administrator
* @description
* @date 2023/8/16 14:36
*/
@Component
public class LoanNoGuaranteeCreditReviewFallback implements LoanNoGuaranteeCreditReviewFeign {
@Override
public ResultBean<LoanNoGuaranteeCreditReviewDetailsVo> details(String salesOrderSid) {
return null;
}
@Override
public ResultBean<String> saveReviewInfo(LoanNoGuaranteeCreditReviewDto dto) {
return null;
}
}

41
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewFeign.java

@ -0,0 +1,41 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanAuditInfoDto;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
* @description: 风控参数
* @author: fan
* @date: 2023/7/6
**/
@Api(tags = "公司非担保业务进度维护")
@FeignClient(
contextId = "anrui-riskcenter-LoanNoGuaranteeCreditReview",
name = "anrui-riskcenter",
path = "v1/noguaranteereview",
fallback = LoanNoGuaranteeCreditReviewFallback.class)
public interface LoanNoGuaranteeCreditReviewFeign {
@ApiOperation("编辑回显、详情")
@PostMapping("/details")
@ResponseBody
public ResultBean<LoanNoGuaranteeCreditReviewDetailsVo> details(@RequestParam("salesOrderSid") String salesOrderSid);
/**
* 办理保存
*
* @param
*/
@ApiOperation("审核保存")
@PostMapping("/saveReviewInfo")
public ResultBean<String> saveReviewInfo(@RequestBody LoanNoGuaranteeCreditReviewDto dto);
}

29
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewQuery.java

@ -0,0 +1,29 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/16 15:05
*/
@Data
public class LoanNoGuaranteeCreditReviewQuery implements Query {
@ApiModelProperty("参数编码")
private String parameterNo;
@ApiModelProperty("参数名称")
private String parameterName;
@ApiModelProperty("组织全路径")
private String orgPath;
@ApiModelProperty("菜单sid")
private String menuSid;
@ApiModelProperty("菜单url")
private String menuUrl;
@ApiModelProperty("用户sid")
private String userSid;
}

23
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewVo.java

@ -0,0 +1,23 @@
package com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/16 15:04
*/
@Data
public class LoanNoGuaranteeCreditReviewVo implements Vo {
private String sid;
@ApiModelProperty("参数编码")
private String parameterNo;
@ApiModelProperty("参数名称")
private String parameterName;
@ApiModelProperty("参数值")
private String parameterValue;
@ApiModelProperty("备注")
private String remarks;
}

36
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanDetailsVo.java

@ -0,0 +1,36 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/9/11 14:00
*/
@Data
public class AppRepaymentPlanDetailsVo implements Vo {
@ApiModelProperty("sid")
private String sid;
@ApiModelProperty("合同号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("车辆台数")
private String carNumber;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("资方")
private String managementName;
@ApiModelProperty("金融产品")
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
private List<AppRepaymentPlanListDetailsVo> records = new ArrayList<>();
}

21
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanListDetailsVo.java

@ -0,0 +1,21 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 14:03
*/
@Data
public class AppRepaymentPlanListDetailsVo implements Vo {
private String times;
private String otherTimes;
private String number;
private String total;
private String month;
private String monthlyPayment;
private String otherMonthlyPayment;
private String companyMonthlyPayment;
}

23
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanQuery.java

@ -0,0 +1,23 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 11:56
*/
@Data
public class AppRepaymentPlanQuery implements Query {
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("合同编号/贷款人姓名/资方名称")
private String names;
@ApiModelProperty("当前组织机构全路径sid")
private String orgPath;
}

32
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanVo.java

@ -0,0 +1,32 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 11:54
*/
@Data
public class AppRepaymentPlanVo implements Vo {
@ApiModelProperty("业务sid")
private String sid;
@ApiModelProperty("消贷合同编号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("资方")
private String managementName;
@ApiModelProperty("金融产品")
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("车辆台数")
private String carNum;
@ApiModelProperty("下载路径")
private String downloadUrl;
}

6
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentSchedule.java

@ -22,6 +22,10 @@ public class LoanRepaymentSchedule extends BaseEntity {
private String salesOrderSid;
@ApiModelProperty("借款人sid")
private String borrowerSid;
@ApiModelProperty("销售专员sid")
private String staffSid;
@ApiModelProperty("销售专员")
private String staffName;
@ApiModelProperty("借款人名称")
private String borrowerName;
@ApiModelProperty("车架号")
@ -32,6 +36,8 @@ public class LoanRepaymentSchedule extends BaseEntity {
private String loanContractNo;
@ApiModelProperty("资方名称")
private String bankName;
@ApiModelProperty("金融产品政策")
private String policyName;
@ApiModelProperty("主产品期数")
private String mainPeriod;
@ApiModelProperty("主产品首期还款日")

22
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java

@ -1,6 +1,10 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationQuery;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
@ -44,4 +48,22 @@ public interface LoanRepaymentScheduleFeign {
public ResultBean<List<LoanCreateScheduleVinOneVo>> viewVinOneSchedule(@RequestParam("salesOrderSid") String salesOrderSid);
//-------------------------app接口--------------------
/**
* 根据条件分页查询数据的列表已测试
*
* @param pq
*/
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/getRepaymentPlanList")
@ResponseBody
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanList(@RequestBody PagerQuery<AppRepaymentPlanQuery> pq);
@ApiOperation("查看还款计划表")
@GetMapping("/getRepaymentPlanListBySid")
@ResponseBody
public ResultBean<AppRepaymentPlanDetailsVo> getRepaymentPlanListBySid(@RequestParam("sid") String sid);
}

12
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java

@ -1,6 +1,8 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.stereotype.Component;
import java.util.List;
@ -32,4 +34,14 @@ public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentSchedule
public ResultBean<List<LoanCreateScheduleVinOneVo>> viewVinOneSchedule(String salesOrderSid) {
return null;
}
@Override
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanList(PagerQuery<AppRepaymentPlanQuery> pq) {
return null;
}
@Override
public ResultBean<AppRepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return null;
}
}

26
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewMapper.java

@ -0,0 +1,26 @@
package com.yxt.anrui.riskcenter.biz.loannoguaranteecreditreview;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReview;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* @description:
* @author: fan
* @date: 2023/8/21
**/
@Mapper
public interface LoanNoGuaranteeCreditReviewMapper extends BaseMapper<LoanNoGuaranteeCreditReview> {
@Select("SELECT * FROM loan_noguarantee_credit_review WHERE salesOrderSid = #{salesOrderSid}")
LoanNoGuaranteeCreditReview selectOneByOrderSid(String salesOrderSid);
}

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.riskcenter.biz.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewMapper">
</mapper>

38
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewRest.java

@ -0,0 +1,38 @@
package com.yxt.anrui.riskcenter.biz.loannoguaranteecreditreview;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewDetailsVo;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewDto;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewFeign;
import com.yxt.anrui.riskcenter.api.loanparameter.*;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description:
* @author: fan
* @date: 2023/8/21
**/
@Api(tags = "公司非担保业务进度维护")
@RestController
@RequestMapping("v1/noguaranteereview")
public class LoanNoGuaranteeCreditReviewRest implements LoanNoGuaranteeCreditReviewFeign {
@Autowired
private LoanNoGuaranteeCreditReviewService loanNoGuaranteeCreditReviewService;
@Override
public ResultBean<LoanNoGuaranteeCreditReviewDetailsVo> details(String salesOrderSid) {
return loanNoGuaranteeCreditReviewService.details(salesOrderSid);
}
@Override
public ResultBean<String> saveReviewInfo(LoanNoGuaranteeCreditReviewDto dto) {
return loanNoGuaranteeCreditReviewService.saveReviewInfo(dto);
}
}

152
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loannoguaranteecreditreview/LoanNoGuaranteeCreditReviewService.java

@ -0,0 +1,152 @@
package com.yxt.anrui.riskcenter.biz.loannoguaranteecreditreview;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile;
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReview;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewDetailsVo;
import com.yxt.anrui.riskcenter.api.loannoguaranteecreditreview.LoanNoGuaranteeCreditReviewDto;
import com.yxt.anrui.riskcenter.api.loanparameter.*;
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @description:
* @author: fan
* @date: 2023/8/21
**/
@Service
public class LoanNoGuaranteeCreditReviewService extends MybatisBaseService<LoanNoGuaranteeCreditReviewMapper, LoanNoGuaranteeCreditReview> {
@Autowired
private SysUserFeign sysUserFeign;
@Autowired
private SysStaffOrgFeign sysStaffOrgFeign;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
@Autowired
private BusSalesOrderFeign busSalesOrderFeign;
@Autowired
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign;
@Autowired
private LoanFileService loanFileService;
@Autowired
private FileUploadComponent fileUploadComponent;
public ResultBean<LoanNoGuaranteeCreditReviewDetailsVo> details(String salesOrderSid) {
ResultBean<LoanNoGuaranteeCreditReviewDetailsVo> rb = ResultBean.fireFail();
LoanNoGuaranteeCreditReviewDetailsVo vo = new LoanNoGuaranteeCreditReviewDetailsVo();
LoanNoGuaranteeCreditReview entity = baseMapper.selectOneByOrderSid(salesOrderSid);
BeanUtil.copyProperties(entity, vo);
String sid = "";
if (StringUtils.isNotBlank(entity.getSid())) {
sid = entity.getSid();
}
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData();
if (null != busSalesOrder) {
if (StringUtils.isNotBlank(busSalesOrder.getStaffName())) {
vo.setSalesman(busSalesOrder.getStaffName());
}
}
BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsByOrderSid(salesOrderSid).getData();
if (null != borrowerDetailsVo) {
if (StringUtils.isNotBlank(borrowerDetailsVo.getBorrowerName())) {
vo.setBorrowerName(borrowerDetailsVo.getBorrowerName());
}
}
//家访考察结果截图
List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.HOME_VISIT_FILES.getAttachType());
fileList.removeAll(Collections.singleton(null));
if (!fileList.isEmpty()) {
List<String> homeVisitFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
collect(Collectors.toList());
vo.setHomeVisitFiles(homeVisitFiles);
}
//信审终审结果截图
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.CREDIT_REVIEW_FILES.getAttachType());
fileList.removeAll(Collections.singleton(null));
if (!fileList.isEmpty()) {
List<String> creditReviewFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList());
vo.setCreditReviewFiles(creditReviewFiles);
}
//放款审核结果截图
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.LOAN_REVIEW_FILES.getAttachType());
fileList.removeAll(Collections.singleton(null));
if (!fileList.isEmpty()) {
List<String> loanReviewFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList());
vo.setLoanReviewFiles(loanReviewFiles);
}
return rb.success().setData(vo);
}
public ResultBean<String> saveReviewInfo(LoanNoGuaranteeCreditReviewDto dto) {
ResultBean<String> rb = ResultBean.fireFail();
String salesOrderSid = dto.getSalesOrderSid();
LoanNoGuaranteeCreditReview entity = baseMapper.selectOneByOrderSid(salesOrderSid);
if (null != entity) {
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
String sid = entity.getSid();
//删除附件表中关于该linkSid的文件
loanFileService.deleteByLinkSid(sid);
List<String> homeVisitFiles = dto.getHomeVisitFiles();
if (!homeVisitFiles.isEmpty()) {
loanFileService.saveAll(sid, homeVisitFiles, LoanFileEnum.HOME_VISIT_FILES.getAttachType());
}
List<String> creditReviewFiles = dto.getCreditReviewFiles();
if (!creditReviewFiles.isEmpty()) {
loanFileService.saveAll(sid, creditReviewFiles, LoanFileEnum.CREDIT_REVIEW_FILES.getAttachType());
}
List<String> loanReviewFiles = dto.getLoanReviewFiles();
if (!loanReviewFiles.isEmpty()) {
loanFileService.saveAll(sid, loanReviewFiles, LoanFileEnum.LOAN_REVIEW_FILES.getAttachType());
}
} else {
LoanNoGuaranteeCreditReview loanNoGuaranteeCreditReview = new LoanNoGuaranteeCreditReview();
BeanUtil.copyProperties(dto, loanNoGuaranteeCreditReview, "id", "sid");
baseMapper.insert(loanNoGuaranteeCreditReview);
String sid = loanNoGuaranteeCreditReview.getSid();
//删除附件表中关于该linkSid的文件
loanFileService.deleteByLinkSid(sid);
List<String> homeVisitFiles = dto.getHomeVisitFiles();
if (!homeVisitFiles.isEmpty()) {
loanFileService.saveAll(sid, homeVisitFiles, LoanFileEnum.HOME_VISIT_FILES.getAttachType());
}
List<String> creditReviewFiles = dto.getCreditReviewFiles();
if (!creditReviewFiles.isEmpty()) {
loanFileService.saveAll(sid, creditReviewFiles, LoanFileEnum.CREDIT_REVIEW_FILES.getAttachType());
}
List<String> loanReviewFiles = dto.getLoanReviewFiles();
if (!loanReviewFiles.isEmpty()) {
loanFileService.saveAll(sid, loanReviewFiles, LoanFileEnum.LOAN_REVIEW_FILES.getAttachType());
}
}
return rb.success().setData(salesOrderSid);
}
}

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleMapper.java

@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentSchedule;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -21,4 +23,6 @@ public interface LoanRepaymentScheduleMapper extends BaseMapper<LoanRepaymentSch
LoanRepaymentSchedule selectByOrderSid(String salesOrderSid);
IPage<AppRepaymentPlanVo> getRepaymentPlanList(IPage<LoanRepaymentSchedule> page, @Param(Constants.WRAPPER) QueryWrapper<LoanWarrantInformation> qw);
}

16
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleMapper.xml

@ -8,4 +8,20 @@
from loan_repayment_schedule
where salesOrderSid = #{salesOrderSid}
</select>
<select id="getRepaymentPlanList"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanVo">
SELECT sid,
loanContractNo as contractId,
borrowerName as lenderName,
vinNo,
bankName as managementName,
policyName as financial,
staffName as salesName,
vehCount as carNum,
schedulePath as downloadUrl
from loan_repayment_schedule
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

15
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java

@ -2,7 +2,10 @@ package com.yxt.anrui.riskcenter.biz.loanrepaymentschedule;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.*;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
@ -42,4 +45,16 @@ public class LoanRepaymentScheduleRest implements LoanRepaymentScheduleFeign {
public ResultBean<List<LoanCreateScheduleVinOneVo>> viewVinOneSchedule(String salesOrderSid) {
return loanRepaymentScheduleService.viewVinOneSchedule(salesOrderSid);
}
@Override
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanList(PagerQuery<AppRepaymentPlanQuery> pq) {
ResultBean<PagerVo<AppRepaymentPlanVo>> rb = ResultBean.fireFail();
PagerVo<AppRepaymentPlanVo> page = loanRepaymentScheduleService.getRepaymentPlanList(pq);
return rb.success().setData(page);
}
@Override
public ResultBean<AppRepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return loanRepaymentScheduleService.getRepaymentPlanListBySid(sid);
}
}

237
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java

@ -2,6 +2,10 @@ package com.yxt.anrui.riskcenter.biz.loanrepaymentschedule;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.SolutionsDetailsssVo;
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract;
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign;
@ -11,18 +15,25 @@ import com.yxt.anrui.buscenter.api.busvehicledatahandover.BusDataListPdfVo;
import com.yxt.anrui.buscenter.api.busvehicledatahandover.BusVehicleDataHandoverPdfVo;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.*;
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;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationQuery;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo;
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsService;
import com.yxt.anrui.riskcenter.biz.loansolutionsotherpolicy.LoanSolutionsOtherpolicyService;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -59,6 +70,8 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign;
@Autowired
private DocPdfComponent docPdfComponent;
@Autowired
private BusSalesOrderFeign busSalesOrderFeign;
/**
* 根据销售订单SID生成还款计划表回显
@ -215,6 +228,15 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
} else {
LoanRepaymentSchedule entity = new LoanRepaymentSchedule();
BeanUtil.copyProperties(dto, entity, "id", "sid");
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(dto.getSalesOrderSid()).getData();
if (null != busSalesOrder) {
if (StringUtils.isNotBlank(busSalesOrder.getCreateBySid())) {
entity.setStaffSid(busSalesOrder.getCreateBySid());
}
if (StringUtils.isNotBlank(busSalesOrder.getStaffName())) {
entity.setStaffName(busSalesOrder.getStaffName());
}
}
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selectListByOrderSid(dto.getSalesOrderSid()).getData();
busSalesOrderVehicles.removeAll(Collections.singleton(null));
if (!busSalesOrderVehicles.isEmpty()) {
@ -231,6 +253,9 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
if (StringUtils.isNotBlank(loancontract.getBankName())) {
entity.setBankName(loancontract.getBankName());
}
if (StringUtils.isNotBlank(loancontract.getPolicyName())) {
entity.setPolicyName(loancontract.getPolicyName());
}
}
baseMapper.insert(entity);
}
@ -518,4 +543,216 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
}
return rb.success().setData(list);
}
//---------------------app接口----------------------------
public PagerVo<AppRepaymentPlanVo> getRepaymentPlanList(PagerQuery<AppRepaymentPlanQuery> pq) {
IPage<LoanRepaymentSchedule> page = PagerUtil.queryToPage(pq);
AppRepaymentPlanQuery pagerQuery = pq.getParams();
QueryWrapper<LoanWarrantInformation> qw = new QueryWrapper<>();
qw.eq("isDelete", 0);
qw.orderByDesc("createTime");
qw.eq("staffSid", pagerQuery.getUserSid());
if (StringUtils.isNotBlank(pagerQuery.getNames())) {
qw.and(wrapper -> wrapper.like("loanContractNo", pagerQuery.getNames()).or().like("borrowerName", pagerQuery.getNames()).or().like("bankName", pagerQuery.getNames()));
}
IPage<AppRepaymentPlanVo> pagging = baseMapper.getRepaymentPlanList(page, qw);
List<AppRepaymentPlanVo> records = pagging.getRecords();
records.removeAll(Collections.singleton(null));
if (!records.isEmpty()) {
String urlPrefix = docPdfComponent.getPrefixTemplateUrl();
for (AppRepaymentPlanVo record : records) {
if (StringUtils.isNotBlank(record.getDownloadUrl())) {
record.setDownloadUrl(urlPrefix + record.getDownloadUrl());
}
}
}
PagerVo<AppRepaymentPlanVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public ResultBean<AppRepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
ResultBean<AppRepaymentPlanDetailsVo> rb = ResultBean.fireFail();
AppRepaymentPlanDetailsVo vo = new AppRepaymentPlanDetailsVo();
LoanRepaymentSchedule schedule = fetchBySid(sid);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String mainDate = "";
String otherDate = "";
String isOther = "";
BigDecimal mainF = new BigDecimal(0);
BigDecimal otherF = new BigDecimal(0);
BigDecimal mainM = new BigDecimal(0);
BigDecimal otherM = new BigDecimal(0);
BigDecimal mainL = new BigDecimal(0);
BigDecimal otherL = new BigDecimal(0);
if (null != schedule) {
vo.setSid(sid);
if (StringUtils.isNotBlank(schedule.getLoanContractNo())) {
vo.setContractId(schedule.getLoanContractNo());
}
if (StringUtils.isNotBlank(schedule.getBorrowerName())) {
vo.setLenderName(schedule.getBorrowerName());
}
if (StringUtils.isNotBlank(schedule.getVehCount())) {
vo.setCarNumber(schedule.getVehCount());
}
if (StringUtils.isNotBlank(schedule.getVinNo())) {
vo.setVinNo(schedule.getVinNo());
}
if (StringUtils.isNotBlank(schedule.getBankName())) {
vo.setManagementName(schedule.getBankName());
}
if (StringUtils.isNotBlank(schedule.getPolicyName())) {
vo.setFinancial(schedule.getPolicyName());
}
if (StringUtils.isNotBlank(schedule.getStaffName())) {
vo.setSalesName(schedule.getStaffName());
}
if (null != schedule.getMainRepayDate()) {
mainDate = sdf.format(schedule.getMainRepayDate());
}
if (null != schedule.getOtherRepayDate()) {
otherDate = sdf.format(schedule.getOtherRepayDate());
}
String mainRepayDate = "";
String otherRepayDate = "";
//主产品月还日
if (StringUtils.isNotBlank(mainDate)) {
String[] splitMainDate = mainDate.split("-");
String day = splitMainDate[2];
if (day.length() == 2 && Integer.parseInt(day) >= 10) {
mainRepayDate = day;
} else {
mainRepayDate = day.replace("0", "");
}
}
//其他融月还日
if (StringUtils.isNotBlank(otherDate)) {
String[] splitOtherDate = otherDate.split("-");
String day = splitOtherDate[2];
if (day.length() == 2 && Integer.parseInt(day) >= 10) {
otherRepayDate = day;
} else {
otherRepayDate = day.replace("0", "");
}
}
//月还金额
if (null != schedule.getMainFirstRepay()) {
mainF = schedule.getMainFirstRepay();
}
if (null != schedule.getMainMidRepay()) {
mainM = schedule.getMainMidRepay();
}
if (null != schedule.getMainLastRepay()) {
mainL = schedule.getMainLastRepay();
}
if (null != schedule.getOtherFirstRepay()) {
otherF = schedule.getOtherFirstRepay();
}
if (null != schedule.getOtherMidRepay()) {
otherM = schedule.getOtherMidRepay();
}
if (null != schedule.getOtherLastRepay()) {
otherL = schedule.getOtherLastRepay();
}
//-----还款计划表列表信息-------
List<AppRepaymentPlanListDetailsVo> scheduleVins = new ArrayList<>();
if (StringUtils.isNotBlank(schedule.getMainPeriod())) {
int mainPeriod = Integer.parseInt(schedule.getMainPeriod());
if (StringUtils.isNotBlank(schedule.getIsOtherPolicy())) {
isOther = schedule.getIsOtherPolicy();
}
String otherPer = "";
if (StringUtils.isNotBlank(schedule.getOtherPeriod())) {
otherPer = schedule.getOtherPeriod();
}
int otherMidPer = 0;
int otherLastPer = 0;
String month = "";
String year = "";
String moth = "";
String otherMoth = "";
String otherFDate = "";
String otherMonth = "";
if (StringUtils.isNotBlank(mainDate)) {
String[] splitMain = mainDate.split("-");
year = splitMain[0];
moth = splitMain[1];
if (moth.length() == 2 && Integer.parseInt(moth) >= 10) {
month = moth;
} else {
month = moth.replace("0", "");
}
}
if (StringUtils.isNotBlank(otherDate)) {
String[] splitOther = otherDate.split("-");
otherMoth = splitOther[1];
if (otherMoth.length() == 2 && Integer.parseInt(otherMoth) >= 10) {
otherMonth = otherMoth;
} else {
otherMonth = otherMoth.replace("0", "");
}
otherFDate = splitOther[0] + otherMonth;
}
for (int i = 1; i <= mainPeriod; i++) {
String yearMonth = year + month;
AppRepaymentPlanListDetailsVo scheduleVo = new AppRepaymentPlanListDetailsVo();
scheduleVo.setTimes(mainRepayDate);
scheduleVo.setOtherTimes(otherRepayDate);
scheduleVo.setMonth(year + "年" + month + "月");
scheduleVo.setNumber(String.valueOf(i));
int m = Integer.parseInt(month);
month = String.valueOf(++m);
if (Integer.parseInt(month) > 12) {
int y = Integer.parseInt(year);
year = String.valueOf(++y);
month = "1";
}
if (isOther.equals("1")) {
//首期
if (i == 1) {
scheduleVo.setMonthlyPayment(mainF.toString());
} else if (i == mainPeriod) {
scheduleVo.setMonthlyPayment(mainL.toString());
} else {
scheduleVo.setMonthlyPayment(mainM.toString());
}
if ((yearMonth.equals(otherFDate))) {
scheduleVo.setOtherMonthlyPayment(otherF.toString());
scheduleVo.setTotal((new BigDecimal(scheduleVo.getMonthlyPayment()).add(otherF)).toString());
otherMidPer = (i + Integer.parseInt(otherPer)) - 2;
otherLastPer = (i + Integer.parseInt(otherPer)) - 1;
} else if (i <= otherMidPer && otherMidPer != 0) {
scheduleVo.setOtherMonthlyPayment(otherM.toString());
scheduleVo.setTotal((new BigDecimal(scheduleVo.getMonthlyPayment()).add(otherM)).toString());
} else if (i == otherLastPer && otherLastPer != 0) {
scheduleVo.setOtherMonthlyPayment(otherL.toString());
scheduleVo.setTotal((new BigDecimal(scheduleVo.getMonthlyPayment()).add(otherL)).toString());
} else if (scheduleVo.getOtherMonthlyPayment() == null || "".equals(scheduleVo.getOtherMonthlyPayment())) {
scheduleVo.setTotal(scheduleVo.getMonthlyPayment());
scheduleVo.setOtherMonthlyPayment("");
}
} else if (isOther.equals("0")) {
//首期
if (i == 1) {
scheduleVo.setMonthlyPayment(mainF.toString());
} else if (i == mainPeriod) {
scheduleVo.setMonthlyPayment(mainL.toString());
} else {
scheduleVo.setMonthlyPayment(mainM.toString());
}
if (scheduleVo.getOtherMonthlyPayment() == null || "".equals(scheduleVo.getOtherMonthlyPayment())) {
scheduleVo.setTotal(scheduleVo.getMonthlyPayment());
scheduleVo.setOtherMonthlyPayment("");
}
}
scheduleVins.add(scheduleVo);
}
if (!scheduleVins.isEmpty()) {
vo.setRecords(scheduleVins);
}
}
}
return rb.success().setData(vo);
}
}

35
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanDetailsVo.java

@ -0,0 +1,35 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:41
*/
@Data
public class RepaymentPlanDetailsVo implements Vo {
@ApiModelProperty("sid")
private String sid;
@ApiModelProperty("合同号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("车辆台数")
private String carNumber;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("资方")
private String managementName;
@ApiModelProperty("金融产品")
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
private List<RepaymentPlanListDetailsVo> records = new ArrayList<>();
}

37
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java

@ -0,0 +1,37 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
* @Author
* @Date
* @Description
*/
@Api(tags = "还款计划表")
@FeignClient(
contextId = "terminal-RepaymentPlan",
name = "anrui-terminal",
path = "/riskcenter/v1/repaymentPlan",
fallback = RepaymentPlanFeignFallback.class)
public interface RepaymentPlanFeign {
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/getRepaymentPlanList")
@ResponseBody
public ResultBean<PagerVo<RepaymentPlanVo>> getRepaymentPlanList(@RequestBody PagerQuery<RepaymentPlanQuery> pq);
@ApiOperation("查看还款计划表")
@GetMapping("/getRepaymentPlanListBySid")
@ResponseBody
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(@RequestParam("sid") String sid);
}

27
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java

@ -0,0 +1,27 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDto;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.stereotype.Component;
/**
* @Author
* @Date 2023/3/21 15:19
* @Description
*/
@Component
public class RepaymentPlanFeignFallback implements RepaymentPlanFeign {
@Override
public ResultBean<PagerVo<RepaymentPlanVo>> getRepaymentPlanList(PagerQuery<RepaymentPlanQuery> pq) {
return null;
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return null;
}
}

22
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanListDetailsVo.java

@ -0,0 +1,22 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/9/11 14:26
*/
@Data
public class RepaymentPlanListDetailsVo implements Vo {
private String times;
private String otherTimes;
private String number;
private String total;
private String month;
private String monthlyPayment;
private String otherMonthlyPayment;
private String companyMonthlyPayment;
}

23
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanQuery.java

@ -0,0 +1,23 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:35
*/
@Data
public class RepaymentPlanQuery implements Query {
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("合同编号/贷款人姓名/资方名称")
private String names;
@ApiModelProperty("当前组织机构全路径sid")
private String orgPath;
}

34
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVo.java

@ -0,0 +1,34 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:33
*/
@Data
public class RepaymentPlanVo implements Vo {
@ApiModelProperty("业务sid")
private String sid;
@ApiModelProperty("消贷合同编号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("资方")
private String managementName;
@ApiModelProperty("金融产品")
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("车辆台数")
private String carNum;
@ApiModelProperty("下载路径")
private String downloadUrl;
}

39
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java

@ -0,0 +1,39 @@
package com.yxt.anrui.terminal.biz.risk.repaymentplan;
import com.yxt.anrui.terminal.api.risk.mortgage.*;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanDetailsVo;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanFeign;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanQuery;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanVo;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @Author
* @Date 2023/3/25 9:39
* @Description
*/
@Api(tags = "还款计划表")
@Controller
@RequestMapping("/riskcenter/v1/repaymentPlan")
public class RepaymentPlanRest implements RepaymentPlanFeign {
@Autowired
private RepaymentPlanService repaymentPlanService;
@Override
public ResultBean<PagerVo<RepaymentPlanVo>> getRepaymentPlanList(PagerQuery<RepaymentPlanQuery> pq) {
return repaymentPlanService.getRepaymentPlanList(pq);
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return repaymentPlanService.getRepaymentPlanListBySid(sid);
}
}

57
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java

@ -0,0 +1,57 @@
package com.yxt.anrui.terminal.biz.risk.repaymentplan;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanDetailsVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanQuery;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentScheduleFeign;
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDetailsVo;
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDto;
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactQuery;
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactVo;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanDetailsVo;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanQuery;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanVo;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author
* @Date 2023/3/25 9:40
* @Description
*/
@Service
public class RepaymentPlanService {
@Autowired
private LoanRepaymentScheduleFeign loanRepaymentScheduleFeign;
public ResultBean<PagerVo<RepaymentPlanVo>> getRepaymentPlanList(PagerQuery<RepaymentPlanQuery> pq) {
ResultBean<PagerVo<RepaymentPlanVo>> rb = ResultBean.fireFail();
PagerVo<RepaymentPlanVo> pagerVo = new PagerVo<>();
PagerQuery<AppRepaymentPlanQuery> pagerQuery = new PagerQuery<>();
BeanUtil.copyProperties(pq, pagerQuery);
ResultBean<PagerVo<AppRepaymentPlanVo>> repaymentPlanList = loanRepaymentScheduleFeign.getRepaymentPlanList(pagerQuery);
if (repaymentPlanList.getSuccess()) {
PagerVo<AppRepaymentPlanVo> data = repaymentPlanList.getData();
BeanUtil.copyProperties(data, pagerVo);
}
return rb.success().setData(pagerVo);
}
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
ResultBean<RepaymentPlanDetailsVo> rb = ResultBean.fireFail();
RepaymentPlanDetailsVo vo = new RepaymentPlanDetailsVo();
AppRepaymentPlanDetailsVo data = loanRepaymentScheduleFeign.getRepaymentPlanListBySid(sid).getData();
if (null != data) {
BeanUtil.copyProperties(data, vo);
}
return rb.success().setData(vo);
}
}
Loading…
Cancel
Save