Browse Source

还款计划小程序列表接口开发

master
God 10 months ago
parent
commit
f4e7108a0a
  1. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java
  2. 3
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerMapper.java
  3. 7
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java
  4. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java
  5. 9
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java
  6. 7
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java
  7. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java
  8. 29
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  9. 4
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java
  10. 5
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java
  11. 17
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVehWxVo.java
  12. 29
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java
  13. 5
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java
  14. 32
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java

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

@ -114,4 +114,9 @@ public interface BusSalesOrderBorrowerFeign {
@ApiOperation("批量保存")
@PostMapping("/saveList")
ResultBean saveList(@RequestBody List<BusSalesOrderBorrower> borrowers);
@ApiOperation("根据客户sid查询贷款人sid")
@PostMapping("/selectByCustomSid")
@ResponseBody
ResultBean<String> selectByCustomSid(@RequestParam("customSid") String customSid);
}

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

@ -104,4 +104,7 @@ public interface BusSalesOrderBorrowerMapper extends BaseMapper<BusSalesOrderBor
void updateState2(@Param("saleOrderBorrowerSid") String saleOrderBorrowerSid,@Param("state") String state);
int saveList(@Param("list") List<BusSalesOrderBorrower> list);
@Select("select sid from bus_sales_order_loancontract where customSid = #{customSid}")
String selectByCustomSid(String customSid);
}

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

@ -138,4 +138,11 @@ public class BusSalesOrderBorrowerRest implements BusSalesOrderBorrowerFeign {
int i = busSalesOrderBorrowerService.saveList(borrowers);
return rb.success();
}
@Override
public ResultBean<String> selectByCustomSid(String customSid) {
ResultBean rb = ResultBean.fireFail();
String borrowerSid = busSalesOrderBorrowerService.selectByCustomSid(customSid);
return rb.success().setData(borrowerSid);
}
}

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

@ -333,4 +333,8 @@ public class BusSalesOrderBorrowerService extends MybatisBaseService<BusSalesOrd
public int saveList(List<BusSalesOrderBorrower> borrowers) {
return baseMapper.saveList(borrowers);
}
public String selectByCustomSid(String customSid) {
return baseMapper.selectByCustomSid(customSid);
}
}

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

@ -121,5 +121,12 @@ public interface LoanRepaymentScheduleFeign {
@ResponseBody
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(@RequestParam("vinNo") String vinNo, @RequestParam("sid") String sid);
/**
* 根据条件分页查询数据的列表已测试
*
*/
@ApiOperation("微信小程序还款计划列表")
@PostMapping("/getRepaymentPlanListWx")
@ResponseBody
ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pagerQuery);
}

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

@ -22,8 +22,6 @@ import java.util.List;
@Component
public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentScheduleFeign {
@Override
public ResultBean<LoanCreateSchedulePdfVo> loanCreateSchedule(String salesOrderSid) {
return null;
@ -104,4 +102,9 @@ public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentSchedule
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(String vinNo,String sid) {
return null;
}
@Override
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pagerQuery) {
return null;
}
}

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

@ -120,4 +120,11 @@ public class LoanRepaymentScheduleRest implements LoanRepaymentScheduleFeign {
public ResultBean<List<AppRepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(String vinNo,String sid) {
return loanRepaymentScheduleService.getRepaymentPlanListByVinNo(vinNo,sid);
}
@Override
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pq) {
ResultBean<PagerVo<AppRepaymentPlanVo>> rb = ResultBean.fireFail();
PagerVo<AppRepaymentPlanVo> page = loanRepaymentScheduleService.getRepaymentPlanListWx(pq);
return rb.success().setData(page);
}
}

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

@ -6949,4 +6949,33 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
}
return rb.success();
}
public PagerVo<AppRepaymentPlanVo> getRepaymentPlanListWx(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");
String userSid = pagerQuery.getUserSid();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.selByMobile(sysUserVo.getMobile()).getData();
String borrSid = busSalesOrderBorrowerFeign.selectByCustomSid(crmCustomerTempVo.getSid()).getData();
qw.eq("borrowerSid", borrSid);
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;
}
}

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

