Browse Source

小程序还款计划动态表格详情接口开发

小程序还款记录动态表格详情接口开发
master
God 10 months ago
parent
commit
1f236e1ce4
  1. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeignFallback.java
  2. 23
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/WxRepaymentPlanDetails.java
  3. 23
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentHistoryListDetailsWxVo.java
  4. 25
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentHistoryRecord.java
  5. 20
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentHistoryThead.java
  6. 39
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanListDetailsWxVo.java
  7. 23
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanRecord.java
  8. 20
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanThead.java
  9. 12
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java
  10. 10
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java
  11. 3
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java
  12. 16
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml
  13. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  14. 3
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java
  15. 50
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  16. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java
  17. 14
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java
  18. 110
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  19. 23
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentHistoryListDetailsWxVo.java
  20. 25
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentHistoryRecord.java
  21. 20
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentHistoryThead.java
  22. 21
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java
  23. 10
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java
  24. 39
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanListDetailsWxVo.java
  25. 23
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanRecord.java
  26. 21
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanThead.java
  27. 10
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java
  28. 16
      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/BusSalesOrderBorrowerFeignFallback.java

@ -109,4 +109,9 @@ public class BusSalesOrderBorrowerFeignFallback implements BusSalesOrderBorrower
public ResultBean saveList(List<BusSalesOrderBorrower> borrowers) {
return null;
}
@Override
public ResultBean<String> selectByCustomSid(String customSid) {
return null;
}
}

23
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/WxRepaymentPlanDetails.java

@ -0,0 +1,23 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentplandetails;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/8/16 14:34
*/
@Data
public class WxRepaymentPlanDetails extends BaseEntity {
@ApiModelProperty("月份")
private String dueDate;
@ApiModelProperty("期数")
private String period;
@ApiModelProperty("月还")
private String dueMoney;
}

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

@ -0,0 +1,23 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/9/11 14:26
*/
@Data
public class AppRepaymentHistoryListDetailsWxVo implements Vo {
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("标题")
private List<AppRepaymentHistoryThead> thead;
@ApiModelProperty("表格")
private List<AppRepaymentHistoryRecord> record;
}

25
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentHistoryRecord.java

@ -0,0 +1,25 @@
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/8/28 10:33
*/
@Data
public class AppRepaymentHistoryRecord implements Vo {
@ApiModelProperty("期数")
private String period;
@ApiModelProperty("款项类别")
private String kxType;
@ApiModelProperty("实还日期")
private String actualDate;
@ApiModelProperty("实还金额")
private String actualMoney;
@ApiModelProperty("还款方式")
private String returnWay;
}

20
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentHistoryThead.java

@ -0,0 +1,20 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:33
*/
@Data
public class AppRepaymentHistoryThead implements Vo {
private String name;
private String label;
private Boolean fixed = false;
private String width;
private String emptyString;
private String align;
}

39
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanListDetailsWxVo.java

@ -0,0 +1,39 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/9/11 14:26
*/
@Data
public class AppRepaymentPlanListDetailsWxVo implements Vo {
@ApiModelProperty("合同号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("主产品资方")
private String management;
@ApiModelProperty("主产品期数/还款日")
private String zcpDate;
@ApiModelProperty("其他融资方")
private String otherManagement;
@ApiModelProperty("其他融期数/还款日")
private String ptrDate;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("下载路径")
private String downloadUrl;
@ApiModelProperty("标题")
private List<AppRepaymentPlanThead> thead;
@ApiModelProperty("表格")
private List<AppRepaymentPlanRecord> record;
}

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

@ -0,0 +1,23 @@
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/8/28 10:33
*/
@Data
public class AppRepaymentPlanRecord implements Vo {
@ApiModelProperty("月份期数")
private String date;
@ApiModelProperty("合计")
private String total;
@ApiModelProperty("月还")
private String yh;
@ApiModelProperty("其他融")
private String qtr;
}

20
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/AppRepaymentPlanThead.java

@ -0,0 +1,20 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:33
*/
@Data
public class AppRepaymentPlanThead implements Vo {
private String name;
private String label;
private Boolean fixed = false;
private String width;
private String emptyString;
private String align;
}

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

@ -1,6 +1,5 @@
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule;
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusLoancontractForRepayQuery;
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.LoanRepaymentPlanDetailsExportVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
import com.yxt.common.core.query.PagerQuery;
@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
@ -129,4 +127,14 @@ public interface LoanRepaymentScheduleFeign {
@PostMapping("/getRepaymentPlanListWx")
@ResponseBody
ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pagerQuery);
@ApiOperation("微信小程序查看单车还款计划表")
@GetMapping("/getRepaymentPlanListByVinNoWx")
@ResponseBody
public ResultBean<AppRepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(@RequestParam("vinNo") String vinNo, @RequestParam("scheduleSid") String scheduleSid);
@ApiOperation("微信小程序查看单车还款记录")
@GetMapping("/getRepaymentHistoryListByVinNoWx")
@ResponseBody
public ResultBean<AppRepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(@RequestParam("vinNo") String vinNo, @RequestParam("scheduleSid") String scheduleSid);
}

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

