|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|