@ -29,6 +29,10 @@ public interface RepaymentPlanFeign {
@ResponseBody
public ResultBean<PagerVo<RepaymentPlanVo>> getRepaymentPlanList(@RequestBody PagerQuery<RepaymentPlanQuery> pq);
@ApiOperation("微信小程序还款计划列表")
@PostMapping("/getRepaymentPlanListWx")
@ResponseBody
public ResultBean<PagerVo<RepaymentPlanWxVo>> getRepaymentPlanListWx(@RequestBody PagerQuery<RepaymentPlanQuery> pq);
@ApiOperation("查看还款计划表")
@GetMapping("/getRepaymentPlanListBySid")

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

@ -22,6 +22,11 @@ public class RepaymentPlanFeignFallback implements RepaymentPlanFeign {
return null;
}
@Override
public ResultBean<PagerVo<RepaymentPlanWxVo>> getRepaymentPlanListWx(PagerQuery<RepaymentPlanQuery> pq) {
return null;
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return null;

17
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVehWxVo.java

@ -0,0 +1,17 @@
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 RepaymentPlanVehWxVo implements Vo {
@ApiModelProperty("车架号")
private String vinNo;
}

29
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java

@ -0,0 +1,29 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:33
*/
@Data
public class RepaymentPlanWxVo implements Vo {
@ApiModelProperty("业务sid")
private String sid;
@ApiModelProperty("消贷合同编号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("金融产品")
private String financial;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("车辆信息")
private List<RepaymentPlanVehWxVo> repaymentPlanVehWxVoList;
}

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

@ -31,6 +31,11 @@ public class RepaymentPlanRest implements RepaymentPlanFeign {
return repaymentPlanService.getRepaymentPlanList(pq);
}
@Override
public ResultBean<PagerVo<RepaymentPlanWxVo>> getRepaymentPlanListWx(PagerQuery<RepaymentPlanQuery> pq) {
return repaymentPlanService.getRepaymentPlanListWx(pq);
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return repaymentPlanService.getRepaymentPlanListBySid(sid);

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

@ -7,10 +7,7 @@ import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDe
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.RepaymentPlanListDetailsVo;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanQuery;
import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanVo;
import 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;
@ -70,4 +67,31 @@ public class RepaymentPlanService {
}
return rb.success().setData(vo);
}
public ResultBean<PagerVo<RepaymentPlanWxVo>> getRepaymentPlanListWx(PagerQuery<RepaymentPlanQuery> pq) {
ResultBean<PagerVo<RepaymentPlanWxVo>> rb = ResultBean.fireFail();
PagerVo<RepaymentPlanWxVo> pagerVo = new PagerVo<>();
PagerQuery<AppRepaymentPlanQuery> pagerQuery = new PagerQuery<>();
BeanUtil.copyProperties(pq, pagerQuery);
ResultBean<PagerVo<AppRepaymentPlanVo>> repaymentPlanList = loanRepaymentScheduleFeign.getRepaymentPlanListWx(pagerQuery);
if (repaymentPlanList.getSuccess()) {
PagerVo<AppRepaymentPlanVo> data = repaymentPlanList.getData();
BeanUtil.copyProperties(data, pagerVo);
List<RepaymentPlanVehWxVo> vehWxVos = new ArrayList<>();
for (AppRepaymentPlanVo record : data.getRecords()) {
String vinNo = record.getVinNo();
String[] vinNos = vinNo.split(",");
for (String no : vinNos) {
RepaymentPlanVehWxVo repaymentPlanVehWxVo = new RepaymentPlanVehWxVo();
repaymentPlanVehWxVo.setVinNo(no);
vehWxVos.add(repaymentPlanVehWxVo);
}
}
List<RepaymentPlanWxVo> records = pagerVo.getRecords();
for (RepaymentPlanWxVo record : records) {
record.setRepaymentPlanVehWxVoList(vehWxVos);
}
}
return rb.success().setData(pagerVo);
}
}

Loading…
Cancel
Save