Commit af064aff authored by BlackJokerCJ's avatar BlackJokerCJ

Merge remote-tracking branch 'origin/master'

parents 15057f94 d11982c2
......@@ -101,7 +101,7 @@ public class CreditSubmitCommand extends AbstractCommand {
}
private CreditModel convert(CreditSubmitRequest request, CreditModel model) {
StringBuilder filePath = new StringBuilder();
StringBuilder filePath = new StringBuilder("ZN/");
filePath.append("CREDIT_DATA").append("/").append(DateUtil.format(new Date(), "yyyyMMdd")).append("/").append(request.getOrderNo()).append(".json");
model.setCreditDetailUrl(filePath.toString());
CreditInformationModel infoModel = request.getCreditData();
......
package com.jqtx.windows.command;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import com.alibaba.fastjson.JSON;
import com.jqtx.windows.common.converter.ProtocolConverter;
......@@ -24,6 +25,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.stream.Collectors;
......@@ -55,14 +57,16 @@ public class SyncLoanCommand extends AbstractCommand {
BigDecimal loanAmt = syncLoanRequest.getPlanList().stream().map(SyncLoanRequest.LoanPlan::getPlanAmt).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal raiseAmt = syncLoanRequest.getPlanList().stream().map(SyncLoanRequest.LoanPlan::getPlanBen).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal rateAmt = syncLoanRequest.getPlanList().stream().map(SyncLoanRequest.LoanPlan::getPlanXi).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal serviceAmt = syncLoanRequest.getPlanList().stream().map(SyncLoanRequest.LoanPlan::getPlanFu).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal burdenAmt = syncLoanRequest.getPlanList().stream().map(SyncLoanRequest.LoanPlan::getPlanBurden).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
loanModel.setLoanAmt(loanAmt);
loanModel.setRaiseAmt(raiseAmt);
loanModel.setServiceAmt(serviceAmt);
loanModel.setServiceAmt(BigDecimal.ZERO);
loanModel.setRateAmt(rateAmt);
loanModel.setBurdenAmt(BigDecimal.ZERO);
loanModel.setBurdenAmt(burdenAmt);
loanModel.setLoanUsage(syncLoanRequest.getLoanUsage());
loanModel.setRaiseDate(LocalDateTime.parse(syncLoanRequest.getRaiseDate()));
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime dateTime = LocalDateTime.parse(syncLoanRequest.getRaiseDate(), df);
loanModel.setRaiseDate(dateTime);
loanModel.setLoanStatus(LoanStatusEnum.BACKING.name());
loanModel.setBankAccount(syncLoanRequest.getBankAccount());
loanModel.setLoanTerm(syncLoanRequest.getLoanTerm());
......@@ -74,6 +78,8 @@ public class SyncLoanCommand extends AbstractCommand {
String planNo = iSeqNoGenerateComponent.genCommonSeqNo(BizSeqNoConfig.PLAN_NO_KEY, BizSeqNoConfig.PLAN_NO_PREFIX);
LoanPlanModel loanPlanModel = BeanUtil.toBean(loanPlan, LoanPlanModel.class);
loanPlanModel.setPlanNo(planNo);
loanPlanModel.setLoanNo(loanModel.getLoanNo());
loanPlanModel.setStatus("BACKING");
//新增
loanPlanComponent.insert(loanPlanModel);
});
......@@ -86,4 +92,12 @@ public class SyncLoanCommand extends AbstractCommand {
iProtocalFeignService.uploadProtocolPdf(uploadPdfRequest);
return JsonResult.success();
}
public static void main(String[] args) {
String dateTimeStr = "2019-11-01 11:11:11";
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime dateTime = LocalDateTime.parse(dateTimeStr, df);
System.out.println(dateTime);
}
}
......@@ -69,10 +69,6 @@ public class SyncLoanRequest {
@ApiModelProperty(value = "计划利息")
private String planXi;
@NotEmpty(message = "计划还款服务费不能为空")
@ApiModelProperty(value = "计划服务费")
private String planFu;
@NotEmpty(message = "计划还款融单费不能为空")
@ApiModelProperty(value = "计划融单费")
private String planBurden;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment