Browse Source

Merge remote-tracking branch 'origin/master'

master
God 1 year ago
parent
commit
5479cdb6bf
  1. 134
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  2. 44
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java
  3. 12
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/voucher/VoucherService.java
  4. 4
      anrui-riskcenter-ui/src/views/advancerequest/advancerequestAdd.vue
  5. 14
      anrui-riskcenter-ui/src/views/customerrepayment/customerrepaymentdetails.vue
  6. 7
      anrui-riskcenter-ui/src/views/monthlypayment/adjust.vue
  7. 26
      anrui-riskcenter-ui/src/views/monthlypayment/monthlypayment.vue
  8. 4
      anrui-riskcenter-ui/src/views/workFlow/diankuanFlow/advancerequestEdit.vue
  9. 6
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinbank/LoanFinBankFeign.java
  10. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinbank/LoanFinBankFeignFallback.java
  11. 7
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymenthistory/LoanRepaymentHistoryFeign.java
  12. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymenthistory/LoanRepaymentHistoryFeignFallback.java
  13. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/LoanRepaymentPlanDetailsFeign.java
  14. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/LoanRepaymentPlanDetailsFeignFallback.java
  15. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankMapper.java
  16. 8
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankMapper.xml
  17. 5
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankRest.java
  18. 6
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankService.java
  19. 46
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java
  20. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryRest.java
  21. 135
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  22. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsRest.java