@ -107,4 +107,14 @@ public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentSchedule
public ResultBean<PagerVo<AppRepaymentPlanVo>> getRepaymentPlanListWx(PagerQuery<AppRepaymentPlanQuery> pagerQuery) {
return null;
}
@Override
public ResultBean<AppRepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
return null;
}
@Override
public ResultBean<AppRepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
return null;
}
}

3
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.java

@ -10,6 +10,7 @@ import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.export.RecordCountVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.export.RepaymentDetailsExportVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.export.TransferedPaymentExportVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentHistoryRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -83,4 +84,6 @@ public interface LoanRepaymentHistoryMapper extends BaseMapper<LoanRepaymentHist
List<UpdateTimeByBankName> selUpdateTimeByBankName(@Param("histories") List<String> histories);
void saveList(@Param("list") List<LoanRepaymentHistory> list);
List<AppRepaymentHistoryRecord> selSchSidAndVinNo(@Param("scheduleSid") String scheduleSid,@Param("vinNo") String vinNo);
}

16
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml

@ -897,5 +897,19 @@
</where>
</select>
<select id="selSchSidAndVinNo"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentHistoryRecord">
SELECT
d.period,
h.actualDate,
h.actualMoney,
h.returnWay
FROM
loan_repayment_history h
LEFT JOIN loan_repayment_plan_details d
ON h.planDetailSid = d.sid
AND h.scheduleSid = d.scheduleSid
WHERE d.vinNo = #{vinNo}
AND h.scheduleSid = #{scheduleSid}
</select>
</mapper>

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -49,6 +49,7 @@ import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.CheckPayStateVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForLateVoucher;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsDto;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentHistoryRecord;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentSchedule;
import com.yxt.anrui.riskcenter.api.loantransferpaymentrecord.LoanTransferPaymentRecord;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
@ -2190,4 +2191,8 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
public void saveList(List<LoanRepaymentHistory> histories) {
baseMapper.saveList(histories);
}
public List<AppRepaymentHistoryRecord> selSchSidAndVinNo(String scheduleSid, String vinNo) {
return baseMapper.selSchSidAndVinNo(scheduleSid,vinNo);
}
}

3
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.DifferenceVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.HistoryOverDueVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.*;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -94,4 +95,6 @@ public interface LoanRepaymentPlanDetailsMapper extends BaseMapper<LoanRepayment
void updateImportDataList(@Param("list") List<LoanRepaymentPlanDetails> list);
void saveList(@Param("list") List<LoanRepaymentPlanDetails> list);
List<AppRepaymentPlanRecord> selByMainSidAndVinNo(@Param("scheduleSid") String scheduleSid, @Param("vinNo") String vinNo);
}

50
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -851,4 +851,54 @@
and policyOrOther = #{s}
order by period asc
</select>
<select id="selByMainSidAndVinNo"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentschedule.AppRepaymentPlanRecord">
SELECT
CONCAT(
SUBSTRING(dueDate, 1, 7),
'(',
period,
')'
) AS 'date',
(SELECT
dueMoney
FROM
loan_repayment_plan_details a
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '0'
AND a.period = c.period) AS yh,
(SELECT
dueMoney
FROM
loan_repayment_plan_details b
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '1'
AND b.period = c.period) AS qtr,
(SELECT
dueMoney
FROM
loan_repayment_plan_details a
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '0'
AND a.period = c.period) + IFNULL(
(SELECT
dueMoney
FROM
loan_repayment_plan_details b
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
AND policyOrOther = '1'
AND b.period = c.period),
0
) AS total
FROM
loan_repayment_plan_details c
WHERE vinNo = #{vinNo}
AND scheduleSid = #{scheduleSid}
GROUP BY dueDate
</select>
</mapper>

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java

@ -347,4 +347,8 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService<LoanRepa
public void saveList(List<LoanRepaymentPlanDetails> planDetails) {
baseMapper.saveList(planDetails);
}
public List<AppRepaymentPlanRecord> selByMainSidAndVinNo(String scheduleSid, String vinNo) {
return baseMapper.selByMainSidAndVinNo(scheduleSid, vinNo);
}
}

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

@ -127,4 +127,18 @@ public class LoanRepaymentScheduleRest implements LoanRepaymentScheduleFeign {
PagerVo<AppRepaymentPlanVo> page = loanRepaymentScheduleService.getRepaymentPlanListWx(pq);
return rb.success().setData(page);
}
@Override
public ResultBean<AppRepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
ResultBean rb = ResultBean.fireFail();
AppRepaymentPlanListDetailsWxVo repaymentPlanListByVinNoWx = loanRepaymentScheduleService.getRepaymentPlanListByVinNoWx(vinNo, scheduleSid);
return rb.success().setData(repaymentPlanListByVinNoWx);
}
@Override
public ResultBean<AppRepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
ResultBean rb = ResultBean.fireFail();
AppRepaymentHistoryListDetailsWxVo repaymentHistoryListByVinNoWx = loanRepaymentScheduleService.getRepaymentHistoryListByVinNoWx(vinNo,scheduleSid);
return rb.success().setData(repaymentHistoryListByVinNoWx);
}
}

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

@ -1,7 +1,6 @@
package com.yxt.anrui.riskcenter.biz.loanrepaymentschedule;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -30,7 +29,6 @@ import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
@ -71,23 +69,21 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.PushMessageQuery;
import com.yxt.messagecenter.api.message.PushSmsDto;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
@ -119,8 +115,6 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
@Autowired
private SysUserFeign sysUserFeign;
@Autowired
private SysStaffOrgFeign sysStaffOrgFeign;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
@Autowired
private BusSalesOrderLoancontractFeign busSalesOrderLoancontractFeign;
@ -6978,4 +6972,106 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
PagerVo<AppRepaymentPlanVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public AppRepaymentPlanListDetailsWxVo getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
AppRepaymentPlanListDetailsWxVo appRepaymentPlanListDetailsWxVo = new AppRepaymentPlanListDetailsWxVo();
List<AppRepaymentPlanThead> appRepaymentPlanTheads = new ArrayList<>();
LoanRepaymentSchedule loanRepaymentSchedule = fetchBySid(scheduleSid);
appRepaymentPlanListDetailsWxVo.setContractId(loanRepaymentSchedule.getLoanContractNo());
appRepaymentPlanListDetailsWxVo.setLenderName(loanRepaymentSchedule.getBorrowerName());
appRepaymentPlanListDetailsWxVo.setSalesName(loanRepaymentSchedule.getStaffName());
appRepaymentPlanListDetailsWxVo.setManagement(loanRepaymentSchedule.getBankName());
appRepaymentPlanListDetailsWxVo.setZcpDate(loanRepaymentSchedule.getMainPeriod() + "/" + loanRepaymentSchedule.getMainRepayDate() + "(首还)");
if ("1".equals(loanRepaymentSchedule.getIsOtherPolicy())){//有其他融
appRepaymentPlanListDetailsWxVo.setPtrDate(loanRepaymentSchedule.getOtherPeriod() + "/" + loanRepaymentSchedule.getOtherRepayDate() + "(首还)");
if ("1".equals(loanRepaymentSchedule.getSameBank())){//其他融资方与主产品相同
appRepaymentPlanListDetailsWxVo.setOtherManagement(appRepaymentPlanListDetailsWxVo.getManagement());
}else {//其他融资方与主产品不相同
List<LoanRepaymentPlanDetails> loanRepaymentPlanDetails = loanRepaymentPlanDetailsService.selByMainSidAndPolicyOrOther(scheduleSid, "1");
appRepaymentPlanListDetailsWxVo.setOtherManagement(loanRepaymentPlanDetails.get(0).getBankName());
}
AppRepaymentPlanThead appRepaymentPlanThead4 = new AppRepaymentPlanThead();
appRepaymentPlanThead4.setName("qtr");
String[] qtrDate = loanRepaymentSchedule.getOtherRepayDate().toString().split("-");
appRepaymentPlanThead4.setLabel("其他融(" + qtrDate[qtrDate.length - 1] + "日)");
appRepaymentPlanThead4.setWidth("100");
appRepaymentPlanThead4.setEmptyString("-");
appRepaymentPlanThead4.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead4);
}
appRepaymentPlanListDetailsWxVo.setVinNo(vinNo);
AppRepaymentPlanThead appRepaymentPlanThead1 = new AppRepaymentPlanThead();
appRepaymentPlanThead1.setName("date");
appRepaymentPlanThead1.setLabel("月份(期数)");
appRepaymentPlanThead1.setFixed(true);
appRepaymentPlanThead1.setWidth("120");
appRepaymentPlanThead1.setEmptyString("-");
appRepaymentPlanThead1.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead1);
AppRepaymentPlanThead appRepaymentPlanThead2 = new AppRepaymentPlanThead();
appRepaymentPlanThead2.setName("total");
appRepaymentPlanThead2.setLabel("合计");
appRepaymentPlanThead2.setWidth("100");
appRepaymentPlanThead2.setEmptyString("-");
appRepaymentPlanThead2.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead2);
AppRepaymentPlanThead appRepaymentPlanThead3 = new AppRepaymentPlanThead();
appRepaymentPlanThead3.setName("yh");
String[] zcpDate = loanRepaymentSchedule.getMainRepayDate().toString().split("-");
appRepaymentPlanThead3.setLabel("月还(" + zcpDate[zcpDate.length - 1] + "日)");
appRepaymentPlanThead3.setWidth("100");
appRepaymentPlanThead3.setEmptyString("-");
appRepaymentPlanThead3.setAlign("center");
appRepaymentPlanTheads.add(appRepaymentPlanThead3);
appRepaymentPlanListDetailsWxVo.setThead(appRepaymentPlanTheads);
List<AppRepaymentPlanRecord> appRepaymentPlanRecords = loanRepaymentPlanDetailsService.selByMainSidAndVinNo(scheduleSid, vinNo);
appRepaymentPlanListDetailsWxVo.setRecord(appRepaymentPlanRecords);
return appRepaymentPlanListDetailsWxVo;
}
public AppRepaymentHistoryListDetailsWxVo getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
AppRepaymentHistoryListDetailsWxVo appRepaymentHistoryListDetailsWxVo = new AppRepaymentHistoryListDetailsWxVo();
List<AppRepaymentHistoryThead> appRepaymentHistoryTheads = new ArrayList<>();
appRepaymentHistoryListDetailsWxVo.setVinNo(vinNo);
AppRepaymentHistoryThead appRepaymentHistoryThead1 = new AppRepaymentHistoryThead();
appRepaymentHistoryThead1.setName("period");
appRepaymentHistoryThead1.setLabel("期数");
appRepaymentHistoryThead1.setFixed(true);
appRepaymentHistoryThead1.setWidth("100");
appRepaymentHistoryThead1.setEmptyString("-");
appRepaymentHistoryThead1.setAlign("center");
appRepaymentHistoryTheads.add(appRepaymentHistoryThead1);
AppRepaymentHistoryThead appRepaymentHistoryThead2 = new AppRepaymentHistoryThead();
appRepaymentHistoryThead2.setName("kxType");
appRepaymentHistoryThead2.setLabel("款项类别");
appRepaymentHistoryThead2.setWidth("80");
appRepaymentHistoryThead2.setEmptyString("-");
appRepaymentHistoryThead2.setAlign("center");
appRepaymentHistoryTheads.add(appRepaymentHistoryThead2);
AppRepaymentHistoryThead appRepaymentHistoryThead3 = new AppRepaymentHistoryThead();
appRepaymentHistoryThead3.setName("actualDate");
appRepaymentHistoryThead3.setLabel("实还日期");
appRepaymentHistoryThead3.setWidth("80");
appRepaymentHistoryThead3.setEmptyString("-");
appRepaymentHistoryThead3.setAlign("center");
appRepaymentHistoryTheads.add(appRepaymentHistoryThead3);
AppRepaymentHistoryThead appRepaymentHistoryThead4 = new AppRepaymentHistoryThead();
appRepaymentHistoryThead4.setName("actualMoney");
appRepaymentHistoryThead4.setLabel("实还金额");
appRepaymentHistoryThead4.setWidth("80");
appRepaymentHistoryThead4.setEmptyString("-");
appRepaymentHistoryThead4.setAlign("center");
appRepaymentHistoryTheads.add(appRepaymentHistoryThead4);
AppRepaymentHistoryThead appRepaymentHistoryThead5 = new AppRepaymentHistoryThead();
appRepaymentHistoryThead5.setName("returnWay");
appRepaymentHistoryThead5.setLabel("还款方式");
appRepaymentHistoryThead5.setWidth("80");
appRepaymentHistoryThead5.setEmptyString("-");
appRepaymentHistoryThead5.setAlign("center");
appRepaymentHistoryTheads.add(appRepaymentHistoryThead5);
appRepaymentHistoryListDetailsWxVo.setThead(appRepaymentHistoryTheads);
List<AppRepaymentHistoryRecord> appRepaymentHistoryRecords = loanRepaymentHistoryService.selSchSidAndVinNo(scheduleSid,vinNo);
appRepaymentHistoryListDetailsWxVo.setRecord(appRepaymentHistoryRecords);
return appRepaymentHistoryListDetailsWxVo;
}
}

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

