Commit d9f217f0 authored by LSL's avatar LSL

推送天思

parent 9e6a62df
......@@ -4,6 +4,7 @@ import com.jqtx.windows.component.model.LoanModel;
import com.jqtx.windows.component.model.LoanPlanModel;
import com.jqtx.windows.repository.entity.WindowsPlan;
import java.math.BigDecimal;
import java.util.List;
public interface LoanPlanComponent {
......@@ -19,4 +20,8 @@ public interface LoanPlanComponent {
long countLoanPlanByStatus(String loanNo);
List<LoanPlanModel> getWillOverdueList();
LoanPlanModel getPlanNoByPlanNo(String planNo);
BigDecimal countBackedAmtByLoanNo(String loanNo);
}
......@@ -11,6 +11,7 @@ import com.jqtx.windows.repository.mapper.WindowsPlanMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
......@@ -79,4 +80,28 @@ public class LoanPlanComponentImpl implements LoanPlanComponent {
List<LoanPlanModel> loanPlanModels = BeanUtil.copyToList(windowsPlanMapper.selectByExample(example), LoanPlanModel.class);
return loanPlanModels;
}
@Override
public LoanPlanModel getPlanNoByPlanNo(String planNo) {
WindowsPlanExample example = new WindowsPlanExample();
WindowsPlanExample.Criteria criteria = example.createCriteria();
criteria.andPlanNoEqualTo(planNo);
List<WindowsPlan> windowsPlans = windowsPlanMapper.selectByExample(example);
return windowsPlans.stream().map(m -> BeanUtil.toBean(m, LoanPlanModel.class)).findFirst().orElse(null);
}
@Override
public BigDecimal countBackedAmtByLoanNo(String loanNo) {
WindowsPlanExample example = new WindowsPlanExample();
WindowsPlanExample.Criteria criteria = example.createCriteria();
criteria.andLoanNoEqualTo(loanNo);
List<WindowsPlan> windowsPlans = windowsPlanMapper.selectByExample(example);
BigDecimal backedAmt = BigDecimal.ZERO;
for (WindowsPlan windowsPlan : windowsPlans) {
backedAmt = backedAmt.add(windowsPlan.getBackedBen()).add(windowsPlan.getBackedXi()).add(windowsPlan.getBackedFu())
.add(windowsPlan.getBackedFa()).add(windowsPlan.getBackedBurden()).add(windowsPlan.getBackedBreak());
}
return backedAmt;
}
}
/**
* tiansishangwu.com Inc. Copyright (c) 2013-2018 All Rights Reserved.
*/
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 通过网关接口同步案件请求对象
*
* @Description
* @Author dongxiaoxia
* @Date 2018/9/12 19:34
*/
@Data
public class AddCaseRequest {
@NotNull(message = "合作渠道不能为空")
@Min(value = 1, message = "合作渠道不能为空")
@ApiModelProperty(value = "合作渠道", required = true)
private Long bizChannel;
@Valid
private List<ContactRequest> contactRequests;
@Valid
private List<SimpleAttachRequest> attachments;
@Valid
private List<UrgentContactRequest> urgentContactModelList;
/**
* 客户基础信息
*/
@NotBlank(message = "客户姓名不能为空")
@ApiModelProperty(value = "客户姓名", required = true)
private String clientName;
@NotBlank(message = "证件号码不能为空")
@ApiModelProperty(value = "证件号码", required = true)
private String clientIdCard;
@ApiModelProperty(value = "手机号码", required = true)
private String clientMobile;
/**
* 案件基础信息
*/
@NotBlank(message = "还款卡号不能为空")
@ApiModelProperty(value = "还款卡号", required = true)
private String loanBankCard;
@NotBlank(message = "贷款产品名不能为空")
@ApiModelProperty(value = "贷款产品名", required = true)
private String loanName;
@NotBlank(message = "产品类型不能为空")
@ApiModelProperty(value = "产品类型", required = true)
private String productTypeCode;
@NotBlank(message = "产品类型名称不能为空")
@ApiModelProperty(value = "产品类型名称", required = true)
private String productTypeName;
@NotBlank(message = "借款编号不能为空")
@ApiModelProperty(value = "借款编号", required = true)
private String loanNo;
@NotBlank(message = "委托方案件编号不能为空")
@ApiModelProperty(value = "委托方案件编号", required = true)
private String loanCaseNo;
@ApiModelProperty(value = "放款日期", required = true)
private Date loanDate;
@NotNull(message = "还款日期不能为空")
@ApiModelProperty(value = "还款日期", required = true)
private Date loanBackDate;
@Min(value = 1, message = "总期数需要大于等于1")
@ApiModelProperty(value = "总期数", required = true)
private Integer loanTotalPeriod;
@Min(value = 0, message = "剩余期数需要大于等于0")
@ApiModelProperty(value = "剩余期数", required = true)
private Integer loanLeftPeriod;
@Min(value = 1, message = "当前期数需要大于等于1")
@ApiModelProperty(value = "当前期数", required = true)
private Integer loanCurrentPeriod;
@Min(value = 1, message = "当期天数需要大于等于1")
@ApiModelProperty(value = "当期天数", required = true)
private Integer loanCurrentPeriodDays;
@Min(value = 1, message = "委外手数需要大于等于1")
@ApiModelProperty(value = "委外手数", required = true)
private Integer loanDelegateTimes;
@DecimalMin(value = "0.00", message = "委案金额不能为负数")
@ApiModelProperty(value = "委案金额", required = true)
private BigDecimal loanDelegateAmt;
@DecimalMin(value = "0.00", message = "本次借款总金额不能为负数")
@ApiModelProperty(value = "本次借款总金额", required = true)
private BigDecimal loanTotalAmt;
/**
* 合计金额
*/
@DecimalMin(value = "0.00", message = "全部应还金额不能为负数")
@ApiModelProperty(value = "全部应还金额", required = true)
private BigDecimal totalShouldRepay;
@DecimalMin(value = "0.00", message = "全部已还金额不能为负数")
@ApiModelProperty(value = "全部已还金额", required = true)
private BigDecimal totalBackedRepay;
@DecimalMin(value = "0.00", message = "全部未还金额不能为负数")
@ApiModelProperty(value = "全部未还金额", required = true)
private BigDecimal totalUnBackedRepay;
/**
* 本金
*/
/*@DecimalMin(value = "0.00", message = "全部应还本金不能为负数")
@ApiModelProperty(value = "全部应还本金", required = true)
private BigDecimal capitalTotalShouldRepay;*/
/*@DecimalMin(value = "0.00", message = "全部已还本金不能为负数")
@ApiModelProperty(value = "全部已还本金", required = true)
private BigDecimal capitalTotalBackedRepay;*/
@DecimalMin(value = "0.00", message = "当期应还本金不能为负数")
@ApiModelProperty(value = "当期应还本金", required = true)
private BigDecimal capitalPeriodShouldRepay;
@DecimalMin(value = "0.00", message = "当期已还本金不能为负数")
@ApiModelProperty(value = "当期已还 本金", required = true)
private BigDecimal capitalPeriodBackedRepay;
/**
* 利息
*/
/*@DecimalMin(value = "0.00", message = "全部应还利息不能为负数")
@ApiModelProperty(value = "全部应还利息", required = true)
private BigDecimal interestTotalShouldRepay;*/
/*@DecimalMin(value = "0.00", message = "全部已还利息不能为负数")
@ApiModelProperty(value = "全部已还利息", required = true)
private BigDecimal interestTotalBackedRepay;*/
@DecimalMin(value = "0.00", message = "当期应还利息不能为负数")
@ApiModelProperty(value = "当期应还利息", required = true)
private BigDecimal interestPeriodShouldRepay;
@DecimalMin(value = "0.00", message = "当期已还利息不能为负数")
@ApiModelProperty(value = "当期已还利息", required = true)
private BigDecimal interestPeriodBackedRepay;
/**
* 服务费
*/
/*@DecimalMin(value = "0.00", message = "全部应还服务费不能为负数")
@ApiModelProperty(value = "全部应还服务费", required = true)
private BigDecimal feeTotalShouldRepay;*/
/*@DecimalMin(value = "0.00", message = "全部已还服务费不能为负数")
@ApiModelProperty(value = "全部已还服务费", required = true)
private BigDecimal feeTotalBackedRepay;*/
@DecimalMin(value = "0.00", message = "当期应还服务费不能为负数")
@ApiModelProperty(value = "当期应还服务费", required = true)
private BigDecimal feePeriodShouldRepay;
@DecimalMin(value = "0.00", message = "当期以已服务费不能为负数")
@ApiModelProperty(value = "当期已还服务费", required = true)
private BigDecimal feePeriodBackedRepay;
/**
* 罚息
*/
/*@DecimalMin(value = "0.00", message = "全部应还罚息不能为负数")
@ApiModelProperty(value = "全部应还罚息", required = true)
private BigDecimal punishTotalShouldRepay;*/
/*@DecimalMin(value = "0.00", message = "全部已还罚息不能为负数")
@ApiModelProperty(value = "全部已还罚息", required = true)
private BigDecimal punishTotalBackedRepay;*/
@DecimalMin(value = "0.00", message = "当期应还罚息不能为负数")
@ApiModelProperty(value = "当期应还罚息", required = true)
private BigDecimal punishPeriodShouldRepay;
@DecimalMin(value = "0.00", message = "当期已还罚息不能为负数")
@ApiModelProperty(value = "当期已还罚息", required = true)
private BigDecimal punishPeriodBackedRepay;
/**
* 客户扩展信息
*/
@Pattern(regexp = "男|女")
@ApiModelProperty(value = "性别(男|女)", required = true)
private String extGender;
/**
* 户籍所在地
*/
@ApiModelProperty(value = "户籍所在地", required = false)
private String extRegisterAddress;
/**
* 现居地地址
*/
@ApiModelProperty(value = "现居地地址", required = false)
private String extLiveAddress;
/**
* 公司名称
*/
@ApiModelProperty(value = "公司名称", required = false)
private String extCompanyName;
/**
* 公司地址
*/
@ApiModelProperty(value = "公司地址", required = false)
private String extCompanyAddress;
/**
* 职位
*/
@ApiModelProperty(value = "职位", required = false)
private String extClientJobTitle;
/**
* 公司联系电话
*/
@ApiModelProperty(value = "公司联系电话", required = false)
private String extCompanyPhone;
/**
* 家庭地址
*/
@ApiModelProperty(value = "家庭地址", required = false)
private String extHomeAddress;
/**
* 备注
*/
@ApiModelProperty(value = "备注", required = false)
private String memo;
@ApiModelProperty(value = "资金渠道", required = false)
private String fundChannel;
@ApiModelProperty(value = "bd名字", required = false)
private String bdName;
}
package com.jqtx.windows.component.tsmodel;
import lombok.Data;
/**
* @program: baoyouhua
* @description:
* @author: zq
* @create: 2022-08-31 14:21
**/
@Data
public class BackOperateModel {
/**
* bizChannel : 0
* loanCaseNo : string
* loanNo : string
* operateTime : 20210820125951
* operateType : PREREPAY:打开还款页面;REPAY:输入密码确认;REPAY_FAIL:输入密码确认,还款失败
* repayAmount : 0
* repayId : string
*/
private String bizChannel;
private String loanCaseNo;
private String loanNo;
private String operateTime;
private String operateType;
private String repayAmount;
private String repayId;
private String memo;
}
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 通过网关接口同步案件联系人请求对象
* @Description
* @Author dongxiaoxia
* @Date 2018/9/12 19:50
*/
@Data
public class ContactRequest {
/**
* 客户证件号
*/
@NotBlank(message = "证件号码不能为空")
@ApiModelProperty(value = "证件号码", required = true)
private String clientIdCard;
@NotBlank(message = "联系姓名不能为空")
@ApiModelProperty(value = "联系姓名", required = true)
private String contactName;
/**
* 联系人手机号码
*/
@NotBlank(message = "电话号码不能为空")
@ApiModelProperty(value = "电话号码", required = true)
private String contactMobile;
@NotBlank(message = "与客户的关系不能为空")
@ApiModelProperty(value = "与客户的关系", required = true)
private String relation;
/**
* 居住地址
*/
@ApiModelProperty(value = "居住地址", required = false)
private String liveAddress;
/**
* 备注
*/
@ApiModelProperty(value = "备注", required = false)
private String memo;
}
package com.jqtx.windows.component.tsmodel;
import lombok.Data;
/**
* @program: baoyouhua
* @description:
* @author: zq
* @create: 2020-05-26 13:58
**/
@Data
public class PlanOverDueAmt {
/**
* 合作渠道 ,
*/
private Long bizChannel;
/**
* 委托方案件编号
*/
private String loanCaseNo;
/**
* 应还罚息
*/
private String punishPeriodShouldRepay;
}
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import java.util.Date;
/**
* @program: asgard
* @description:
* @author: zq
* @create: 2019-12-17 16:48
**/
@Data
public class PlanRequest {
@ApiModelProperty(value = "渠道来源", required = true)
private Long bizChannel;
@DecimalMin(value = "0.00", message = " 已还本金")
@ApiModelProperty(value = " 已还本金", required = false)
private BigDecimal capitalBackedRepay;
@DecimalMin(value = "0.00", message = " 提前结清违约金")
@ApiModelProperty(value = " 提前结清违约金", required = false)
private BigDecimal defaultFine;
@DecimalMin(value = "0.00", message = " 已还服务费")
@ApiModelProperty(value = " 已还服务费", required = false)
private BigDecimal feeBackedRepay;
@DecimalMin(value = "0.00", message = " 已还利息")
@ApiModelProperty(value = " 已还利息", required = false)
private BigDecimal interestBackedRepay;
@ApiModelProperty(value = "第三方合同编号", required = false)
private String loanNo;
@ApiModelProperty(value = "资金回款方式 ", required = false)
private String payType;
@ApiModelProperty(value = "已还罚息", required = false)
private BigDecimal punishBackedRepay;
@ApiModelProperty(value = "还款时间", required = false)
private Date repayDate;
@ApiModelProperty(value = " 委托方还款业务凭证", required = false)
private String repayVoucher;
@ApiModelProperty(value = " 全部已还金额", required = false)
private BigDecimal totalBackedRepay;
@ApiModelProperty(value = " 第三方案件编号", required = false)
private String loanCaseNo;
@ApiModelProperty(value = " 借款合同状态", required = false)
private String loanState;
@ApiModelProperty(value = " 回款方式/结清还是单期", required = false)
private String backedType;
@ApiModelProperty(value = "还款时间yyyyMMddHHmmss", required = false)
private String repayTime;
private String isYtCase;
}
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* 通过网关接口同步案件联系人请求对象
*
* @Description
* @Author dongxiaoxia
* @Date 2018/9/12 19:50
*/
@Data
public class RefundRequest {
@ApiModelProperty(value = "还款时间(格式:yyyyMMddHHmmss)", required = true, example = "20210820125951")
private String repayTime;
@ApiModelProperty(value = "退款金额")
private BigDecimal refundAmount;
@NotNull(message = "合作渠道不能为空")
@Min(value = 1, message = "合作渠道不能为空")
@ApiModelProperty(value = "合作渠道", required = true, example = "请在header里传递secretKey或body里传递secretKey,代替bizChannel")
private Long bizChannel;
@ApiModelProperty(value = "第三方案件编号", required = true)
@NotBlank(message = "第三方案件编号不能为空")
private String loanCaseNo;
@ApiModelProperty(value = "委托方还款业务凭证", required = true)
@NotBlank(message = "委托方还款业务凭证不能为空")
private String repayVoucher;
private String payType;
}
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;
/**
* @program: asgard
* @description:
* @author: zq
* @create: 2019-12-17 16:48
**/
@Data
public class ResultRequest {
@DecimalMin(value = "0.00", message = "扣款金额")
@ApiModelProperty(value = "扣款金额", required = true)
private BigDecimal actualAmt;
@ApiModelProperty(value = "处理结果描述信息", required = false)
private String handleMsg;
@ApiModelProperty(value = "意向单编号", required = false)
private String intentionId;
@ApiModelProperty(value = "处理结果描述信息 ", required = false)
private String memo;
@ApiModelProperty(value = "意向单状态[SUCCESS:处理成功,FAILED:处理失败", required = false)
private String state;
private String isYtCase = "0";
}
package com.jqtx.windows.component.tsmodel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author catface
* @Description
* @Date 2018/9/30
* @Copyright tiansishangwu.com Inc. Copyright (c)
**/
@Data
@ApiModel(value = "案件附件请求模型", description = "案件附件请求模型")
public class SimpleAttachRequest {
@ApiModelProperty(value = "文件类型", required = true)
private String fileType;
@ApiModelProperty(value = "文件路径", required = true)
private String url;
}
package com.jqtx.windows.component.tsmodel;
import lombok.Data;
/**
* @program: 紧急联系人
* @description:
* @author: zq
* @create: 2020-04-07 15:45
**/
@Data
public class UrgentContactRequest {
private String urgentContactMobile;
private String urgentContactName;
private String urgentContactRelation;
}
......@@ -49,6 +49,6 @@
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<!-- 指定数据库表 -->
<table schema="windows" tableName="windows_redeem"></table>
<table schema="windows" tableName="windows_retry"></table>
</context>
</generatorConfiguration>
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