134
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -26,6 +26,7 @@
package com.yxt.anrui.fin.biz.fincollectionconfirmation; package com.yxt.anrui.fin.biz.fincollectionconfirmation;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -80,11 +81,17 @@ import com.yxt.anrui.riskcenter.api.loandiff.LoanDiffFeign;
import com.yxt.anrui.riskcenter.api.loandiff.LoanDiffsDto; import com.yxt.anrui.riskcenter.api.loandiff.LoanDiffsDto;
import com.yxt.anrui.riskcenter.api.loandiffdetails.LoanDiffDetailssDto; import com.yxt.anrui.riskcenter.api.loandiffdetails.LoanDiffDetailssDto;
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank; import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank;
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankFeign;
import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.LoanFinOtherPolicy; import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.LoanFinOtherPolicy;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy; import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicyFeign;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicyVo;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryFeign;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails; import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsFeign; import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsFeign;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail; import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy; import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
@ -170,6 +177,10 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
private LoanRepaymentPlanDetailsFeign loanRepaymentPlanDetailsFeign; private LoanRepaymentPlanDetailsFeign loanRepaymentPlanDetailsFeign;
@Autowired @Autowired
private FinUncollectedReceivablesDetailedJRService finUncollectedReceivablesDetailedJRService; private FinUncollectedReceivablesDetailedJRService finUncollectedReceivablesDetailedJRService;
@Autowired
private LoanRepaymentHistoryFeign loanRepaymentHistoryFeign;
@Autowired
private LoanFinBankFeign loanFinBankFeign;
private QueryWrapper<FinCollectionConfirmation> createQueryWrapper(FinCollectionConfirmationQuery query) { private QueryWrapper<FinCollectionConfirmation> createQueryWrapper(FinCollectionConfirmationQuery query) {
// todo: 这里根据具体业务调整查询条件 // todo: 这里根据具体业务调整查询条件
@ -3679,6 +3690,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
BigDecimal subscriptionMoneyAll = new BigDecimal("0"); BigDecimal subscriptionMoneyAll = new BigDecimal("0");
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 1); List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByAuditState(sid, 1);
if (finSelectedReceivablesDetailedVos.size() > 0) { if (finSelectedReceivablesDetailedVos.size() > 0) {
FinCollectionConfirmation finalConfirmation = confirmation;
finSelectedReceivablesDetailedVos.stream().forEach(v -> { finSelectedReceivablesDetailedVos.stream().forEach(v -> {
//已选款项明细sid //已选款项明细sid
String selectSid = v.getSid(); String selectSid = v.getSid();
@ -3688,6 +3700,128 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
//更新审核时间 //更新审核时间
finSelectedReceivablesDetailed.setAuditDate(DateUtil.today()); finSelectedReceivablesDetailed.setAuditDate(DateUtil.today());
finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed); finSelectedReceivablesDetailedService.updateById(finSelectedReceivablesDetailed);
//推送间还认款记录
if (v.getReceivablesName().equals("月还")) {
LoanRepaymentHistory historyEntity = new LoanRepaymentHistory();
historyEntity.setSkdBillNo(finalConfirmation.getBillNo());
historyEntity.setUpdateTime(new DateTime());
historyEntity.setUpdateState("1");
historyEntity.setDataTime(new DateTime());
historyEntity.setBuckle("审核通过");
historyEntity.setBuckleKey("003");
historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney()));
historyEntity.setActualDate(new DateTime());
historyEntity.setReturnWay("间还");
historyEntity.setReturnWayKey("02");
historyEntity.setPlanDetailSid(v.getReceivablesSid());
LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(v.getReceivablesSid()).getData();
if (null != planDetails) {
historyEntity.setScheduleSid(planDetails.getScheduleSid());
}
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
}
//推送间还待转付列表
if (v.getReceivablesName().equals("月还") || v.getReceivablesName().equals("资方逾期利息")) {
String planSid = "";
if (v.getReceivablesName().equals("月还")) {
planSid = v.getReceivablesSid();
} else {
FinUncollectedReceivablesDetailedJR jr = finUncollectedReceivablesDetailedJRService.fetchBySid(v.getReceivablesSid());
if (jr != null) {
planSid = jr.getBusSid();
}
}
LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData();
if (null != planDetails) {
if (null != planDetails.getPaymentMoney()) {
if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 1) {
String orderSid = planDetails.getSalesOrderSid();
ResultBean<LoanFinBank> bankResultBean = loanFinBankFeign.reAdvancesByOrderSid(orderSid);
if (bankResultBean.getData() != null) {
LoanFinBank loanFinBank = bankResultBean.getData();
if (null != loanFinBank.getReAdvances()) {
if (loanFinBank.getReAdvances() == 1) {
LoanRepaymentHistory historyEntity = new LoanRepaymentHistory();
historyEntity.setSkdBillNo(finalConfirmation.getBillNo());
historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney()));
historyEntity.setActualDate(new DateTime());
historyEntity.setReturnWay("间还");
historyEntity.setReturnWayKey("02");
historyEntity.setPaymentState("待转付");
historyEntity.setPaymentStateKey("001");
Date dueDate = planDetails.getDueDate();
if (new Date().compareTo(dueDate) > 0) {
historyEntity.setPrepareDate(new DateTime());
} else {
Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历
cal_1.setTime(dueDate);
cal_1.add(Calendar.DAY_OF_MONTH, -1);
historyEntity.setPrepareDate(cal_1.getTime());
}
historyEntity.setPrepareDate(new DateTime());
historyEntity.setPlanDetailSid(planSid);
historyEntity.setScheduleSid(planDetails.getScheduleSid());
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
} else {
BigDecimal paymentMoney = planDetails.getPaymentMoney();
String subscriptionMoney = v.getSubscriptionMoney();
BigDecimal subtract = paymentMoney.subtract(new BigDecimal(subscriptionMoney));
planDetails.setPaymentMoney(subtract);
loanRepaymentPlanDetailsFeign.updateByEntity(planDetails);
}
}
}
} else {
LoanRepaymentHistory historyEntity = new LoanRepaymentHistory();
historyEntity.setSkdBillNo(finalConfirmation.getBillNo());
historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney()));
historyEntity.setActualDate(new DateTime());
historyEntity.setReturnWay("间还");
historyEntity.setReturnWayKey("02");
historyEntity.setPaymentState("待转付");
historyEntity.setPaymentStateKey("001");
Date dueDate = planDetails.getDueDate();
if (new Date().compareTo(dueDate) > 0) {
historyEntity.setPrepareDate(new DateTime());
} else {
Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历
cal_1.setTime(dueDate);
cal_1.add(Calendar.DAY_OF_MONTH, -1);
historyEntity.setPrepareDate(cal_1.getTime());
}
historyEntity.setPrepareDate(new DateTime());
historyEntity.setPlanDetailSid(planSid);
historyEntity.setScheduleSid(planDetails.getScheduleSid());
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
}
} else {
LoanRepaymentHistory historyEntity = new LoanRepaymentHistory();
historyEntity.setSkdBillNo(finalConfirmation.getBillNo());
historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney()));
historyEntity.setActualDate(new DateTime());
historyEntity.setReturnWay("间还");
historyEntity.setReturnWayKey("02");
historyEntity.setPaymentState("待转付");
historyEntity.setPaymentStateKey("001");
Date dueDate = planDetails.getDueDate();
if (new Date().compareTo(dueDate) > 0) {
historyEntity.setPrepareDate(new DateTime());
} else {
Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历
cal_1.setTime(dueDate);
cal_1.add(Calendar.DAY_OF_MONTH, -1);
historyEntity.setPrepareDate(cal_1.getTime());
}
historyEntity.setPrepareDate(new DateTime());
historyEntity.setPlanDetailSid(planSid);
historyEntity.setScheduleSid(planDetails.getScheduleSid());
loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity);
}
}
}
}); });
//查询该申请已认款金额总数 //查询该申请已认款金额总数
subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);

44
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java