@ -0,0 +1,23 @@
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/9/11 14:26
*/
@Data
public class RepaymentHistoryListDetailsWxVo implements Vo {
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("标题")
private List<RepaymentHistoryThead> thead;
@ApiModelProperty("表格")
private List<RepaymentHistoryRecord> record;
}

25
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentHistoryRecord.java

@ -0,0 +1,25 @@
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 RepaymentHistoryRecord implements Vo {
@ApiModelProperty("期数")
private String period;
@ApiModelProperty("款项类别")
private String kxType;
@ApiModelProperty("实还日期")
private String actualDate;
@ApiModelProperty("实还金额")
private String actualMoney;
@ApiModelProperty("还款方式")
private String returnWay;
}

20
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentHistoryThead.java

@ -0,0 +1,20 @@
package com.yxt.anrui.terminal.api.risk.repaymentplan;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Administrator
* @description
* @date 2023/8/28 10:33
*/
@Data
public class RepaymentHistoryThead implements Vo {
private String name;
private String label;
private Boolean fixed = false;
private String width;
private String emptyString;
private String align;
}

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

@ -29,11 +29,6 @@ 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")
@ResponseBody
@ -44,5 +39,21 @@ public interface RepaymentPlanFeign {
@ResponseBody
public ResultBean<List<RepaymentPlanListDetailsVo>> getRepaymentPlanListByVinNo(@RequestParam("vinNo") String vinNo, @RequestParam("sid") String sid);
/********************************************************微信小程序*****************************************************/
@ApiOperation("微信小程序还款计划列表")
@PostMapping("/getRepaymentPlanListWx")
@ResponseBody
public ResultBean<PagerVo<RepaymentPlanWxVo>> getRepaymentPlanListWx(@RequestBody PagerQuery<RepaymentPlanQuery> pq);
@ApiOperation("微信小程序查看单车还款计划表")
@GetMapping("/getRepaymentPlanListByVinNoWx")
@ResponseBody
public ResultBean<RepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(@RequestParam("vinNo") String vinNo,@RequestParam("scheduleSid") String scheduleSid);
@ApiOperation("微信小程序查看单车还款记录")
@GetMapping("/getRepaymentHistoryListByVinNoWx")
@ResponseBody
public ResultBean<RepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(@RequestParam("vinNo") String vinNo,@RequestParam("scheduleSid") String scheduleSid);
}

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

@ -27,6 +27,16 @@ public class RepaymentPlanFeignFallback implements RepaymentPlanFeign {
return null;
}
@Override
public ResultBean<RepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
return null;
}
@Override
public ResultBean<RepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
return null;
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return null;

39
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanListDetailsWxVo.java

@ -0,0 +1,39 @@
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/9/11 14:26
*/
@Data
public class RepaymentPlanListDetailsWxVo implements Vo {
@ApiModelProperty("合同号")
private String contractId;
@ApiModelProperty("贷款人名称")
private String lenderName;
@ApiModelProperty("销售专员")
private String salesName;
@ApiModelProperty("主产品资方")
private String management;
@ApiModelProperty("主产品期数/还款日")
private String zcpDate;
@ApiModelProperty("其他融资方")
private String otherManagement;
@ApiModelProperty("其他融期数/还款日")
private String ptrDate;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("下载路径")
private String downloadUrl;
@ApiModelProperty("标题")
private List<RepaymentPlanThead> thead;
@ApiModelProperty("表格")
private List<RepaymentPlanRecord> record;
}

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

@ -0,0 +1,23 @@
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 RepaymentPlanRecord implements Vo {
@ApiModelProperty("月份期数")
private String date;
@ApiModelProperty("合计")
private String total;
@ApiModelProperty("月还")
private String yh;
@ApiModelProperty("其他融")
private String qtr;
}

21
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanThead.java

@ -0,0 +1,21 @@
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 RepaymentPlanThead implements Vo {
private String name;
private String label;
private Boolean fixed = false;
private String width;
private String emptyString;
private String align;
}

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

@ -36,6 +36,16 @@ public class RepaymentPlanRest implements RepaymentPlanFeign {
return repaymentPlanService.getRepaymentPlanListWx(pq);
}
@Override
public ResultBean<RepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
return repaymentPlanService.getRepaymentPlanListByVinNoWx(vinNo,scheduleSid);
}
@Override
public ResultBean<RepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
return repaymentPlanService.getRepaymentHistoryListByVinNoWx(vinNo,scheduleSid);
}
@Override
public ResultBean<RepaymentPlanDetailsVo> getRepaymentPlanListBySid(String sid) {
return repaymentPlanService.getRepaymentPlanListBySid(sid);

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

@ -94,4 +94,20 @@ public class RepaymentPlanService {
}
return rb.success().setData(pagerVo);
}
public ResultBean<RepaymentPlanListDetailsWxVo> getRepaymentPlanListByVinNoWx(String vinNo, String scheduleSid) {
ResultBean rb = ResultBean.fireFail();
AppRepaymentPlanListDetailsWxVo appRepaymentPlanListDetailsWxVo = loanRepaymentScheduleFeign.getRepaymentPlanListByVinNoWx(vinNo, scheduleSid).getData();
RepaymentPlanListDetailsWxVo repaymentPlanListDetailsWxVo = new RepaymentPlanListDetailsWxVo();
BeanUtil.copyProperties(appRepaymentPlanListDetailsWxVo,repaymentPlanListDetailsWxVo);
return rb.success().setData(repaymentPlanListDetailsWxVo);
}
public ResultBean<RepaymentHistoryListDetailsWxVo> getRepaymentHistoryListByVinNoWx(String vinNo, String scheduleSid) {
ResultBean rb = ResultBean.fireFail();
AppRepaymentHistoryListDetailsWxVo appRepaymentHistoryListDetailsWxVo = loanRepaymentScheduleFeign.getRepaymentHistoryListByVinNoWx(vinNo, scheduleSid).getData();
RepaymentHistoryListDetailsWxVo repaymentHistoryListDetailsWxVo = new RepaymentHistoryListDetailsWxVo();
BeanUtil.copyProperties(appRepaymentHistoryListDetailsWxVo,repaymentHistoryListDetailsWxVo);
return rb.success().setData(repaymentHistoryListDetailsWxVo);
}
}

Loading…
Cancel
Save