@ -63,7 +63,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@Api(tags = "单据调用金蝶的暂存接口") @Api(tags = "单据调用金蝶的暂存接口")
@ -250,9 +252,9 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
for (GeneralVoucher.GeneralVoucherDetail voucherDetail : voucherDetails) { for (GeneralVoucher.GeneralVoucherDetail voucherDetail : voucherDetails) {
Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方 Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方
Voucher.VoucherResultDetailDto dto2 = new Voucher.VoucherResultDetailDto(); //贷方 Voucher.VoucherResultDetailDto dto2 = new Voucher.VoucherResultDetailDto(); //贷方
dto1.setSummary(voucherDetail.getBankName() + "贷款"); dto1.setSummary(voucherDetail.getBankName() + "贷款");
dto2.setSummary(voucherDetail.getBankName() + "贷款"); dto2.setSummary(voucherDetail.getBankName() + "贷款");
dto1.setSubjectNo("1201.01.00"); dto1.setSubjectNo("1201.01.00");
} }
@ -268,7 +270,41 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
*/ */
@Override @Override
public ResultBean<String> saveAccrualVoucher(GeneralVoucher voucher) { public ResultBean<String> saveAccrualVoucher(GeneralVoucher voucher) {
return null; ResultBean rb = ResultBean.fireFail();
Voucher newVoucher = new Voucher();
List<Voucher.VoucherResultDetailDto> resultDetails = new ArrayList<>();
if (StringUtils.isNotBlank(voucher.getUseOrgCode())) {
newVoucher.setAccountBook(voucher.getUseOrgCode());
newVoucher.setVoucherNo(voucher.getUseOrgCode());
}
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String formatDate = sdf.format(date);
String[] split = formatDate.split("-");
String month = split[1];
int m = Integer.parseInt(month);
List<GeneralVoucher.GeneralVoucherDetail> voucherDetails = voucher.getVoucherDetails();
if (!voucherDetails.isEmpty()) {
for (GeneralVoucher.GeneralVoucherDetail voucherDetail : voucherDetails) {
Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方
Voucher.VoucherResultDetailDto dto2 = new Voucher.VoucherResultDetailDto(); //贷方
dto1.setSummary(m + "月还计提");
dto2.setSummary(m + "月还计提");
dto1.setSubjectNo("1201.02.01");
dto2.setSubjectNo("1201.01.00");
dto1.setDimensionDept(voucherDetail.getDeptCode());
dto1.setDimensionCustom(voucherDetail.getCustomerCode());
dto2.setDimensionDept(voucherDetail.getDeptCode());
dto2.setDimensionCustom(voucherDetail.getCustomerCode());
dto1.setDebit(String.valueOf(voucherDetail.getAmount()));
dto2.setCredit(String.valueOf(voucherDetail.getAmount()));
resultDetails.add(dto1);
resultDetails.add(dto2);
}
newVoucher.setResultDetails(resultDetails);
}
log.info("FinKingDeeFeignRest-saveVoucher:{}", JSONObject.toJSONString(newVoucher));
return voucherService.saveVoucher(newVoucher);
} }
/** /**

12
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/voucher/VoucherService.java

@ -41,12 +41,12 @@ public class VoucherService extends FinKingDeeService {
// if (StringUtils.isBlank(voucher.getVoucherWord())) { // if (StringUtils.isBlank(voucher.getVoucherWord())) {
// return rb.setMsg("凭证字不能为空"); // return rb.setMsg("凭证字不能为空");
// } // }
map_fEntityModel_.put("FVOUCHERGROUPID", voucher.getVoucherWord()); map_fEntityModel_.put("FVOUCHERGROUPID", "PRE001");
//凭证号 // //凭证号
if (StringUtils.isBlank(voucher.getVoucherNo())) { // if (StringUtils.isBlank(voucher.getVoucherNo())) {
return rb.setMsg("凭证号不能为空"); // return rb.setMsg("凭证号不能为空");
} // }
map_fEntityModel_.put("FVOUCHERGROUPNO", voucher.getVoucherNo()); // map_fEntityModel_.put("FVOUCHERGROUPNO", voucher.getVoucherNo());
List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = voucher.getResultDetails() == null ? new ArrayList<>() : voucher.getResultDetails(); List<Voucher.VoucherResultDetailDto> voucherResultDetailDtos = voucher.getResultDetails() == null ? new ArrayList<>() : voucher.getResultDetails();
//准备 物料列表的数据 //准备 物料列表的数据

4
anrui-riskcenter-ui/src/views/advancerequest/advancerequestAdd.vue

@ -92,6 +92,9 @@
</div> </div>
<!-- 导入 --> <!-- 导入 -->
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> <el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false">
<div>
<el-button style="font-weight: bold" size="small" type="text" @click="downLoad">下载当月资方逾期记录模板</el-button>
</div>
<el-card class="box-card"> <el-card class="box-card">
<div> <div>
<el-upload <el-upload
@ -108,7 +111,6 @@
:data="uploadData" :data="uploadData"
:headers="headers" :headers="headers"
> >
<el-button style="margin-left: 10px;" size="small" type="primary" @click="downLoad">下载模板</el-button>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
</el-upload> </el-upload>

14
anrui-riskcenter-ui/src/views/customerrepayment/customerrepaymentdetails.vue

@ -98,14 +98,14 @@
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> <el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/> <el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> <el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="分公司" align="center" width="100" /> <el-table-column fixed prop="useOrgName" label="分公司" align="center" width="100" />
<el-table-column prop="dept" label="销售部门" align="center"/> <el-table-column fixed prop="dept" label="销售部门" align="center"/>
<el-table-column prop="staffName" label="销售专员" align="center" width="100" /> <el-table-column fixed prop="staffName" label="销售专员" align="center" width="100" />
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="120" /> <el-table-column fixed prop="loanContractNo" label="贷款合同编号" align="center" width="120" />
<el-table-column prop="vinNo" label="车架号" align="center" width="100" /> <el-table-column fixed prop="vinNo" label="车架号" align="center" width="100" />
<el-table-column prop="bankName" label="资方" align="center" width="100" /> <el-table-column prop="bankName" label="资方" align="center" width="100" />
<el-table-column prop="bankContractNo" label="资方合同编号" align="center" width="100" /> <el-table-column prop="bankContractNo" label="资方合同编号" align="center" width="120" />
<el-table-column prop="customer" label="客户名称" align="center" width="100" /> <el-table-column prop="customer" label="客户名称" align="center" width="100" />
<el-table-column prop="borrowerName" label="贷款人" align="center" width="100" /> <el-table-column prop="borrowerName" label="贷款人" align="center" width="100" />
<el-table-column prop="period" label="期数" align="center" min-width="100" /> <el-table-column prop="period" label="期数" align="center" min-width="100" />

7
anrui-riskcenter-ui/src/views/monthlypayment/adjust.vue

@ -121,8 +121,11 @@ export default {
}) })
}, },
UpNumber(e) { UpNumber(e) {
e.target.value = e.target.value.replace(/[^0-9]/g, '') // . e.target.value = e.target.value.replace(/[^0-9.]/g, '') // .
e.target.value = e.target.value.replace(/^00/, '0') // 0 e.target.value = e.target.value.replace(/^00/, '0.') // 0
e.target.value = e.target.value.replace(/\.{2,}/g, '.') // .
e.target.value = e.target.value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
e.target.value = e.target.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102 // 0102
e.target.value = parseFloat(e.target.value) e.target.value = parseFloat(e.target.value)

26
anrui-riskcenter-ui/src/views/monthlypayment/monthlypayment.vue

@ -106,6 +106,9 @@
<deductAdd ref="divDeduct" v-show="viewState == 3" @doback="resetState" @reloadlist="getList"/> <deductAdd ref="divDeduct" v-show="viewState == 3" @doback="resetState" @reloadlist="getList"/>
<!-- 导入 --> <!-- 导入 -->
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> <el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false">
<div>
<el-button size="small" type="text" style="font-weight: bold" @click="downLoad">下载还款记录模板</el-button>
</div>
<el-card class="box-card"> <el-card class="box-card">
<div> <div>
<el-upload <el-upload
@ -122,7 +125,6 @@
:data="uploadData" :data="uploadData"
:headers="headers" :headers="headers"
> >
<el-button style="margin-left: 10px;" size="small" type="primary" @click="downLoad">下载模板</el-button>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
</el-upload> </el-upload>
@ -193,15 +195,15 @@ export default {
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: '', icon: '',
btnKey: 'toDeduct', btnKey: 'toUpdate',
btnLabel: '划扣' btnLabel: '更新'
}, },
{ {
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: '', icon: '',
btnKey: 'toUpdate', btnKey: 'toDeduct',
btnLabel: '更新' btnLabel: '划扣'
}, },
{ {
type: 'danger', type: 'danger',
@ -224,6 +226,7 @@ export default {
tableKey: 0, tableKey: 0,
list: [], list: [],
sids: [], // SIDs sids: [], // SIDs
multipleSelection: [],
returnWay_list: [], returnWay_list: [],
buckle_list: [ buckle_list: [
{ {
@ -325,6 +328,7 @@ export default {
// sid // sid
handleSelectionChange(row) { handleSelectionChange(row) {
const aa = [] const aa = []
this.multipleSelection = row
row.forEach(element => { row.forEach(element => {
aa.push(element.sid) aa.push(element.sid)
}) })
@ -406,7 +410,7 @@ export default {
const blob = new Blob([resp], { const blob = new Blob([resp], {
type: 'application/vnd.ms-excel' type: 'application/vnd.ms-excel'
}) })
const fileName = '当月还款记录模板' + '.xls' const fileName = '还款记录模板' + '.xls'
const elink = document.createElement('a') const elink = document.createElement('a')
elink.download = fileName elink.download = fileName
elink.style.display = 'nonde' elink.style.display = 'nonde'
@ -434,7 +438,7 @@ export default {
}, },
handleConfirm() { handleConfirm() {
if (this.upload_list.length === 0) { if (this.upload_list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请先上传当月还款记录' }) this.$message({ showClose: true, type: 'error', message: '请先上传还款记录' })
return return
} }
req.saveRecords(this.upload_list).then((res) => { req.saveRecords(this.upload_list).then((res) => {
@ -499,8 +503,12 @@ export default {
// //
toEdit(row) { toEdit(row) {
if (this.sids.length === 1) { if (this.sids.length === 1) {
this.viewState = 2 if (this.multipleSelection[0].updateTime === '') {
this.$refs['divAdd'].showEdit(this.sids[0]) this.viewState = 2
this.$refs['divAdd'].showEdit(this.sids[0])
} else {
this.$message({ showClose: true, type: 'error', message: '该记录已生成更新日期,无需进行调整操作' })
}
} else { } else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' }) this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' })
} }

4
anrui-riskcenter-ui/src/views/workFlow/diankuanFlow/advancerequestEdit.vue

@ -91,6 +91,9 @@
</div> </div>
<!-- 导入 --> <!-- 导入 -->
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> <el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false">
<div>
<el-button style="font-weight: bold" size="small" type="text" @click="downLoad">下载当月资方逾期记录模板</el-button>
</div>
<el-card class="box-card"> <el-card class="box-card">
<div> <div>
<el-upload <el-upload
@ -107,7 +110,6 @@
:data="uploadData" :data="uploadData"
:headers="headers" :headers="headers"
> >
<el-button style="margin-left: 10px;" size="small" type="primary" @click="downLoad">下载模板</el-button>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
</el-upload> </el-upload>

6
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinbank/LoanFinBankFeign.java

@ -117,4 +117,10 @@ public interface LoanFinBankFeign {
@ApiOperation("产品政策查询资方下拉框") @ApiOperation("产品政策查询资方下拉框")
@GetMapping("/selectListByOrgPath") @GetMapping("/selectListByOrgPath")
ResultBean<List<LoanFinBanksVo>> selectListByOrgPath(@RequestParam("orgPath") String orgPath); ResultBean<List<LoanFinBanksVo>> selectListByOrgPath(@RequestParam("orgPath") String orgPath);
@ApiOperation("查询资方是否为退还垫款")
@GetMapping("/reAdvancesByOrderSid")
@ResponseBody
ResultBean<LoanFinBank> reAdvancesByOrderSid(@RequestParam("orderSid") String orderSid);
} }

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinbank/LoanFinBankFeignFallback.java

@ -75,4 +75,9 @@ public class LoanFinBankFeignFallback implements LoanFinBankFeign {
return null; return null;
} }
@Override
public ResultBean<LoanFinBank> reAdvancesByOrderSid(String orderSid) {
return null;
}
} }

7
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymenthistory/LoanRepaymentHistoryFeign.java

@ -35,6 +35,11 @@ public interface LoanRepaymentHistoryFeign {
@PostMapping("/monthListPage") @PostMapping("/monthListPage")
public ResultBean<PagerVo<LoanRepaymentHistoryVo>> monthListPage(@RequestBody PagerQuery<LoanRepaymentHistoryQuery> pq); public ResultBean<PagerVo<LoanRepaymentHistoryVo>> monthListPage(@RequestBody PagerQuery<LoanRepaymentHistoryQuery> pq);
@ApiOperation("保存还款记录")
@PostMapping("/saveHistoryByEntity")
@ResponseBody
public ResultBean saveHistoryByEntity(@RequestBody LoanRepaymentHistory entity);
@ApiOperation("保存还款记录") @ApiOperation("保存还款记录")
@PostMapping("/saveHistory") @PostMapping("/saveHistory")
@ResponseBody @ResponseBody
@ -107,6 +112,4 @@ public interface LoanRepaymentHistoryFeign {
public void exportExcel(@RequestBody RepaymentStatisticsQuery repaymentStatisticsQuery); public void exportExcel(@RequestBody RepaymentStatisticsQuery repaymentStatisticsQuery);
} }

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymenthistory/LoanRepaymentHistoryFeignFallback.java

@ -26,6 +26,11 @@ public class LoanRepaymentHistoryFeignFallback implements LoanRepaymentHistoryFe
return null; return null;
} }
@Override
public ResultBean saveHistoryByEntity(LoanRepaymentHistory entity) {
return null;
}
@Override @Override
public ResultBean<String> saveHistory(LoanRepaymentHistoryDto dto) { public ResultBean<String> saveHistory(LoanRepaymentHistoryDto dto) {
return null; return null;

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/LoanRepaymentPlanDetailsFeign.java

@ -43,4 +43,9 @@ public interface LoanRepaymentPlanDetailsFeign {
@ResponseBody @ResponseBody
public ResultBean<LoanRepaymentPlanDetails> fetchDetails(@RequestParam("sid") String sid); public ResultBean<LoanRepaymentPlanDetails> fetchDetails(@RequestParam("sid") String sid);
@ApiOperation("修改实体")
@PostMapping("/updateByEntity")
@ResponseBody
public ResultBean<String> updateByEntity(@RequestBody LoanRepaymentPlanDetails entity);
} }

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentplandetails/LoanRepaymentPlanDetailsFeignFallback.java

@ -36,4 +36,9 @@ public class LoanRepaymentPlanDetailsFeignFallback implements LoanRepaymentPlanD
public ResultBean<LoanRepaymentPlanDetails> fetchDetails(String sid) { public ResultBean<LoanRepaymentPlanDetails> fetchDetails(String sid) {
return null; return null;
} }
@Override
public ResultBean<String> updateByEntity(LoanRepaymentPlanDetails entity) {
return null;
}
} }

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankMapper.java

@ -88,4 +88,6 @@ public interface LoanFinBankMapper extends BaseMapper<LoanFinBank> {
int updateBySidDelete(String sid); int updateBySidDelete(String sid);
List<LoanFinBanksVo> selectListByOrgSid(String orgSid); List<LoanFinBanksVo> selectListByOrgSid(String orgSid);
LoanFinBank reAdvancesByOrderSid(@Param("orderSid") String orderSid);
} }

8
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankMapper.xml

@ -80,4 +80,12 @@
from loan_fin_bank from loan_fin_bank
where isDelete = 0 where isDelete = 0
</select> </select>
<select id="reAdvancesByOrderSid" resultType="com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank">
SELECT b.*
FROM loan_solutions AS s
LEFT JOIN loan_fin_policy AS p ON s.policySid = p.sid
LEFT JOIN loan_fin_bank as b ON p.bankSid = b.sid
WHERE s.salesOrderSid = #{orderSid}
AND s.isDelete = '0'
</select>
</mapper> </mapper>

5
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankRest.java

@ -186,4 +186,9 @@ public class LoanFinBankRest implements LoanFinBankFeign {
public ResultBean<List<LoanFinBanksVo>> selectListByOrgPath(String orgPath) { public ResultBean<List<LoanFinBanksVo>> selectListByOrgPath(String orgPath) {
return loanFinBankService.selectListByOrgPath(orgPath); return loanFinBankService.selectListByOrgPath(orgPath);
} }
@Override
public ResultBean<LoanFinBank> reAdvancesByOrderSid(String orderSid) {
return loanFinBankService.reAdvancesByOrderSid(orderSid);
}
} }

6
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinbank/LoanFinBankService.java

@ -302,4 +302,10 @@ public class LoanFinBankService extends MybatisBaseService<LoanFinBankMapper, Lo
list.removeAll(Collections.singleton(null)); list.removeAll(Collections.singleton(null));
return rb.success().setData(list); return rb.success().setData(list);
} }
public ResultBean<LoanFinBank> reAdvancesByOrderSid(String orderSid) {
ResultBean rb = ResultBean.fireFail();
LoanFinBank loanFinBank = baseMapper.reAdvancesByOrderSid(orderSid);
return rb.success().setData(loanFinBank);
}
} }

46
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

@ -7,9 +7,26 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.yxt.anrui.base.api.basetrailer.BaseTrailerDetailsVo;
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateDto;
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateEnum;
import com.yxt.anrui.base.common.enums.BillTypeEnum; import com.yxt.anrui.base.common.enums.BillTypeEnum;
import com.yxt.anrui.base.common.utils.Rule; import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.base.common.utils.domain.BillNo; import com.yxt.anrui.base.common.utils.domain.BillNo;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply.BusArrearsCarryVehicleApplyVo;
import com.yxt.anrui.buscenter.api.busbillapplication.BusBillApplication;
import com.yxt.anrui.buscenter.api.busbilltrailer.BusBillTrailerVo;
import com.yxt.anrui.buscenter.api.busbillvehicle.BusBillVehicleVo;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetails;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice;
import com.yxt.anrui.buscenter.api.busvalcustfiling.BusValcustFilingDto;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDetailsVo;
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceDto;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery; import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -26,6 +43,7 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo; import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.portal.api.sysuser.UserQuery;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.LoanBuckleApply; import com.yxt.anrui.riskcenter.api.loanbuckleapply.LoanBuckleApply;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppBuckleDetailsVo; import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppBuckleDetailsVo;
import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppRecordVo; import com.yxt.anrui.riskcenter.api.loanbuckleapply.app.AppRecordVo;
@ -52,6 +70,7 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.MessageFeign; import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo; import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery; import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import com.yxt.messagecenter.api.message.PushMessageQuery;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -95,7 +114,8 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
private LoanMonthlyAccrualRecordService loanMonthlyAccrualRecordService; private LoanMonthlyAccrualRecordService loanMonthlyAccrualRecordService;
@Autowired @Autowired
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService; private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService;
@Autowired
private FinKingDeeFeign finKingDeeFeign;
public ResultBean<LoanMonthlyAccrualApplyInit> accrualInit(String orgPath) { public ResultBean<LoanMonthlyAccrualApplyInit> accrualInit(String orgPath) {
ResultBean<LoanMonthlyAccrualApplyInit> rb = ResultBean.fireFail(); ResultBean<LoanMonthlyAccrualApplyInit> rb = ResultBean.fireFail();
String orgSidPath = orgPath; String orgSidPath = orgPath;
@ -638,6 +658,21 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
LoanMonthlyAccrualApply accrualApply = fetchBySid(businessSid); LoanMonthlyAccrualApply accrualApply = fetchBySid(businessSid);
accrualApply.setClosingDate(new DateTime()); accrualApply.setClosingDate(new DateTime());
baseMapper.updateById(accrualApply); baseMapper.updateById(accrualApply);
try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
.setNameFormat("demo-pool-%d").build();
ExecutorService pool = new org.apache.tomcat.util.threads.ThreadPoolExecutor(1, 10,
1000, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new org.apache.tomcat.util.threads.ThreadPoolExecutor.AbortPolicy());
//推送优惠包交接数据
Future future = pool.submit(() -> {
pushAccrualVoucher(businessSid);
});
} catch (Exception e) {
e.printStackTrace();
log.error("推送数据失败=========================" + e.getMessage());
return rb.setMsg("推送数据失败");
}
} }
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
} else { } else {
@ -645,6 +680,15 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
} }
} }
private void pushAccrualVoucher(String businessSid) {
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(businessSid);
if (!records.isEmpty()) {
}
}
public ResultBean revokeProcess(AccrualTaskQuery query) { public ResultBean revokeProcess(AccrualTaskQuery query) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryRest.java

@ -50,6 +50,13 @@ public class LoanRepaymentHistoryRest implements LoanRepaymentHistoryFeign {
return rb.success().setData(pv); return rb.success().setData(pv);
} }
@Override
public ResultBean saveHistoryByEntity(LoanRepaymentHistory entity) {
ResultBean rb = ResultBean.fireFail();
loanRepaymentHistoryService.insert(entity);
return rb.success();
}
@Override @Override
public ResultBean<String> saveHistory(LoanRepaymentHistoryDto dto) { public ResultBean<String> saveHistory(LoanRepaymentHistoryDto dto) {
return loanRepaymentHistoryService.saveHistory(dto); return loanRepaymentHistoryService.saveHistory(dto);

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

@ -497,66 +497,69 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.apply(StringUtils.isNotEmpty(dueStartDate), "date_format (p.dueDate,'%Y-%m-%d') >= date_format('" + dueStartDate + "','%Y-%m-%d')"). qw.apply(StringUtils.isNotEmpty(dueStartDate), "date_format (p.dueDate,'%Y-%m-%d') >= date_format('" + dueStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(dueEndDate), "date_format (p.dueDate,'%Y-%m-%d') <= date_format('" + dueEndDate + "','%Y-%m-%d')" apply(StringUtils.isNotEmpty(dueEndDate), "date_format (p.dueDate,'%Y-%m-%d') <= date_format('" + dueEndDate + "','%Y-%m-%d')"
); );
List<String> monthHeadAndLast = getMonthHeadAndLast(new Date()); // List<String> monthHeadAndLast = getMonthHeadAndLast(new Date());
String head = monthHeadAndLast.get(0); // String head = monthHeadAndLast.get(0);
String last = monthHeadAndLast.get(1); // String last = monthHeadAndLast.get(1);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String actualStartDate = pagerQuery.getActualStartDate(); String actualStartDate = pagerQuery.getActualStartDate();
String actualEndDate = pagerQuery.getActualEndDate(); String actualEndDate = pagerQuery.getActualEndDate();
try { qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')").
Date headT = sdf.parse(head); apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')"
Date lastT = sdf.parse(last); );
Date ast = null; // try {
Date aed = null; // Date headT = sdf.parse(head);
if (StringUtils.isNotBlank(actualStartDate)) { // Date lastT = sdf.parse(last);
ast = sdf.parse(actualStartDate); // Date ast = null;
} // Date aed = null;
if (StringUtils.isNotBlank(actualEndDate)) { // if (StringUtils.isNotBlank(actualStartDate)) {
aed = sdf.parse(actualEndDate); // ast = sdf.parse(actualStartDate);
} // }
// if (StringUtils.isNotBlank(actualEndDate)) {
if (StringUtils.isBlank(actualStartDate) && StringUtils.isNotBlank(actualEndDate)) { // aed = sdf.parse(actualEndDate);
if (aed.before(lastT)) { // }
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). //
apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')" // if (StringUtils.isBlank(actualStartDate) && StringUtils.isNotBlank(actualEndDate)) {
); // if (aed.before(lastT)) {
} else { // qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). // apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')"
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')" // );
); // } else {
} // qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
} else if (StringUtils.isBlank(actualEndDate) && StringUtils.isNotBlank(actualStartDate)) { // apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
if (headT.before(ast)) { // );
qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')"). // }
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')" // } else if (StringUtils.isBlank(actualEndDate) && StringUtils.isNotBlank(actualStartDate)) {
); // if (headT.before(ast)) {
} else { // qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')").
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). // apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')" // );
); // } else {
} // qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
} else if (StringUtils.isNotBlank(actualStartDate) && StringUtils.isNotBlank(actualEndDate)) { // apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
if (headT.before(ast) && aed.before(lastT)) { // );
qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')"). // }
apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')" // } else if (StringUtils.isNotBlank(actualStartDate) && StringUtils.isNotBlank(actualEndDate)) {
); // if (headT.before(ast) && aed.before(lastT)) {
} else if (headT.before(ast) && !aed.before(lastT)) { // qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')").
qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')"). // apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')"
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + lastT + "','%Y-%m-%d')" // );
); // } else if (headT.before(ast) && !aed.before(lastT)) {
} else if (!headT.before(ast) && aed.before(lastT)) { // qw.apply(StringUtils.isNotEmpty(actualStartDate), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + actualStartDate + "','%Y-%m-%d')").
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). // apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + lastT + "','%Y-%m-%d')"
apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')" // );
); // } else if (!headT.before(ast) && aed.before(lastT)) {
} else if (!headT.before(ast) && !aed.before(lastT)) { // qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). // apply(StringUtils.isNotEmpty(actualEndDate), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + actualEndDate + "','%Y-%m-%d')"
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')" // );
); // } else if (!headT.before(ast) && !aed.before(lastT)) {
} // qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
} // apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
} catch (ParseException e) { // );
e.printStackTrace(); // }
} // }
// } catch (ParseException e) {
// e.printStackTrace();
// }
String dataStartTime = pagerQuery.getDataStartTime(); String dataStartTime = pagerQuery.getDataStartTime();
String dataEndTime = pagerQuery.getDataEndTime(); String dataEndTime = pagerQuery.getDataEndTime();
@ -564,11 +567,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
apply(StringUtils.isNotEmpty(dataEndTime), "date_format (h.dataTime,'%Y-%m-%d') <= date_format('" + dataEndTime + "','%Y-%m-%d')" apply(StringUtils.isNotEmpty(dataEndTime), "date_format (h.dataTime,'%Y-%m-%d') <= date_format('" + dataEndTime + "','%Y-%m-%d')"
); );
qw.orderByDesc("h.dataTime"); qw.orderByDesc("h.dataTime");
if (StringUtils.isBlank(actualStartDate) && StringUtils.isBlank(actualEndDate)) {
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
);
}
IPage<LoanRepaymentHistoryVo> pagging = baseMapper.monthListPage(page, qw); IPage<LoanRepaymentHistoryVo> pagging = baseMapper.monthListPage(page, qw);
List<LoanRepaymentHistoryVo> records = pagging.getRecords(); List<LoanRepaymentHistoryVo> records = pagging.getRecords();
records.removeAll(Collections.singleton(null)); records.removeAll(Collections.singleton(null));
@ -715,12 +713,6 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.ne("h.buckleKey", "002"); qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003"); qw.ne("h.buckleKey", "003");
qw.eq("h.updateState", "0"); qw.eq("h.updateState", "0");
List<String> monthHeadAndLast = getMonthHeadAndLast(new Date());
String head = monthHeadAndLast.get(0);
String last = monthHeadAndLast.get(1);
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
);
List<String> histories = baseMapper.selUpdateStateList(qw); List<String> histories = baseMapper.selUpdateStateList(qw);
if (!histories.isEmpty()) { if (!histories.isEmpty()) {
for (String historySid : histories) { for (String historySid : histories) {
@ -755,12 +747,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
qw.like("p.orgSidPath", orgSidPath); qw.like("p.orgSidPath", orgSidPath);
qw.ne("h.buckleKey", "002"); qw.ne("h.buckleKey", "002");
qw.ne("h.buckleKey", "003"); qw.ne("h.buckleKey", "003");
List<String> monthHeadAndLast = getMonthHeadAndLast(new Date()); qw.eq("h.updateState","1");
String head = monthHeadAndLast.get(0);
String last = monthHeadAndLast.get(1);
qw.apply(StringUtils.isNotEmpty(head), "date_format (h.actualDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(last), "date_format (h.actualDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')"
);
List<LoanRepaymentHistoryVo> histories = baseMapper.selbuckleNewInitList(qw); List<LoanRepaymentHistoryVo> histories = baseMapper.selbuckleNewInitList(qw);
Set<String> planSids = new HashSet<>(); Set<String> planSids = new HashSet<>();
if (!histories.isEmpty()) { if (!histories.isEmpty()) {

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsRest.java

@ -47,4 +47,11 @@ public class LoanRepaymentPlanDetailsRest implements LoanRepaymentPlanDetailsFei
public ResultBean<LoanRepaymentPlanDetails> fetchDetails(String sid) { public ResultBean<LoanRepaymentPlanDetails> fetchDetails(String sid) {
return loanRepaymentPlanDetailsService.fetchDetails(sid); return loanRepaymentPlanDetailsService.fetchDetails(sid);
} }
@Override
public ResultBean<String> updateByEntity(LoanRepaymentPlanDetails entity) {
ResultBean rb = ResultBean.fireFail();
loanRepaymentPlanDetailsService.updateById(entity);
return rb.success();
}
} }

Loading…
Cancel
Save